From patchwork Fri Apr 22 12:08:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Subhasish Ghosh X-Patchwork-Id: 727321 Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3MBptI8019914 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 22 Apr 2011 11:52:16 GMT Received: from dlep36.itg.ti.com ([157.170.170.91]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id p3MBoZsm014087 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 22 Apr 2011 06:50:35 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id p3MBoYO9028722; Fri, 22 Apr 2011 06:50:34 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 6A2A280631; Fri, 22 Apr 2011 06:50:34 -0500 (CDT) 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 AC68A8062B for ; Fri, 22 Apr 2011 06:49:21 -0500 (CDT) Received: from neches.ext.ti.com (localhost [127.0.0.1]) by dflp51.itg.ti.com (8.13.7/8.13.7) with ESMTP id p3MBnLPp015037 for ; Fri, 22 Apr 2011 06:49:21 -0500 (CDT) Received: from psmtp.com (na3sys009amx174.postini.com [74.125.149.100]) by neches.ext.ti.com (8.13.7/8.13.7) with SMTP id p3MBnKIX018027 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 22 Apr 2011 06:49:21 -0500 Received: from mail-pz0-f45.google.com ([209.85.210.45]) (using TLSv1) by na3sys009amx174.postini.com ([74.125.148.10]) with SMTP; Fri, 22 Apr 2011 11:49:21 GMT Received: by pzk36 with SMTP id 36so388318pzk.4 for ; Fri, 22 Apr 2011 04:49:20 -0700 (PDT) Received: by 10.143.83.11 with SMTP id k11mr475584wfl.378.1303472959944; Fri, 22 Apr 2011 04:49:19 -0700 (PDT) Received: from localhost ([122.166.13.232]) by mx.google.com with ESMTPS id o1sm3820566wfl.21.2011.04.22.04.49.16 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 22 Apr 2011 04:49:19 -0700 (PDT) From: Subhasish Ghosh To: davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH v4 06/11] da850: pruss SUART board specific additions. Date: Fri, 22 Apr 2011 17:38:24 +0530 Message-Id: <1303474109-6212-7-git-send-email-subhasish@mistralsolutions.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1303474109-6212-1-git-send-email-subhasish@mistralsolutions.com> References: <1303474109-6212-1-git-send-email-subhasish@mistralsolutions.com> X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:99.90000/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: sachi@mistralsolutions.com, Russell King , Subhasish Ghosh , open list , m-watkins@ti.com, 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.6 (demeter1.kernel.org [140.211.167.41]); Fri, 22 Apr 2011 11:52:16 +0000 (UTC) This patch adds the pruss SUART pin mux and registers the device with the pruss mfd driver. Signed-off-by: Subhasish Ghosh --- arch/arm/mach-davinci/board-da850-evm.c | 46 ++++++++++++++++++++++++++++++- 1 files changed, 45 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 0b6b948..e7fdf31 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -1117,8 +1117,52 @@ static __init int da850_evm_init_cpufreq(void) static __init int da850_evm_init_cpufreq(void) { return 0; } #endif +static const short da850_evm_pruss_suart_pins[] = { + DA850_AHCLKX, DA850_ACLKX, DA850_AFSX, + DA850_AHCLKR, DA850_ACLKR, DA850_AFSR, + DA850_AXR_13, DA850_AXR_9, DA850_AXR_7, + DA850_AXR_14, DA850_AXR_10, DA850_AXR_8, + -1 +}; + +static int __init da850_evm_pruss_suart_setup(void) +{ + int ret; + + ret = davinci_cfg_reg_list(da850_evm_pruss_suart_pins); + if (ret) + pr_warning("%s: da850_evm_pruss_suart_pins " + "mux setup failed: %d\n", __func__, ret); + return ret; +} + +static struct da850_evm_pruss_suart_data suart_data = { + .version = 1, + .setup = da850_evm_pruss_suart_setup, +}; + +static struct resource da850_evm_pruss_suart_resource[] = { + { + .name = "da8xx_mcasp0_iomem", + .start = DAVINCI_DA8XX_MCASP0_REG_BASE, + .end = DAVINCI_DA8XX_MCASP0_REG_BASE + + (SZ_1K * 12) - 1, + .flags = IORESOURCE_MEM, + }, +}; + static struct mfd_cell cell[] = { - {.name = NULL,}, + { + .id = 0, + .name = "da8xx_pruss_uart", + .platform_data = &suart_data, + .data_size = sizeof(suart_data), + .num_resources = ARRAY_SIZE(da850_evm_pruss_suart_resource), + .resources = da850_evm_pruss_suart_resource, + }, + { + .name = NULL, + }, }; static int __init da8xx_evm_setup_pruss(void)