From patchwork Wed Oct 10 15:18:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 12147 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 0E228293F82 for ; Wed, 10 Oct 2012 15:19:24 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id B3B26A18897 for ; Wed, 10 Oct 2012 15:19:23 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so1064877iej.11 for ; Wed, 10 Oct 2012 08:19:23 -0700 (PDT) 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=nDA9VfyHE0hT4TLoTyHwoUJikN5a8CIIoabarPfX7rs=; b=H1RG8GnHmIUGsoKg0EexnMy4EuJBW1pdShdpgCd7Xv32TFEGE9BszHLZ16NruufTXe ZKqiu3JZgTOcN60vNJNrIKTiuy6YAjuC/affcndtp6vjDDQ+22Jw5rdr1B5Hvahz0WpY a6lyPJd3O0NacQ1+6GIVkHH/aFM4mi6CZzbmna2XbXzgsJaxmBeB13Fmu4az4gkVB2wT Z1I0lViXllnWfbxMmFrw/X2qfhOik/QdXaR/GH4OynLJikLqLEDSL7eZDsfsxo3jlfCe TewBsfOY75uaLvqX3UjPH+knfnVmliuHrDm8PlKOXBzrj6YWW6dzuqNhVrw3XjZPZvdv RZ7w== Received: by 10.50.236.72 with SMTP id us8mr5522860igc.70.1349882363524; Wed, 10 Oct 2012 08:19:23 -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.50.67.148 with SMTP id n20csp239730igt; Wed, 10 Oct 2012 08:19:22 -0700 (PDT) Received: by 10.216.140.73 with SMTP id d51mr14134260wej.217.1349882361769; Wed, 10 Oct 2012 08:19:21 -0700 (PDT) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id t2si29424922wiw.2.2012.10.10.08.19.21 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Oct 2012 08:19:21 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 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-we0-f178.google.com with SMTP id r6so471256wey.37 for ; Wed, 10 Oct 2012 08:19:21 -0700 (PDT) Received: by 10.180.78.102 with SMTP id a6mr13653490wix.20.1349882361287; Wed, 10 Oct 2012 08:19:21 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id eq2sm3295516wib.1.2012.10.10.08.19.19 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Oct 2012 08:19:20 -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 6/6] mfd: Differentiate between u8500 and u9540 TCDM address mapping Date: Wed, 10 Oct 2012 16:18:55 +0100 Message-Id: <1349882335-6786-7-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1349882335-6786-1-git-send-email-lee.jones@linaro.org> References: <1349882335-6786-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQkdwsYfbATyz1JsEhvO21TynyWBFRvsSyUBteiajdXQLNBD4rgCuZZiNW9vwpFzYS0P6++D 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 9d51585..fd0462a 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c @@ -2670,7 +2670,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) { @@ -2688,7 +2688,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();