Return-Path: Received: from mail-ye0-f174.google.com (mail-ye0-f174.google.com [209.85.213.174]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id C9A37E013A7 for ; Mon, 25 Mar 2013 07:19:23 -0700 (PDT) Received: by mail-ye0-f174.google.com with SMTP id l2so147076yen.5 for ; Mon, 25 Mar 2013 07:19:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=lOU0XbYx8Lo+0jj3aLC6Ry6iVtR3p2Yak7Qs9EsuQq0=; b=NHQiMQoJ0Pd5apWo25uqSh4tT14KfjMgidZoL6hLcAfGB6YuxjHwOjg6ohX0yK19Cz 2dwMn87pyeXAtm96d8cNzZZuJvWKjuBhawVoWqAuzUkXGHKMHy1Nq38uVr+f9KBZ79O8 MCEW2UsrBwxqGCHwn6col8Wx+2Rnhpc6ZlT+VIXGp+gFeNztqQFdMumbFKtCPYZnLBx+ KmM8l3gVcmV6cJxG3fLGRf03OiaiTKnnHTFqhbc7w5RGrNyHZq6jPv6tbzWdbN4SjTQ7 MIlaSmcQw3SyZDPv4vk6WRdMFKjdB3+NsRdkfM2OzEWbMMce+mJgB5xbmgh9oZHGW3Gz RDkQ== X-Received: by 10.236.145.10 with SMTP id o10mr6933788yhj.56.1364221163153; Mon, 25 Mar 2013 07:19:23 -0700 (PDT) Received: from localhost.localdomain ([75.76.228.60]) by mx.google.com with ESMTPS id t47sm18905593yhe.22.2013.03.25.07.19.22 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Mar 2013 07:19:22 -0700 (PDT) From: John Weber To: meta-freescale@yoctoproject.org Date: Mon, 25 Mar 2013 09:19:18 -0500 Message-Id: <1364221158-15914-1-git-send-email-rjohnweber@gmail.com> X-Mailer: git-send-email 1.7.9.5 Subject: [meta-fsl-arm-extra][PATCH] linux-imx (3.0.35): Fix cpu_regulator problem with Wandboard X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2013 14:19:24 -0000 With a recent merge, the default kernel for mx6dl changed to linux-imx 3.0.35, rev 3.0.0. In this branch, calls to mx6_cpu_regulator_init() are required. This patch adds this call to the Wandboard init file. Also, fixed some minor things such as adding the header to the Wandboard board file so that the original authors are credited, and uncommented the #include for cpu_op-mx6.h which was commented out for some reason. Signed-off-by: John Weber --- ...odifications-for-fsl-3.0.0-and-add-header.patch | 86 ++++++++++++++++++++ recipes-kernel/linux/linux-imx_3.0.35.bbappend | 3 +- 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 recipes-kernel/linux/linux-imx-3.0.35/wandboard-dual/0004-modifications-for-fsl-3.0.0-and-add-header.patch diff --git a/recipes-kernel/linux/linux-imx-3.0.35/wandboard-dual/0004-modifications-for-fsl-3.0.0-and-add-header.patch b/recipes-kernel/linux/linux-imx-3.0.35/wandboard-dual/0004-modifications-for-fsl-3.0.0-and-add-header.patch new file mode 100644 index 0000000..6aed334 --- /dev/null +++ b/recipes-kernel/linux/linux-imx-3.0.35/wandboard-dual/0004-modifications-for-fsl-3.0.0-and-add-header.patch @@ -0,0 +1,86 @@ +From 725293d858a76d871b949f460b179a0fe4a8cc1c Mon Sep 17 00:00:00 2001 +From: John Weber +Date: Mon, 25 Mar 2013 08:43:04 -0500 +Subject: modifications for fsl 3.0.0 and add header + +Freescale kernel 3.0.35, rev 3.0.0 requires that mx6_cpu_regulator_init() +be called within the board init function. Not doing so results in +unrecoverable kernel errors during kernel initialization in calls to +regulator_set_voltage(). Calls to this function seem to be removed +in rev 1.1.0 and later versions of the FSL kernel. + +In addition, add the header to the file giving the original authors credit. + +Include 'cpu_op-mx6.h' because this was commented out for some reason. + +Upstream-Status: Pending + +Signed-off-by: John Weber +--- + arch/arm/mach-mx6/board-wand.c | 32 +++++++++++++++++++++++++++++++- + 1 file changed, 31 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/mach-mx6/board-wand.c b/arch/arm/mach-mx6/board-wand.c +index 7d2d45b..8b3029e 100644 +--- a/arch/arm/mach-mx6/board-wand.c ++++ b/arch/arm/mach-mx6/board-wand.c +@@ -1,3 +1,21 @@ ++/* ++ Wandboard board file. Copyright (C) 2013 Tapani Utriainen ++ Authors: Tapani Utriainen, Edward Lin ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++*/ + + #include + #include +@@ -22,7 +40,10 @@ + #include "crm_regs.h" + #include "devices-imx6q.h" + #include "usb.h" +-//#include "cpu_op-mx6.h" ++#include "cpu_op-mx6.h" ++ ++extern char *soc_reg_id; ++extern char *pu_reg_id; + + #define WAND_BT_ON IMX_GPIO_NR(3, 13) + #define WAND_BT_WAKE IMX_GPIO_NR(3, 14) +@@ -752,6 +773,8 @@ static const struct pm_platform_data wand_pm_data = { + + static const struct mxc_dvfs_platform_data wand_dvfscore_data = { + .reg_id = "cpu_vddgp", ++ .soc_id = "cpu_vddsoc", ++ .pu_id = "cpu_vddvpu", + .clk1_id = "cpu_clk", + .clk2_id = "gpc_dvfs_clk", + .gpc_cntr_offset = MXC_GPC_CNTR_OFFSET, +@@ -780,6 +803,13 @@ static __init void wand_init_pm(void) { + imx6q_add_anatop_thermal_imx(1, &wand_thermal); + imx6q_add_pm_imx(0, &wand_pm_data); + imx6q_add_dvfs_core(&wand_dvfscore_data); ++ ++ /* Required for 3.0.0 kernel */ ++ gp_reg_id = wand_dvfscore_data.reg_id; ++ soc_reg_id = wand_dvfscore_data.soc_id; ++ pu_reg_id = wand_dvfscore_data.pu_id; ++ mx6_cpu_regulator_init(); ++ + imx6q_add_busfreq(); + } + +-- +1.7.9.5 + diff --git a/recipes-kernel/linux/linux-imx_3.0.35.bbappend b/recipes-kernel/linux/linux-imx_3.0.35.bbappend index 34e96eb..4b66f1e 100644 --- a/recipes-kernel/linux/linux-imx_3.0.35.bbappend +++ b/recipes-kernel/linux/linux-imx_3.0.35.bbappend @@ -1,6 +1,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" -PRINC := "${@int(PRINC) + 3}" +PRINC := "${@int(PRINC) + 4}" # Wandboard-specific patches SRC_URI_append_wandboard-dual = " \ @@ -8,6 +8,7 @@ SRC_URI_append_wandboard-dual = " \ file://wandboard-dual/0002-wandboard-dual-fix-sdhc-platform-data.patch \ file://wandboard-dual/0003-linux-imx-3.0.35-Add-brcm80211-driver-backported-fro.patch \ file://wandboard-dual/0003-linux-imx-3.0.35-remove-brcm80211-staging-driver.patch \ + file://wandboard-dual/0004-modifications-for-fsl-3.0.0-and-add-header.patch \ " # Add support for the Congatec qmx6 board SRC_URI_append_cgtqmx6 = " file://cgtqmx6/cgtqmx6.patch" -- 1.7.9.5