From patchwork Fri Feb 20 19:24:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 442135 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0996A14016A for ; Sat, 21 Feb 2015 06:25:17 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 9B7C428C6F4; Fri, 20 Feb 2015 20:25:02 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, T_DKIM_INVALID autolearn=no version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 2CA9128C6F6 for ; Fri, 20 Feb 2015 20:24:59 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-wi0-f173.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -8.5 Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Fri, 20 Feb 2015 20:24:58 +0100 (CET) Received: by mail-wi0-f173.google.com with SMTP id bs8so5167878wib.0 for ; Fri, 20 Feb 2015 11:25:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; bh=XHVt0hhaC7Oj8ZUCWaPlIIN25LByNyzuxH6XTMYbHog=; b=SIGXOLVwJfFNGMQ5hnDuXknaYP2lCG6xDbTwP7vTB0XlbeK0alD+Q1zVG34x03Ji9L bC7FlVWETUWopGB6Kf35ZI9Dp+y0QkDBmtmzUq7BWjQdRysG9khaYPF0NXHrCMb/8Axk FEgxyMasu37iPEYYrmHbHKQfBcO1dBPgas90pK/9fFYRogfioe7vjZ1uVZCEMaM6E4HG UNEt8pkejDnSKHfziuFRNBKOHIjDs3PBZyVhibIW205ZBUrV91+tRmgnkG1hy3CcE0K1 su1uSYM09yUNT19JeXF3907aBf2DnK10/RP5ghlXfvIgd21ezmGm6DuagwYlaxG4oIof 8zYw== X-Received: by 10.180.8.10 with SMTP id n10mr478881wia.79.1424460303438; Fri, 20 Feb 2015 11:25:03 -0800 (PST) Received: from ?IPv6:2003:63:2370:9500:50b9:bd91:29e:3ac7? (p200300632370950050B9BD91029E3AC7.dip0.t-ipconnect.de. [2003:63:2370:9500:50b9:bd91:29e:3ac7]) by mx.google.com with ESMTPSA id hs7sm3701273wib.4.2015.02.20.11.25.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Feb 2015 11:25:02 -0800 (PST) Message-ID: <54E789ED.8000800@gmail.com> Date: Fri, 20 Feb 2015 20:24:29 +0100 From: Heiner Kallweit User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: blogic@openwrt.org Cc: OpenWrt Development List Subject: [OpenWrt-Devel] [PATCH] mpc85xx: add mpic timer clock frequency to avoid boot log warning X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" MPIC timers are enabled in the config, however a devicetree clock setting is missing causing the following error: /soc@ffe00000/timer@41100: cannot get timer frequency. /soc@ffe00000/timer@42100: cannot get timer frequency. This patch adds the missing clock and avoids the error. It's a functional copy of this code do_fixup_by_compat_u32(blob, "fsl,mpic", "clock-frequency", get_bus_freq(0), 1); in arch/powerpc/cpu/mpc85xx/fdt.c in the u-boot code. Signed-off-by: Heiner Kallweit --- .../142-add-mpic-timer-clock-frequency.patch | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 target/linux/mpc85xx/patches-3.18/142-add-mpic-timer-clock-frequency.patch diff --git a/target/linux/mpc85xx/patches-3.18/142-add-mpic-timer-clock-frequency.patch b/target/linux/mpc85xx/patches-3.18/142-add-mpic-timer-clock-frequency.patch new file mode 100644 index 0000000..cc5e4dd --- /dev/null +++ b/target/linux/mpc85xx/patches-3.18/142-add-mpic-timer-clock-frequency.patch @@ -0,0 +1,48 @@ +From 1c20a5420c2602e2438209f34a633eae377eda5e Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Thu, 19 Feb 2015 23:43:32 +0100 +Subject: [PATCH] mpc85xx: add mpic timer clock frequency + +MPIC timers are enabled in the config, however a devicetree clock setting +is missing causing the following error: +/soc@ffe00000/timer@41100: cannot get timer frequency. +/soc@ffe00000/timer@42100: cannot get timer frequency. + +This patch adds the missing clock and avoids the error. +It's a functional copy of this code +do_fixup_by_compat_u32(blob, "fsl,mpic", + "clock-frequency", get_bus_freq(0), 1); +in arch/powerpc/cpu/mpc85xx/fdt.c in the u-boot code. + +Signed-off-by: Heiner Kallweit +--- + arch/powerpc/boot/cuboot-tl-wdr4900-v1.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/arch/powerpc/boot/cuboot-tl-wdr4900-v1.c b/arch/powerpc/boot/cuboot-tl-wdr4900-v1.c +index 095e777..17459ef 100644 +--- a/arch/powerpc/boot/cuboot-tl-wdr4900-v1.c ++++ b/arch/powerpc/boot/cuboot-tl-wdr4900-v1.c +@@ -119,7 +119,7 @@ static void process_boot_dtb(void *boot_dtb) + + static void platform_fixups(void) + { +- void *soc; ++ void *soc, *mpic; + + dt_fixup_memory(0, mem_size); + +@@ -144,6 +144,10 @@ static void platform_fixups(void) + sizeof(bus_freq)); + } + } ++ ++ mpic = find_node_by_compatible(NULL, "fsl,mpic"); ++ if (mpic) ++ setprop(mpic, "clock-frequency", &bus_freq, sizeof(bus_freq)); + } + + void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, +-- +2.3.0 +