From patchwork Mon May 13 14:18:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 16884 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DD59125E14 for ; Mon, 13 May 2013 14:19:54 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id z6sf8278317yhz.7 for ; Mon, 13 May 2013 07:19:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-beenthere:x-received:received-spf:x-received :x-forwarded-to:x-forwarded-for:delivered-to:x-received:received-spf :from:to:cc:subject:date:message-id:x-mailer:mime-version :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=ENMlsut5ImtpOz8PbUi1e8qNovGf3Q8Mdrt/AlLeksc=; b=bpgza2zqe19GgPhf7fVWw8hLY/USODsKYVL9WsmGq/1ElP0h3ziS10XyJGP51AODSi wHeYzkaptPaFeqxIFwd4G0X33Oh0Esq/qIy3QWqdhOSv79TfgOD7Df8IpqTAYn+VSZm9 41sYIuMUuG08LwY6/Xl/YcqQk60cfcwPGjB1Ebca/u3pzS/SWWgSw1Slk5nVfB+nGzLQ 8Gm3d6h3Nqx+GaP/pKwyr9lspFiUJzIK+Bn9bPJjm2RQtJ+xVynb7H5jQxMnEvtrsEYK 8ZjU0Z7BXoC9WsPKbFZk2cAYk6eLHNWSlbhrbh1Ml3j/iYJjhCpEYnZJkmhuA57f++jI U7FA== X-Received: by 10.224.217.195 with SMTP id hn3mr18986934qab.5.1368454761828; Mon, 13 May 2013 07:19:21 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.35.238 with SMTP id l14ls2811370qej.13.gmail; Mon, 13 May 2013 07:19:21 -0700 (PDT) X-Received: by 10.52.29.142 with SMTP id k14mr15697886vdh.124.1368454761629; Mon, 13 May 2013 07:19:21 -0700 (PDT) Received: from mail-vb0-x22e.google.com (mail-vb0-x22e.google.com [2607:f8b0:400c:c02::22e]) by mx.google.com with ESMTPS id gr7si8531751vdc.90.2013.05.13.07.19.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 May 2013 07:19:21 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22e; Received: by mail-vb0-f46.google.com with SMTP id 10so5131981vbe.19 for ; Mon, 13 May 2013 07:19:21 -0700 (PDT) X-Received: by 10.220.189.9 with SMTP id dc9mr18404093vcb.8.1368454761387; Mon, 13 May 2013 07:19:21 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.217.15 with SMTP id hk15csp20704vcb; Mon, 13 May 2013 07:19:20 -0700 (PDT) X-Received: by 10.194.11.70 with SMTP id o6mr40660913wjb.29.1368454760162; Mon, 13 May 2013 07:19:20 -0700 (PDT) Received: from eu1sys200aog110.obsmtp.com (eu1sys200aog110.obsmtp.com [207.126.144.129]) by mx.google.com with SMTP id t45si8565952eel.144.2013.05.13.07.18.52 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 13 May 2013 07:19:20 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.129 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) client-ip=207.126.144.129; Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob110.postini.com ([207.126.147.11]) with SMTP ID DSNKUZD2RwezW5z0KKdmOPw6GsHCSIdie03Q@postini.com; Mon, 13 May 2013 14:19:19 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 26854E2; Mon, 13 May 2013 14:18:44 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id CAF993FF; Mon, 13 May 2013 14:18:43 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 3D16BA8072; Mon, 13 May 2013 16:18:37 +0200 (CEST) Received: from steludxu1397.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.279.5; Mon, 13 May 2013 16:18:43 +0200 From: Ulf Hansson To: , Russell King Cc: , Chris Ball , Ulf Hansson , Fredrik Soderstedt Subject: [PATCH] mmc: mmci: Set actual clock for debug purpose Date: Mon, 13 May 2013 16:18:39 +0200 Message-ID: <1368454719-16420-1-git-send-email-ulf.hansson@stericsson.com> X-Mailer: git-send-email 1.7.10 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQk/jVJQ99ZEO0mpWWtzdFk16jtfnqmpqFitELmQyfDPFtR6QRSW0q7feiT9/8l4p3ZGA7wH X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Ulf Hansson Update cclk to the acutal used value and copy it to the actual_clock variable in the mmc host for debug purpose. Signed-off-by: Fredrik Soderstedt Signed-off-by: Ulf Hansson --- drivers/mmc/host/mmci.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index f4f3038..1170c9c 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -196,6 +196,9 @@ static void mmci_set_clkreg(struct mmci_host *host, unsigned int desired) struct variant_data *variant = host->variant; u32 clk = variant->clkreg; + /* Make sure cclk reflects the current calculated clock */ + host->cclk = 0; + if (desired) { if (desired >= host->mclk) { clk = MCI_CLK_BYPASS; @@ -230,6 +233,9 @@ static void mmci_set_clkreg(struct mmci_host *host, unsigned int desired) /* clk |= MCI_CLK_PWRSAVE; */ } + /* Set actual clock for debug */ + host->mmc->actual_clock = host->cclk; + if (host->mmc->ios.bus_width == MMC_BUS_WIDTH_4) clk |= MCI_4BIT_BUS; if (host->mmc->ios.bus_width == MMC_BUS_WIDTH_8)