From patchwork Mon Dec 27 22:43:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Rodriguez X-Patchwork-Id: 435241 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 oBRMhhkO017413 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 27 Dec 2010 22:44:05 GMT Received: from dlep33.itg.ti.com ([157.170.170.112]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id oBRMhg00020225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 27 Dec 2010 16:43:42 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id oBRMhfPW026980 for ; Mon, 27 Dec 2010 16:43:41 -0600 (CST) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id D30BE8064E for ; Mon, 27 Dec 2010 16:43:40 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id 76FEA80627 for ; Mon, 27 Dec 2010 16:43:24 -0600 (CST) Received: from white.ext.ti.com (localhost [127.0.0.1]) by dflp51.itg.ti.com (8.13.7/8.13.7) with ESMTP id oBRMhNSn005919 for ; Mon, 27 Dec 2010 16:43:23 -0600 (CST) Received: from psmtp.com (na3sys009amx246.postini.com [74.125.149.130]) by white.ext.ti.com (8.13.7/8.13.7) with SMTP id oBRMhN2F017880 for ; Mon, 27 Dec 2010 16:43:23 -0600 Received: from source ([209.85.210.45]) by na3sys009amx246.postini.com ([74.125.148.10]) with SMTP; Mon, 27 Dec 2010 16:43:23 CST Received: by pzk2 with SMTP id 2so2491954pzk.4 for ; Mon, 27 Dec 2010 14:43:23 -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=uznRhW2UkqUrXzI+brVlXl9Q3jGuACElLe9G0jK2eFE=; b=e8W1sTY4zQRmFTcpZfLpi0EwVSHC+oMID4OQPxhTMNsvCVyVHRYOVkKdksI6z54Pno 8UO0RBJKc4AW+qWmemsLKMiixXl5O9schNpuTYtmPl89b8iRZObJ3WcM1wvlCC/qwvHY KgFOkF2FErDZmhJM2+DeWAiBbY1SHrIGDpj2A= 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=SjLC2DBGP2K5xKYPQobttPLF4zrnzqY7Dqu7YpyHNAzOdDh0hG+KOGkbuQdUDgE/6f m/3PY/Yq1S8++DIppxPQDExnGAqvKFBjEs2VTl5yQxOpn9rdhuBcTY+wy6jIxhyL5vMT RrgU3rfAXV7DS7A3ydy0a/L2n0p9E6KK1JH5M= Received: by 10.142.216.3 with SMTP id o3mr10337821wfg.296.1293489803116; Mon, 27 Dec 2010 14:43:23 -0800 (PST) Received: from localhost.localdomain ([189.138.143.93]) by mx.google.com with ESMTPS id f5sm18305417wfg.14.2010.12.27.14.43.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 27 Dec 2010 14:43:22 -0800 (PST) From: To: davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH v11 2/6] davinci: EDMA support for Omapl138-Hawkboard Date: Mon, 27 Dec 2010 16:43:09 -0600 Message-Id: <1293489793-23312-3-git-send-email-vm.rod25@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1293489793-23312-1-git-send-email-vm.rod25@gmail.com> References: <1293489793-23312-1-git-send-email-vm.rod25@gmail.com> X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:74.84782/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: 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+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 27 Dec 2010 22:44:05 +0000 (UTC) diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c index 75b3fe2..cefff9b 100644 --- a/arch/arm/mach-davinci/board-omapl138-hawk.c +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c @@ -60,6 +60,55 @@ static __init void omapl138_hawk_config_emac(void) __func__, ret); } +/* + * The following EDMA channels/slots are not being used by drivers (for + * example: Timer, GPIO, UART events etc) on da850/omap-l138 EVM/Hawkboard, + * hence they are being reserved for codecs on the DSP side. + */ +static const s16 da850_dma0_rsv_chans[][2] = { + /* (offset, number) */ + { 8, 6}, + {24, 4}, + {30, 2}, + {-1, -1} +}; + +static const s16 da850_dma0_rsv_slots[][2] = { + /* (offset, number) */ + { 8, 6}, + {24, 4}, + {30, 50}, + {-1, -1} +}; + +static const s16 da850_dma1_rsv_chans[][2] = { + /* (offset, number) */ + { 0, 28}, + {30, 2}, + {-1, -1} +}; + +static const s16 da850_dma1_rsv_slots[][2] = { + /* (offset, number) */ + { 0, 28}, + {30, 90}, + {-1, -1} +}; + +static struct edma_rsv_info da850_edma_cc0_rsv = { + .rsv_chans = da850_dma0_rsv_chans, + .rsv_slots = da850_dma0_rsv_slots, +}; + +static struct edma_rsv_info da850_edma_cc1_rsv = { + .rsv_chans = da850_dma1_rsv_chans, + .rsv_slots = da850_dma1_rsv_slots, +}; + +static struct edma_rsv_info *da850_edma_rsv[2] = { + &da850_edma_cc0_rsv, + &da850_edma_cc1_rsv, +}; static struct davinci_uart_config omapl138_hawk_uart_config __initdata = { .enabled_uarts = 0x7, @@ -73,6 +122,11 @@ static __init void omapl138_hawk_init(void) omapl138_hawk_config_emac(); + ret = da850_register_edma(da850_edma_rsv); + if (ret) + pr_warning("%s: EDMA registration failed: %d\n", + __func__, ret); + ret = da8xx_register_watchdog(); if (ret) pr_warning("omapl138_hawk_init: "