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: 10938 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 3B90523E1B for ; Fri, 24 Aug 2012 14:02:32 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 4F533A1893C for ; Fri, 24 Aug 2012 14:02:14 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id j25so1165440iaf.11 for ; Fri, 24 Aug 2012 07:02:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=+xLBgeNFJsoh6AhsZiXw5Qck9bP0pOqdZ4WkKsLH440=; b=T1M1/C+wa/MHEWGk1Jm6PHH5sanKzVNQ9f9jRP1dsJPvGyqyC/uRD34fSeEuH+r6KK VbKHBZ4Z+6N8DJjGUM8vNPNNJHxZoPeILMlr/YpfyEJTuoGwXoPRqtxHzHUYZtjr28o6 KCloCdTfe9SWchbty11EKF+MMBmBepBUH+tx1wOAgTU2yjcybKrvCUeu6oLvcD8CRUvF rNmuk6JRRoZnKuZ2FJM7Jse4eb0rYx3jq1HgSSuZ9mHMlCy+GuiwGO8Y793JKXv0m5fZ 676dwUlZiW/362lv90dq4ThUAz6rrW+cuv/fsozoMARGbhZZkxD12o9UfVKFnar+jh1O 08Cg== Received: by 10.50.207.106 with SMTP id lv10mr2338362igc.0.1345816951608; Fri, 24 Aug 2012 07:02:31 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp321624igc; Fri, 24 Aug 2012 07:02:30 -0700 (PDT) Received: by 10.180.97.33 with SMTP id dx1mr5779918wib.18.1345816950164; Fri, 24 Aug 2012 07:02:30 -0700 (PDT) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id 7si14386415wet.134.2012.08.24.07.02.29 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 24 Aug 2012 07:02:30 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wg0-f50.google.com with SMTP id ds11so1354276wgb.31 for ; Fri, 24 Aug 2012 07:02:29 -0700 (PDT) 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 Cc: STEricsson_nomadik_linux@list.st.com, linus.walleij@stericsson.com, arnd@arndb.de, broonie@opensource.wolfsonmicro.com, ola.o.lilja@stericsson.com, roger.xr.nilsson@stericsson.com, alsa-devel@alsa-project.org, Lee Jones 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: ALoCoQn5oPH9q/2rLs6xJwjNs9mu1FgW3xY4faiA5NfA0DMKO2B2UxXvwf8rSR28zzHJsHAPlC9g 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