From patchwork Wed Jun 25 00:40:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 4415351 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AB4E0BEEAA for ; Wed, 25 Jun 2014 00:38:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BF3792037A for ; Wed, 25 Jun 2014 00:38:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D321220170 for ; Wed, 25 Jun 2014 00:38:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752186AbaFYAi3 (ORCPT ); Tue, 24 Jun 2014 20:38:29 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:41912 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751862AbaFYAi3 (ORCPT ); Tue, 24 Jun 2014 20:38:29 -0400 Received: by mail-pd0-f180.google.com with SMTP id fp1so896281pdb.25 for ; Tue, 24 Jun 2014 17:38:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=ahKec3MuK0iwI+KFl0Hs2VQ5sZMG6XcUPCJ/4RPZY80=; b=aQLLQxYGJ5FukByjN21PBcXRF/u5Rrab3F9YbC3h/hC3p2kuKWuT7pkMPruK/SIWGz s1asbHDgEcaEHjegBIIDJ3AnT5mPnsTgVc/lnmWsfL3clKKXKHH+U1joEonJoE7WNiQk gdZZkKtosNlCsp52Xg/0IjbRfCG9ULykFVe2c1Y4BsUIf0ySjwuNelTLiicm2GzAMVpY DuUMwYQU8ZjAo9gYx+Bj4/fWkuLvCtgkKeyei5lRAmJ+bt/vIcTudmJENecMubcc87St ZvId8Lsf70Rr+m+kDjCFwRQPMkXpN+CPcJEyq9bmpE9YbqCP2dfdXLyVspaSjxCYZBDs G+Cw== X-Received: by 10.68.224.198 with SMTP id re6mr6515433pbc.8.1403656708650; Tue, 24 Jun 2014 17:38:28 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id fb4sm8812165pac.30.2014.06.24.17.38.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jun 2014 17:38:27 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , geert+renesas@glider.be Date: Wed, 25 Jun 2014 09:40:35 +0900 Message-Id: <20140625004035.18295.42356.sendpatchset@w520> In-Reply-To: <20140625004027.18295.39707.sendpatchset@w520> References: <20140625004027.18295.39707.sendpatchset@w520> Subject: [PATCH 01/05] serial: sh-sci: Allow AUXDATA DMAC parameters Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Magnus Damm Allow passing platform data also in the case of DT. With this in place it is possible to use AUXDATA together with platform data to specify DMA channel configuration. Signed-off-by: Magnus Damm --- drivers/tty/serial/sh-sci.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/drivers/tty/serial/sh-sci.c +++ work/drivers/tty/serial/sh-sci.c 2014-06-25 08:11:20.000000000 +0900 @@ -2470,9 +2470,13 @@ sci_parse_dt(struct platform_device *pde info = match->data; - p = devm_kzalloc(&pdev->dev, sizeof(struct plat_sci_port), GFP_KERNEL); + if (pdev->dev.platform_data) + p = pdev->dev.platform_data; + else + p = devm_kzalloc(&pdev->dev, sizeof(struct plat_sci_port), + GFP_KERNEL); if (!p) { - dev_err(&pdev->dev, "failed to allocate DT config data\n"); + dev_err(&pdev->dev, "failed to get DT config data\n"); return NULL; }