From patchwork Tue Feb 28 21:46:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 6978 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 1CE1C23E4A for ; Tue, 28 Feb 2012 21:46:16 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id D780EA18025 for ; Tue, 28 Feb 2012 21:46:15 +0000 (UTC) Received: by iage36 with SMTP id e36so2021488iag.11 for ; Tue, 28 Feb 2012 13:46:15 -0800 (PST) Received: from mr.google.com ([10.50.170.41]) by 10.50.170.41 with SMTP id aj9mr24444166igc.0.1330465575269 (num_hops = 1); Tue, 28 Feb 2012 13:46:15 -0800 (PST) Received: by 10.50.170.41 with SMTP id aj9mr19793429igc.0.1330465575227; Tue, 28 Feb 2012 13:46:15 -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.231.11.10 with SMTP id r10csp17712ibr; Tue, 28 Feb 2012 13:46:14 -0800 (PST) Received: by 10.180.107.169 with SMTP id hd9mr25982973wib.0.1330465573959; Tue, 28 Feb 2012 13:46:13 -0800 (PST) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id s57si15260640weq.147.2012.02.28.13.46.13 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 28 Feb 2012 13:46:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of mail-we0-f178.google.com designates 74.125.82.178 as permitted sender) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of mail-we0-f178.google.com designates 74.125.82.178 as permitted sender) smtp.mail= Received: by wera13 with SMTP id a13so1444547wer.37 for ; Tue, 28 Feb 2012 13:46:13 -0800 (PST) Received-SPF: pass (google.com: domain of designates 10.180.83.70 as permitted sender) client-ip=10.180.83.70; Received: from mr.google.com ([10.180.83.70]) by 10.180.83.70 with SMTP id o6mr11375808wiy.19.1330465573532 (num_hops = 1); Tue, 28 Feb 2012 13:46:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.180.83.70 with SMTP id o6mr9054177wiy.19.1330465573478; Tue, 28 Feb 2012 13:46:13 -0800 (PST) Received: from localhost.localdomain (AToulouse-159-1-63-219.w92-134.abo.wanadoo.fr. [92.134.214.219]) by mx.google.com with ESMTPS id dw7sm31483074wib.4.2012.02.28.13.46.10 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 28 Feb 2012 13:46:11 -0800 (PST) From: daniel.lezcano@linaro.org To: sameo@linux.intel.com Cc: linus.walleij@stericsson.com, linux-arm-kernel@lists.infradead.org, rickard.andersson@stericsson.com, patches@linaro.org, linaro-dev@lists.linaro.org Subject: [PATCH 1/5] mfd : ux500 - Cleanup duplicate definitions Date: Tue, 28 Feb 2012 22:46:05 +0100 Message-Id: <1330465569-567-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.5.4 X-Gm-Message-State: ALoCoQmDj7QGlU9xG3zUN2ChLLpNKvjbWic7+dRPoZhpjeFCSo2gUfunrI5wp2tW/QV9qoG4jZhl From: Daniel Lezcano I missed in my previous patch the A9_MASK_REQ[_MASK] were already defined. Let's remove the duplicate definitions. The PRCMU_GIC_DELAY macro could be removed as it is not really useful here. Signed-off-by: Daniel Lezcano --- drivers/mfd/db8500-prcmu.c | 17 +++++++---------- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index b320cc6..d2244dc 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c @@ -821,23 +821,20 @@ u8 db8500_prcmu_get_power_state_result(void) return readb(tcdm_base + PRCM_ACK_MB0_AP_PWRSTTR_STATUS); } -#define PRCMU_A9_MASK_REQ 0x00000328 -#define PRCMU_A9_MASK_REQ_MASK 0x00000001 -#define PRCMU_GIC_DELAY 1 - /* This function decouple the gic from the prcmu */ int db8500_prcmu_gic_decouple(void) { - u32 val = readl(_PRCMU_BASE + PRCMU_A9_MASK_REQ); + u32 val = readl(PRCM_A9_MASK_REQ); /* Set bit 0 register value to 1 */ - writel(val | PRCMU_A9_MASK_REQ_MASK, _PRCMU_BASE + PRCMU_A9_MASK_REQ); + writel(val | PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ, + PRCM_A9_MASK_REQ); /* Make sure the register is updated */ - readl(_PRCMU_BASE + PRCMU_A9_MASK_REQ); + readl(PRCM_A9_MASK_REQ); /* Wait a few cycles for the gic mask completion */ - udelay(PRCMU_GIC_DELAY); + udelay(1); return 0; } @@ -845,10 +842,10 @@ int db8500_prcmu_gic_decouple(void) /* This function recouple the gic with the prcmu */ int db8500_prcmu_gic_recouple(void) { - u32 val = readl(_PRCMU_BASE + PRCMU_A9_MASK_REQ); + u32 val = readl(PRCM_A9_MASK_REQ); /* Set bit 0 register value to 0 */ - writel(val & ~PRCMU_A9_MASK_REQ_MASK, _PRCMU_BASE + PRCMU_A9_MASK_REQ); + writel(val & ~PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ, PRCM_A9_MASK_REQ); return 0; }