From patchwork Wed Sep 1 09:45:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 177692 Return-path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on void.printf.net X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.9 tests=RCVD_IN_DNSWL_LOW autolearn=disabled version=3.2.5 Envelope-to: chris@printf.net Delivery-date: Wed, 01 Sep 2010 10:57:51 +0100 Received: from lists.laptop.org ([18.85.2.145] helo=mail.laptop.org) by void.printf.net with esmtp (Exim 4.69) (envelope-from ) id 1Oqk4l-00072I-DX for chris@printf.net; Wed, 01 Sep 2010 10:57:51 +0100 Received: by mail.laptop.org (Postfix) id BA94124542; Wed, 1 Sep 2010 05:57:31 -0400 (EDT) Delivered-To: cjb@laptop.org Received: from spam.laptop.org (spam.laptop.org [18.85.46.23]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.laptop.org (Postfix) with ESMTPS id D3C2F24538 for ; Wed, 1 Sep 2010 05:57:30 -0400 (EDT) X-ASG-Debug-ID: 1283335067-0b74c9690002-zHW3sV Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by spam.laptop.org with ESMTP id vwr7fMS0Sfgf2mWN for ; Wed, 01 Sep 2010 05:57:47 -0400 (EDT) X-Barracuda-Envelope-From: linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752767Ab0IAJ5p (ORCPT ); Wed, 1 Sep 2010 05:57:45 -0400 Received: from db3ehsobe003.messaging.microsoft.com ([213.199.154.141]:38618 "EHLO DB3EHSOBE003.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754663Ab0IAJ5o (ORCPT ); Wed, 1 Sep 2010 05:57:44 -0400 Received: from mail21-db3-R.bigfish.com (10.3.81.252) by DB3EHSOBE003.bigfish.com (10.3.84.23) with Microsoft SMTP Server id 8.1.436.0; Wed, 1 Sep 2010 09:42:40 +0000 Received: from mail21-db3 (localhost.localdomain [127.0.0.1]) by mail21-db3-R.bigfish.com (Postfix) with ESMTP id 2EF54B084BB for ; Wed, 1 Sep 2010 09:50:57 +0000 (UTC) X-SpamScore: -2 X-BigFish: VS-2(zzbb2cKzz1202hzz8275bh1497iz2dh87h2a8h63h) X-FB-DOMAIN-IP-MATCH: fail Received: from mail21-db3 (localhost.localdomain [127.0.0.1]) by mail21-db3 (MessageSwitch) id 1283334656991528_16312; Wed, 1 Sep 2010 09:50:56 +0000 (UTC) Received: from DB3EHSMHS008.bigfish.com (unknown [10.3.81.246]) by mail21-db3.bigfish.com (Postfix) with ESMTP id ECDD734804B for ; Wed, 1 Sep 2010 09:50:56 +0000 (UTC) Received: from az33egw02.freescale.net (192.88.158.103) by DB3EHSMHS008.bigfish.com (10.3.87.108) with Microsoft SMTP Server (TLS) id 14.0.482.44; Wed, 1 Sep 2010 09:42:33 +0000 Received: from de01smr01.freescale.net (de01smr01.freescale.net [10.208.0.31]) by az33egw02.freescale.net (8.14.3/8.14.3) with ESMTP id o819gVuT001462 for ; Wed, 1 Sep 2010 02:42:31 -0700 (MST) Received: from shlinux1.ap.freescale.net ([10.192.225.216]) by de01smr01.freescale.net (8.13.1/8.13.0) with ESMTP id o819uERO023507 for ; Wed, 1 Sep 2010 04:56:15 -0500 (CDT) Received: by shlinux1.ap.freescale.net (Postfix, from userid 1003) id CCE6B4D6002; Wed, 1 Sep 2010 17:45:08 +0800 (CST) From: Richard Zhu To: linux-mmc@vger.kernel.org CC: kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, Richard Zhu X-ASG-Orig-Subj: [PATCH 1/9] sdhci-1: add host's own set_power func to support the controller that used it's own power mechanism Subject: [PATCH 1/9] sdhci-1: add host's own set_power func to support the controller that used it's own power mechanism Date: Wed, 1 Sep 2010 17:45:05 +0800 Message-ID: <1283334305-12453-2-git-send-email-r65037@freescale.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1283334305-12453-1-git-send-email-r65037@freescale.com> References: <1283334305-12453-1-git-send-email-r65037@freescale.com> MIME-Version: 1.0 X-Reverse-DNS: az33egw02.freescale.net Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Barracuda-Connect: vger.kernel.org[209.132.180.67] X-Barracuda-Start-Time: 1283335067 X-Barracuda-URL: http://18.85.46.23:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at laptop.org X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.5 tests=MAILTO_TO_SPAM_ADDR X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.39598 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 MAILTO_TO_SPAM_ADDR URI: Includes a link to a likely spammer email diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 7855121..2a93c27 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1036,6 +1036,11 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned short power) { u8 pwr; + if (host->ops->set_power) { + host->ops->set_power(host, power); + return; + } + if (power == (unsigned short)-1) pwr = 0; else { diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 036cfae..d420b4e 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -316,6 +316,7 @@ struct sdhci_ops { #endif void (*set_clock)(struct sdhci_host *host, unsigned int clock); + void (*set_power)(struct sdhci_host *host, unsigned int power); int (*enable_dma)(struct sdhci_host *host); unsigned int (*get_max_clock)(struct sdhci_host *host);