From patchwork Mon Nov 5 15:10:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 12672 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 0686223EF8 for ; Mon, 5 Nov 2012 15:11:07 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 6BE2DA19A08 for ; Mon, 5 Nov 2012 15:11:06 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id f6so4196858iag.11 for ; Mon, 05 Nov 2012 07:11:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=vUA2g/fbimRZr9eIgn3RYJjh41iltHozJb62+33U1g8=; b=c0WNZJ3Tq9SzpDIQWu+rUsJ041BN9krxR8M8GRxIxqc5nFJGI6R512XkGCINDoSv7N GE4+o4qv+RuV7FwmswEiU329lKv5MKPMlBygVB6axDmVKUjiY/FCRnmarOcfD0eRy7QR CO4HGzLsg3VnzrrGYm9BMQLd1HPQmkBSVvVevnR6UI4LuYPYhB8JNWMbJ3hZFZeGf1ze +qLRKwVvdvEaVDCnBDTsBO146TM01D/CNj93xaPJ7JS5qrz6HR23JCQ89N5L7oNRIlo8 yrREzF+64jvMmnWVMRDmKd0g4mzEWJvJMZnGKIYTT08NYSFjVY8Q2wLqCIyid6s4MbH7 8baQ== Received: by 10.50.173.34 with SMTP id bh2mr9485371igc.70.1352128266156; Mon, 05 Nov 2012 07:11:06 -0800 (PST) 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.50.67.148 with SMTP id n20csp231271igt; Mon, 5 Nov 2012 07:11:05 -0800 (PST) Received: by 10.180.106.9 with SMTP id gq9mr13706658wib.12.1352128265081; Mon, 05 Nov 2012 07:11:05 -0800 (PST) Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by mx.google.com with ESMTPS id ea6si6868698wib.0.2012.11.05.07.11.04 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Nov 2012 07:11:05 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.173 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.173; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.173 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-f173.google.com with SMTP id hm4so2519064wib.2 for ; Mon, 05 Nov 2012 07:11:04 -0800 (PST) Received: by 10.180.100.97 with SMTP id ex1mr13658572wib.17.1352128264597; Mon, 05 Nov 2012 07:11:04 -0800 (PST) Received: from laptop.vlan14.pylonone.local (78.Red-88-2-49.staticIP.rima-tde.net. [88.2.49.78]) by mx.google.com with ESMTPS id ea9sm12275388wib.11.2012.11.05.07.11.03 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Nov 2012 07:11:03 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, sameo@linux.intel.com Cc: arnd@arndb.de, linus.walleij@stericsson.com, Lee Jones Subject: [PATCH 8/8] mfd: Differentiate between u8500 and u9540 TCDM address mapping Date: Mon, 5 Nov 2012 16:10:36 +0100 Message-Id: <1352128236-11554-9-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1352128236-11554-1-git-send-email-lee.jones@linaro.org> References: <1352128236-11554-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmA111lGWbgtXimLhmqGSmvlDvtFKppdAcmaARcSA//rgt2mFNRliqwgPGroe2JkWD8UeCW The TCDM mappings are quite different from u8500 to u9540. If these aren't correctly specified for a given board, it will fail to boot. Here we add the correct TCDM base for the u9540. Please note that although this patch allows us to boot the u9540, it doesn't provide us with full enablement. For that, another patch-set will follow which completely re-vamps the way the PRCMU is passed TCDM mappings. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- drivers/mfd/db8500-prcmu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index e91a6e6..70898c9 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c @@ -2757,7 +2757,7 @@ static int db8500_irq_init(struct device_node *np) void __init db8500_prcmu_early_init(void) { - if (cpu_is_u8500v2()) { + if (cpu_is_u8500v2() || cpu_is_u9540()) { void *tcpm_base = ioremap_nocache(U8500_PRCMU_TCPM_BASE, SZ_4K); if (tcpm_base != NULL) { @@ -2775,7 +2775,11 @@ void __init db8500_prcmu_early_init(void) iounmap(tcpm_base); } - tcdm_base = __io_address(U8500_PRCMU_TCDM_BASE); + if (cpu_is_u9540()) + tcdm_base = ioremap_nocache(U8500_PRCMU_TCDM_BASE, + SZ_4K + SZ_8K) + SZ_8K; + else + tcdm_base = __io_address(U8500_PRCMU_TCDM_BASE); } else { pr_err("prcmu: Unsupported chip version\n"); BUG();