From patchwork Fri Jan 23 02:41:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 5690471 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3A5DD9F2ED for ; Fri, 23 Jan 2015 02:44:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 114A42024D for ; Fri, 23 Jan 2015 02:44:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 140162024C for ; Fri, 23 Jan 2015 02:44:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YEUCS-00069l-42; Fri, 23 Jan 2015 02:42:20 +0000 Received: from mail-yh0-f46.google.com ([209.85.213.46]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YEUCJ-00065j-P5 for linux-arm-kernel@lists.infradead.org; Fri, 23 Jan 2015 02:42:12 +0000 Received: by mail-yh0-f46.google.com with SMTP id c41so2325009yho.5 for ; Thu, 22 Jan 2015 18:41:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=37KCbdTKL4IZ+6dXGmUJ+Syr/xldGP1oG1nvG7kkmLQ=; b=IU34yJlAVmk7xgXPXFlpbe+XnoXlQ+c2VhrO7bZXD9X78EH7KyQJfTJ9sHBo/V0o2e t0FPLSftRQadn3JkDWd1Pv1wc9d2Wv5n03Lvbz+6BPd5Lno7t+NoL0JrKGMmiBfE8tVg N23T+em1kzxaI3YbcSmcHc+NmMOBvP+j1uf0+ZhQwFgI96EYFWRvscKGG0uifpZYmmji VoUScNnDKF0gLEgP82Wdbx1qksGJ8dIZQFtu5PZJO4mP4VdBSRXGQxeHbIQiY/HhfPoz cZRtOUHSX0haEHFeEEnJM7ziZK2YVzZ1Yk8SyGEGRsf5uHtr/nGgwHhoLxIl38ZfP86M hxXQ== X-Received: by 10.236.230.103 with SMTP id i97mr2031658yhq.47.1421980910412; Thu, 22 Jan 2015 18:41:50 -0800 (PST) Received: from localhost ([162.213.34.56]) by mx.google.com with ESMTPSA id j41sm197446yhj.18.2015.01.22.18.41.48 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 22 Jan 2015 18:41:49 -0800 (PST) From: Ming Lei To: linux-arm-kernel@lists.infradead.org, "David S. Miller" Subject: [PATCH 1/2] ARM: EXYNOS: add fixed phy support for EXYNOS5440 Date: Fri, 23 Jan 2015 10:41:32 +0800 Message-Id: <1421980893-14475-2-git-send-email-ming.lei@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1421980893-14475-1-git-send-email-ming.lei@canonical.com> References: <1421980893-14475-1-git-send-email-ming.lei@canonical.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150122_184211_959202_B5D60838 X-CRM114-Status: GOOD ( 11.70 ) X-Spam-Score: -0.7 (/) Cc: linux-samsung-soc@vger.kernel.org, Ike Panhc , netdev@vger.kernel.org, Ming Lei , Kukjin Kim , Byungho An X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Byungho An This patch adds fixed phy codes for Exynos5440. This patch can support fixed_phy. Signed-off-by: Byungho An Signed-off-by: Ike Panhc Signed-off-by: Ming Lei --- 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 #include #include +#include +#include #include #include @@ -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.