From patchwork Sat May 30 13:40:35 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 27052 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4UDjor1005861 for ; Sat, 30 May 2009 13:46:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751660AbZE3Nqh (ORCPT ); Sat, 30 May 2009 09:46:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758597AbZE3Nqh (ORCPT ); Sat, 30 May 2009 09:46:37 -0400 Received: from qw-out-2122.google.com ([74.125.92.24]:48254 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751660AbZE3Nqh (ORCPT ); Sat, 30 May 2009 09:46:37 -0400 Received: by qw-out-2122.google.com with SMTP id 5so4387342qwd.37 for ; Sat, 30 May 2009 06:46:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=dKd5SyFE60KfVB4xl5CZskZVlJVDE0awZydeyqz35rI=; b=m5GP0yDi6OQ78R04GgNGNxJcIXHduMXrcskZwBGkndbsdUJ7EBNlbXrRQg8VN/KVIZ XuVCP6Ia0+0ZMpc1m1XQ0zcW4iBZmm9gzbpRo4fXKqg30yKpsNUafCcdw6mVmmPB6/KW wJ80miCBlXL5OG9PNJAIw7xDVbAEsMjZ0arBo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=Z/nipBNFBV9dFkgWahBhzvhQ2TVWW6SjfukVKlgYgotr8ec592aFQKiPurxyzD0Ag6 EnlA2ODZeYt3EzWDqFYkI2z38k8t1B7+uf8QSflEY3tZcG5Q++vLvS2h6vyFfqVwZ56o FmvDgCvv7OFeZAYjpLGz1gHXUKLxNFGcnV8IY= MIME-Version: 1.0 Received: by 10.229.85.132 with SMTP id o4mr1337046qcl.0.1243690835277; Sat, 30 May 2009 06:40:35 -0700 (PDT) Date: Sat, 30 May 2009 06:40:35 -0700 Message-ID: <5e088bd90905300640sc9837b4x6055c5c262c18a8c@mail.gmail.com> Subject: [PATCH/RFC] ARM: OMAP: Initialize MADC clock divider and clock From: Steve Sakoman To: "linux-omap@vger.kernel.org" Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Though the comment in clocks_init claims to initialize the MADC clocks, it wasn't actually being done. This patch implements minimal MADC clock initialization. Compile/run tested on Overo (prior to patch MADC access would always timeout) the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mfd/twl4030-core.c b/drivers/mfd/twl4030-core.c index 769b34b..c5ca36d 100644 --- a/drivers/mfd/twl4030-core.c +++ b/drivers/mfd/twl4030-core.c @@ -159,6 +159,7 @@ /* Few power values */ #define R_CFG_BOOT 0x05 +#define R_GPBR1 0x0C #define R_PROTECT_KEY 0x0E /* access control values for R_PROTECT_KEY */ @@ -166,6 +167,10 @@ #define KEY_UNLOCK2 0xec #define KEY_LOCK 0x00 +/* MADC clock values for R_GPBR1 */ +#define MADC_HFCLK_EN 0x80 +#define DEFAULT_MADC_CLK_EN 0x10 + /* some fields in R_CFG_BOOT */ #define HFCLK_FREQ_19p2_MHZ (1 << 0) #define HFCLK_FREQ_26_MHZ (2 << 0) @@ -717,6 +722,11 @@ static void __init clocks_init(struct device *dev) ctrl |= HIGH_PERF_SQ; e |= unprotect_pm_master(); /* effect->MADC+USB ck en */ + + if (twl_has_madc()) + e |= twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, + MADC_HFCLK_EN | DEFAULT_MADC_CLK_EN, R_GPBR1); + e |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, ctrl, R_CFG_BOOT); e |= protect_pm_master(); -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in