From patchwork Fri Feb 11 14:51:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Subhasish Ghosh X-Patchwork-Id: 549611 Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1BEkUSs007008 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 11 Feb 2011 14:46:51 GMT Received: from dlep34.itg.ti.com ([157.170.170.115]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id p1BEexks016774 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Feb 2011 08:41:22 -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 p1BEerUo028911; Fri, 11 Feb 2011 08:40:55 -0600 (CST) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 80F9E80A2F; Fri, 11 Feb 2011 08:39:25 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id 009AB807F1 for ; Fri, 11 Feb 2011 08:38:20 -0600 (CST) Received: from neches.ext.ti.com (localhost [127.0.0.1]) by dflp52.itg.ti.com (8.13.7/8.13.7) with ESMTP id p1BEcJ42026206 for ; Fri, 11 Feb 2011 08:38:19 -0600 (CST) Received: from psmtp.com (na3sys009amx243.postini.com [74.125.149.127]) by neches.ext.ti.com (8.13.7/8.13.7) with SMTP id p1BEcISg021956 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 11 Feb 2011 08:38:19 -0600 Received: from source ([209.85.212.173]) (using TLSv1) by na3sys009amx243.postini.com ([74.125.148.10]) with SMTP; Fri, 11 Feb 2011 09:38:19 EST Received: by mail-px0-f173.google.com with SMTP id 16so538920pxi.4 for ; Fri, 11 Feb 2011 06:38:18 -0800 (PST) Received: by 10.142.251.7 with SMTP id y7mr414860wfh.433.1297435098739; Fri, 11 Feb 2011 06:38:18 -0800 (PST) Received: from localhost ([122.166.46.84]) by mx.google.com with ESMTPS id e14sm1079003wfg.8.2011.02.11.06.38.15 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 11 Feb 2011 06:38:18 -0800 (PST) From: Subhasish Ghosh To: davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH v2 06/13] da850: pruss CAN board specific additions. Date: Fri, 11 Feb 2011 20:21:25 +0530 Message-Id: <1297435892-28278-7-git-send-email-subhasish@mistralsolutions.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1297435892-28278-1-git-send-email-subhasish@mistralsolutions.com> References: <1297435892-28278-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 , Kevin Hilman , 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, 11 Feb 2011 14:46:51 +0000 (UTC) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 242d1ed..2ce5536 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -1053,8 +1053,43 @@ static __init int da850_evm_init_cpufreq(void) static __init int da850_evm_init_cpufreq(void) { return 0; } #endif +const short da850_evm_pruss_can_pins[] = { + DA850_PRUSS_PRU0_R31_0, DA850_PRUSS_PRU1_R30_15, + DA850_PRUSS_PRU1_R31_18, + -1 +}; + +static int __init da850_evm_setup_pruss_can(void) +{ + int ret, val = 0; + void __iomem *cfg_chip3_reg; + + ret = davinci_cfg_reg_list(da850_evm_pruss_can_pins); + if (ret) + pr_warning("%s: da850_evm_pruss_can_pins mux setup " + "failed:%d\n", __func__, ret); + cfg_chip3_reg = DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG); + val = __raw_readl(cfg_chip3_reg); + val |= BIT(3); + __raw_writel(val, cfg_chip3_reg); + + return ret; +} + +static struct da8xx_pruss_can_data can_data = { + .version = 1, +}; + static struct da8xx_pruss_devices pruss_devices[] = { - {.dev_name = NULL,}, + { + .dev_name = "da8xx_pruss_can", + .pdata = &can_data, + .pdata_size = sizeof(can_data), + .setup = da850_evm_setup_pruss_can, + }, + { + .dev_name = NULL, + }, }; static int __init da8xx_evm_setup_pruss(void)