From patchwork Thu Sep 2 10:20:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kim Kukjin X-Patchwork-Id: 177862 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: Thu, 02 Sep 2010 11:20:28 +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 1Or6uC-0002wN-Az for chris@printf.net; Thu, 02 Sep 2010 11:20:28 +0100 Received: by mail.laptop.org (Postfix) id F289A24743; Thu, 2 Sep 2010 06:20:08 -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 E62A324742 for ; Thu, 2 Sep 2010 06:20:08 -0400 (EDT) X-ASG-Debug-ID: 1283422823-0b7424130001-zHW3sV Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by spam.laptop.org with ESMTP id 3QhECVcEyVpZJsLc for ; Thu, 02 Sep 2010 06:20:24 -0400 (EDT) X-Barracuda-Envelope-From: linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752696Ab0IBKUK (ORCPT ); Thu, 2 Sep 2010 06:20:10 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:29752 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752319Ab0IBKUG (ORCPT ); Thu, 2 Sep 2010 06:20:06 -0400 Received: from epmmp2 (mailout2.samsung.com [203.254.224.25]) by mailout2.samsung.com (Sun Java(tm) System Messaging Server 7u3-15.01 64bit (built Feb 12 2010)) with ESMTP id <0L8400ATR7DF9B10@mailout2.samsung.com> for linux-mmc@vger.kernel.org; Thu, 02 Sep 2010 19:20:03 +0900 (KST) Received: from kgenekim ([12.23.103.96]) by mmp2.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0L84009MY7DFKW@mmp2.samsung.com> for linux-mmc@vger.kernel.org; Thu, 02 Sep 2010 19:20:04 +0900 (KST) Date: Thu, 02 Sep 2010 19:20:14 +0900 From: Kukjin Kim X-ASG-Orig-Subj: RE: [PATCH] sdhci-s3c: support non-standard clock setting for c210 Subject: RE: [PATCH] sdhci-s3c: support non-standard clock setting for c210 In-reply-to: <4C7CDA39.1020907@samsung.com> To: 'Jaehoon Chung' , linux-mmc@vger.kernel.org, 'Kyungmin Park' , matt@console-pimps.org, 'Marek Szyprowski' , 'Andrew Morton' , 'Ben Dooks' Message-id: <005101cb4a88$7283d080$578b7180$%kim@samsung.com> MIME-version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Content-type: text/plain; charset=us-ascii Content-language: ko Content-transfer-encoding: 7BIT Thread-index: ActI981hFuf4R7dBTtauCMsChQHPpgBhebEw References: <4C7CDA39.1020907@samsung.com> 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: 1283422823 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= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.39696 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 71ad416..1ac2f36 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -96,6 +96,11 @@ static unsigned int sdhci_s3c_get_max_clk(struct sdhci_host *host) unsigned int rate, max; int clk; + /* There is only one clock source(sclk) if there is no clock divider + * in the host controller */ + if(host->quirks & SDHCI_QUIRK_BROKEN_CLOCK_DIVIDER) + return clk_round_rate(ourhost->clk_bus[ourhost->cur_clk], UINT_MAX); + /* note, a reset will reset the clock source */