Fix the kernel crash when MAC addr is not passed in dtb.
Signed-off-by: Anji Jagarlmudi <anji.jagarlmudi@nxp.com>
(cherry picked from commit 2be5e9c740060b58e962db4c9c20161b0c656ea9)
RAM area used by PFE should be mapped using memremap() instead of
directly traslating physical addr to virtual. This will ensure proper
checks are done before the area is used.
Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
- separate mdio initialization from mac initialization
- Define pfe_mdio_priv_s structure to hold mii_bus structure and other
related data.
- Modify functions to work with the separted mdio init model.
Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
- arrange members of struct mii_bus in sequence matching phy.h
- if mdio node is defined, use of_mdiobus_register to register
child nodes (phy devices) available on the mdio bus.
- remove of_phy_register_fixed_link from pfe_phy_init as it is being
handled in pfe_get_gemac_if_properties
- remove mdio enabled check
- skip phy init, if no PHY or fixed-link
Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
- Use "phy-handle" and of_* functions to get phy node and fixed-link
parameters
- Reorganize phy parameters and initialize them only if phy-handle
or fixed-link is defined in the dtb.
- correct typo pfe_get_gemac_if_proprties to pfe_get_gemac_if_properties
Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
Replace license text with corresponding SPDX identifiers and update the
format of existing SPDX identifiers to follow the new guideline
Documentation/process/license-rules.rst.
Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
In cases where MAC is not connected to a normal MDIO-managed PHY
device, and instead to a switch, it is configured as a "fixed-link".
Code to handle this scenario is added here.
phy_node in the dtb is checked to identify a fixed-link.
On identification of a fixed-link, it is registered and connected.
Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
Resolve the following indentation warning:
drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c:
In function ‘pfe_get_gemac_if_proprties’:
drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c:96:2:
warning: this ‘else’ clause does not guard...
[-Wmisleading-indentation]
else
^~~~
drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c:98:3:
note: ...this statement, but the latter is misleadingly indented as
if it were guarded by the ‘else’
pdata->ls1012a_eth_pdata[port].mdio_muxval = phy_id;
^~~~~
Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
This patch introduces Linux support for NXP's LS1012A Packet
Forwarding Engine (pfe_eth). LS1012A uses hardware packet forwarding
engine to provide high performance Ethernet interfaces. The device
includes two Ethernet ports.
Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
Signed-off-by: Anjaneyulu Jagarlmudi <anji.jagarlmudi@nxp.com>