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: 15599 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 78B0723E3E for ; Mon, 25 Mar 2013 15:02:57 +0000 (UTC) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com [209.85.215.41]) by fiordland.canonical.com (Postfix) with ESMTP id 3C3C5A19409 for ; Mon, 25 Mar 2013 15:02:57 +0000 (UTC) Received: by mail-la0-f41.google.com with SMTP id fo12so11593013lab.14 for ; Mon, 25 Mar 2013 08:02:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=i5QQvPb26VvYC9uO4KrVHb1hmhvOjlCCehx6xf+psf8=; b=QzaYZZ3F5yVq9daYYtb0QRWkh1roiUJJV+dvIoh9ruifgbApk0PQpTBbR5e4qg09M0 klN5RwOA89fR5bDveSwCluWjL6qonhoooIojEv1JTgNqSXaBFiJ8+1gTlQJ+jp20B/Up epRaUWbIcSmzvBTNWKw7qqzsB97cslUS8bJSNiyhE/TLj8VP/6sAXrzJtIy85J2xyc6f nvYVPercGyAvbgwLZjhTU9F0nJrOEabz2IoRcJwsQyoSTa0jB3vdjHMcEYY0psyfiiqg P1WSxuIQSpdUqnrsWb9LbuBL57zelvVExAmACq2/ukxkClEnXGXjovRP1BRTj8HUstsj zgAg== X-Received: by 10.152.105.38 with SMTP id gj6mr6208547lab.25.1364223776789; Mon, 25 Mar 2013 08:02:56 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.112.147.5 with SMTP id tg5csp52504lbb; Mon, 25 Mar 2013 08:02:56 -0700 (PDT) X-Received: by 10.180.84.165 with SMTP id a5mr26432305wiz.6.1364223775920; Mon, 25 Mar 2013 08:02:55 -0700 (PDT) Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]) by mx.google.com with ESMTPS id ln10si743079wic.71.2013.03.25.08.02.55 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Mar 2013 08:02:55 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::235 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c05::235; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c05::235 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wi0-f181.google.com with SMTP id hj8so3069052wib.14 for ; Mon, 25 Mar 2013 08:02:55 -0700 (PDT) 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 Cc: arnd@arndb.de, linus.walleij@stericsson.com, Lee Jones 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: ALoCoQksaJWhx4rMly9etepwd5raUDZeU12bjTw+kKO56steTrPKlm9BTJIqU64WdAj24kin2Rsl 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);