From patchwork Fri Nov 7 14:49:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 40421 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 65488240F7 for ; Fri, 7 Nov 2014 14:50:39 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id mc6sf3080151lab.11 for ; Fri, 07 Nov 2014 06:50:38 -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=rWqJc8ahzQ6hR199GFUsU8U+Xu967KsAT4G7i+jPhuM=; b=ENz9lx91n9LDjOziFTYRa+HVGD83RaP6Jtfnbmi+rS76Wahw2q/BXqrCth4yLt3XR4 OPcal4phbcca3jJDpkHVR7xRH/tEakEmDko/Wt0WQlBCn7LoL4Az6+63ZDifGGlNC875 MH8H7Kzot/knqAb26e7XpVDuiikkhn1t9eeeCus6IMgvJW/gKlRr/iLawPqyH7Fm0Ql1 Jkl//hAKu7BVqgW9kgYI+YHppOZR6Wbb7GVpW8FNl82rISkItywi4Tw1n1lgBcLgA7HL yNWko//PT9BIos4jC8okc2a724XCfcGzgZ/+iMpBDt2YJmUhg/o153VESkQQdh5dnmqS MbDw== X-Gm-Message-State: ALoCoQnZdkwgc5c4NAq3JLXuqSXq3ef6XT6ErF1glEwxqXe3GDNM6nM361KCwENebYmi8/4COY28 X-Received: by 10.112.142.36 with SMTP id rt4mr1987444lbb.3.1415371838333; Fri, 07 Nov 2014 06:50:38 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.173 with SMTP id p13ls210795lal.84.gmail; Fri, 07 Nov 2014 06:50:37 -0800 (PST) X-Received: by 10.152.8.100 with SMTP id q4mr11457707laa.48.1415371837493; Fri, 07 Nov 2014 06:50:37 -0800 (PST) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id uc5si15420439lbb.31.2014.11.07.06.50.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Nov 2014 06:50:37 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by mail-la0-f54.google.com with SMTP id s18so4572981lam.27 for ; Fri, 07 Nov 2014 06:50:37 -0800 (PST) X-Received: by 10.112.235.196 with SMTP id uo4mr2493396lbc.66.1415371837396; Fri, 07 Nov 2014 06:50:37 -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 ew9csp210508lbc; Fri, 7 Nov 2014 06:50:36 -0800 (PST) X-Received: by 10.70.135.41 with SMTP id pp9mr3079539pdb.77.1415371835513; Fri, 07 Nov 2014 06:50:35 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fj4si9242251pbd.97.2014.11.07.06.50.31 for ; Fri, 07 Nov 2014 06:50:35 -0800 (PST) Received-SPF: none (google.com: netdev-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 S1753011AbaKGOu0 (ORCPT + 3 others); Fri, 7 Nov 2014 09:50:26 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:48057 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752995AbaKGOuX (ORCPT ); Fri, 7 Nov 2014 09:50:23 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id sA7Eo4K4010715; Fri, 7 Nov 2014 08:50:04 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id sA7Eo3XA013386; Fri, 7 Nov 2014 08:50:04 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Fri, 7 Nov 2014 08:50:04 -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 sA7EnX7J007870; Fri, 7 Nov 2014 08:50:01 -0600 From: Roger Quadros To: , CC: , , , , , , , , , , , , Roger Quadros Subject: [PATCH v4 7/8] net: can: c_can: Add support for TI DRA7 DCAN Date: Fri, 7 Nov 2014 16:49:21 +0200 Message-ID: <1415371762-29885-8-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1415371762-29885-1-git-send-email-rogerq@ti.com> References: <1415371762-29885-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: netdev@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.54 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 | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/net/can/c_can.txt b/Documentation/devicetree/bindings/net/can/c_can.txt index a3ca3ee..f682fdb 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_can". - 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 71b9063..7a81db4 100644 --- a/drivers/net/can/c_can/c_can_platform.c +++ b/drivers/net/can/c_can/c_can_platform.c @@ -195,6 +195,16 @@ static struct c_can_driver_data d_can_drvdata = { .id = BOSCH_D_CAN, }; +static u8 dra7_raminit_start_bits[] = {3, 5}; +static u8 dra7_raminit_done_bits[] = {1, 2}; +static struct c_can_driver_data dra7_dcan_drvdata = { + .id = BOSCH_D_CAN, + .num_can = 2, + .raminit_start_bits = dra7_raminit_start_bits, + .raminit_done_bits = dra7_raminit_done_bits, + .raminit_pulse = true, +}; + static struct platform_device_id c_can_id_table[] = { { .name = KBUILD_MODNAME, @@ -215,6 +225,7 @@ 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_can", .data = &dra7_dcan_drvdata }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, c_can_of_table);