From patchwork Wed Apr 13 10:43:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Abraham X-Patchwork-Id: 610042 X-Patchwork-Delegate: promsoft@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3qlQvR2KWcz9t3t for ; Thu, 14 Apr 2016 00:20:51 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=xKAjncM1; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9E396A75C2; Wed, 13 Apr 2016 16:20:13 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g8dkRxuV0_eF; Wed, 13 Apr 2016 16:20:13 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D2522A7721; Wed, 13 Apr 2016 16:19:41 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8B034A748A for ; Wed, 13 Apr 2016 11:47:41 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sJE69pSo4Roz for ; Wed, 13 Apr 2016 11:47:41 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f68.google.com (mail-pa0-f68.google.com [209.85.220.68]) by theia.denx.de (Postfix) with ESMTPS id 0B0F9A7506 for ; Wed, 13 Apr 2016 11:47:38 +0200 (CEST) Received: by mail-pa0-f68.google.com with SMTP id hb4so3479641pac.1 for ; Wed, 13 Apr 2016 02:47:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PcZC130XSh/0ytqACReWuPSbl5AsGWBYhTczziHHLY8=; b=xKAjncM1BGutlvjTY1To7pgAnRwnoCQpXc70jYRS+C0L1Od8Q/5439lABy8KvXFpQk KlsDJh8S0DKHjdZbiAJyDNPUrHc/UjfEWtL4udi/LN9qJKJ846WNR5wEnoiKjTN1V1d0 duI/A05w5/OqdLdOtewWUzgrabVXALQ12tFEfYpsHwWBelsYbV2CGpzfP2PizQ3qDEcZ 0oK+acmWSTLBfkCPPXAYIaLIi8SEdkXDUKN7UNQQlcHgJT4A510i7abwKOUyqFxwL8jr 3ebMYkexRvTP60liOHoOBmXeBlEDUH0I1CGcTpoEXtpVS0M6euV3ZnyI4gooZ1G26okx +Adw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PcZC130XSh/0ytqACReWuPSbl5AsGWBYhTczziHHLY8=; b=NjqjxgNG1NAk5djgcGWxFz3DS6tZMYqLUGliZUM9aHYunmNLNQkTWVwTisfxIVaLzh ZFbAbiscl0NQDtjC/NdRsg3nokB5Hh5hx8zKUXWOKkU897bbJCb4pt75ABOblO7CmRfx fR0odqTHZ2RhlbQzLcG+4n0FsGWcE32jk8TL7skmw3mud1C3NdI1UmJzP8x9y7rxK5Zv HVeJo4FuNI3n9sWGaWaLesaeoFICo8s96Hh2FXLxtu5oohrR/yYBMF4PRr4/RGC9gxGW gbK4/m+fJ9OfT/zWqpaoiDqndt2QoJf1Ss4DcA8pp9C5uwg92wvYAIBi824EjspQN82S sx8Q== X-Gm-Message-State: AOPr4FUY9lsVI0709rYWmaUZz8g/w1OSJThHFlwGwNvZKV0a43w5fCJmhyLWN3/Ftwd9uQ== X-Received: by 10.66.225.235 with SMTP id rn11mr11433405pac.138.1460540857041; Wed, 13 Apr 2016 02:47:37 -0700 (PDT) Received: from user-ubuntu.sisodomain.com ([103.58.156.161]) by smtp.gmail.com with ESMTPSA id lq10sm49762686pab.36.2016.04.13.02.47.33 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Apr 2016 02:47:36 -0700 (PDT) From: Thomas Abraham To: u-boot@lists.denx.de Date: Wed, 13 Apr 2016 16:13:38 +0530 Message-Id: <1460544222-5342-6-git-send-email-ta.omasab@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460544222-5342-1-git-send-email-ta.omasab@gmail.com> References: <1460544222-5342-1-git-send-email-ta.omasab@gmail.com> X-Mailman-Approved-At: Wed, 13 Apr 2016 16:19:24 +0200 Cc: thomas.ab@samsung.com, alim.akhtar@samsung.com Subject: [U-Boot] [PATCH 5/9] serial: s5p: get the port id number from the alias of the device node X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Thomas Abraham The port id, if not specified in the device node, can be obtained from the alias of the device node listed in the aliases node. Cc: Minkyu Kang Signed-off-by: Thomas Abraham --- drivers/serial/serial_s5p.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c index feba467..038d9b6 100644 --- a/drivers/serial/serial_s5p.c +++ b/drivers/serial/serial_s5p.c @@ -175,6 +175,8 @@ static int s5p_serial_ofdata_to_platdata(struct udevice *dev) plat->reg = (struct s5p_uart *)addr; plat->port_id = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "id", -1); + if (plat->port_id == -1) + plat->port_id = dev->seq; return 0; }