From patchwork Thu Sep 20 12:12:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11555 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 7E7EA1B4E37 for ; Thu, 20 Sep 2012 12:13:39 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id B3144A184EA for ; Thu, 20 Sep 2012 12:13:38 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so2722108iej.11 for ; Thu, 20 Sep 2012 05:13:38 -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=gvZQOoWsNNuYR9+UCJbT1wEkwtN7UKsmtFqHMKfymLo=; b=NXT+K87cT5rpsZREOt06hXlqu8ubJNe6iCgz23gAPbt72l6vF9TxUZP/A8wuEhFxDU KSbqLMkoNDUJXh05KMEldidQHiuujj40L2ZlS/H2QhCrLOeUX2uVY4M/HmnVy83J3HI3 rF+LV4sksVvESOWJJIi2uFpd85x62wzFlc5q6FxIXBYxpiOGjMHjXrL8NmFfBxVVjbt3 q4AqHt4WqpaEYt5Qp8rVe5Yn96e3h2Dc3M9jDEF74FJGeWXCQf9QKDyJAz2VLYMeGJsm DWq1bu7MfihaEMtZzwhWTlV2zGoFc4sEuU9hSIXW41kWLDbyimQqxHXSvlTUXnxSgaRv 8mcQ== Received: by 10.50.195.134 with SMTP id ie6mr1475670igc.28.1348143218502; Thu, 20 Sep 2012 05:13:38 -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 ex8csp71627igc; Thu, 20 Sep 2012 05:13:37 -0700 (PDT) Received: by 10.216.255.18 with SMTP id i18mr1075667wes.45.1348143216908; Thu, 20 Sep 2012 05:13: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 z42si7296505weo.132.2012.09.20.05.13.36 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 20 Sep 2012 05:13: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 u7so1482334wey.37 for ; Thu, 20 Sep 2012 05:13:36 -0700 (PDT) Received: by 10.180.105.163 with SMTP id gn3mr4191363wib.2.1348143214688; Thu, 20 Sep 2012 05:13:34 -0700 (PDT) Received: from localhost.localdomain (LPuteaux-156-14-44-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by mx.google.com with ESMTPS id w7sm32394460wiz.0.2012.09.20.05.13.33 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 20 Sep 2012 05:13:34 -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, olof.johansson@gmail.com, Lee Jones Subject: [PATCH 18/32] ARM: ux500: Fork MSP platform registration for step-by-step DT enablement Date: Thu, 20 Sep 2012 14:12:36 +0200 Message-Id: <1348143170-2130-19-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1348143170-2130-1-git-send-email-lee.jones@linaro.org> References: <1348143170-2130-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQk02/nEU/irQmmu2hFUyKi4LOZclNGV2QVlaRVlR33sDzlvQCPdV3kjMJZCESndB2bOTtUK 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 +- arch/arm/mach-ux500/board-mop500.h | 2 ++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-ux500/board-mop500-msp.c b/arch/arm/mach-ux500/board-mop500-msp.c index dcf5ea9..bfd4851 100644 --- a/arch/arm/mach-ux500/board-mop500-msp.c +++ b/arch/arm/mach-ux500/board-mop500-msp.c @@ -171,6 +171,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 a799477..e7593b0 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -804,7 +804,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 diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h index bdae9b0..c6daea2 100644 --- a/arch/arm/mach-ux500/board-mop500.h +++ b/arch/arm/mach-ux500/board-mop500.h @@ -95,6 +95,8 @@ void __init mop500_pinmaps_init(void); void __init snowball_pinmaps_init(void); void __init hrefv60_pinmaps_init(void); void mop500_msp_init(struct device *parent); +/* Due for removal once the MSP driver has been fully DT:ed. */ +void mop500_of_msp_init(struct device *parent); int __init mop500_uib_init(void); void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info,