1
0
Fork 0
Commit Graph

10 Commits (01868891ee803ce54b862fdd13c89d8c5f09a4f0)

Author SHA1 Message Date
Anji Jagarlmudi 01868891ee staging: fsl_ppfe/eth: Enhance error checking in platform probe
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)
2020-02-26 04:17:43 +08:00
Calvin Johnson 658db0ba79 staging: fsl_ppfe/eth: use memremap() to map RAM area used by PFE
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>
2019-12-02 18:05:09 +08:00
Calvin Johnson 9688f347dd staging: fsl_ppfe/eth: separate mdio init from mac init
- 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>
2019-12-02 18:05:07 +08:00
Calvin Johnson e6092a5f07 staging: fsl_ppfe/eth: remove unused code
- remove gemac-bus-id related code that is unused.
- remove unused prototype gemac_set_mdc_div.

Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
2019-12-02 18:05:07 +08:00
Calvin Johnson a498d8f7a0 staging: fsl_ppfe/eth: support single interface initialization
- 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>
2019-12-02 18:05:07 +08:00
Calvin Johnson f0645177f9 staging: fsl_ppfe/eth: reorganize platform phy parameters
- 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>
2019-12-02 18:05:06 +08:00
Calvin Johnson 1783b0624b staging: fsl_ppfe/eth: Update to use SPDX identifiers
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>
2019-12-02 18:05:05 +08:00
Calvin Johnson fab313f6f0 staging: fsl_ppfe/eth: add fixed-link support
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>
2019-12-02 18:05:03 +08:00
Calvin Johnson d75972b2ca staging: fsl_ppfe/eth: resolve indentation warning
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>
2019-12-02 18:05:02 +08:00
Calvin Johnson 520f8c5cf5 staging: fsl_ppfe/eth: introduce pfe driver
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>
2019-12-02 18:04:53 +08:00