From patchwork Fri Nov 14 18:09:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Kleine-Budde X-Patchwork-Id: 40842 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5F328240ED for ; Fri, 14 Nov 2014 18:10:12 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id f15sf9651034lbj.7 for ; Fri, 14 Nov 2014 10:10:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=rtskA9Jq31m2InemTw2V7FV0a77R3YFiSp5NrwoPkq0=; b=k3+DlZJLNMZN/6wMRFsFD5qU6ELJnGMn4Ufq8b0H2/9NzxF/n6T/chkSwpNCToRF2/ aUnI4bAIn2MRzuBVvV9gS30OhxwEdM4lJoQEYsanjO+4SlJjFiMclu74KabyRErK/aLq w+J8Wv9lmcAsrnleBNVp+LoIv//dYDA3zqVpS1BGiE/WOyBDI0jjbzZB31wu8LPps1Tw SFctA5I8cihi0kQnYs0mBMWxJ0r7CpujLBp5CFsjsnpdE53apqTYHafPozm1vcRPna/z 2PmWg0Uqihr+G0yQLH5CJYlGnEZpRRuAQH6iwiNaS1L5tvVBaSzW5EJyT5ox4iSELL+Q mnSg== X-Gm-Message-State: ALoCoQltj4zvMMBpA4xuoYoNGllNfEa6Y/OAgLaXpfVXRbiUwAL4mVj5VOLVkrD93Z2WaSXTss4v X-Received: by 10.152.88.98 with SMTP id bf2mr10912193lab.1.1415988611375; Fri, 14 Nov 2014 10:10:11 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.197.100 with SMTP id it4ls990166lac.7.gmail; Fri, 14 Nov 2014 10:10:10 -0800 (PST) X-Received: by 10.112.73.103 with SMTP id k7mr9610373lbv.41.1415988610837; Fri, 14 Nov 2014 10:10:10 -0800 (PST) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id o3si42534459lag.29.2014.11.14.10.10.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Nov 2014 10:10:10 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by mail-la0-f48.google.com with SMTP id s18so1625151lam.35 for ; Fri, 14 Nov 2014 10:10:10 -0800 (PST) X-Received: by 10.112.202.104 with SMTP id kh8mr9666515lbc.46.1415988610645; Fri, 14 Nov 2014 10:10:10 -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 ew9csp809415lbc; Fri, 14 Nov 2014 10:10:09 -0800 (PST) X-Received: by 10.68.232.226 with SMTP id tr2mr11681359pbc.89.1415988608015; Fri, 14 Nov 2014 10:10:08 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kj7si29059118pab.98.2014.11.14.10.10.07 for ; Fri, 14 Nov 2014 10:10:08 -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 S1161734AbaKNSKD (ORCPT + 5 others); Fri, 14 Nov 2014 13:10:03 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:51626 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161688AbaKNSKC (ORCPT ); Fri, 14 Nov 2014 13:10:02 -0500 Received: from gallifrey.ext.pengutronix.de ([2001:6f8:1178:4:5054:ff:fe8d:eefb] helo=hardanger.do.blackshift.org) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1XpLJn-00039L-G8; Fri, 14 Nov 2014 19:09:59 +0100 From: Marc Kleine-Budde To: linux-can@vger.kernel.org Cc: wsa@the-dreams.de, linux-omap@vger.kernel.org, rogerq@ti.com, kernel@pengutronix.de, Marc Kleine-Budde Subject: [PATCH v8 8/8] can: c_can: Add support for TI am3352 DCAN Date: Fri, 14 Nov 2014 19:09:51 +0100 Message-Id: <1415988591-6032-9-git-send-email-mkl@pengutronix.de> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1415988591-6032-1-git-send-email-mkl@pengutronix.de> References: <1415988591-6032-1-git-send-email-mkl@pengutronix.de> X-SA-Exim-Connect-IP: 2001:6f8:1178:4:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-omap@vger.kernel.org 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: mkl@pengutronix.de 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.48 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: , From: Roger Quadros 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 Signed-off-by: Marc Kleine-Budde --- Documentation/devicetree/bindings/net/can/c_can.txt | 2 +- drivers/net/can/c_can/c_can_platform.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/can/c_can.txt b/Documentation/devicetree/bindings/net/can/c_can.txt index f682fdb6d921..6731730eec0d 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 570da5f56aae..f4488e5d5d68 100644 --- a/drivers/net/can/c_can/c_can_platform.c +++ b/drivers/net/can/c_can/c_can_platform.c @@ -202,6 +202,17 @@ static const struct c_can_driver_data dra7_dcan_drvdata = { .raminit_pulse = true, }; +static const struct raminit_bits am3352_raminit_bits[] = { + [0] = { .start = 0, .done = 8, }, + [1] = { .start = 1, .done = 9, }, +}; + +static const struct c_can_driver_data am3352_dcan_drvdata = { + .id = BOSCH_D_CAN, + .raminit_num = ARRAY_SIZE(am3352_raminit_bits), + .raminit_bits = am3352_raminit_bits, +}; + static struct platform_device_id c_can_id_table[] = { { .name = KBUILD_MODNAME, @@ -223,6 +234,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);