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: 10414 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 D809123E02 for ; Tue, 31 Jul 2012 13:39:37 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id A841EA18CF5 for ; Tue, 31 Jul 2012 13:39:37 +0000 (UTC) Received: by mail-yx0-f180.google.com with SMTP id q6so5921364yen.11 for ; Tue, 31 Jul 2012 06:39:37 -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=knRk5O5E9XEgo87u9bvryYFEo1DZ91p0YCydHgiVx+8=; b=e8EIk7Nrm5WT9sw0GGaXdwEXlE83uE3z/TQHv62QAPNYJDKGiczxi0zl/6Civq9axc pXcbUkcZT62LtbRpGzc/tZH70vSBZLk1D4pkADICFK53qOI7vfzxHnOEIxnv/M85ZmAK bETcG+8B/irajHfWbjVx7Kbiu8qHupNLUZoPxhdstt0mpgozRbKpgh6nfMIzEaxL+Ndy oyHngAPqj1UGh5EEjWGv9PzUDdDkHBPEA8Sf5PDVpSj2RwYjZsxV42V5OQcbF0p5IGT+ 7Usk68Xch3qxkiTaKdmGxPgWaFiNBG0irUfQ0JwAbfLc8z4RzqgN6qnZGj2Ae3G9cOnn u8nQ== Received: by 10.50.160.168 with SMTP id xl8mr2011873igb.25.1343741977151; Tue, 31 Jul 2012 06:39:37 -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.87.40 with SMTP id u8csp143518igz; Tue, 31 Jul 2012 06:39:36 -0700 (PDT) Received: by 10.216.234.231 with SMTP id s81mr8108656weq.34.1343741976201; Tue, 31 Jul 2012 06:39:36 -0700 (PDT) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id s2si310780wiz.17.2012.07.31.06.39.35 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jul 2012 06:39:36 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 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-we0-f178.google.com with SMTP id u7so5232514wey.37 for ; Tue, 31 Jul 2012 06:39:35 -0700 (PDT) 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 Cc: STEricsson_nomadik_linux@list.st.com, linus.walleij@stericsson.com, arnd@arndb.de, Lee Jones 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: ALoCoQmSr/dGCzSqaYX+85PD3O9n7nvsId/dIWz8sdxTFZo6AsBsi3GjC1maQlLnBYZlVJepSFb9 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__);