From patchwork Fri Feb 19 09:12:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 80561 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1J9CNBC009539 for ; Fri, 19 Feb 2010 09:12:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752108Ab0BSJMW (ORCPT ); Fri, 19 Feb 2010 04:12:22 -0500 Received: from mail-yw0-f197.google.com ([209.85.211.197]:32797 "EHLO mail-yw0-f197.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752056Ab0BSJMU (ORCPT ); Fri, 19 Feb 2010 04:12:20 -0500 Received: by ywh35 with SMTP id 35so1865971ywh.4 for ; Fri, 19 Feb 2010 01:12:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=E1Xxq9vsV/IyM9Ev+xNE3rzsjAvALi0stE8DsnpxIdU=; b=PD56NJSdubOXfefllzmKhgHT5qFetjQ7knNPZ3BK0OgdFNHDCAHZ5a8wP21XjWnH4o DgCFCBArfuLXzJDo/flN+hNHEkQsWZqW3/epIp/r4mODjcyaoWdrkm/cBqrHPk+Q7/LH zfG/q0mwkmpONQBt/epqr8NCnSYt5vOjPjt3w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=ay9oFtXY08wHnFyjVXN7rtEsPFwIL51oL20JMgY/7JDK4TIy7s8b5JHA2X2XJQLR2S 1pvUg4+QxWzFTJlA3o/kzMNyih+yM0GrdNodg0BmsqGzOQX4CeKAF/V40LWXq+A+T1PH e2vcsPOLXPoX5HHhB6ea/tTMBUjHZv7H82Hws= Received: by 10.90.40.4 with SMTP id n4mr342211agn.44.1266570739916; Fri, 19 Feb 2010 01:12:19 -0800 (PST) Received: from ?127.0.0.1? (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id 15sm1332402gxk.10.2010.02.19.01.12.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 19 Feb 2010 01:12:19 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Fri, 19 Feb 2010 18:12:00 +0900 Message-Id: <20100219091200.472.86301.sendpatchset@t400s> Subject: [PATCH] sh: clock-cpg div4 set_rate() shift fix Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 19 Feb 2010 09:12:24 +0000 (UTC) --- 0001/arch/sh/kernel/cpu/clock-cpg.c +++ work/arch/sh/kernel/cpu/clock-cpg.c 2010-02-19 16:21:09.000000000 +0900 @@ -192,8 +192,8 @@ static int sh_clk_div4_set_rate(struct c return idx; value = __raw_readl(clk->enable_reg); - value &= ~0xf; - value |= idx; + value &= ~(0xf << clk->enable_bit); + value |= (idx << clk->enable_bit); __raw_writel(value, clk->enable_reg); return 0;