From patchwork Mon Mar 25 15:02:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 2331731 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id EC92F3FD8C for ; Mon, 25 Mar 2013 15:07:14 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UK8wx-0007vx-Mo; Mon, 25 Mar 2013 15:04:39 +0000 Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UK8vJ-0007Hy-Tv for linux-arm-kernel@lists.infradead.org; Mon, 25 Mar 2013 15:02:59 +0000 Received: by mail-wi0-f178.google.com with SMTP id ez12so2148264wid.5 for ; Mon, 25 Mar 2013 08:02:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=i5QQvPb26VvYC9uO4KrVHb1hmhvOjlCCehx6xf+psf8=; b=kCo3/oLYbn+XKi/HpR2dKtofm5I9EzMZyhUk+U83t5ghizSMX8/O8u05acaQUoSsZB BLWr283tOJu+LP2sQmlpIeBskCA2NDZQmObqU+uyERKOoQxLkQtdv61yMkK9z92pQMJ0 C8MloD/IvE4k2Tyaj5wp3qAdBbAAmS+lfAhK+JQwYPQ6BofIj7B6a445rb8ai4MZ5ToA K0wGo/fQ8178DJZWzAfPBy6pYDQ0o28/tKBU+aFL+MEf7B1kw6xiNPGFN82IBHW9IgvY 2hEWnw4NFPKGC/NsBqPoCLqfckZ/gkNqE/ePn77DIqzvdR5uUvpDe6zhwudZ9bZEYade dNag== X-Received: by 10.194.170.165 with SMTP id an5mr18687342wjc.41.1364223775630; Mon, 25 Mar 2013 08:02:55 -0700 (PDT) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPS id f1sm23002006wib.0.2013.03.25.08.02.54 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Mar 2013 08:02:54 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] mfd: db8500-prcmu: Fetch the PRCMU TCPM base address from Device Tree Date: Mon, 25 Mar 2013 15:02:38 +0000 Message-Id: <1364223758-17621-3-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1364223758-17621-1-git-send-email-lee.jones@linaro.org> References: <1364223758-17621-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQnP2E4XBKsCwc6pqXpt1cMRO9ai5zCF5R2hmZ8GnU4ykEBzF4v3nKPfmhFRhvzoZ7W3ZSPt X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130325_110258_137765_B9514B2A X-CRM114-Status: GOOD ( 13.63 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Lee Jones , linus.walleij@stericsson.com, arnd@arndb.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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 A recent move to send the base addresses though the PRCMU platform device resource instead of defines found in , means that dbx500 devices can no longer boot successfully when booting with Device Tree enabled. This patch ensures the addresses are obtained correctly from DT instead. Signed-off-by: Lee Jones --- drivers/mfd/db8500-prcmu.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index 8602bf8..a998edc 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c @@ -3159,8 +3159,9 @@ static void db8500_prcmu_update_cpufreq(void) */ static int db8500_prcmu_probe(struct platform_device *pdev) { - struct device_node *np = pdev->dev.of_node; struct prcmu_pdata *pdata = dev_get_platdata(&pdev->dev); + struct device_node *np = pdev->dev.of_node; + struct device_node *tcdm_np; int irq = 0, err = 0, i; struct resource *res; @@ -3169,11 +3170,19 @@ static int db8500_prcmu_probe(struct platform_device *pdev) dbx500_fw_version_init(pdev, pdata->version_offset, np); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "prcmu-tcdm"); if (!res) { - dev_err(&pdev->dev, "no prcmu tcdm region provided\n"); - return -ENOENT; - } - tcdm_base = devm_ioremap(&pdev->dev, res->start, - resource_size(res)); + if (np) { + tcdm_np = of_find_node_by_name(np->parent, + "prcmu-tcdm-per4"); + if (!tcdm_np) { + dev_err(&pdev->dev, + "no prcmu tcdm region provided\n"); + return -ENOENT; + } + tcdm_base = of_iomap(tcdm_np, 0); + } + } else + tcdm_base = devm_ioremap(&pdev->dev, res->start, + resource_size(res)); /* Clean up the mailbox interrupts after pre-kernel code. */ writel(ALL_MBOX_BITS, PRCM_ARM_IT1_CLR);