From patchwork Fri Jul 6 10:11:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Ferre X-Patchwork-Id: 1164661 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 0A29CDF236 for ; Fri, 6 Jul 2012 10:12:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756662Ab2GFKL7 (ORCPT ); Fri, 6 Jul 2012 06:11:59 -0400 Received: from newsmtp5.atmel.com ([204.2.163.5]:31560 "EHLO sjogate2.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750946Ab2GFKL7 (ORCPT ); Fri, 6 Jul 2012 06:11:59 -0400 X-Greylist: delayed 780 seconds by postgrey-1.27 at vger.kernel.org; Fri, 06 Jul 2012 06:11:59 EDT Received: from meyreuil.atmel.fr ([10.159.254.132]) by sjogate2.atmel.com (8.13.6/8.13.6) with ESMTP id q66A7CkS012132; Fri, 6 Jul 2012 03:07:12 -0700 (PDT) Received: from ibiza.rfo.atmel.com ([10.159.245.197]) by meyreuil.atmel.fr (8.11.7p1+Sun/8.11.7) with ESMTP id q66ABp713581; Fri, 6 Jul 2012 12:11:51 +0200 (MEST) From: Nicolas Ferre To: linux-mmc@vger.kernel.org, Ludovic.Desroches@atmel.com Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Nicolas Ferre Subject: [PATCH] mmc: atmel-mci: modify CLKDIV displaying in debugfs Date: Fri, 6 Jul 2012 12:11:51 +0200 Message-Id: <1341569511-11340-1-git-send-email-nicolas.ferre@atmel.com> X-Mailer: git-send-email 1.7.5.4 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Modify clock division displaying in debugfs for matching the new CLKDIV,CLKODD user interface arrangement. Is using the has_odd_clk_div property to choose the proper format. Signed-off-by: Nicolas Ferre --- drivers/mmc/host/atmel-mci.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 1fe20cd..9c5daa2 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -396,11 +396,17 @@ static int atmci_regs_show(struct seq_file *s, void *v) clk_disable(host->mck); spin_unlock_bh(&host->lock); - seq_printf(s, "MR:\t0x%08x%s%s CLKDIV=%u\n", + seq_printf(s, "MR:\t0x%08x%s%s ", buf[ATMCI_MR / 4], buf[ATMCI_MR / 4] & ATMCI_MR_RDPROOF ? " RDPROOF" : "", - buf[ATMCI_MR / 4] & ATMCI_MR_WRPROOF ? " WRPROOF" : "", - buf[ATMCI_MR / 4] & 0xff); + buf[ATMCI_MR / 4] & ATMCI_MR_WRPROOF ? " WRPROOF" : ""); + if (host->caps.has_odd_clk_div) + seq_printf(s, "{CLKDIV,CLKODD}=%u\n", + ((buf[ATMCI_MR / 4] & 0xff) << 1) + | ((buf[ATMCI_MR / 4] >> 16) & 1)); + else + seq_printf(s, "CLKDIV=%u\n", + (buf[ATMCI_MR / 4] & 0xff)); seq_printf(s, "DTOR:\t0x%08x\n", buf[ATMCI_DTOR / 4]); seq_printf(s, "SDCR:\t0x%08x\n", buf[ATMCI_SDCR / 4]); seq_printf(s, "ARGR:\t0x%08x\n", buf[ATMCI_ARGR / 4]);