From patchwork Tue Jun 17 14:03:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 32028 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BC41B20C81 for ; Tue, 17 Jun 2014 14:03:35 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id ma3sf25782151pbc.11 for ; Tue, 17 Jun 2014 07:03:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=eBGazyrtZ0CCj/hK514jB81nHGiwSeJUIpJYpvR7QCQ=; b=MWDxhjI83sl2zmnDVVDINM7UjNHvJyPaV/X4PhWzBIwQl7bvXloy4mkbdfeNgEjD7C lIQ0RNLKZn2jiLG8Rn4h/QnzCKxmyB+RRhFLQ+ml+Y6SLH2PGSNeco1FLIdoiX+sTrM4 suojXP440dgo2sCvFW9g4bhCcjlJ7qOBsgF3LuQDCOWlq9OwWu3ty8nh22A0tykSCsA1 9AHnmzX1E49zfbqnAQc72YYAxB877I3wsws1/tLbGAARsynodH+lYOCcP+5V56mrBJ+j c7gr8iy2x++HV+1zwxRKaQM9NmdZgN0WnVSZArU3rhhBDy9fzJFjEYVzKg2CzGUoGVyW GmlQ== X-Gm-Message-State: ALoCoQnWURP+j5c8pvSpFVJ8KoDnVGRkBQxOzNmc84ezZnvXd55RrKahpq9L4xOCcisQpUzICBeD X-Received: by 10.66.137.105 with SMTP id qh9mr132557pab.30.1403013815019; Tue, 17 Jun 2014 07:03:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.21.85 with SMTP id 79ls4910920qgk.41.gmail; Tue, 17 Jun 2014 07:03:34 -0700 (PDT) X-Received: by 10.220.92.193 with SMTP id s1mr1813020vcm.34.1403013814838; Tue, 17 Jun 2014 07:03:34 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id nu8si5501465vcb.16.2014.06.17.07.03.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 07:03:34 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.172 as permitted sender) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id jz11so7600692veb.17 for ; Tue, 17 Jun 2014 07:03:34 -0700 (PDT) X-Received: by 10.53.8.162 with SMTP id dl2mr18351941vdd.24.1403013814746; Tue, 17 Jun 2014 07:03:34 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp211713vcb; Tue, 17 Jun 2014 07:03:34 -0700 (PDT) X-Received: by 10.66.158.10 with SMTP id wq10mr33433627pab.32.1403013813775; Tue, 17 Jun 2014 07:03:33 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bs8si17419799pad.157.2014.06.17.07.03.33; Tue, 17 Jun 2014 07:03:33 -0700 (PDT) Received-SPF: none (google.com: linux-omap-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932410AbaFQODc (ORCPT + 6 others); Tue, 17 Jun 2014 10:03:32 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:51457 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932133AbaFQODb (ORCPT ); Tue, 17 Jun 2014 10:03:31 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s5HE3Tdp023497; Tue, 17 Jun 2014 09:03:29 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5HE3To5006806; Tue, 17 Jun 2014 09:03:29 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Tue, 17 Jun 2014 09:03:29 -0500 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5HE3QSs003386; Tue, 17 Jun 2014 09:03:27 -0500 From: Roger Quadros To: , CC: , , , Roger Quadros Subject: [PATCH] clk: ti: am43x: Fix boot with CONFIG_SOC_AM33XX disabled Date: Tue, 17 Jun 2014 17:03:24 +0300 Message-ID: <1403013804-13522-1-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.8.3.2 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: rogerq@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Define ti_clk_register_dpll_x2() and of_ti_am3_dpll_x2_setup() if AM43XX is defined. Fixes the below boot issue. [ 2.157258] gpmc_l3_clk not enabled [ 2.161194] gpmc_l3_clk not enabled [ 2.164896] Division by zero in kernel. [ 2.169055] CPU: 0 PID: 321 Comm: kworker/u2:2 Tainted: G W 3.16.0-rc1-00008-g4c0e520 #273 [ 2.178880] Workqueue: deferwq deferred_probe_work_func [ 2.184459] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 2.192752] [] (show_stack) from [] (dump_stack+0x80/0x9c) [ 2.200486] [] (dump_stack) from [] (Ldiv0+0x8/0x10) [ 2.207678] [] (Ldiv0) from [] (gpmc_calc_divider+0x24/0x40) [ 2.215490] [] (gpmc_calc_divider) from [] (gpmc_cs_set_timings+0x18/0x474) [ 2.224783] [] (gpmc_cs_set_timings) from [] (gpmc_nand_init+0x74/0x1a8) [ 2.233791] [] (gpmc_nand_init) from [] (gpmc_probe+0x52c/0x874) [ 2.242089] [] (gpmc_probe) from [] (platform_drv_probe+0x18/0x48) [ 2.250534] [] (platform_drv_probe) from [] (driver_probe_device+0x104/0x22c) [ 2.259988] [] (driver_probe_device) from [] (bus_for_each_drv+0x44/0x8c) [ 2.269087] [] (bus_for_each_drv) from [] (device_attach+0x74/0x8c) [ 2.277620] [] (device_attach) from [] (bus_probe_device+0x88/0xb0) [ 2.286074] [] (bus_probe_device) from [] (deferred_probe_work_func+0x60/0x90) [ 2.295611] [] (deferred_probe_work_func) from [] (process_one_work+0x1b4/0x4bc) [ 2.305288] [] (process_one_work) from [] (worker_thread+0x148/0x550) [ 2.313954] [] (worker_thread) from [] (kthread+0xc8/0xe4) [ 2.321628] [] (kthread) from [] (ret_from_fork+0x14/0x2c) Signed-off-by: Roger Quadros Reported-by: Tony Lindgren --- drivers/clk/ti/dpll.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/clk/ti/dpll.c b/drivers/clk/ti/dpll.c index abd956d..79791e1 100644 --- a/drivers/clk/ti/dpll.c +++ b/drivers/clk/ti/dpll.c @@ -161,7 +161,8 @@ cleanup: } #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \ - defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM33XX) + defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM33XX) || \ + defined(CONFIG_SOC_AM43XX) /** * ti_clk_register_dpll_x2 - Registers a DPLLx2 clock * @node: device node for this clock @@ -322,7 +323,7 @@ CLK_OF_DECLARE(ti_omap4_dpll_x2_clock, "ti,omap4-dpll-x2-clock", of_ti_omap4_dpll_x2_setup); #endif -#ifdef CONFIG_SOC_AM33XX +#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX) static void __init of_ti_am3_dpll_x2_setup(struct device_node *node) { ti_clk_register_dpll_x2(node, &dpll_x2_ck_ops, NULL);