From patchwork Tue Jan 19 08:09:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 73827 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0J88pOa007724 for ; Tue, 19 Jan 2010 08:09:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755339Ab0ASIJI (ORCPT ); Tue, 19 Jan 2010 03:09:08 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755374Ab0ASIJI (ORCPT ); Tue, 19 Jan 2010 03:09:08 -0500 Received: from mail.gmx.net ([213.165.64.20]:59962 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755339Ab0ASIJH (ORCPT ); Tue, 19 Jan 2010 03:09:07 -0500 Received: (qmail invoked by alias); 19 Jan 2010 08:09:05 -0000 Received: from p57BD1A13.dip0.t-ipconnect.de (EHLO axis700.grange) [87.189.26.19] by mail.gmx.net (mp009) with SMTP; 19 Jan 2010 09:09:05 +0100 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX1/a2UpstF3aOYwIMoi+HLhGbLXvt54E5k4Qd01X+e R6ok/zvS7/2ASc Received: from lyakh (helo=localhost) by axis700.grange with local-esmtp (Exim 4.63) (envelope-from ) id 1NX99C-0001Ky-LT; Tue, 19 Jan 2010 09:09:10 +0100 Date: Tue, 19 Jan 2010 09:09:10 +0100 (CET) From: Guennadi Liakhovetski To: alsa-devel@alsa-project.org cc: linux-sh@vger.kernel.org, Liam Girdwood , Kuninori Morimoto , Mark Brown , Magnus Damm Subject: [PATCH 4/4] sh: audio support for the sh7722 Migo-R board In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Y-GMX-Trusted: 0 X-FuHaFi: 0.44 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c index e1972a8..8f2bd4e 100644 --- a/arch/sh/boards/mach-migor/setup.c +++ b/arch/sh/boards/mach-migor/setup.c @@ -419,6 +419,9 @@ static struct i2c_board_info migor_i2c_devices[] = { I2C_BOARD_INFO("migor_ts", 0x51), .irq = 38, /* IRQ6 */ }, + { + I2C_BOARD_INFO("wm8978", 0x1a), + }, }; static struct i2c_board_info migor_i2c_camera[] = { @@ -631,6 +634,19 @@ static int __init migor_devices_setup(void) platform_resource_setup_memory(&migor_ceu_device, "ceu", 4 << 20); + /* SIU: Port B */ + gpio_request(GPIO_FN_SIUBOLR, NULL); + gpio_request(GPIO_FN_SIUBOBT, NULL); + gpio_request(GPIO_FN_SIUBISLD, NULL); + gpio_request(GPIO_FN_SIUBOSLD, NULL); + gpio_request(GPIO_FN_SIUMCKB, NULL); + + /* + * The original driver sets SIUB OLR/OBT, ILR/IBT, and SIUA OLR/OBT to + * output. Need only SIUB, set to output for master mode (table 34.2) + */ + ctrl_outw(ctrl_inw(PORT_MSELCRA) | 1, PORT_MSELCRA); + i2c_register_board_info(0, migor_i2c_devices, ARRAY_SIZE(migor_i2c_devices)); diff --git a/arch/sh/include/mach-migor/mach/migor.h b/arch/sh/include/mach-migor/mach/migor.h index cee6cb8..42fccf9 100644 --- a/arch/sh/include/mach-migor/mach/migor.h +++ b/arch/sh/include/mach-migor/mach/migor.h @@ -1,6 +1,7 @@ #ifndef __ASM_SH_MIGOR_H #define __ASM_SH_MIGOR_H +#define PORT_MSELCRA 0xa4050180 #define PORT_MSELCRB 0xa4050182 #define BSC_CS4BCR 0xfec10010 #define BSC_CS6ABCR 0xfec1001c