From: Ming Lei <ming.lei@canonical.com>
To: linux-arm-kernel@lists.infradead.org,
"David S. Miller" <davem@davemloft.net>
Cc: linux-samsung-soc@vger.kernel.org, Kukjin Kim <kgene@kernel.org>,
netdev@vger.kernel.org, Byungho An <bh74.an@samsung.com>,
Ike Panhc <ike.pan@canonical.com>,
Ming Lei <ming.lei@canoncial.com>
Subject: [PATCH 1/2] ARM: EXYNOS: add fixed phy support for EXYNOS5440
Date: Fri, 23 Jan 2015 10:41:32 +0800 [thread overview]
Message-ID: <1421980893-14475-2-git-send-email-ming.lei@canonical.com> (raw)
In-Reply-To: <1421980893-14475-1-git-send-email-ming.lei@canonical.com>
From: Byungho An <bh74.an@samsung.com>
This patch adds fixed phy codes for Exynos5440.
This patch can support fixed_phy.
Signed-off-by: Byungho An <bh74.an@samsung.com>
Signed-off-by: Ike Panhc <ike.pan@canonical.com>
Signed-off-by: Ming Lei <ming.lei@canoncial.com>
---
arch/arm/mach-exynos/exynos.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 78eca99b..dfd5699 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -20,6 +20,8 @@
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/irqchip.h>
+#include <linux/phy.h>
+#include <linux/phy_fixed.h>
#include <asm/cacheflush.h>
#include <asm/hardware/cache-l2x0.h>
@@ -202,8 +204,21 @@ static void __init exynos_init_irq(void)
exynos_map_pmu();
}
+static struct fixed_phy_status fixed_phy_status __initdata = {
+ .link = 1,
+ .speed = 1000,
+ .duplex = 1,
+};
+
static void __init exynos_dt_machine_init(void)
{
+ struct device_node *gmac_np;
+ unsigned int tmp;
+
+ /* add fixed phy in need */
+ gmac_np = of_find_compatible_node(NULL, NULL, "snps,dwmac-3.70a");
+ if (of_find_property(gmac_np, "fixed_phy", NULL))
+ tmp = fixed_phy_add(PHY_POLL, 1, &fixed_phy_status);
/*
* This is called from smp_prepare_cpus if we've built for SMP, but
* we still need to set it up for PM and firmware ops if not.
--
1.7.9.5
next prev parent reply other threads:[~2015-01-23 2:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-23 2:41 [PATCH 0/2] ARM & NET: add fixed phy support on stmmac Ming Lei
2015-01-23 2:41 ` Ming Lei [this message]
2015-01-23 4:12 ` [PATCH 1/2] ARM: EXYNOS: add fixed phy support for EXYNOS5440 Florian Fainelli
2015-01-23 2:41 ` [PATCH 2/2] net: stmmac: add fixed_phy and phy_addr support using DT file Ming Lei
2015-01-23 4:15 ` Florian Fainelli
2015-01-23 4:57 ` Ming Lei
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=1421980893-14475-2-git-send-email-ming.lei@canonical.com \
--to=ming.lei@canonical.com \
--cc=bh74.an@samsung.com \
--cc=davem@davemloft.net \
--cc=ike.pan@canonical.com \
--cc=kgene@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=ming.lei@canoncial.com \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox