From patchwork Fri Nov 7 14:49:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 40422 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D20B2240F7 for ; Fri, 7 Nov 2014 14:50:40 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id l18sf1977847wgh.4 for ; Fri, 07 Nov 2014 06:50:40 -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=cr9bLyGuC9v7qn+v6nJbbr7eDR95OhNQPAct8ouOojQ=; b=Lf564+s19obs+fWaMlrGJLovNLsPA2hBpB43dBiDl53M9/lA5J78lyS7fBdvqm73U+ MxxSi0uW+dIUv4PZkeXgTzhGQnlREuqo0nhKpCssbVPKkmtaK7xgXSTvZmHLSSSwfFO+ /fPsF1JQvo3QuJrIYPlduUJ4Cn5rEfDzzEBjCazggMsMP9Idhrtg4zFBcFB8GVQuIXFp UiznEUTcHT+n5lch4/EtVT6MJSwZs8kQu3bdZX82abek7vGmmjHEd0SiLLo1xKg/L54v Wo0OleSXgx06uyib84m5Nuu77tKBMYnQIIgD+FwK2WRF7rEZO4tiGFdGirOOQvTMLvAM Cljg== X-Gm-Message-State: ALoCoQkurxyPTvk1qjPjyM6QD9TlIE1hgLXQMOMYeN6VB+yUXbl7JadhETjxqZW90v4FsxhfGyy5 X-Received: by 10.194.176.106 with SMTP id ch10mr508060wjc.6.1415371840055; Fri, 07 Nov 2014 06:50:40 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.130 with SMTP id d2ls236565laf.32.gmail; Fri, 07 Nov 2014 06:50:39 -0800 (PST) X-Received: by 10.112.17.1 with SMTP id k1mr11455655lbd.39.1415371839700; Fri, 07 Nov 2014 06:50:39 -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 o7si15387080lbp.45.2014.11.07.06.50.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Nov 2014 06:50:39 -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 s18so4479776lam.41 for ; Fri, 07 Nov 2014 06:50:39 -0800 (PST) X-Received: by 10.112.189.10 with SMTP id ge10mr11533876lbc.23.1415371839580; Fri, 07 Nov 2014 06:50:39 -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 ew9csp210516lbc; Fri, 7 Nov 2014 06:50:38 -0800 (PST) X-Received: by 10.70.128.203 with SMTP id nq11mr12644894pdb.88.1415371836970; Fri, 07 Nov 2014 06:50:36 -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.36 for ; Fri, 07 Nov 2014 06:50:36 -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 S1753034AbaKGOue (ORCPT + 3 others); Fri, 7 Nov 2014 09:50:34 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:55218 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753001AbaKGOuZ (ORCPT ); Fri, 7 Nov 2014 09:50:25 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id sA7Eo8fM029281; Fri, 7 Nov 2014 08:50:08 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id sA7Eo8hO024115; Fri, 7 Nov 2014 08:50:08 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Fri, 7 Nov 2014 08:50:07 -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 sA7EnX7K007870; Fri, 7 Nov 2014 08:50:04 -0600 From: Roger Quadros To: , CC: , , , , , , , , , , , , Roger Quadros Subject: [PATCH v4 8/8] net: can: c_can: Add support for TI am3352 DCAN Date: Fri, 7 Nov 2014 16:49:22 +0200 Message-ID: <1415371762-29885-9-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: , AM3352 SoC has 2 DCAN modules. Add compatible id and raminit driver data for am3352 DCAN. Signed-off-by: Roger Quadros Acked-by: Wolfram Sang --- Documentation/devicetree/bindings/net/can/c_can.txt | 2 +- drivers/net/can/c_can/c_can_platform.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/can/c_can.txt b/Documentation/devicetree/bindings/net/can/c_can.txt index f682fdb..6731730 100644 --- a/Documentation/devicetree/bindings/net/can/c_can.txt +++ b/Documentation/devicetree/bindings/net/can/c_can.txt @@ -4,7 +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". + Can be "ti,dra7-d_can" or "ti,am3352-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 7a81db4..eb09068 100644 --- a/drivers/net/can/c_can/c_can_platform.c +++ b/drivers/net/can/c_can/c_can_platform.c @@ -205,6 +205,15 @@ static struct c_can_driver_data dra7_dcan_drvdata = { .raminit_pulse = true, }; +static u8 am3352_raminit_start_bits[] = {0, 1}; +static u8 am3352_raminit_done_bits[] = {8, 9}; +static struct c_can_driver_data am3352_dcan_drvdata = { + .id = BOSCH_D_CAN, + .num_can = 2, + .raminit_start_bits = am3352_raminit_start_bits, + .raminit_done_bits = am3352_raminit_done_bits, +}; + static struct platform_device_id c_can_id_table[] = { { .name = KBUILD_MODNAME, @@ -226,6 +235,7 @@ 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 }, + { .compatible = "ti,am3352-d_can", .data = &am3352_dcan_drvdata }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, c_can_of_table);