From patchwork Fri Nov 12 22:38:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Rodriguez X-Patchwork-Id: 321662 Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oACMgoHk021651 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 12 Nov 2010 22:43:12 GMT Received: from dlep34.itg.ti.com ([157.170.170.115]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id oACMfSFB003892 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Nov 2010 16:41:28 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id oACMfPQB019826; Fri, 12 Nov 2010 16:41:25 -0600 (CST) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 4985D8069F; Fri, 12 Nov 2010 16:41:20 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 45C5D80626 for ; Fri, 12 Nov 2010 16:39:45 -0600 (CST) Received: from white.ext.ti.com (localhost [127.0.0.1]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id oACMdjGk029451 for ; Fri, 12 Nov 2010 16:39:45 -0600 (CST) Received: from psmtp.com (na3sys009amx243.postini.com [74.125.149.127]) by white.ext.ti.com (8.13.7/8.13.7) with SMTP id oACMdiEl007147 for ; Fri, 12 Nov 2010 16:39:44 -0600 Received: from source ([209.85.160.173]) by na3sys009amx243.postini.com ([74.125.148.10]) with SMTP; Fri, 12 Nov 2010 14:39:44 PST Received: by mail-gy0-f173.google.com with SMTP id 10so348142gyd.4 for ; Fri, 12 Nov 2010 14:39:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=iGlR65KeQ9jOZDS+SbJ1/1nmPwRGJrrg0kf5hcptr7Y=; b=mQ6DeyqHdyt/7QHXdVQVhPS2qhc4Jgf3wnG2d5g4DSDGF2IBc9yBJyvriZlVa9NgGz lqdccbCbq8FTb4d8z0JoP8QWI0Wxe6qYRoboZRgvG/f6WHXfm4YrTgjIt2jpl0sQMKgn tE6YJr9AEmqUOsZ9ibo/9EIfT9n/AxHZuOze8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=IZReapXRhJlmsmsunKEr8YTzo88jGRoy5HiWN1lJpiuJGcedzros31vbkFLvxaPFaa 618+6LlDv8XSS9F0ZqyKitQiJbAez2BZCeTqQxJfdvh6H3rXbdCsxrXLLKNMc8d4D2iV yLYjwB2AolzalULNxilwLfjILImdYufURT9Ig= Received: by 10.150.178.16 with SMTP id a16mr4659684ybf.437.1289601583645; Fri, 12 Nov 2010 14:39:43 -0800 (PST) Received: from localhost.localdomain ([200.52.114.70]) by mx.google.com with ESMTPS id v39sm1060655yba.7.2010.11.12.14.39.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 12 Nov 2010 14:39:43 -0800 (PST) From: To: davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH v8 5/9] davinci: Audio support for Omapl138-Hawkboard Date: Fri, 12 Nov 2010 16:38:51 -0600 Message-Id: <1289601535-6746-6-git-send-email-vm.rod25@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1289601535-6746-1-git-send-email-vm.rod25@gmail.com> References: <1289601535-6746-1-git-send-email-vm.rod25@gmail.com> X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:18.33259/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-settings: 2 (0.5000:0.0750) s cv GT3 gt2 gt1 r p m c X-pstn-addresses: from [db-null] Cc: Victor Rodriguez , Russell King , linux-arm-kernel@lists.infradead.org X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 12 Nov 2010 22:43:13 +0000 (UTC) diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c index 114fc9b..115dac0 100644 --- a/arch/arm/mach-davinci/board-omapl138-hawk.c +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -110,6 +111,38 @@ static struct edma_rsv_info *da850_edma_rsv[2] = { &da850_edma_cc1_rsv, }; +static struct i2c_board_info __initdata omapl138_hawk_i2c_devices[] = { + { + I2C_BOARD_INFO("tlv320aic3x", 0x18), + }, +}; + +static struct davinci_i2c_platform_data omapl138_hawk_i2c_0_pdata = { + .bus_freq = 100, /* kHz */ + .bus_delay = 0, /* usec */ +}; + +/* davinci Hawkboard audio machine driver */ +static u8 da850_iis_serializer_direction[] = { + INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, + INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, + INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, + INACTIVE_MODE, TX_MODE, RX_MODE, INACTIVE_MODE, +}; + +static struct snd_platform_data omapl138_hawk_snd_data = { + .tx_dma_offset = 0x2000, + .rx_dma_offset = 0x2000, + .op_mode = DAVINCI_MCASP_IIS_MODE, + .num_serializer = ARRAY_SIZE(da850_iis_serializer_direction), + .tdm_slots = 2, + .serial_dir = da850_iis_serializer_direction, + .asp_chan_q = EVENTQ_1, + .version = MCASP_VERSION_2, + .txnumevt = 1, + .rxnumevt = 1, +}; + static struct davinci_uart_config omapl138_hawk_uart_config __initdata = { .enabled_uarts = 0x7, }; @@ -127,6 +160,19 @@ static __init void omapl138_hawk_init(void) pr_warning("%s: EDMA registration failed: %d\n", __func__, ret); + i2c_register_board_info(1, omapl138_hawk_i2c_devices, + ARRAY_SIZE(omapl138_hawk_i2c_devices)); + + ret = da8xx_register_i2c(0, &omapl138_hawk_i2c_0_pdata); + if (ret) + pr_warning("%s: i2c0 registration failed: %d\n", + __func__, ret); + + ret = davinci_cfg_reg_list(da850_mcasp_pins); + if (ret) + pr_warning("%s: mcasp mux setup failed: %d\n", __func__, ret); + da8xx_register_mcasp(0, &omapl138_hawk_snd_data); + ret = da8xx_register_watchdog(); if (ret) pr_warning("omapl138_hawk_init: "