From patchwork Tue Jul 31 13:39:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 1260331 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 3B5403FC1A for ; Tue, 31 Jul 2012 14:21:03 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SwDDi-0006kn-KX; Tue, 31 Jul 2012 14:14:46 +0000 Received: from mail-we0-f177.google.com ([74.125.82.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SwCfi-0007vG-4E for linux-arm-kernel@lists.infradead.org; Tue, 31 Jul 2012 13:39:38 +0000 Received: by mail-we0-f177.google.com with SMTP id r3so4892992wey.36 for ; Tue, 31 Jul 2012 06:39:35 -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=knRk5O5E9XEgo87u9bvryYFEo1DZ91p0YCydHgiVx+8=; b=eTtfqZNB3n/lhBLOiY2xx5AyNY4emX7mnGderv8djga0nsXC82gky6d+VmEFQbNRI6 FWqyKrnEOyJJ2m+Ior1F6KjticUp9hmcG/nfoUy8LR7IRTGLq9cXtUSB6Vok23F63KvY HHZz1KI1pYKP3kPV0K8i97eRbtg1QRi/AMSqSly770sxZLuwE1a41kB20Jy1wulsHCwH usynBXvknGqn9g8PdfgC/hXkvadvz+HWRaHgOASKzVeDTMTuAFw6+Rbh5zfdNNTs1P6h Tb0u1MyNpL+6E7K950/sVtDFkCKPelLAWg0lHuM6zq44ZdQWUcM1G+chglsx7t9TZ5o2 7kqA== Received: by 10.180.103.4 with SMTP id fs4mr6952773wib.16.1343741975690; Tue, 31 Jul 2012 06:39:35 -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 el6sm22252911wib.8.2012.07.31.06.39.34 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jul 2012 06:39:35 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, olalilja@yahoo.se, ola.o.lilja@stericsson.com, alsa-devel@alsa-project.org, lrg@ti.com, broonie@opensource.wolfsonmicro.com Subject: [PATCH 08/19] ARM: ux500: Fork MSP platform registration for step-by-step DT enablement Date: Tue, 31 Jul 2012 14:39:02 +0100 Message-Id: <1343741953-17828-9-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343741953-17828-1-git-send-email-lee.jones@linaro.org> References: <1343741953-17828-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmXQ5kFlr/RIMCE0FFyN68b+kegKqIrG/OSp4Vd4THT2WPc7C5AFBNXMIempTzf9NPbIHJ5 X-Spam-Note: CRM114 invocation failed X-Spam-Note: SpamAssassin invocation failed Cc: STEricsson_nomadik_linux@list.st.com, Lee Jones , linus.walleij@stericsson.com, arnd@arndb.de 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. Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500-msp.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm/mach-ux500/board-mop500-msp.c b/arch/arm/mach-ux500/board-mop500-msp.c index 573d912..7dd997a 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-u8500'.\n", __func__);