History log of /u-boot/drivers/net/mtk_eth.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>

# 0e407c74 01-May-2024 Tom Rini <trini@konsulko.com>

net: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 172e32ad 21-Jan-2024 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for XGMII interface

This patch add XGMII support for connecting 2.5G PHY.

Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 85d1968e 21-Jan-2024 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for adjusting MDIO clock

User can assign a specific MDC speed to the eth node as follow:

&eth {
...
phy-mode = "usxgmii";
phy-handle = <&phy8>;

mdio {
clock-frequency = <10500000>;
};

phy8: eth-phy@8 {
compatible = "ethernet-phy-id31c3.1c12";
...
};

Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 93eb707c 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7988 SoC

This patch adds support for MediaTek MT7988.

MT7988 features MediaTek NETSYS v3, including three GMACs, and two
of them supports 10Gbps USXGMII.

MT7988 embeds a MT7531 switch (not MCM) which supports accessing
internal registers through MMIO instead of MDIO.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 7628194d 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for NETSYS v3

This patch adds support for NETSYS v3 hardware.
Comparing to NETSYS v2, NETSYS v3 has three GMACs.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# ba026ebe 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add USXGMII support

This patch adds support for USXGMII of SoC.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 585a1a44 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for GMAC/USB3 PHY mux mode for MT7981

MT7981 has its GMAC2 PHY shared with USB3. To enable GMAC2, mux
register must be set to connect the SGMII phy to GMAC2.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# bd70f3ce 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for SGMII 1Gbps auto-negotiation mode

Existing SGMII support of mtk-eth is actually a MediaTek-specific
2.5Gbps high-speed SGMII (HSGMII) which does not support
auto-negotiation mode.

This patch adds SGMII 1Gbps auto-negotiation mode and rename the
existing HSGMII to 2500basex.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 159458d3 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add missing static qualifier

mt7531_mmd_ind_read and mt753x_switch_init are defined without static.
Since they're not used outside this file, we should add them back.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

fixup to add static qualifier

# c94ad009 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: fix direct MDIO clause 45 access via SoC

The original direct MDIO clause 45 access via SoC is missing the
data output. This patch adds it back to ensure MDIO clause 45 can
work properly for external PHYs.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# c41a058f 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: optimize the switch reset delay wait time

Not all switches requires 1 second delay after deasserting reset.
MT7531 requires only maximum 200ms.

This patch defines dedicated reset wait time for each switch chip, and will
significantly improve the boot time for boards using MT7531.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# c73d3871 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: connect switch to PSE only when starting eth is requested

So far the switch is initialized in probe stage and is connected to PSE
unconditionally. This will cause all packets being flooded to PSE and may
cause PSE hang before entering linux.

This patch changes the connection between switch and PSE:
- Still initialize switch in probe stage, but disconnect it with PSE
- Connect switch with PSE on eth start
- Disconnect on eth stop

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 29a48bf9 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7981/MT7986

This patch adds support for MediaTek MT7981 and MT7986. Both chips uses
PDMA v2.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# e7ad046b 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for PDMA v2

This patch adds support for PDMA v2 hardware. The PDMA v2 has extended the
DMA descriptor to 8-words, and some of its fields have changed comparing
to the v1 hardware.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 7d928c3f 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: stop using bitfileds for DMA descriptors

This patch is a preparation for adding a new version of PDMA of which the
DMA descriptor fields has changed. Using bitfields will result in a complex
modification. Convert bitfields to u32 units can solve this problem easily.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

# 62596725 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: use a struct to cover variations of all SoCs

Using a single soc id to control different initialization and TX/RX flow
for all SoCs is not extensible if more hardware variations are added in
the future.

This patch introduces a struct to replace the original mtk_soc to allow
the driver be able handle newer hardwares.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

# ad80d489 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7621 SoC

This patch adds GMAC support for MediaTek MT7621 SoC.
MT7621 has the same GMAC/Switch configuration as MT7623.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 86062e7a 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: use regmap api to modify ethsys registers

The address returned by regmap_get_range() is not remapped. Directly r/w
to this address is ok for ARM platforms since it's idential to the virtual
address.

But for MIPS platform only virtual address should be used for access.
To solve this issue, the regmap api regmap_read/regmap_write should be used
since they will remap address before accessing.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 528e483a 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: remap iobase address

The iobase address from dts node is actually physical address. It's
identical to the virtual address in ARM platform. This is ok because this
driver was used only by ARM platforms (mt7622/mt7623 ...).

But now this driver will be used by mt7621 which is a MIPS SoC. For MIPS
platform the physical address space is mapped to KSEG0 and KSEG1 and this
makes the virtual address apparently not idential to its physical address.

To solve this issue, this patch replaces dev_read_addr with dev_remap_addr
to get the remapped iobase address.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# ffb0f6f4 06-Apr-2022 Marek Behún <kabel@kernel.org>

treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA

Rename constant PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA to make
it compatible with Linux' naming.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>

# 123ca114 06-Apr-2022 Marek Behún <kabel@kernel.org>

net: introduce helpers to get PHY interface mode from a device/ofnode

Add helpers ofnode_read_phy_mode() and dev_read_phy_mode() to parse the
"phy-mode" / "phy-connection-type" property. Add corresponding UT test.

Use them treewide.

This allows us to inline the phy_get_interface_by_name() into
ofnode_read_phy_mode(), since the former is not used anymore.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>

# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>

# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# 2548493a 16-Jul-2020 Masahiro Yamada <masahiroy@kernel.org>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>

# 60e7fa8b 16-Jul-2020 Masahiro Yamada <masahiroy@kernel.org>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>

# 9a8942b5 11-Feb-2020 Tom Rini <trini@konsulko.com>

Merge tag 'dm-pull-6feb20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

sandbox conversion to SDL2
TPM TEE driver
Various minor sandbox video enhancements
New driver model core utility functions


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>

# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>

# 0e407c74 01-May-2024 Tom Rini <trini@konsulko.com>

net: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 172e32ad 21-Jan-2024 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for XGMII interface

This patch add XGMII support for connecting 2.5G PHY.

Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 85d1968e 21-Jan-2024 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for adjusting MDIO clock

User can assign a specific MDC speed to the eth node as follow:

&eth {
...
phy-mode = "usxgmii";
phy-handle = <&phy8>;

mdio {
clock-frequency = <10500000>;
};

phy8: eth-phy@8 {
compatible = "ethernet-phy-id31c3.1c12";
...
};

Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 93eb707c 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7988 SoC

This patch adds support for MediaTek MT7988.

MT7988 features MediaTek NETSYS v3, including three GMACs, and two
of them supports 10Gbps USXGMII.

MT7988 embeds a MT7531 switch (not MCM) which supports accessing
internal registers through MMIO instead of MDIO.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 7628194d 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for NETSYS v3

This patch adds support for NETSYS v3 hardware.
Comparing to NETSYS v2, NETSYS v3 has three GMACs.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# ba026ebe 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add USXGMII support

This patch adds support for USXGMII of SoC.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 585a1a44 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for GMAC/USB3 PHY mux mode for MT7981

MT7981 has its GMAC2 PHY shared with USB3. To enable GMAC2, mux
register must be set to connect the SGMII phy to GMAC2.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# bd70f3ce 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for SGMII 1Gbps auto-negotiation mode

Existing SGMII support of mtk-eth is actually a MediaTek-specific
2.5Gbps high-speed SGMII (HSGMII) which does not support
auto-negotiation mode.

This patch adds SGMII 1Gbps auto-negotiation mode and rename the
existing HSGMII to 2500basex.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 159458d3 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add missing static qualifier

mt7531_mmd_ind_read and mt753x_switch_init are defined without static.
Since they're not used outside this file, we should add them back.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

fixup to add static qualifier

# c94ad009 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: fix direct MDIO clause 45 access via SoC

The original direct MDIO clause 45 access via SoC is missing the
data output. This patch adds it back to ensure MDIO clause 45 can
work properly for external PHYs.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# c41a058f 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: optimize the switch reset delay wait time

Not all switches requires 1 second delay after deasserting reset.
MT7531 requires only maximum 200ms.

This patch defines dedicated reset wait time for each switch chip, and will
significantly improve the boot time for boards using MT7531.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# c73d3871 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: connect switch to PSE only when starting eth is requested

So far the switch is initialized in probe stage and is connected to PSE
unconditionally. This will cause all packets being flooded to PSE and may
cause PSE hang before entering linux.

This patch changes the connection between switch and PSE:
- Still initialize switch in probe stage, but disconnect it with PSE
- Connect switch with PSE on eth start
- Disconnect on eth stop

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 29a48bf9 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7981/MT7986

This patch adds support for MediaTek MT7981 and MT7986. Both chips uses
PDMA v2.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# e7ad046b 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for PDMA v2

This patch adds support for PDMA v2 hardware. The PDMA v2 has extended the
DMA descriptor to 8-words, and some of its fields have changed comparing
to the v1 hardware.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 7d928c3f 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: stop using bitfileds for DMA descriptors

This patch is a preparation for adding a new version of PDMA of which the
DMA descriptor fields has changed. Using bitfields will result in a complex
modification. Convert bitfields to u32 units can solve this problem easily.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

# 62596725 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: use a struct to cover variations of all SoCs

Using a single soc id to control different initialization and TX/RX flow
for all SoCs is not extensible if more hardware variations are added in
the future.

This patch introduces a struct to replace the original mtk_soc to allow
the driver be able handle newer hardwares.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

# ad80d489 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7621 SoC

This patch adds GMAC support for MediaTek MT7621 SoC.
MT7621 has the same GMAC/Switch configuration as MT7623.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 86062e7a 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: use regmap api to modify ethsys registers

The address returned by regmap_get_range() is not remapped. Directly r/w
to this address is ok for ARM platforms since it's idential to the virtual
address.

But for MIPS platform only virtual address should be used for access.
To solve this issue, the regmap api regmap_read/regmap_write should be used
since they will remap address before accessing.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 528e483a 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: remap iobase address

The iobase address from dts node is actually physical address. It's
identical to the virtual address in ARM platform. This is ok because this
driver was used only by ARM platforms (mt7622/mt7623 ...).

But now this driver will be used by mt7621 which is a MIPS SoC. For MIPS
platform the physical address space is mapped to KSEG0 and KSEG1 and this
makes the virtual address apparently not idential to its physical address.

To solve this issue, this patch replaces dev_read_addr with dev_remap_addr
to get the remapped iobase address.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# ffb0f6f4 06-Apr-2022 Marek Behún <kabel@kernel.org>

treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA

Rename constant PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA to make
it compatible with Linux' naming.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>

# 123ca114 06-Apr-2022 Marek Behún <kabel@kernel.org>

net: introduce helpers to get PHY interface mode from a device/ofnode

Add helpers ofnode_read_phy_mode() and dev_read_phy_mode() to parse the
"phy-mode" / "phy-connection-type" property. Add corresponding UT test.

Use them treewide.

This allows us to inline the phy_get_interface_by_name() into
ofnode_read_phy_mode(), since the former is not used anymore.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>

# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>

# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# 2548493a 16-Jul-2020 Masahiro Yamada <masahiroy@kernel.org>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>

# 60e7fa8b 16-Jul-2020 Masahiro Yamada <masahiroy@kernel.org>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>

# 9a8942b5 11-Feb-2020 Tom Rini <trini@konsulko.com>

Merge tag 'dm-pull-6feb20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

sandbox conversion to SDL2
TPM TEE driver
Various minor sandbox video enhancements
New driver model core utility functions


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>

# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>

# 172e32ad 21-Jan-2024 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for XGMII interface

This patch add XGMII support for connecting 2.5G PHY.

Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 85d1968e 21-Jan-2024 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for adjusting MDIO clock

User can assign a specific MDC speed to the eth node as follow:

&eth {
...
phy-mode = "usxgmii";
phy-handle = <&phy8>;

mdio {
clock-frequency = <10500000>;
};

phy8: eth-phy@8 {
compatible = "ethernet-phy-id31c3.1c12";
...
};

Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 93eb707c 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7988 SoC

This patch adds support for MediaTek MT7988.

MT7988 features MediaTek NETSYS v3, including three GMACs, and two
of them supports 10Gbps USXGMII.

MT7988 embeds a MT7531 switch (not MCM) which supports accessing
internal registers through MMIO instead of MDIO.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 7628194d 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for NETSYS v3

This patch adds support for NETSYS v3 hardware.
Comparing to NETSYS v2, NETSYS v3 has three GMACs.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# ba026ebe 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add USXGMII support

This patch adds support for USXGMII of SoC.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 585a1a44 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for GMAC/USB3 PHY mux mode for MT7981

MT7981 has its GMAC2 PHY shared with USB3. To enable GMAC2, mux
register must be set to connect the SGMII phy to GMAC2.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# bd70f3ce 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for SGMII 1Gbps auto-negotiation mode

Existing SGMII support of mtk-eth is actually a MediaTek-specific
2.5Gbps high-speed SGMII (HSGMII) which does not support
auto-negotiation mode.

This patch adds SGMII 1Gbps auto-negotiation mode and rename the
existing HSGMII to 2500basex.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 159458d3 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add missing static qualifier

mt7531_mmd_ind_read and mt753x_switch_init are defined without static.
Since they're not used outside this file, we should add them back.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

fixup to add static qualifier

# c94ad009 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: fix direct MDIO clause 45 access via SoC

The original direct MDIO clause 45 access via SoC is missing the
data output. This patch adds it back to ensure MDIO clause 45 can
work properly for external PHYs.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# c41a058f 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: optimize the switch reset delay wait time

Not all switches requires 1 second delay after deasserting reset.
MT7531 requires only maximum 200ms.

This patch defines dedicated reset wait time for each switch chip, and will
significantly improve the boot time for boards using MT7531.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# c73d3871 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: connect switch to PSE only when starting eth is requested

So far the switch is initialized in probe stage and is connected to PSE
unconditionally. This will cause all packets being flooded to PSE and may
cause PSE hang before entering linux.

This patch changes the connection between switch and PSE:
- Still initialize switch in probe stage, but disconnect it with PSE
- Connect switch with PSE on eth start
- Disconnect on eth stop

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 29a48bf9 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7981/MT7986

This patch adds support for MediaTek MT7981 and MT7986. Both chips uses
PDMA v2.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# e7ad046b 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for PDMA v2

This patch adds support for PDMA v2 hardware. The PDMA v2 has extended the
DMA descriptor to 8-words, and some of its fields have changed comparing
to the v1 hardware.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 7d928c3f 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: stop using bitfileds for DMA descriptors

This patch is a preparation for adding a new version of PDMA of which the
DMA descriptor fields has changed. Using bitfields will result in a complex
modification. Convert bitfields to u32 units can solve this problem easily.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

# 62596725 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: use a struct to cover variations of all SoCs

Using a single soc id to control different initialization and TX/RX flow
for all SoCs is not extensible if more hardware variations are added in
the future.

This patch introduces a struct to replace the original mtk_soc to allow
the driver be able handle newer hardwares.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

# ad80d489 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7621 SoC

This patch adds GMAC support for MediaTek MT7621 SoC.
MT7621 has the same GMAC/Switch configuration as MT7623.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 86062e7a 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: use regmap api to modify ethsys registers

The address returned by regmap_get_range() is not remapped. Directly r/w
to this address is ok for ARM platforms since it's idential to the virtual
address.

But for MIPS platform only virtual address should be used for access.
To solve this issue, the regmap api regmap_read/regmap_write should be used
since they will remap address before accessing.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 528e483a 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: remap iobase address

The iobase address from dts node is actually physical address. It's
identical to the virtual address in ARM platform. This is ok because this
driver was used only by ARM platforms (mt7622/mt7623 ...).

But now this driver will be used by mt7621 which is a MIPS SoC. For MIPS
platform the physical address space is mapped to KSEG0 and KSEG1 and this
makes the virtual address apparently not idential to its physical address.

To solve this issue, this patch replaces dev_read_addr with dev_remap_addr
to get the remapped iobase address.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# ffb0f6f4 06-Apr-2022 Marek Behún <kabel@kernel.org>

treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA

Rename constant PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA to make
it compatible with Linux' naming.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>

# 123ca114 06-Apr-2022 Marek Behún <kabel@kernel.org>

net: introduce helpers to get PHY interface mode from a device/ofnode

Add helpers ofnode_read_phy_mode() and dev_read_phy_mode() to parse the
"phy-mode" / "phy-connection-type" property. Add corresponding UT test.

Use them treewide.

This allows us to inline the phy_get_interface_by_name() into
ofnode_read_phy_mode(), since the former is not used anymore.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>

# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>

# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# 2548493a 16-Jul-2020 Masahiro Yamada <masahiroy@kernel.org>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>

# 60e7fa8b 16-Jul-2020 Masahiro Yamada <masahiroy@kernel.org>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>

# 9a8942b5 11-Feb-2020 Tom Rini <trini@konsulko.com>

Merge tag 'dm-pull-6feb20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

sandbox conversion to SDL2
TPM TEE driver
Various minor sandbox video enhancements
New driver model core utility functions


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>

# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>

# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 93eb707c 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7988 SoC

This patch adds support for MediaTek MT7988.

MT7988 features MediaTek NETSYS v3, including three GMACs, and two
of them supports 10Gbps USXGMII.

MT7988 embeds a MT7531 switch (not MCM) which supports accessing
internal registers through MMIO instead of MDIO.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 7628194d 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for NETSYS v3

This patch adds support for NETSYS v3 hardware.
Comparing to NETSYS v2, NETSYS v3 has three GMACs.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# ba026ebe 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add USXGMII support

This patch adds support for USXGMII of SoC.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 585a1a44 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for GMAC/USB3 PHY mux mode for MT7981

MT7981 has its GMAC2 PHY shared with USB3. To enable GMAC2, mux
register must be set to connect the SGMII phy to GMAC2.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# bd70f3ce 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for SGMII 1Gbps auto-negotiation mode

Existing SGMII support of mtk-eth is actually a MediaTek-specific
2.5Gbps high-speed SGMII (HSGMII) which does not support
auto-negotiation mode.

This patch adds SGMII 1Gbps auto-negotiation mode and rename the
existing HSGMII to 2500basex.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 159458d3 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add missing static qualifier

mt7531_mmd_ind_read and mt753x_switch_init are defined without static.
Since they're not used outside this file, we should add them back.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

fixup to add static qualifier

# c94ad009 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: fix direct MDIO clause 45 access via SoC

The original direct MDIO clause 45 access via SoC is missing the
data output. This patch adds it back to ensure MDIO clause 45 can
work properly for external PHYs.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# c41a058f 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: optimize the switch reset delay wait time

Not all switches requires 1 second delay after deasserting reset.
MT7531 requires only maximum 200ms.

This patch defines dedicated reset wait time for each switch chip, and will
significantly improve the boot time for boards using MT7531.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# c73d3871 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: connect switch to PSE only when starting eth is requested

So far the switch is initialized in probe stage and is connected to PSE
unconditionally. This will cause all packets being flooded to PSE and may
cause PSE hang before entering linux.

This patch changes the connection between switch and PSE:
- Still initialize switch in probe stage, but disconnect it with PSE
- Connect switch with PSE on eth start
- Disconnect on eth stop

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 29a48bf9 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7981/MT7986

This patch adds support for MediaTek MT7981 and MT7986. Both chips uses
PDMA v2.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# e7ad046b 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for PDMA v2

This patch adds support for PDMA v2 hardware. The PDMA v2 has extended the
DMA descriptor to 8-words, and some of its fields have changed comparing
to the v1 hardware.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 7d928c3f 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: stop using bitfileds for DMA descriptors

This patch is a preparation for adding a new version of PDMA of which the
DMA descriptor fields has changed. Using bitfields will result in a complex
modification. Convert bitfields to u32 units can solve this problem easily.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

# 62596725 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: use a struct to cover variations of all SoCs

Using a single soc id to control different initialization and TX/RX flow
for all SoCs is not extensible if more hardware variations are added in
the future.

This patch introduces a struct to replace the original mtk_soc to allow
the driver be able handle newer hardwares.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

# ad80d489 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7621 SoC

This patch adds GMAC support for MediaTek MT7621 SoC.
MT7621 has the same GMAC/Switch configuration as MT7623.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 86062e7a 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: use regmap api to modify ethsys registers

The address returned by regmap_get_range() is not remapped. Directly r/w
to this address is ok for ARM platforms since it's idential to the virtual
address.

But for MIPS platform only virtual address should be used for access.
To solve this issue, the regmap api regmap_read/regmap_write should be used
since they will remap address before accessing.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 528e483a 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: remap iobase address

The iobase address from dts node is actually physical address. It's
identical to the virtual address in ARM platform. This is ok because this
driver was used only by ARM platforms (mt7622/mt7623 ...).

But now this driver will be used by mt7621 which is a MIPS SoC. For MIPS
platform the physical address space is mapped to KSEG0 and KSEG1 and this
makes the virtual address apparently not idential to its physical address.

To solve this issue, this patch replaces dev_read_addr with dev_remap_addr
to get the remapped iobase address.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# ffb0f6f4 06-Apr-2022 Marek Behún <kabel@kernel.org>

treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA

Rename constant PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA to make
it compatible with Linux' naming.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>

# 123ca114 06-Apr-2022 Marek Behún <kabel@kernel.org>

net: introduce helpers to get PHY interface mode from a device/ofnode

Add helpers ofnode_read_phy_mode() and dev_read_phy_mode() to parse the
"phy-mode" / "phy-connection-type" property. Add corresponding UT test.

Use them treewide.

This allows us to inline the phy_get_interface_by_name() into
ofnode_read_phy_mode(), since the former is not used anymore.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>

# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>

# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# 2548493a 16-Jul-2020 Masahiro Yamada <masahiroy@kernel.org>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>

# 60e7fa8b 16-Jul-2020 Masahiro Yamada <masahiroy@kernel.org>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>

# 9a8942b5 11-Feb-2020 Tom Rini <trini@konsulko.com>

Merge tag 'dm-pull-6feb20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

sandbox conversion to SDL2
TPM TEE driver
Various minor sandbox video enhancements
New driver model core utility functions


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>

# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>

# 93eb707c 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7988 SoC

This patch adds support for MediaTek MT7988.

MT7988 features MediaTek NETSYS v3, including three GMACs, and two
of them supports 10Gbps USXGMII.

MT7988 embeds a MT7531 switch (not MCM) which supports accessing
internal registers through MMIO instead of MDIO.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 7628194d 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for NETSYS v3

This patch adds support for NETSYS v3 hardware.
Comparing to NETSYS v2, NETSYS v3 has three GMACs.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# ba026ebe 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add USXGMII support

This patch adds support for USXGMII of SoC.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 585a1a44 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for GMAC/USB3 PHY mux mode for MT7981

MT7981 has its GMAC2 PHY shared with USB3. To enable GMAC2, mux
register must be set to connect the SGMII phy to GMAC2.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# bd70f3ce 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for SGMII 1Gbps auto-negotiation mode

Existing SGMII support of mtk-eth is actually a MediaTek-specific
2.5Gbps high-speed SGMII (HSGMII) which does not support
auto-negotiation mode.

This patch adds SGMII 1Gbps auto-negotiation mode and rename the
existing HSGMII to 2500basex.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 159458d3 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add missing static qualifier

mt7531_mmd_ind_read and mt753x_switch_init are defined without static.
Since they're not used outside this file, we should add them back.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

fixup to add static qualifier

# c94ad009 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: fix direct MDIO clause 45 access via SoC

The original direct MDIO clause 45 access via SoC is missing the
data output. This patch adds it back to ensure MDIO clause 45 can
work properly for external PHYs.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# c41a058f 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: optimize the switch reset delay wait time

Not all switches requires 1 second delay after deasserting reset.
MT7531 requires only maximum 200ms.

This patch defines dedicated reset wait time for each switch chip, and will
significantly improve the boot time for boards using MT7531.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# c73d3871 19-Jul-2023 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: connect switch to PSE only when starting eth is requested

So far the switch is initialized in probe stage and is connected to PSE
unconditionally. This will cause all packets being flooded to PSE and may
cause PSE hang before entering linux.

This patch changes the connection between switch and PSE:
- Still initialize switch in probe stage, but disconnect it with PSE
- Connect switch with PSE on eth start
- Disconnect on eth stop

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 29a48bf9 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7981/MT7986

This patch adds support for MediaTek MT7981 and MT7986. Both chips uses
PDMA v2.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# e7ad046b 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for PDMA v2

This patch adds support for PDMA v2 hardware. The PDMA v2 has extended the
DMA descriptor to 8-words, and some of its fields have changed comparing
to the v1 hardware.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 7d928c3f 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: stop using bitfileds for DMA descriptors

This patch is a preparation for adding a new version of PDMA of which the
DMA descriptor fields has changed. Using bitfields will result in a complex
modification. Convert bitfields to u32 units can solve this problem easily.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

# 62596725 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: use a struct to cover variations of all SoCs

Using a single soc id to control different initialization and TX/RX flow
for all SoCs is not extensible if more hardware variations are added in
the future.

This patch introduces a struct to replace the original mtk_soc to allow
the driver be able handle newer hardwares.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

# ad80d489 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7621 SoC

This patch adds GMAC support for MediaTek MT7621 SoC.
MT7621 has the same GMAC/Switch configuration as MT7623.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 86062e7a 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: use regmap api to modify ethsys registers

The address returned by regmap_get_range() is not remapped. Directly r/w
to this address is ok for ARM platforms since it's idential to the virtual
address.

But for MIPS platform only virtual address should be used for access.
To solve this issue, the regmap api regmap_read/regmap_write should be used
since they will remap address before accessing.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 528e483a 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: remap iobase address

The iobase address from dts node is actually physical address. It's
identical to the virtual address in ARM platform. This is ok because this
driver was used only by ARM platforms (mt7622/mt7623 ...).

But now this driver will be used by mt7621 which is a MIPS SoC. For MIPS
platform the physical address space is mapped to KSEG0 and KSEG1 and this
makes the virtual address apparently not idential to its physical address.

To solve this issue, this patch replaces dev_read_addr with dev_remap_addr
to get the remapped iobase address.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# ffb0f6f4 06-Apr-2022 Marek Behún <kabel@kernel.org>

treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA

Rename constant PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA to make
it compatible with Linux' naming.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>

# 123ca114 06-Apr-2022 Marek Behún <kabel@kernel.org>

net: introduce helpers to get PHY interface mode from a device/ofnode

Add helpers ofnode_read_phy_mode() and dev_read_phy_mode() to parse the
"phy-mode" / "phy-connection-type" property. Add corresponding UT test.

Use them treewide.

This allows us to inline the phy_get_interface_by_name() into
ofnode_read_phy_mode(), since the former is not used anymore.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>

# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>

# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# 2548493a 16-Jul-2020 Masahiro Yamada <masahiroy@kernel.org>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>

# 60e7fa8b 16-Jul-2020 Masahiro Yamada <masahiroy@kernel.org>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>

# 9a8942b5 11-Feb-2020 Tom Rini <trini@konsulko.com>

Merge tag 'dm-pull-6feb20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

sandbox conversion to SDL2
TPM TEE driver
Various minor sandbox video enhancements
New driver model core utility functions


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>

# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>

# 29a48bf9 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7981/MT7986

This patch adds support for MediaTek MT7981 and MT7986. Both chips uses
PDMA v2.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# e7ad046b 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for PDMA v2

This patch adds support for PDMA v2 hardware. The PDMA v2 has extended the
DMA descriptor to 8-words, and some of its fields have changed comparing
to the v1 hardware.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 7d928c3f 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: stop using bitfileds for DMA descriptors

This patch is a preparation for adding a new version of PDMA of which the
DMA descriptor fields has changed. Using bitfields will result in a complex
modification. Convert bitfields to u32 units can solve this problem easily.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

# 62596725 09-Sep-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: use a struct to cover variations of all SoCs

Using a single soc id to control different initialization and TX/RX flow
for all SoCs is not extensible if more hardware variations are added in
the future.

This patch introduces a struct to replace the original mtk_soc to allow
the driver be able handle newer hardwares.

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

# ad80d489 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7621 SoC

This patch adds GMAC support for MediaTek MT7621 SoC.
MT7621 has the same GMAC/Switch configuration as MT7623.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 86062e7a 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: use regmap api to modify ethsys registers

The address returned by regmap_get_range() is not remapped. Directly r/w
to this address is ok for ARM platforms since it's idential to the virtual
address.

But for MIPS platform only virtual address should be used for access.
To solve this issue, the regmap api regmap_read/regmap_write should be used
since they will remap address before accessing.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 528e483a 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: remap iobase address

The iobase address from dts node is actually physical address. It's
identical to the virtual address in ARM platform. This is ok because this
driver was used only by ARM platforms (mt7622/mt7623 ...).

But now this driver will be used by mt7621 which is a MIPS SoC. For MIPS
platform the physical address space is mapped to KSEG0 and KSEG1 and this
makes the virtual address apparently not idential to its physical address.

To solve this issue, this patch replaces dev_read_addr with dev_remap_addr
to get the remapped iobase address.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# ffb0f6f4 06-Apr-2022 Marek Behún <kabel@kernel.org>

treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA

Rename constant PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA to make
it compatible with Linux' naming.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>

# 123ca114 06-Apr-2022 Marek Behún <kabel@kernel.org>

net: introduce helpers to get PHY interface mode from a device/ofnode

Add helpers ofnode_read_phy_mode() and dev_read_phy_mode() to parse the
"phy-mode" / "phy-connection-type" property. Add corresponding UT test.

Use them treewide.

This allows us to inline the phy_get_interface_by_name() into
ofnode_read_phy_mode(), since the former is not used anymore.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>

# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>

# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>

# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>

# 9a8942b5 11-Feb-2020 Tom Rini <trini@konsulko.com>

Merge tag 'dm-pull-6feb20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

sandbox conversion to SDL2
TPM TEE driver
Various minor sandbox video enhancements
New driver model core utility functions


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>

# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>

# ad80d489 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: add support for MediaTek MT7621 SoC

This patch adds GMAC support for MediaTek MT7621 SoC.
MT7621 has the same GMAC/Switch configuration as MT7623.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 86062e7a 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: use regmap api to modify ethsys registers

The address returned by regmap_get_range() is not remapped. Directly r/w
to this address is ok for ARM platforms since it's idential to the virtual
address.

But for MIPS platform only virtual address should be used for access.
To solve this issue, the regmap api regmap_read/regmap_write should be used
since they will remap address before accessing.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# 528e483a 19-May-2022 Weijie Gao <weijie.gao@mediatek.com>

net: mediatek: remap iobase address

The iobase address from dts node is actually physical address. It's
identical to the virtual address in ARM platform. This is ok because this
driver was used only by ARM platforms (mt7622/mt7623 ...).

But now this driver will be used by mt7621 which is a MIPS SoC. For MIPS
platform the physical address space is mapped to KSEG0 and KSEG1 and this
makes the virtual address apparently not idential to its physical address.

To solve this issue, this patch replaces dev_read_addr with dev_remap_addr
to get the remapped iobase address.

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>

# ffb0f6f4 06-Apr-2022 Marek Behún <marek.behun@nic.cz>

treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA

Rename constant PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA to make
it compatible with Linux' naming.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>

# 123ca114 06-Apr-2022 Marek Behún <marek.behun@nic.cz>

net: introduce helpers to get PHY interface mode from a device/ofnode

Add helpers ofnode_read_phy_mode() and dev_read_phy_mode() to parse the
"phy-mode" / "phy-connection-type" property. Add corresponding UT test.

Use them treewide.

This allows us to inline the phy_get_interface_by_name() into
ofnode_read_phy_mode(), since the former is not used anymore.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>

# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>

# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>

# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>

# 9a8942b5 11-Feb-2020 Tom Rini <trini@konsulko.com>

Merge tag 'dm-pull-6feb20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

sandbox conversion to SDL2
TPM TEE driver
Various minor sandbox video enhancements
New driver model core utility functions


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>

# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>

# ffb0f6f4 06-Apr-2022 Marek Behún <marek.behun@nic.cz>

treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA

Rename constant PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA to make
it compatible with Linux' naming.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>

# 123ca114 06-Apr-2022 Marek Behún <marek.behun@nic.cz>

net: introduce helpers to get PHY interface mode from a device/ofnode

Add helpers ofnode_read_phy_mode() and dev_read_phy_mode() to parse the
"phy-mode" / "phy-connection-type" property. Add corresponding UT test.

Use them treewide.

This allows us to inline the phy_get_interface_by_name() into
ofnode_read_phy_mode(), since the former is not used anymore.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>

# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>

# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>

# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>

# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>

# 9a8942b5 11-Feb-2020 Tom Rini <trini@konsulko.com>

Merge tag 'dm-pull-6feb20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

sandbox conversion to SDL2
TPM TEE driver
Various minor sandbox video enhancements
New driver model core utility functions


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>

# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>

# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>

# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# d1998a9f 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename ofdata_to_platdata() to of_to_plat()

This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c69cda25 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename dev_get_platdata() to dev_get_plat()

Rename this to be consistent with the change from 'platdata'.

Signed-off-by: Simon Glass <sjg@chromium.org>


# caa4daa2 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename 'platdata' variables to just 'plat'

We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# f0236b70 19-Jun-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 2548493a 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 7208396b 24-Jul-2020 Tom Rini <trini@konsulko.com>

Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"

This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.

Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649

Signed-off-by: Tom Rini <trini@konsulko.com>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 60e7fa8b 16-Jul-2020 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: convert devfdt_get_addr() to dev_read_addr()

When you enable CONFIG_OF_LIVE, you will end up with a lot of
conversions.

To generate this commit, I used coccinelle excluding drivers/core/,
include/dm/, and test/

The semantic patch that makes this change is as follows:

<smpl>
@@
expression dev;
@@
-devfdt_get_addr(dev)
+dev_read_addr(dev)
</smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# c05ed00a 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/delay.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 90526e9f 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop net.h from common header

Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 532de8d9 18-Feb-2020 Landen Chao <landen.chao@mediatek.com>

eth: mtk-eth: add mt7531 switch support in mediatek eth driver

mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same
MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5
supports RGMII or SGMII in different model.

mt7531 is connected to mt7622 via both RGMII and SGMII interfaces.
In this patch, mt7531 cpu port5 or port6 is configured to maximum
capability to align CPU MAC setting.

The dts has been committed in the commit 6efa450565cdc ("arm: dts:
mediatek: add ethernet and sgmii dts node for mt7622")

Signed-off-by: Landen Chao <landen.chao@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 47b1431d 31-Jan-2020 Frank Wunderlich <frank-w@public-files.de>

eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

"error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>


# e395717c 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# b4ef49a9 21-Jan-2020 MarkLee <Mark-MC.Lee@mediatek.com>

eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# 1eb69ae4 14-Nov-2019 Simon Glass <sjg@chromium.org>

common: Move ARM cache operations out of common.h

These functions are CPU-related and do not use driver model. Move them to
cpu_func.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>


# ebb97ea8 28-Apr-2019 Weijie Gao <weijie.gao@mediatek.com>

eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>


# 23f17164 20-Dec-2018 Weijie Gao <weijie.gao@mediatek.com>

ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>