From patchwork Fri Aug 24 14:01:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 1371251 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 772463FC81 for ; Fri, 24 Aug 2012 14:10:04 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T4uW7-0007RO-Tc; Fri, 24 Aug 2012 14:05:44 +0000 Received: from mail-wi0-f171.google.com ([209.85.212.171]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T4uT0-0005tt-2Z for linux-arm-kernel@lists.infradead.org; Fri, 24 Aug 2012 14:02:31 +0000 Received: by mail-wi0-f171.google.com with SMTP id hq4so711266wib.0 for ; Fri, 24 Aug 2012 07:02:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=+xLBgeNFJsoh6AhsZiXw5Qck9bP0pOqdZ4WkKsLH440=; b=UpW7UayQV2t++c1z/8nEtjyY/4rWuUS/TjXv4CiO8iB0zy6C0dONC1Nw7/Sck62+p6 feBUGOrSJ7CLvbzu2SKWJobsLqMH6zHuklSmX2J2A9yzm1gveT2+d1bKY8QotNh/ux0u 4ZDKZ/qC7/E3CKmkQOTKULLAok/Om6cQTbjGqHowv5thDopoCCnsuBcx+iDGaMVvI+bx 2DhW63bAGlgIY8iP4VuLej+FXOqWydiCHnlqgQgvTNEJB9ZuZq22Cq3ElfZx3BHiQDKk np7tbIpRNf7SsoxqhKXLZDr8BgHwwpmDpHjJPv1X00d+w45ddp9g+x3+QKsSJZn1jACM XDqQ== Received: by 10.180.14.8 with SMTP id l8mr5853552wic.6.1345816949663; Fri, 24 Aug 2012 07:02:29 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id eu4sm4556709wib.2.2012.08.24.07.02.27 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 24 Aug 2012 07:02:28 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/17] ARM: ux500: Fork MSP platform registration for step-by-step DT enablement Date: Fri, 24 Aug 2012 15:01:46 +0100 Message-Id: <1345816913-4113-11-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1345816913-4113-1-git-send-email-lee.jones@linaro.org> References: <1345816913-4113-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmzak4xwlRgjVWb0ytmjqE0A5bnayn6qcXXS2AgET7DXR3lQCCSr1Qu2rguUlrXzWbcVU4Z X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.171 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: ola.o.lilja@stericsson.com, alsa-devel@alsa-project.org, linus.walleij@stericsson.com, arnd@arndb.de, roger.xr.nilsson@stericsson.com, broonie@opensource.wolfsonmicro.com, STEricsson_nomadik_linux@list.st.com, Lee Jones X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org We've done this before and it worked well last time. Here we're duplicating a complex registration function to ease the process of enabling it for Device Tree. As there are quite a few steps taken during the registration process, it makes sense to break them up into more manageable chunks. This patch will aid us. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500-msp.c | 20 ++++++++++++++++++++ arch/arm/mach-ux500/board-mop500.c | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-ux500/board-mop500-msp.c b/arch/arm/mach-ux500/board-mop500-msp.c index 1a67577..24a3604 100644 --- a/arch/arm/mach-ux500/board-mop500-msp.c +++ b/arch/arm/mach-ux500/board-mop500-msp.c @@ -172,6 +172,26 @@ static struct msp_i2s_platform_data msp3_platform_data = { .msp_i2s_dma_tx = NULL, }; +/* Due for removal once the MSP driver has been fully DT:ed. */ +void mop500_of_msp_init(struct device *parent) +{ + pr_info("%s: Register platform-device 'snd-soc-u8500'.\n", __func__); + platform_device_register(&snd_soc_mop500); + + pr_info("Initialize MSP I2S-devices.\n"); + db8500_add_msp_i2s(parent, 0, U8500_MSP0_BASE, IRQ_DB8500_MSP0, + &msp0_platform_data); + db8500_add_msp_i2s(parent, 1, U8500_MSP1_BASE, IRQ_DB8500_MSP1, + &msp1_platform_data); + db8500_add_msp_i2s(parent, 2, U8500_MSP2_BASE, IRQ_DB8500_MSP2, + &msp2_platform_data); + db8500_add_msp_i2s(parent, 3, U8500_MSP3_BASE, IRQ_DB8500_MSP1, + &msp3_platform_data); + + pr_info("%s: Register platform-device 'ux500-pcm'\n", __func__); + platform_device_register(&ux500_pcm); +} + void mop500_msp_init(struct device *parent) { pr_info("%s: Register platform-device 'snd-soc-mop500'.\n", __func__); diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 11dd962..8f419b1 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -807,7 +807,7 @@ static void __init u8500_init_machine(void) mop500_uib_init(); } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { - mop500_msp_init(parent); + mop500_of_msp_init(parent); } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) { /* * The HREFv60 board removed a GPIO expander and routed