From patchwork Tue Nov 4 10:21:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 40107 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E314821894 for ; Tue, 4 Nov 2014 10:22:44 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b57sf3893100eek.5 for ; Tue, 04 Nov 2014 02:22:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=FmKy8T9ePt2UdxpBRZIV06+AKL4nniCZcaK1v2PPmG4=; b=nE/mM8gpx/ZTMmVcAAwEWw5QkZXjEloJjADx6ptip+RCes3UChAXR4BQzuBepIndUG 1MxVXXZKfs1aVYu/ylrCDOpPrf1FY52DTB3sVC/u9v4jGFshy8tp2dJI7NaCFz2B3Qby vOjfXknO6sM3jc0/C0VvngYpQcSraZZ4qcXlcsaFH4PHLtoZH4YrqluucJIFUOqbLD1E ikzEhspkvcpzuR83l+uszQ4jeZ9to00zjuaT6IT5x1R2Jq/VMdnMRObHQFhzA1AsDxLa zAd61VsjF+74NrgdF5nhzMqloDyF0/Xdskrw16mEX+jufjqQYWebvFfdSPpgQFBVYfBB Ts+g== X-Gm-Message-State: ALoCoQmHdEfCO7wqrsoS8dfeSuxTvcx2c0aCTt5ZTWnbYl8Q00+WiTUb/CxEXOLd7OA2s+6ih7SO X-Received: by 10.112.138.202 with SMTP id qs10mr8399216lbb.5.1415096564128; Tue, 04 Nov 2014 02:22:44 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.129 with SMTP id t1ls921701lag.53.gmail; Tue, 04 Nov 2014 02:22:43 -0800 (PST) X-Received: by 10.112.93.231 with SMTP id cx7mr57289953lbb.89.1415096563852; Tue, 04 Nov 2014 02:22:43 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id x8si36788249laj.107.2014.11.04.02.22.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Nov 2014 02:22:43 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id mc6so575856lab.26 for ; Tue, 04 Nov 2014 02:22:43 -0800 (PST) X-Received: by 10.112.12.35 with SMTP id v3mr57955540lbb.80.1415096563574; Tue, 04 Nov 2014 02:22:43 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp92888lbc; Tue, 4 Nov 2014 02:22:42 -0800 (PST) X-Received: by 10.67.30.232 with SMTP id kh8mr664314pad.149.1415096561640; Tue, 04 Nov 2014 02:22:41 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id my4si17537061pbc.159.2014.11.04.02.22.41 for ; Tue, 04 Nov 2014 02:22:41 -0800 (PST) Received-SPF: none (google.com: linux-omap-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753029AbaKDKWh (ORCPT + 5 others); Tue, 4 Nov 2014 05:22:37 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:59109 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751961AbaKDKWA (ORCPT ); Tue, 4 Nov 2014 05:22:00 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id sA4ALj0H018811; Tue, 4 Nov 2014 04:21:45 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id sA4ALjuI020844; Tue, 4 Nov 2014 04:21:45 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Tue, 4 Nov 2014 04:21:45 -0600 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id sA4ALEGH020969; Tue, 4 Nov 2014 04:21:41 -0600 From: Roger Quadros To: , CC: , , , , , , , , , , , , Roger Quadros Subject: [PATCH v3 7/8] net: can: c_can: Add support for TI DRA7 DCAN Date: Tue, 4 Nov 2014 12:21:00 +0200 Message-ID: <1415096461-25576-8-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1415096461-25576-1-git-send-email-rogerq@ti.com> References: <1415096461-25576-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: rogerq@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , DRA7 SoC has 2 CAN IPs. Provide compatible IDs and RAMINIT register data for both. Signed-off-by: Roger Quadros --- Documentation/devicetree/bindings/net/can/c_can.txt | 1 + drivers/net/can/c_can/c_can_platform.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/net/can/c_can.txt b/Documentation/devicetree/bindings/net/can/c_can.txt index 917ac0e..746cc07 100644 --- a/Documentation/devicetree/bindings/net/can/c_can.txt +++ b/Documentation/devicetree/bindings/net/can/c_can.txt @@ -4,6 +4,7 @@ Bosch C_CAN/D_CAN controller Device Tree Bindings Required properties: - compatible : Should be "bosch,c_can" for C_CAN controllers and "bosch,d_can" for D_CAN controllers. + Can be "ti,dra7-d_can1" or "ti,dra7-d_can2". - reg : physical base address and size of the C_CAN/D_CAN registers map - interrupts : property with a value describing the interrupt diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c index d058820..dc618ce 100644 --- a/drivers/net/can/c_can/c_can_platform.c +++ b/drivers/net/can/c_can/c_can_platform.c @@ -195,6 +195,20 @@ static struct c_can_driver_data d_can_drvdata = { .id = BOSCH_D_CAN, }; +static struct c_can_driver_data dra7_dcan1_drvdata = { + .id = BOSCH_D_CAN, + .raminit_start_bit = 3, + .raminit_done_bit = 1, + .raminit_pulse = true, +}; + +static struct c_can_driver_data dra7_dcan2_drvdata = { + .id = BOSCH_D_CAN, + .raminit_start_bit = 5, + .raminit_done_bit = 2, + .raminit_pulse = true, +}; + static struct platform_device_id c_can_id_table[] = { { .name = KBUILD_MODNAME, @@ -215,6 +229,8 @@ MODULE_DEVICE_TABLE(platform, c_can_id_table); static const struct of_device_id c_can_of_table[] = { { .compatible = "bosch,c_can", .data = &c_can_drvdata }, { .compatible = "bosch,d_can", .data = &d_can_drvdata }, + { .compatible = "ti,dra7-d_can1", .data = &dra7_dcan1_drvdata }, + { .compatible = "ti,dra7-d_can2", .data = &dra7_dcan2_drvdata }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, c_can_of_table);