From patchwork Mon Apr 14 00:56:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 3975561 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 024A5BFF02 for ; Mon, 14 Apr 2014 00:57:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 20FB72014A for ; Mon, 14 Apr 2014 00:57:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 51F832015D for ; Mon, 14 Apr 2014 00:56:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750958AbaDNA47 (ORCPT ); Sun, 13 Apr 2014 20:56:59 -0400 Received: from mail-pb0-f54.google.com ([209.85.160.54]:46503 "EHLO mail-pb0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750930AbaDNA46 (ORCPT ); Sun, 13 Apr 2014 20:56:58 -0400 Received: by mail-pb0-f54.google.com with SMTP id ma3so7603421pbc.13 for ; Sun, 13 Apr 2014 17:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:subject:user-agent:to:cc:in-reply-to :references:mime-version:content-type; bh=Tstlh2nF9+KhOzk2lUb6ffcgaDq9FzwW6/Pc9VM0Vok=; b=guQFudykZDre91t6lB80BKT3gIZqOzimJRA1ApIJjpy55VZQEZXtvaXvwIykqTXhm4 Edlmd3Kwv8fMU6h25pLnQX2J1uwpcYfYYAX06LD8uOchws/L+KVgv4wcBeBDRnxL4yyl is1e7nrbCOrdu05QBb162kKfsk3M1gR0vCi0RO8bU/lWg5Zb+N87L3+0GwklYDwCBMz9 +0Bcfif5nirbdRwxeUf9VXD9Q838ptmDj+cdd5HnV+ki9WTXEXi45ztFlZ4O6AE/I0pJ mZ8DJPyTUDXkQwxmlEyPOvC7DAHJDRj9dYibwE4fmbwgPIFFpjcIbCpDaRqm10d1wYlh 2dAw== X-Received: by 10.68.136.226 with SMTP id qd2mr26266054pbb.72.1397437018309; Sun, 13 Apr 2014 17:56:58 -0700 (PDT) Received: from remon.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id it4sm30166241pbd.48.2014.04.13.17.56.56 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 13 Apr 2014 17:56:57 -0700 (PDT) Date: Sun, 13 Apr 2014 17:56:57 -0700 (PDT) Message-ID: <87ob0420fc.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto Subject: [PATCH 3/7] ARM: shmobile: bockw: remove old style audio clock User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Simon , broonie@kernel.org Cc: Magnus , linux-sh@vger.kernel.org, Kuninori Morimoto , alsa-devel@alsa-project.org In-Reply-To: <87sipg20h1.wl%kuninori.morimoto.gx@gmail.com> References: <87sipg20h1.wl%kuninori.morimoto.gx@gmail.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 From: Kuninori Morimoto Current audio clock didn't have dependency to device/driver, but, it was not good design for DT support. To avoid branch merge conflict issue, it is using this load map, and this patch is 3) part. 1) add new style clock in platform 2) add new style clock method in driver 3) remove old tyle clock from platform Signed-off-by: Kuninori Morimoto --- arch/arm/mach-shmobile/board-bockw.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index b4122f8..1aca107 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c @@ -591,6 +591,7 @@ static void __init bockw_init(void) { void __iomem *base; struct clk *clk; + struct platform_device *pdev; int i; r8a7778_clock_init(); @@ -673,9 +674,6 @@ static void __init bockw_init(void) } /* for Audio */ - clk = clk_get(NULL, "audio_clk_b"); - clk_set_rate(clk, 24576000); - clk_put(clk); rsnd_codec_power(5, 1); /* enable ak4642 */ platform_device_register_simple( @@ -684,11 +682,15 @@ static void __init bockw_init(void) platform_device_register_simple( "ak4554-adc-dac", 1, NULL, 0); - platform_device_register_resndata( + pdev = platform_device_register_resndata( &platform_bus, "rcar_sound", -1, rsnd_resources, ARRAY_SIZE(rsnd_resources), &rsnd_info, sizeof(rsnd_info)); + clk = clk_get(&pdev->dev, "clk_b"); + clk_set_rate(clk, 24576000); + clk_put(clk); + for (i = 0; i < ARRAY_SIZE(rsnd_card_info); i++) { struct platform_device_info cardinfo = { .parent = &platform_bus,