mbox series

[0/3] Add support for Actions Semi Owl Ethernet MAC

Message ID cover.1615423279.git.cristian.ciocaltea@gmail.com
Headers show
Series Add support for Actions Semi Owl Ethernet MAC | expand

Message

Cristian Ciocaltea March 11, 2021, 1:20 a.m. UTC
This patch series adds support for the Ethernet MAC found on the Actions
Semi Owl family of SoCs.

For the moment I have only tested the driver on RoseapplePi SBC, which is
based on the S500 SoC variant. It might work on S900 as well, but I cannot
tell for sure since the S900 datasheet I currently have doesn't provide
any information regarding the MAC registers - so I couldn't check the
compatibility with S500.

Similar story for S700: the datasheet I own is incomplete, but it seems
the MAC is advertised with Gigabit capabilities. For that reason most
probably we need to extend the current implementation in order to support
this SoC variant as well.

Please note that for testing the driver it is also necessary to update the
S500 clock subsystem:

https://lore.kernel.org/lkml/cover.1615221459.git.cristian.ciocaltea@gmail.com/

The DTS changes for the S500 SBCs will be provided separately.

Thanks,
Cristi

Cristian Ciocaltea (3):
  dt-bindings: net: Add Actions Semi Owl Ethernet MAC binding
  net: ethernet: actions: Add Actions Semi Owl Ethernet MAC driver
  MAINTAINERS: Add entries for Actions Semi Owl Ethernet MAC

 .../bindings/net/actions,owl-emac.yaml        |   91 +
 MAINTAINERS                                   |    2 +
 drivers/net/ethernet/Kconfig                  |    1 +
 drivers/net/ethernet/Makefile                 |    1 +
 drivers/net/ethernet/actions/Kconfig          |   39 +
 drivers/net/ethernet/actions/Makefile         |    6 +
 drivers/net/ethernet/actions/owl-emac.c       | 1660 +++++++++++++++++
 drivers/net/ethernet/actions/owl-emac.h       |  278 +++
 8 files changed, 2078 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/actions,owl-emac.yaml
 create mode 100644 drivers/net/ethernet/actions/Kconfig
 create mode 100644 drivers/net/ethernet/actions/Makefile
 create mode 100644 drivers/net/ethernet/actions/owl-emac.c
 create mode 100644 drivers/net/ethernet/actions/owl-emac.h

Comments

Cristian Ciocaltea March 11, 2021, 4:47 p.m. UTC | #1
Hi Philipp,

Thanks for your quick review!

I will incorporate the indicated changes in the next patch revision.

Kind regards,
Cristi

On Thu, Mar 11, 2021 at 07:43:36AM +0100, Philipp Zabel wrote:
> Hi Cristian,
> 
> On Thu, Mar 11, 2021 at 03:20:13AM +0200, Cristian Ciocaltea wrote:
> > Add new driver for the Ethernet MAC used on the Actions Semi Owl
> > family of SoCs.
> > 
> > Currently this has been tested only on the Actions Semi S500 SoC
> > variant.
> > 
> > Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
> > ---
> [...]
> > diff --git a/drivers/net/ethernet/actions/owl-emac.c b/drivers/net/ethernet/actions/owl-emac.c
> > new file mode 100644
> > index 000000000000..ebd8ea88bca4
> > --- /dev/null
> > +++ b/drivers/net/ethernet/actions/owl-emac.c
> > @@ -0,0 +1,1660 @@
> [...]
> > +static int owl_emac_probe(struct platform_device *pdev)
> > +{
> [...]
> > +	priv->reset = devm_reset_control_get(dev, NULL);
> 
> Please use
> 
> 	priv->reset = devm_reset_control_get_exclusive(dev, NULL);
> 
> instead, to explicitly state that the driver requires exclusive
> control over the reset line.
> 
> > +	if (IS_ERR(priv->reset)) {
> > +		ret = PTR_ERR(priv->reset);
> > +		dev_err(dev, "failed to get reset control: %d\n", ret);
> > +		return ret;
> 
> You could use:
> 
> 		return dev_err_probe(dev, PTR_ERR(priv->reset),
> 				     "failed to get reset control");
> 
> regards
> Philipp