From patchwork Tue Nov 4 10:21:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 40105 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DBCF221894 for ; Tue, 4 Nov 2014 10:22:18 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id w7sf1975977lbi.8 for ; Tue, 04 Nov 2014 02:22:17 -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=1P+jyofKMz8maGIF1xIW2RlboIN6FGOlOLYVu36YsSs=; b=m9L6i75qqG89NfQjIxNOQLrc9ZnsZsUZE8sWYVQTUl2rkkXq8uDuaR38dzoXYclAqT Nb50SDeYHUyz5lusQuwe0Me6IdupyN+2JQ+O0667EUtRAUCk+REi/1UeqWxXQQYyjwCQ 5gIzhd0EvgryQXRAOWT/RrwV4MuaZm+H8RX/xuty1pX1eF+uictGuQPGcqnAQDoMhI+t YvlqR1OTLkGX414xhUMvIqhhB5WOJHCAwVjjSSxkZjEBjFXj/fTV2hCT90QdbUV0YCT6 gwd/2EZUzI6FKH4MxGlrG3Zz00z4lVmhNN9Ni6YfTGUJ/nDHLQz4x4/0Fp6k764gCSNP ROQA== X-Gm-Message-State: ALoCoQl6/F+vwfUrAa30xft8XaRljce4jXQ2UIOgOFcGjiLnODjALJpYOBNNF054OG1RivHuvIj9 X-Received: by 10.112.154.194 with SMTP id vq2mr1751179lbb.10.1415096537680; Tue, 04 Nov 2014 02:22:17 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.26.228 with SMTP id o4ls526230lag.66.gmail; Tue, 04 Nov 2014 02:22:17 -0800 (PST) X-Received: by 10.112.73.39 with SMTP id i7mr34575615lbv.8.1415096537490; Tue, 04 Nov 2014 02:22:17 -0800 (PST) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id ja10si7390982lbc.102.2014.11.04.02.22.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Nov 2014 02:22:17 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by mail-lb0-f178.google.com with SMTP id f15so12050368lbj.37 for ; Tue, 04 Nov 2014 02:22:17 -0800 (PST) X-Received: by 10.112.218.101 with SMTP id pf5mr21927189lbc.46.1415096537396; Tue, 04 Nov 2014 02:22:17 -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 ew9csp92843lbc; Tue, 4 Nov 2014 02:22:16 -0800 (PST) X-Received: by 10.68.90.225 with SMTP id bz1mr6934972pbb.153.1415096535839; Tue, 04 Nov 2014 02:22:15 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3si17687129pdr.74.2014.11.04.02.22.13 for ; Tue, 04 Nov 2014 02:22:15 -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 S1752947AbaKDKWL (ORCPT + 3 others); Tue, 4 Nov 2014 05:22:11 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:49530 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752674AbaKDKWJ (ORCPT ); Tue, 4 Nov 2014 05:22:09 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id sA4ALnOA001309; Tue, 4 Nov 2014 04:21:49 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id sA4ALnFo028945; Tue, 4 Nov 2014 04:21:49 -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:49 -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 sA4ALEGI020969; Tue, 4 Nov 2014 04:21:45 -0600 From: Roger Quadros To: , CC: , , , , , , , , , , , , Roger Quadros Subject: [PATCH v3 8/8] net: can: c_can: Add support for TI am3352 DCAN Date: Tue, 4 Nov 2014 12:21:01 +0200 Message-ID: <1415096461-25576-9-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: 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.217.178 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: , AM3352 SoC has 2 DCAN modules. Add compatible id and raminit driver data for am3352 DCAN. Signed-off-by: Roger Quadros --- Documentation/devicetree/bindings/net/can/c_can.txt | 3 ++- drivers/net/can/c_can/c_can_platform.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/can/c_can.txt b/Documentation/devicetree/bindings/net/can/c_can.txt index 746cc07..27205d9 100644 --- a/Documentation/devicetree/bindings/net/can/c_can.txt +++ b/Documentation/devicetree/bindings/net/can/c_can.txt @@ -4,7 +4,8 @@ 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". + Can be "ti,dra7-d_can1" or "ti,dra7-d_can2" or + "ti,am3352-d_can0" or "ti,am3352-d_can1". - 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 dc618ce..7dcdcde 100644 --- a/drivers/net/can/c_can/c_can_platform.c +++ b/drivers/net/can/c_can/c_can_platform.c @@ -209,6 +209,18 @@ static struct c_can_driver_data dra7_dcan2_drvdata = { .raminit_pulse = true, }; +static struct c_can_driver_data am3352_dcan0_drvdata = { + .id = BOSCH_D_CAN, + .raminit_start_bit = 0, + .raminit_done_bit = 8, +}; + +static struct c_can_driver_data am3352_dcan1_drvdata = { + .id = BOSCH_D_CAN, + .raminit_start_bit = 1, + .raminit_done_bit = 9, +}; + static struct platform_device_id c_can_id_table[] = { { .name = KBUILD_MODNAME, @@ -231,6 +243,8 @@ static const struct of_device_id c_can_of_table[] = { { .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 }, + { .compatible = "ti,am3352-d_can0", .data = &am3352_dcan0_drvdata }, + { .compatible = "ti,am3352-d_can1", .data = &am3352_dcan1_drvdata }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, c_can_of_table);