From: tklauser@distanz.ch (Tobias Klauser)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/8] net: ethernet driver: Fujitsu OGMA
Date: Mon, 14 Jul 2014 11:06:28 +0200 [thread overview]
Message-ID: <20140714090628.GA7668@distanz.ch> (raw)
In-Reply-To: <1405233107-4762-1-git-send-email-mollie.wu@linaro.org>
On 2014-07-13 at 08:31:47 +0200, Mollie Wu <mollie.wu@linaro.org> wrote:
> This driver adds support for "ogma", a Fujitsu Semiconductor Ltd IP Gigabit
> Ethernet + PHY IP used in a variety of their ARM-based ASICs.
>
> This is being sent as part of a series including the arch support that uses it,
> Fujitsu mb86s7x.
>
> This driver was originally written by guys inside Fujitsu as an abstracted
> "you can build this for Windows as well" type code, I've removed all that,
> modernized various things, added runtime_pm, and ported it to work with
> Device Tree, using only the bindings already mentioned in
>
> ./Documentation/devicetree/bindings/net/ethernet.txt
>
> Bindings documentation is added by this patch.
>
> Signed-off-by: Andy Green <andy.green@linaro.org>
> Signed-off-by: Tetsuya Takinishi <t.takinishi@jp.fujitsu.com>
> Signed-off-by: Mollie Wu <mollie.wu@linaro.org>
> ---
> .../devicetree/bindings/net/fujitsu-ogma.txt | 43 ++
> drivers/net/ethernet/fujitsu/Kconfig | 12 +
> drivers/net/ethernet/fujitsu/Makefile | 1 +
> drivers/net/ethernet/fujitsu/ogma/Makefile | 6 +
> drivers/net/ethernet/fujitsu/ogma/ogma.h | 380 +++++++++++++
> .../ethernet/fujitsu/ogma/ogma_desc_ring_access.c | 627 +++++++++++++++++++++
> drivers/net/ethernet/fujitsu/ogma/ogma_ethtool.c | 95 ++++
> .../net/ethernet/fujitsu/ogma/ogma_gmac_access.c | 295 ++++++++++
> drivers/net/ethernet/fujitsu/ogma/ogma_netdev.c | 592 +++++++++++++++++++
> drivers/net/ethernet/fujitsu/ogma/ogma_platform.c | 333 +++++++++++
> 10 files changed, 2384 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/fujitsu-ogma.txt
> create mode 100644 drivers/net/ethernet/fujitsu/ogma/Makefile
> create mode 100644 drivers/net/ethernet/fujitsu/ogma/ogma.h
> create mode 100644 drivers/net/ethernet/fujitsu/ogma/ogma_desc_ring_access.c
> create mode 100644 drivers/net/ethernet/fujitsu/ogma/ogma_ethtool.c
> create mode 100644 drivers/net/ethernet/fujitsu/ogma/ogma_gmac_access.c
> create mode 100644 drivers/net/ethernet/fujitsu/ogma/ogma_netdev.c
> create mode 100644 drivers/net/ethernet/fujitsu/ogma/ogma_platform.c
[...]
> diff --git a/drivers/net/ethernet/fujitsu/ogma/ogma_platform.c b/drivers/net/ethernet/fujitsu/ogma/ogma_platform.c
> new file mode 100644
> index 0000000..09071da
> --- /dev/null
> +++ b/drivers/net/ethernet/fujitsu/ogma/ogma_platform.c
[...]
> +#ifdef CONFIG_PM
> +static const struct dev_pm_ops ogma_pm_ops = {
> + SET_SYSTEM_SLEEP_PM_OPS(ogma_pm_suspend, ogma_pm_resume)
> + SET_RUNTIME_PM_OPS(ogma_runtime_suspend, ogma_runtime_resume, NULL)
> +};
> +#endif
#ifdef CONFIG_PM can be omitted here since
SET_{SYSTEM_SLEEP,RUNTIME}_PM_OPS will just evaluate empty if CONFIG_PM
is not defined.
> +
> +static const struct of_device_id ogma_dt_ids[] = {
> + {.compatible = "fujitsu,ogma"},
> + { /* sentinel */ }
> +};
> +
> +MODULE_DEVICE_TABLE(of, ogma_dt_ids);
> +
> +static struct platform_driver ogma_driver = {
> + .probe = ogma_probe,
> + .remove = ogma_remove,
> + .driver = {
> + .name = "ogma",
> + .of_match_table = ogma_dt_ids,
> +#ifdef CONFIG_PM
> + .pm = &ogma_pm_ops,
> +#endif
With the above #ifdef CONFIG_PM removed, ogma_pm_ops will be all NULL if
CONFIG_PM is not set. Thus, the #ifdef can be removed as well.
> + },
> +};
> +
> +module_platform_driver(ogma_driver);
> +
> +MODULE_AUTHOR("Fujitsu Semiconductor Ltd");
> +MODULE_DESCRIPTION("OGMA Ethernet driver");
> +MODULE_LICENSE("GPL");
> +
> +MODULE_ALIAS("platform:ogma");
> --
> 1.8.1.2
WARNING: multiple messages have this Message-ID (diff)
From: Tobias Klauser <tklauser@distanz.ch>
To: Mollie Wu <mollie.wu@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
netdev@vger.kernel.org, andy.green@linaro.org,
patches@linaro.org, jaswinder.singh@linaro.org,
linux@arm.linux.org.uk, arnd@arndb.de, olof@lixom.net,
mark.rutland@arm.com, robh+dt@kernel.org, pawel.moll@arm.com,
davem@davemloft.net, stephen@networkplumber.org,
f.fainelli@gmail.com, romieu@fr.zoreil.com,
Tetsuya Takinishi <t.takinishi@jp.fujitsu.com>
Subject: Re: [PATCH 6/8] net: ethernet driver: Fujitsu OGMA
Date: Mon, 14 Jul 2014 11:06:28 +0200 [thread overview]
Message-ID: <20140714090628.GA7668@distanz.ch> (raw)
In-Reply-To: <1405233107-4762-1-git-send-email-mollie.wu@linaro.org>
On 2014-07-13 at 08:31:47 +0200, Mollie Wu <mollie.wu@linaro.org> wrote:
> This driver adds support for "ogma", a Fujitsu Semiconductor Ltd IP Gigabit
> Ethernet + PHY IP used in a variety of their ARM-based ASICs.
>
> This is being sent as part of a series including the arch support that uses it,
> Fujitsu mb86s7x.
>
> This driver was originally written by guys inside Fujitsu as an abstracted
> "you can build this for Windows as well" type code, I've removed all that,
> modernized various things, added runtime_pm, and ported it to work with
> Device Tree, using only the bindings already mentioned in
>
> ./Documentation/devicetree/bindings/net/ethernet.txt
>
> Bindings documentation is added by this patch.
>
> Signed-off-by: Andy Green <andy.green@linaro.org>
> Signed-off-by: Tetsuya Takinishi <t.takinishi@jp.fujitsu.com>
> Signed-off-by: Mollie Wu <mollie.wu@linaro.org>
> ---
> .../devicetree/bindings/net/fujitsu-ogma.txt | 43 ++
> drivers/net/ethernet/fujitsu/Kconfig | 12 +
> drivers/net/ethernet/fujitsu/Makefile | 1 +
> drivers/net/ethernet/fujitsu/ogma/Makefile | 6 +
> drivers/net/ethernet/fujitsu/ogma/ogma.h | 380 +++++++++++++
> .../ethernet/fujitsu/ogma/ogma_desc_ring_access.c | 627 +++++++++++++++++++++
> drivers/net/ethernet/fujitsu/ogma/ogma_ethtool.c | 95 ++++
> .../net/ethernet/fujitsu/ogma/ogma_gmac_access.c | 295 ++++++++++
> drivers/net/ethernet/fujitsu/ogma/ogma_netdev.c | 592 +++++++++++++++++++
> drivers/net/ethernet/fujitsu/ogma/ogma_platform.c | 333 +++++++++++
> 10 files changed, 2384 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/fujitsu-ogma.txt
> create mode 100644 drivers/net/ethernet/fujitsu/ogma/Makefile
> create mode 100644 drivers/net/ethernet/fujitsu/ogma/ogma.h
> create mode 100644 drivers/net/ethernet/fujitsu/ogma/ogma_desc_ring_access.c
> create mode 100644 drivers/net/ethernet/fujitsu/ogma/ogma_ethtool.c
> create mode 100644 drivers/net/ethernet/fujitsu/ogma/ogma_gmac_access.c
> create mode 100644 drivers/net/ethernet/fujitsu/ogma/ogma_netdev.c
> create mode 100644 drivers/net/ethernet/fujitsu/ogma/ogma_platform.c
[...]
> diff --git a/drivers/net/ethernet/fujitsu/ogma/ogma_platform.c b/drivers/net/ethernet/fujitsu/ogma/ogma_platform.c
> new file mode 100644
> index 0000000..09071da
> --- /dev/null
> +++ b/drivers/net/ethernet/fujitsu/ogma/ogma_platform.c
[...]
> +#ifdef CONFIG_PM
> +static const struct dev_pm_ops ogma_pm_ops = {
> + SET_SYSTEM_SLEEP_PM_OPS(ogma_pm_suspend, ogma_pm_resume)
> + SET_RUNTIME_PM_OPS(ogma_runtime_suspend, ogma_runtime_resume, NULL)
> +};
> +#endif
#ifdef CONFIG_PM can be omitted here since
SET_{SYSTEM_SLEEP,RUNTIME}_PM_OPS will just evaluate empty if CONFIG_PM
is not defined.
> +
> +static const struct of_device_id ogma_dt_ids[] = {
> + {.compatible = "fujitsu,ogma"},
> + { /* sentinel */ }
> +};
> +
> +MODULE_DEVICE_TABLE(of, ogma_dt_ids);
> +
> +static struct platform_driver ogma_driver = {
> + .probe = ogma_probe,
> + .remove = ogma_remove,
> + .driver = {
> + .name = "ogma",
> + .of_match_table = ogma_dt_ids,
> +#ifdef CONFIG_PM
> + .pm = &ogma_pm_ops,
> +#endif
With the above #ifdef CONFIG_PM removed, ogma_pm_ops will be all NULL if
CONFIG_PM is not set. Thus, the #ifdef can be removed as well.
> + },
> +};
> +
> +module_platform_driver(ogma_driver);
> +
> +MODULE_AUTHOR("Fujitsu Semiconductor Ltd");
> +MODULE_DESCRIPTION("OGMA Ethernet driver");
> +MODULE_LICENSE("GPL");
> +
> +MODULE_ALIAS("platform:ogma");
> --
> 1.8.1.2
next prev parent reply other threads:[~2014-07-14 9:06 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <message-id-of-cover-letter>
2014-07-13 6:28 ` [PATCH 1/8] ARM: Add platform support for Fujitsu MB86S7X SoCs Mollie Wu
2014-07-13 6:28 ` Mollie Wu
2014-07-14 13:33 ` Arnd Bergmann
2014-07-14 13:33 ` Arnd Bergmann
2014-07-15 17:37 ` Jassi Brar
2014-07-15 17:37 ` Jassi Brar
2014-07-15 20:09 ` Arnd Bergmann
2014-07-15 20:09 ` Arnd Bergmann
2014-07-17 13:32 ` Jassi Brar
2014-07-17 13:32 ` Jassi Brar
2014-07-17 13:48 ` Arnd Bergmann
2014-07-17 13:48 ` Arnd Bergmann
2014-07-17 16:54 ` Jassi Brar
2014-07-17 16:54 ` Jassi Brar
2014-07-17 17:12 ` Arnd Bergmann
2014-07-17 17:12 ` Arnd Bergmann
2014-07-15 15:11 ` Rob Herring
2014-07-15 15:11 ` Rob Herring
2014-07-15 16:11 ` Nicolas Pitre
2014-07-15 16:11 ` Nicolas Pitre
2014-07-15 18:03 ` Jassi Brar
2014-07-15 18:03 ` Jassi Brar
2014-07-16 5:52 ` Andy Green
2014-07-16 5:52 ` Andy Green
2014-07-15 17:05 ` Nicolas Pitre
2014-07-15 17:05 ` Nicolas Pitre
2014-07-15 18:16 ` Jassi Brar
2014-07-15 18:16 ` Jassi Brar
2014-07-13 6:29 ` [PATCH 2/8] mmc: sdhci: host: add new f_sdh30 Mollie Wu
2014-07-13 6:29 ` Mollie Wu
2014-07-14 14:04 ` Arnd Bergmann
2014-07-14 14:04 ` Arnd Bergmann
2014-07-16 9:35 ` Vincent.Yang
2014-07-16 9:35 ` Vincent.Yang
2014-07-16 10:10 ` Arnd Bergmann
2014-07-16 10:10 ` Arnd Bergmann
2014-07-16 11:07 ` Vincent.Yang
2014-07-16 11:07 ` Vincent.Yang
2014-07-13 6:30 ` [PATCH 3/8] mmc: core: add manual resume capability Mollie Wu
2014-07-13 6:30 ` Mollie Wu
2014-07-13 6:30 ` [PATCH 4/8] clk: Add clock driver for mb86s7x Mollie Wu
2014-07-13 6:30 ` Mollie Wu
2014-07-14 14:08 ` Arnd Bergmann
2014-07-14 14:08 ` Arnd Bergmann
2014-07-16 7:09 ` Jassi Brar
2014-07-16 7:09 ` Jassi Brar
2014-07-13 6:31 ` [PATCH 5/8] pinctrl: add driver for MB86S7x Mollie Wu
2014-07-13 6:31 ` Mollie Wu
2014-07-22 16:11 ` Linus Walleij
2014-07-22 16:11 ` Linus Walleij
2014-07-24 18:04 ` Jassi Brar
2014-07-24 18:04 ` Jassi Brar
2014-08-08 12:42 ` Linus Walleij
2014-08-08 12:42 ` Linus Walleij
2014-08-22 7:46 ` Jassi Brar
2014-08-22 7:46 ` Jassi Brar
2014-08-27 16:58 ` Jassi Brar
2014-08-27 16:58 ` Jassi Brar
2014-09-03 9:17 ` Linus Walleij
2014-09-03 9:17 ` Linus Walleij
2014-07-13 6:31 ` [PATCH 6/8] net: ethernet driver: Fujitsu OGMA Mollie Wu
2014-07-13 6:31 ` Mollie Wu
2014-07-14 9:06 ` Tobias Klauser [this message]
2014-07-14 9:06 ` Tobias Klauser
2014-07-14 10:36 ` Andy Green
2014-07-14 10:36 ` Andy Green
2014-07-14 13:50 ` Arnd Bergmann
2014-07-14 13:50 ` Arnd Bergmann
2014-07-14 14:00 ` Andy Green
2014-07-13 6:32 ` [PATCH 7/8] mailbox: f_mhu: add driver for Fujitsu MHU controller Mollie Wu
2014-07-13 6:32 ` Mollie Wu
2014-07-16 17:37 ` Sudeep Holla
2014-07-16 17:37 ` Sudeep Holla
2014-07-17 6:25 ` Jassi Brar
2014-07-17 6:25 ` Jassi Brar
2014-07-17 10:31 ` Sudeep Holla
2014-07-17 10:31 ` Sudeep Holla
2014-07-17 12:56 ` Jassi Brar
2014-07-17 12:56 ` Jassi Brar
2014-07-17 15:09 ` Sudeep Holla
2014-07-17 15:09 ` Sudeep Holla
2014-07-17 17:07 ` Jassi Brar
2014-07-17 17:07 ` Jassi Brar
2014-07-17 18:51 ` Sudeep Holla
2014-07-17 18:51 ` Sudeep Holla
2014-07-18 9:06 ` Jassi Brar
2014-07-18 9:06 ` Jassi Brar
2014-07-13 6:32 ` =?y?q?=5BPATCH=208/8=5D=20of=3A=20add=20Fujitsu=20vendor=20prefix?= Mollie Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140714090628.GA7668@distanz.ch \
--to=tklauser@distanz.ch \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.