From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: linuxppc-dev@ozlabs.org
Cc: Scott Wood <scottwood@freescale.com>,
linux-pm@lists.linux-foundation.org,
Paul Mackerras <paulus@samba.org>
Subject: [PATCH 5/7] gianfar: Add flags for magic packet and MDIO.
Date: Mon, 28 Apr 2008 17:39:47 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.0804281722140.7897@axis700.grange> (raw)
In-Reply-To: <Pine.LNX.4.64.0804281714000.7897@axis700.grange>
The magic packet flag indicates that the hardware has this
capability. The MDIO flag indicates that this device's
registers contain active MDIO registers, and thus this
device should not be put to sleep.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
arch/powerpc/sysdev/fsl_soc.c | 7 +++++++
include/linux/fsl_devices.h | 2 ++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index d5fd916..032b8e8 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -324,6 +324,9 @@ static int __init gfar_of_init(void)
else
gfar_data.interface = PHY_INTERFACE_MODE_MII;
+ if (of_get_property(np, "fsl,magic-packet", NULL))
+ gfar_data.device_flags |= FSL_GIANFAR_DEV_HAS_MAGIC_PACKET;
+
ph = of_get_property(np, "phy-handle", NULL);
if (ph == NULL) {
u32 *fixed_link;
@@ -345,6 +348,10 @@ static int __init gfar_of_init(void)
snprintf(gfar_data.bus_id, MII_BUS_ID_SIZE, "%x",
res.start);
+ if (res.start >= gfar_dev->resource[0].start &&
+ res.start < gfar_dev->resource[0].end)
+ gfar_data.device_flags |= FSL_GIANFAR_DEV_HAS_MDIO;
+
of_node_put(phy);
of_node_put(mdio);
}
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index 5cec939..81fcc67 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -87,6 +87,8 @@ struct gianfar_mdio_data {
#define FSL_GIANFAR_DEV_HAS_VLAN 0x00000020
#define FSL_GIANFAR_DEV_HAS_EXTENDED_HASH 0x00000040
#define FSL_GIANFAR_DEV_HAS_PADDING 0x00000080
+#define FSL_GIANFAR_DEV_HAS_MAGIC_PACKET 0x00000100
+#define FSL_GIANFAR_DEV_HAS_MDIO 0x00000200
/* Flags in gianfar_platform_data */
#define FSL_GIANFAR_BRD_HAS_PHY_INTR 0x00000001 /* set or use a timer */
--
1.5.3.7
next prev parent reply other threads:[~2008-04-28 15:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-28 15:37 [RFC, PATCH 0/7] Power management patches from Scott Wood plus MPC8241 Linkstation Guennadi Liakhovetski
2008-04-28 15:37 ` [PATCH 1/7] pm: Add TLF_SLEEPING hack to delay interrupt delivery when waking from sleep Guennadi Liakhovetski
2008-04-28 15:38 ` [PATCH 2/7] Add 6xx-style HID0_SLEEP support Guennadi Liakhovetski
2008-04-28 15:38 ` [PATCH 3/7] mpc83xx: Power Management support Guennadi Liakhovetski
2008-04-28 15:39 ` [PATCH 4/7] mpc83xx: timer driver for PM wakeup Guennadi Liakhovetski
2008-04-28 18:15 ` Scott Wood
2008-04-28 15:39 ` Guennadi Liakhovetski [this message]
2008-04-28 15:40 ` [PATCH 6/7] gianfar: Magic Packet and suspend/resume support Guennadi Liakhovetski
2008-04-28 15:40 ` [PATCH 7/7] linkstation: implement standby Guennadi Liakhovetski
2008-04-28 15:58 ` Scott Wood
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=Pine.LNX.4.64.0804281722140.7897@axis700.grange \
--to=g.liakhovetski@gmx.de \
--cc=linux-pm@lists.linux-foundation.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=scottwood@freescale.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox