From patchwork Fri Oct 24 10:37:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 5145701 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6B3FF9F349 for ; Fri, 24 Oct 2014 10:42:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AA7BD2026D for ; Fri, 24 Oct 2014 10:42:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7B00E20220 for ; Fri, 24 Oct 2014 10:42:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XhcI1-0003HA-TG; Fri, 24 Oct 2014 10:40:13 +0000 Received: from mail-pd0-x233.google.com ([2607:f8b0:400e:c02::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XhcGT-0000vD-Ug; Fri, 24 Oct 2014 10:38:38 +0000 Received: by mail-pd0-f179.google.com with SMTP id g10so1254068pdj.10 for ; Fri, 24 Oct 2014 03:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=j0Zj59OIDZLDBYcAhbnKXcCE7hmWXwH2x7cwLhJPhqE=; b=HVpCj5+7j1eidUQZaNrpecp7EsNghk4+a/mtB8/iglTkIKV1UWIYszfrrFkCeAb4zG g7VnXeL8gblu/H13YaxU4LkScqx2B9SavjeP+0TK5XerMvpHQowX8jOPJn9C9i4hrtsA flXyqNTOTosppWpVkc6bBlHtdfgzgo58PXIxVGjwf13mncCLY5XLGDExFTSyMvAz+QjU bxod8WY8r7K2Ds9G4+AU3BXwwkL0ANs5uwIP5+o94ewKBoiAE8HNGu7t3UNwNvu0xPiT T4h5Ev3qiakZXQcLCw9JEatjnsXeaiMwGVEZmvERjEqQnGk3bl89b2uBOOKk/vjBMZ1K hQBg== X-Received: by 10.70.38.201 with SMTP id i9mr3559007pdk.127.1414147097032; Fri, 24 Oct 2014 03:38:17 -0700 (PDT) Received: from fangorn.rup.mentorg.com (nat-min.mentorg.com. [139.181.32.34]) by mx.google.com with ESMTPSA id jc3sm3590019pbb.49.2014.10.24.03.38.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Oct 2014 03:38:16 -0700 (PDT) From: Dmitry Eremin-Solenikov To: linux-arm-kernel@lists.infradead.org, linux-pcmcia@lists.infradead.org, linux-fbdev@vger.kernel.org Subject: [PATCH 5/5] pcmcia: sa1111: provide device clock Date: Fri, 24 Oct 2014 14:37:27 +0400 Message-Id: <1414147047-12892-6-git-send-email-dbaryshkov@gmail.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1414147047-12892-1-git-send-email-dbaryshkov@gmail.com> References: <1414147047-12892-1-git-send-email-dbaryshkov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141024_033838_032557_65744ADE X-CRM114-Status: UNSURE ( 9.41 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: Andrea Adami , Jean-Christophe Plagniol-Villard , Linus Walleij , Tomi Valkeinen , Russell King X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Both pxa2xx (long ago) and sa1100 (now) make use of clock device to get the cpu speed. Make sa1111 glue code provide clock to platform layer. Signed-off-by: Dmitry Eremin-Solenikov --- drivers/pcmcia/sa1111_generic.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c index 65b02c3..c5988be 100644 --- a/drivers/pcmcia/sa1111_generic.c +++ b/drivers/pcmcia/sa1111_generic.c @@ -145,6 +145,9 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops, return -ENOMEM; s->soc.nr = ops->first + i; + s->soc.clk = clk_get(&dev->dev, NULL); + if (IS_ERR(s->soc.clk)) + return -ENODEV; soc_pcmcia_init_one(&s->soc, ops, &dev->dev); s->dev = dev; if (s->soc.nr) { @@ -220,6 +223,7 @@ static int pcmcia_remove(struct sa1111_dev *dev) for (; s; s = next) { next = s->next; soc_pcmcia_remove_one(&s->soc); + clk_put(s->soc.clk); kfree(s); }