From patchwork Wed Nov 7 15:00:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 150401 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5273690ljp; Wed, 7 Nov 2018 07:03:36 -0800 (PST) X-Google-Smtp-Source: AJdET5e9pc0sN2gc8Ljf+vYBz497ylt0yThEwStGYKFr8ZjRDLzPIApt8TD+NKcCqNLCrthFYwLd X-Received: by 2002:a17:906:3b4b:: with SMTP id h11-v6mr357680ejf.183.1541603015969; Wed, 07 Nov 2018 07:03:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541603015; cv=none; d=google.com; s=arc-20160816; b=IBntG+hR/t6quW9BjTKQKApvJiS48udR4C+kVGx+q702eN64rRX73l4GsZfsPjUmoT tVUbgWCzf07t02BukvOne6qya4UzfNwduqoyNz/TNO3H44yIF2qIKOw0J13x73g5FWK5 jPHi5eosQeTjYTL4R84sh4WtIRMoINAY9HRvN1bSvH1V6MGV503/7UAv0M4p6ZaUfkuh im0rSC4vCk+NUmf9Z4Bfv6jUWlOHhPyygT3bdrOfefA2k+zsaC4B4Wew1rWepgp35g+2 sUqtEXa8RgnEmkQ/jjlK5acJWyL2tSxWMLsA4Mtn3cmHdeySbj9hQI24C1W4737QUtID IruA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:cms-type:in-reply-to :message-id:date:to:from:dkim-signature:dkim-filter; bh=D6QCEj1kjjRPF0DlSEzy3JfwQ9TafwspKNHu14235rY=; b=0vzTk3qI8gAT9BYg5LNswGBiwFxKHGX4DPgKSVBYt04n3CiEViF+HV/uU5vfr9VnbR 3agThkq1n2zGHTxAeKMa0dKITfkxExjeHwdZ2Nr79W2AoAGxMPyv321coJvdlB0nYftD oXUgy4erZPSaH246IljWfpfwINY8Vl+c6wSeanXz3hotJbwkMaNy+w+75xN+rm0C0kbG VGHsTsJ6WLbzzP6amLpJsiHSxuXz6/5tT7cIZzLCIrJSreQRKsc4NDsRL059ru9Rokdd hmSL21OWvLuBFsQm0GrpmNj5DXzvVAJUuKFuKYIYMUJLFWa/AweQiCYhRtgShgxfldFV 60xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=jr4SXrA4; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id u8-v6si628981edd.348.2018.11.07.07.03.35; Wed, 07 Nov 2018 07:03:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=jr4SXrA4; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: by lists.denx.de (Postfix, from userid 105) id 5692DC224BE; Wed, 7 Nov 2018 15:02:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id C51ECC224CC; Wed, 7 Nov 2018 15:02:18 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D96FEC22496; Wed, 7 Nov 2018 15:01:16 +0000 (UTC) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lists.denx.de (Postfix) with ESMTPS id F0818C224A3 for ; Wed, 7 Nov 2018 15:01:15 +0000 (UTC) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181107150115euoutp02bf00a2e0bac50197fddc47c7c770e409~k36WslQhE0369003690euoutp02y; Wed, 7 Nov 2018 15:01:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181107150115euoutp02bf00a2e0bac50197fddc47c7c770e409~k36WslQhE0369003690euoutp02y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1541602875; bh=n/C+1ij3OetCA+EkiMbDsdMHr0xJRgkZ8fBkfQDVw+g=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=jr4SXrA4HrIBGS+qes7Mqak/+F58h3Erg00sXmEBCz4uTW1GMMuTTNRfT5kfD211X EQGdERr3IPcZUhKIawIq/VuUV8Vrs9jIqvuQs0a8cEsRVftcuuXNyu88fFSTpynF/g 4nFBlWYjem7WywbbMr+szIag6fKkHxlsXpgKPGEI= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181107150114eucas1p2598c8fafc1e9cfe5e8ed57b258293588~k36WTw1h92528525285eucas1p2J; Wed, 7 Nov 2018 15:01:14 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id C5.95.04294.A3EF2EB5; Wed, 7 Nov 2018 15:01:14 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181107150113eucas1p117128d7094b83df2346fcd8ac91651d4~k36Vnb3912023720237eucas1p1Q; Wed, 7 Nov 2018 15:01:13 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-e2-5be2fe3a8083 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 34.C4.04128.93EF2EB5; Wed, 7 Nov 2018 15:01:13 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PHT005I7WDUVY00@eusync3.samsung.com>; Wed, 07 Nov 2018 15:01:13 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de Date: Wed, 07 Nov 2018 16:00:57 +0100 Message-id: <20181107150105.23165-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20181107150105.23165-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLIsWRmVeSWpSXmKPExsWy7djPc7pW/x5FG+zeK2uxccZ6Vosbv9pY LZ6/u8xksfbIXXaLjiMtjBZv93ayO7B5zJt1gsXj7J0djB59W1YxBjBHcdmkpOZklqUW6dsl cGXsurmMuaCNs+LEk0dMDYwd7F2MnBwSAiYSD298Z+1i5OIQEljBKNH9fDMzhPOZUeLP9B9M MFWf921ih0gsY5RoPneeBcJpYJLYdeUTG0gVm4ChRNfbLjBbREBC4lf/VUYQm1ngGqPErO2K ILawgJPEkuYOsKksAqoSG24+BrN5BWwlFh9sYIHYJi+xesMBZhCbU8BOortnMtgyCYGPrBJb Fl1ghihykZh0/RYrhC0s8er4FqiHZCQuT+6GamhmlGifMYsdwulhlNg6ZwcbRJW1xOHjF1kh zuOTmLRtOtBUDqA4r0RHmxBEiYfEt19/2SDenMgoMWHrE+YJjJILGBlWMYqnlhbnpqcWG+Wl lusVJ+YWl+al6yXn525iBEba6X/Hv+xg3PUn6RCjAAejEg/vha0Po4VYE8uKK3MPMUpwMCuJ 8PaufhQtxJuSWFmVWpQfX1Sak1p8iFGag0VJnLea4UG0kEB6YklqdmpqQWoRTJaJg1OqgTFc +HTGHAa5TbP3vZA4MHHdLPnyNVo8XxeKHuLXO/Zz8gpmDxu1o5vu6a2NW/kstSJK+dTmUutT IdNUpDfVnNjedE/Kc/E/actZjFOVX/WKy7Lb/jpo4Z18pT22KotLyY9NTvrffIeq+3F3vt22 sPw4Y1nUhWtad689KpyRbiVSKGUxL6Jd8IQSS3FGoqEWc1FxIgDenbLmsAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJJMWRmVeSWpSXmKPExsVy+t/xq7qW/x5FG6x8ZW6xccZ6Vosbv9pY LZ6/u8xksfbIXXaLjiMtjBZv93ayO7B5zJt1gsXj7J0djB59W1YxBjBHcdmkpOZklqUW6dsl cGXsurmMuaCNs+LEk0dMDYwd7F2MnBwSAiYSn/dtArK5OIQEljBKTJnWyAqSEBJoYpI49I0L xGYTMJToetvFBmKLCEhI/Oq/ygjSwCxwg1HizvmfYJOEBZwkljR3MIHYLAKqEhtuPgazeQVs JRYfbGCB2CYvsXrDAWYQm1PATqK7ZzILxDJbiYdXzzNOYORZwMiwilEktbQ4Nz232EivODG3 uDQvXS85P3cTIzBAth37uWUHY9e74EOMAhyMSjy8GjseRguxJpYVV+YeYpTgYFYS4e1d/Sha iDclsbIqtSg/vqg0J7X4EKM0B4uSOO95g8ooIYH0xJLU7NTUgtQimCwTB6dUA+PSlbPTf5l1 xeYUzZ73VVLONzY/fkJpVmeh05dPnR2C9sXJgjJC8g/VGEVKtvPesdr1I6vE17SW61lA+UlP 4RO6k/ask5myVujgxoeLuCPOzM19JbDHU6Qk68TJLb5r/BU23Hmyx21yZcSv/T9mf/KbpfQt /qxHvnu5j8/epx+0nyn+1Hl06b0SS3FGoqEWc1FxIgDsah5IDAIAAA== X-CMS-MailID: 20181107150113eucas1p117128d7094b83df2346fcd8ac91651d4 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181107150113eucas1p117128d7094b83df2346fcd8ac91651d4 References: <20181107150105.23165-1-m.szyprowski@samsung.com> X-Mailman-Approved-At: Wed, 07 Nov 2018 15:02:17 +0000 Cc: Bartlomiej Zolnierkiewicz , Marek Szyprowski Subject: [U-Boot] [PATCH 1/9] cmd: itest: add support for .q size specifier X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" Add support for quad (64bits) memory access. Signed-off-by: Marek Szyprowski Acked-by: Lukasz Majewski --- cmd/itest.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmd/itest.c b/cmd/itest.c index fd6f4166f1..1813a131d1 100644 --- a/cmd/itest.c +++ b/cmd/itest.c @@ -72,6 +72,11 @@ static long evalexp(char *s, int w) case 4: l = (long)(*(u32 *)buf); break; +#ifdef CONFIG_PHYS_64BIT + case 8: + l = (long)(*(unsigned long *)buf); + break; +#endif } unmap_physmem(buf, w); return l; @@ -185,6 +190,9 @@ static int do_itest(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) case 1: case 2: case 4: +#ifdef CONFIG_PHYS_64BIT + case 8: +#endif value = binary_test (argv[2], argv[1], argv[3], w); break; case -2: @@ -203,5 +211,9 @@ static int do_itest(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) U_BOOT_CMD( itest, 4, 0, do_itest, "return true/false on integer compare", +#ifdef CONFIG_PHYS_64BIT + "[.b, .w, .l, .q, .s] [*]value1 [*]value2" +#else "[.b, .w, .l, .s] [*]value1 [*]value2" +#endif ); From patchwork Wed Nov 7 15:00:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 150403 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5275394ljp; Wed, 7 Nov 2018 07:04:51 -0800 (PST) X-Google-Smtp-Source: AJdET5cAKgk5XL2v0dc/WLP8tmtE6OdiPY87A3kNWk6pK9V9SFDkvuzVm9dpt4hSvhjHs/f1dW3h X-Received: by 2002:a17:906:c149:: with SMTP id bp9-v6mr385240ejb.82.1541603091012; Wed, 07 Nov 2018 07:04:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541603091; cv=none; d=google.com; s=arc-20160816; b=SIBnIV+mO1502uDZLGsXR2h9l0YcMWo/bWpJKjU9PFt+FSao0aqmXg25W4rcJVQp8y Oh/GuljIBbVY/lsamNiYAHgHRx8cp9yhOcRqcqmS7bOEoisLLiKLPIyLnepvj4z9m0cQ v99M2Mxoo714RksAMxQnpqIHrwmhR7RdgJgs6HEsCagj1QqHaohwBAT21Eu9doOtePmK cLuOMlS+WxKd5/HAC882l+o9oacTFfY7zJUJMZG1QRL46ZqCnb49EBK4OWdM9qotK7s2 4ipgUXQId5gJIXQAayWXe1GawblPp+9Fto04HqGDWZvybYA3icsdOBCoQR4gbfdz3FN1 aR2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:cms-type:in-reply-to :message-id:date:to:from:dkim-signature:dkim-filter; bh=QnAW+fkZ7Jt2jBqZsgc+tnJr4kwKwYqv0KJ4z2ka7fY=; b=wfCfQSUuPHi2mLWevH4FsfCNV4avojS5+F8xSVuzNgWH9QXJ0YnIBHR2DPi7YbybNT r/43BayUkP/pk1cu0U9Dp4b73cfy5yL2YqbWFyYffj4wgdiN3PRZ1vKWOng/HU6ehBi+ TggiVNTlZGeBUs71aJabYsaK65X8h/2RXXcQT1pDlLZvhJxvw9M2bhKRSnMiGjT+lFXw owRALxf80yqS0WDuPwjV96KEBTjiG1A18135NKKWwZ4kBlrympGul8rU1avNkIf8wVe9 a94EOXpe8yFXB3MXDOfFrhBrVQMc7/G8NTkrqCPSt4UTpj3KTER6wPjSdC8sLE8oY7WY laFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=r2iBAiFO; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id k25-v6si719461edb.363.2018.11.07.07.04.50; Wed, 07 Nov 2018 07:04:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=r2iBAiFO; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: by lists.denx.de (Postfix, from userid 105) id 9E1D2C224F9; Wed, 7 Nov 2018 15:03:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 9FA2AC224EE; Wed, 7 Nov 2018 15:02:20 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3A7E9C22496; Wed, 7 Nov 2018 15:01:17 +0000 (UTC) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lists.denx.de (Postfix) with ESMTPS id 47B24C224B8 for ; Wed, 7 Nov 2018 15:01:16 +0000 (UTC) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181107150115euoutp0158d7c628fe4a18f086955bd3c272166e~k36W4KJ0J2076820768euoutp01q; Wed, 7 Nov 2018 15:01:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181107150115euoutp0158d7c628fe4a18f086955bd3c272166e~k36W4KJ0J2076820768euoutp01q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1541602875; bh=/YetBjFRls2FrHLt8pX2/9L5x9FTH1gh3XPyC/A4Pek=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=r2iBAiFOv8K5Bwp6BpFUMb54yvt3RljdtxqDwURMPnOJK01JCN0kx2P0m42UjL1C6 ZwdT8GTV84jWBWiCfdjHHy/YKdJdIbRxHJpWkl/RJHQY13n2mOGfNOQfGW2mBv3vCW z+6JHmjnv3CiqF/e9KZpaRE59nRyOvakggBFlzN0= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181107150114eucas1p1075fc1133423fa56c46978d5761c0f7f~k36WgFTVw2020320203eucas1p1V; Wed, 7 Nov 2018 15:01:14 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 24.8B.04441.A3EF2EB5; Wed, 7 Nov 2018 15:01:14 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181107150114eucas1p22b48cd9da7017c279d4c95bf62300570~k36V9TEO81618616186eucas1p2D; Wed, 7 Nov 2018 15:01:14 +0000 (GMT) X-AuditID: cbfec7f2-a1ae89c000001159-8b-5be2fe3a94ca Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 08.11.04284.A3EF2EB5; Wed, 7 Nov 2018 15:01:14 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PHT005I7WDUVY00@eusync3.samsung.com>; Wed, 07 Nov 2018 15:01:14 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de Date: Wed, 07 Nov 2018 16:00:58 +0100 Message-id: <20181107150105.23165-3-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20181107150105.23165-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIIsWRmVeSWpSXmKPExsWy7djPc7pW/x5FG7zeqm2xccZ6Vosbv9pY LZ6/u8xksfbIXXaLN22NjBYdR1oYLd7u7WR3YPeYN+sEi8fZOzsYPfq2rGIMYI7isklJzcks Sy3St0vgylh65hRLwUO2in0PpzM2MJ5k7WLk4JAQMJF4cUK9i5GTQ0hgBaPEikUsXYxcQPZn RolTx04wgSRAam6+fMwEkVjGKPHv1lyoqgYmiS+zr7CCVLEJGEp0ve1iA7FFBCQkfvVfZQQp Yhb4yigx7eQlsISwQLTE+smPGEFsFgFViRevloKt4BWwlXh98TsbxDp5idUbDjCD2JwCdhLd PZPBtkkIfGWVuLz6MjNEkYvEw6/drBC2sMSr41vYIWwZic6Og0wQDc2MEu0zZrFDOD2MElvn 7IBaYS1x+PhFsG5mAT6JSdumM0NCg1eio00IosRD4tCzPWwQf05klLi9toNtAqPkAkaGVYzi qaXFuempxYZ5qeV6xYm5xaV56XrJ+bmbGIERd/rf8U87GL9eSjrEKMDBqMTDe2Hrw2gh1sSy 4srcQ4wSHMxKIry9qx9FC/GmJFZWpRblxxeV5qQWH2KU5mBREuetZngQLSSQnliSmp2aWpBa BJNl4uCUamDMOWdv6blXI3jh5TX2K/mnJp1YcnTr3HatXa5MRZJ6AXFXQucJBmgxnfpaxyEW IGO24DSXl+jvlY93lhn7zGBx6/Np/Xf0FkdyWTerxC+xhyuaJE7mmSZzhzhO11lWXOu6LHZS 2e4/BrF/DNZMUD3O+OHuhdKVh+NT+tqO3/jDYGsTHr0487ISS3FGoqEWc1FxIgALoCKytAIA AA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHJMWRmVeSWpSXmKPExsVy+t/xq7pW/x5FG7w4LWSxccZ6Vosbv9pY LZ6/u8xksfbIXXaLN22NjBYdR1oYLd7u7WR3YPeYN+sEi8fZOzsYPfq2rGIMYI7isklJzcks Sy3St0vgylh65hRLwUO2in0PpzM2MJ5k7WLk5JAQMJG4+fIxUxcjF4eQwBJGie6fHxkhnCYm iaVbdzODVLEJGEp0ve1iA7FFBCQkfvVfZQSxmQW+M0qc/s8CYgsLREusn/wILM4ioCrx4tVS JhCbV8BW4vXF72wQ2+QlVm84ADaTU8BOortnMlivEFDNw6vnGScw8ixgZFjFKJJaWpybnlts qFecmFtcmpeul5yfu4kRGCrbjv3cvIPx0sbgQ4wCHIxKPLwaOx5GC7EmlhVX5h5ilOBgVhLh 7V39KFqINyWxsiq1KD++qDQntfgQozQHi5I473mDyighgfTEktTs1NSC1CKYLBMHp1QDY2ej l31eyI/9ZWnP1iv9kX9yXP2+CjNL94nFT1u01m/cu3Z60/GqGt1mm8/C+5KmBXXaPxPtWGLc Off1PP11/yXETHd//ftzG9Nf6diTBn9LG8908Xq1TGj/YBw6715Lh9zv8keTZ2t5Pze3Wm6k KJpk8uaIHWdnqM1t1Z2Pdpet/KXHnCPup8RSnJFoqMVcVJwIAFpWX9cRAgAA X-CMS-MailID: 20181107150114eucas1p22b48cd9da7017c279d4c95bf62300570 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181107150114eucas1p22b48cd9da7017c279d4c95bf62300570 References: <20181107150105.23165-1-m.szyprowski@samsung.com> X-Mailman-Approved-At: Wed, 07 Nov 2018 15:02:17 +0000 Cc: Marek Vasut , Bartlomiej Zolnierkiewicz , Marek Szyprowski Subject: [U-Boot] [PATCH 2/9] gadget: f_thor: properly enable 3rd endpoint defined by the protocol X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" This is needed to make Windows THOR flash tool happy, because it starts sending data only when interrupt packet is received on the 3rd endpoint. Signed-off-by: Marek Szyprowski Acked-by: Lukasz Majewski --- drivers/usb/gadget/f_thor.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c index 8b3b19feaf..920fa5279c 100644 --- a/drivers/usb/gadget/f_thor.c +++ b/drivers/usb/gadget/f_thor.c @@ -941,6 +941,13 @@ static int thor_eps_setup(struct usb_function *f) dev->out_req = req; /* ACM control EP */ ep = dev->int_ep; + d = ep_desc(gadget, &hs_int_desc, &fs_int_desc); + debug("(d)bEndpointAddress: 0x%x\n", d->bEndpointAddress); + + result = usb_ep_enable(ep, d); + if (result) + goto err; + ep->driver_data = cdev; /* claim */ return 0; From patchwork Wed Nov 7 15:00:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 150402 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5274268ljp; Wed, 7 Nov 2018 07:04:01 -0800 (PST) X-Google-Smtp-Source: AJdET5e1EunCanFnVlmhBXW8ERHeaVaCxZtKfpf51UX6T3NzG8a1qUDXAke2M7MMHF5B0CN+icj7 X-Received: by 2002:a50:9923:: with SMTP id k32-v6mr465126edb.3.1541603041259; Wed, 07 Nov 2018 07:04:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541603041; cv=none; d=google.com; s=arc-20160816; b=tjBTODQByl+eEs7Q6oMs/n1UPGbhnJWFA1dlWZ4Y6n5pg7+EKjWvTRUNJRd7MIdWRE 0dBHNEkvfIYezJrIO6ZvAsSaIlah389rJqGuIl9kBerW7EKrKlb2IU321F30GnwAm1pO nfNQu9IfwIuUIU6MyqJV7JlLv5/7dkvoZlUWdlXh8fWIEn3aoJJlpvfd2pyJJTJf0OIu ZjIiMoNCcAELPtv3aCyBi7iEa/RxipsuE//pVNEfYxazZ2lepRJeqT3i6J2s3HybNsgu /TDpb8gvQG61i08PUV7wmSxoRDJjRC2Iw6Mc1IhIpK6c0oa+xgZmn4MxfUjpIXXbHecC z8kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:cms-type:in-reply-to :message-id:date:to:from:dkim-signature:dkim-filter; bh=I9/7Q/wz7so4Mq6nImNgv8382sFANQwGQarapZdvcgo=; b=dsZ3KtTqLcaPSODJOkRAUK0oK6CghBrxowVAlyl/+xA96tfuEScpKbXd/QFr81xaPe KokB+LM/NEWMM0e27E6hICODC9d2z11aFFTb0LmJC0bCtZb3o3fUqN/deK0kFU6CKjj4 eFXZPY05YGkNH+LyonH8VG1rW297oaY+VY+RasekvMhBgJNuIoHyX0xmq7IKo2UBj0L/ NO7PcIuW+53hKqomwoYBfekJkmFIWt+RPDoJc4yjR8NaR1mTSD3kTEvLnEqlpmGEl7WC pNLYaZ1cEmOWbn82AOPTMglrSLy8X4nmvCY8LkN2Gp47E5py2HOKMsWOo6DzieacddXf tNBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=Z4XOleGo; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id d35-v6si717218edd.382.2018.11.07.07.04.01; Wed, 07 Nov 2018 07:04:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=Z4XOleGo; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: by lists.denx.de (Postfix, from userid 105) id D9512C224F3; Wed, 7 Nov 2018 15:03:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 7732FC224D5; Wed, 7 Nov 2018 15:02:21 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4A552C224A3; Wed, 7 Nov 2018 15:01:17 +0000 (UTC) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lists.denx.de (Postfix) with ESMTPS id 5FE79C224BC for ; Wed, 7 Nov 2018 15:01:16 +0000 (UTC) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181107150116euoutp019ed650216e36d4d398841dfd87ff1192~k36XhJp0d2078820788euoutp01q; Wed, 7 Nov 2018 15:01:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181107150116euoutp019ed650216e36d4d398841dfd87ff1192~k36XhJp0d2078820788euoutp01q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1541602876; bh=S5DayGfSqH07mVwymY04BBnwqaNMnJC8k1ByGP7ZtE0=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=Z4XOleGoOy2+bxpE0dQkwLkHugI37owbTjzmdO1K1dEKnqEQn3WONZrszw6hfRZhQ OgE2LoPOz6mqx+wiy2smpCVVXjpEszYY0CkTt2ZVPHyZdFRnCFF0YZzhBYFRXfGs3/ tjzi+tuurtzJgEyVYLxzQoixZ+9tDDhkkMo9RYYw= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181107150115eucas1p1651534b2610a57e7f2139c49cbc7c77a~k36W_sQ_12021220212eucas1p1O; Wed, 7 Nov 2018 15:01:15 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id C4.8B.04441.B3EF2EB5; Wed, 7 Nov 2018 15:01:15 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181107150114eucas1p1b51616e0943661c3b30c26763d359cee~k36WV3Zy02021220212eucas1p1N; Wed, 7 Nov 2018 15:01:14 +0000 (GMT) X-AuditID: cbfec7f2-5c9ff70000001159-8d-5be2fe3b3d27 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id E4.C4.04128.A3EF2EB5; Wed, 7 Nov 2018 15:01:14 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PHT005I7WDUVY00@eusync3.samsung.com>; Wed, 07 Nov 2018 15:01:14 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de Date: Wed, 07 Nov 2018 16:00:59 +0100 Message-id: <20181107150105.23165-4-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20181107150105.23165-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrEIsWRmVeSWpSXmKPExsWy7djPc7rW/x5FGyx5xW2xccZ6Vosbv9pY LZ6/u8xksfbIXXaLN22NjBYdR1oYLd7u7WR3YPeYN+sEi8fZOzsYPfq2rGIMYI7isklJzcks Sy3St0vgyrj7p5GxYDlrRev1A4wNjAtYuhg5OSQETCQO73vA1MXIxSEksIJRounrYRYI5zOj RGPPBTaYqgtre6GqljFKXPnzFcppYJL4MvsKK0gVm4ChRNfbLrAOEQEJiV/9VxlBipgFvjJK TDt5CSwhLBAi0f1oGVgDi4CqxIspa5hBbF4BW4krizcxQayTl1i94QBYnFPATqK7ZzLYTRIC H1klzm77wAxR5CIx6fZzqPuEJV4d38IOYctIXJ7cDdXQzCjRPmMWO4TTwyixdc4OqA5ricPH L4KdwSzAJzFp23SgqRxAcV6JjjYhCNNDonEuNDAmMkr0L7zPNIFRcgEjwypG8dTS4tz01GLD vNRyveLE3OLSvHS95PzcTYzAmDv97/inHYxfLyUdYhTgYFTi4b2w9WG0EGtiWXFl7iFGCQ5m JRHe3tWPooV4UxIrq1KL8uOLSnNSiw8xSnOwKInzVjM8iBYSSE8sSc1OTS1ILYLJMnFwSjUw HvifbaKan6q/rKRaVlJn5s+KLXzFFbMy3gmbl+U1h6xOT52oIDf/NFt4o8dvh5pggSfJxxY/ TYng+ru4aa7hSYWeieGi0sfeZz+XP7wuZcWs/YfstyYuXOXU9XXVies7L6j3l2YtmvHa7tFn 8Yi0e8FZUfxcVja2bclTj0nGKPx91nXd5NwyJZbijERDLeai4kQAGBgCmrUCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHJMWRmVeSWpSXmKPExsVy+t/xq7pW/x5FG0x5ommxccZ6Vosbv9pY LZ6/u8xksfbIXXaLN22NjBYdR1oYLd7u7WR3YPeYN+sEi8fZOzsYPfq2rGIMYI7isklJzcks Sy3St0vgyrj7p5GxYDlrRev1A4wNjAtYuhg5OSQETCQurO1l6mLk4hASWMIosWBXH5TTxCSx dOtuZpAqNgFDia63XWwgtoiAhMSv/quMIDazwHdGidP/wSYJC4RIzOp6DFbDIqAq8WLKGrBe XgFbiSuLNzFBbJOXWL3hAFicU8BOortnMlivEFDNw6vnGScw8ixgZFjFKJJaWpybnltspFec mFtcmpeul5yfu4kRGCrbjv3csoOx613wIUYBDkYlHl6NHQ+jhVgTy4orcw8xSnAwK4nw9q5+ FC3Em5JYWZValB9fVJqTWnyIUZqDRUmc97xBZZSQQHpiSWp2ampBahFMlomDU6qB8XCa1faI 6dMv6LqtkV9n7/xk/jFTxf7N239P8nlTobt38XQ+t6K2vnmZiwWfROpwh27lFeuJT3i77JDX 0b9VU28mBK1reBwtGLjryZ0kXhUbN7nTPBaB6+bsLhRsYIj/zloZrH0wY88+IYVjs5rX+f4o 3lbZtP2t+H8zy1Q7iVPaqhEOe1lilViKMxINtZiLihMBjt8WOxECAAA= X-CMS-MailID: 20181107150114eucas1p1b51616e0943661c3b30c26763d359cee X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181107150114eucas1p1b51616e0943661c3b30c26763d359cee References: <20181107150105.23165-1-m.szyprowski@samsung.com> X-Mailman-Approved-At: Wed, 07 Nov 2018 15:02:17 +0000 Cc: Marek Vasut , Bartlomiej Zolnierkiewicz , Marek Szyprowski Subject: [U-Boot] [PATCH 3/9] cmd: thor: select DFU subsystem also for 'thor' download tool X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" 'THOR' download command requires DFU infrastructure to properly flash board images. It can be used without enabling DFU command, so add such dependency to Kconfig. Signed-off-by: Marek Szyprowski Acked-by: Lukasz Majewski --- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index d66f710ad0..0af08aeab3 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -340,6 +340,7 @@ config CMD_FITUPD config CMD_THOR_DOWNLOAD bool "thor - TIZEN 'thor' download" + select DFU help Implements the 'thor' download protocol. This is a way of downloading a software update over USB from an attached host. From patchwork Wed Nov 7 15:01:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 150404 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5275466ljp; Wed, 7 Nov 2018 07:04:53 -0800 (PST) X-Google-Smtp-Source: AJdET5fo1fhd4UtFajR/Qp+1WxMbTIR/E+Kw1SdCQXT3cjtJqMn0/cSDp9em9WRLL96R8iq+5CGM X-Received: by 2002:a50:f4c3:: with SMTP id v3-v6mr438243edm.223.1541603093762; Wed, 07 Nov 2018 07:04:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541603093; cv=none; d=google.com; s=arc-20160816; b=X4PvYQhr/wjKZ64htqEkpOaquX5t1QCJ2VN7NDlm6WQNyAtg4QdqmiXebRhrLXyNk3 LD6BfIfw6lvFBdSCoRZY+HmumszWDH/2bdzeZyp4+U5gZ+7wL3iL4iGqbS9xUQeYQFJO k5p8Dqmz8p3nKf9iBM9cUKibLgB8j5hlI1KdN4r+4V2t+tHuLipfRNYZ2fNNtCbp86Z+ q88Q23pg5W7aDjytUyCwGWcMtTfX4O8/BfwLL8voVwTheAoDK7YFdamslE10WIdXB96j d89ctmK9xyLKAvBq/2CfuEzmDqxxAv9S+tq+yR0ZzmFt8KR/OqaeqYYodIJ1HRVAZpyI Un4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:cms-type:in-reply-to :message-id:date:to:from:dkim-signature:dkim-filter; bh=3I4dI0AsVD5Hyf2hxwEKpnAqiJX+A2swi5IeKt0ZukI=; b=x0ChJwCy7cfObREnni5BFO2/sJmbYJZtlzPc2RcivQMQo8C7vjszNnZcfPLdYKfQEU PF5vQjw7/7EeP1xPrDE+OiPkyCEjCOj/FHb5I8uNXkTfpMjI3LGtASNbdEmsuCXL7Ba+ gbfwVAug5LhHXmgxBu6yOl9E2i3dQ6MFjgoTtY0A0b6uJ3HpQ9OescBrTCLsp8zeWq+W OpSkDS6S5XRywlEa6DzpsLgqVUlTkXDXEIOJ1kntyoJegzNbrq7B2by6o8buVUJvmEJZ EiryRPO+yBktfEYM7sfdr1ciFPeq3Anzw4+L6SQRFkda3XRZkOyk+7Hq0vWiHCZcoHAY SqhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=oadUOuDN; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id q19-v6si585303eju.57.2018.11.07.07.04.53; Wed, 07 Nov 2018 07:04:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=oadUOuDN; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: by lists.denx.de (Postfix, from userid 105) id 62931C22512; Wed, 7 Nov 2018 15:02:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id ADEE1C224E1; Wed, 7 Nov 2018 15:02:19 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id EECB0C224A3; Wed, 7 Nov 2018 15:01:16 +0000 (UTC) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lists.denx.de (Postfix) with ESMTPS id 917F0C224BE for ; Wed, 7 Nov 2018 15:01:16 +0000 (UTC) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181107150116euoutp02148a57816d39012eafdbf2c8f2720675~k36XuUHfW0236402364euoutp02j; Wed, 7 Nov 2018 15:01:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181107150116euoutp02148a57816d39012eafdbf2c8f2720675~k36XuUHfW0236402364euoutp02j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1541602876; bh=0c0H991MMEDOzwTuOqBL5SdvBkP/IhIvIIbAiJcTYww=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=oadUOuDNW+8GREs4Ya1GZqO9xsC+Ub/BUT4fxs1glI58zNUpICUHxBSBjWCb+sVKX 935g9lq1LOUZI7RPjX/1mEtpDi92uv4e3iAwElsrwA25z+EkyAAwkT7fGyeQXYawny RajHDaaVbIw57mz+59/BRHtMKRjospPg8T27Ajmw= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181107150115eucas1p1ccd08c8fcfc8f5edf33c81582ed22b2d~k36XUt87E2021220212eucas1p1Q; Wed, 7 Nov 2018 15:01:15 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 44.4B.04806.B3EF2EB5; Wed, 7 Nov 2018 15:01:15 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181107150115eucas1p1104597e81bb7420a9115fb4f15b49409~k36WuxtKm2023720237eucas1p1T; Wed, 7 Nov 2018 15:01:15 +0000 (GMT) X-AuditID: cbfec7f5-367ff700000012c6-ce-5be2fe3b8860 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id D5.C4.04128.B3EF2EB5; Wed, 7 Nov 2018 15:01:15 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PHT005I7WDUVY00@eusync3.samsung.com>; Wed, 07 Nov 2018 15:01:15 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de Date: Wed, 07 Nov 2018 16:01:00 +0100 Message-id: <20181107150105.23165-5-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20181107150105.23165-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIIsWRmVeSWpSXmKPExsWy7djP87rW/x5FG5yZp2KxccZ6Vosbv9pY LZ6/u8xksfbIXXaLN22NjBYdR1oYLd7u7WR3YPeYN+sEi8fZOzsYPfq2rGIMYI7isklJzcks Sy3St0vgyljVf5m14AJvxc0305kbGH9zdTFyckgImEjsu/+AuYuRi0NIYAWjRNePNewQzmdG iRVXJjLCVO2c/I4NIrGMUeLtrw5WCKeBSeLY0RPMIFVsAoYSXW+72EBsEQEJiV/9VxlBipgF vjJKTDt5CSwhLOAk8enzE7AGFgFVif+3Z7OD2LwCthJf525jh1gnL7F6wwGwGk4BO4nunsks EPGfrBJLf9hD2C4Sp76ugTpPWOLV8S1QvTISlyd3s4AslhBoZpRonzGLHcLpYZTYOmcHG0SV tcTh4xdZQWxmAT6JSdumA23jAIrzSnS0CUGYHhKX94VDfDmRUeLTnJ/sExglFzAyrGIUTy0t zk1PLTbOSy3XK07MLS7NS9dLzs/dxAiMuNP/jn/dwbjvT9IhRgEORiUe3gtbH0YLsSaWFVfm HmKU4GBWEuHtXf0oWog3JbGyKrUoP76oNCe1+BCjNAeLkjhvNcODaCGB9MSS1OzU1ILUIpgs EwenVAOjVljSqVLplX++t+lczokpemOm8eXWCv1F5+7z67zxSZmYekhwxuc+i6Sg3EnnuPcf UWLetG0vM+9T8/7vqXraW699Vnpzdk2qRcBnrce+1nf/zN/xbHGUimv46v439yd/S1t6Wkgj YvcbKb442/jmua80th5+tjjvSsfG3qTcB/N41zW46CmuUmIpzkg01GIuKk4EAOHV8FW0AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrLJMWRmVeSWpSXmKPExsVy+t/xq7rW/x5FG5xaxWyxccZ6Vosbv9pY LZ6/u8xksfbIXXaLN22NjBYdR1oYLd7u7WR3YPeYN+sEi8fZOzsYPfq2rGIMYI7isklJzcks Sy3St0vgyljVf5m14AJvxc0305kbGH9zdTFyckgImEjsnPyOrYuRi0NIYAmjxPWHN1lBEkIC TUwS95t5QGw2AUOJrrddbCC2iICExK/+q4wgNrPAd0aJ0/9ZQGxhASeJT5+fMIPYLAKqEv9v z2YHsXkFbCW+zt3GDrFMXmL1hgNgNZwCdhLdPZNZIHbZSjy8ep5xAiPPAkaGVYwiqaXFuem5 xUZ6xYm5xaV56XrJ+bmbGIGBsu3Yzy07GLveBR9iFOBgVOLh1djxMFqINbGsuDL3EKMEB7OS CG/v6kfRQrwpiZVVqUX58UWlOanFhxilOViUxHnPG1RGCQmkJ5akZqemFqQWwWSZODilGhjP 7zjp1SiiI8qjWMfyfbovB/eRPp5fUeWVj41yTZcm1tt4Lv6z3VFGbvPDd3snHZox02H5lJOl lhMumUwo0rzQNPnip7j0luMcTFbxWxVb9pw+0V0p3OQuup1l/eq04AULs3vNv/Ap9L7Z/Wua 66LTsqXz++3comOLE6o0JJ2OLJ5wxchM6bUSS3FGoqEWc1FxIgAT9H3OEAIAAA== X-CMS-MailID: 20181107150115eucas1p1104597e81bb7420a9115fb4f15b49409 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181107150115eucas1p1104597e81bb7420a9115fb4f15b49409 References: <20181107150105.23165-1-m.szyprowski@samsung.com> X-Mailman-Approved-At: Wed, 07 Nov 2018 15:02:17 +0000 Cc: Marek Vasut , Bartlomiej Zolnierkiewicz , Marek Szyprowski Subject: [U-Boot] [PATCH 4/9] dfu: mmc: add support for in-partition offset X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" Add possibility to define a part of partition as a separate DFU entity. This allows to have more than one items on the given partiton. The real use case for this option is TM2 board. It can use u-boot stored as Linux kernel on the defined partiton (as RAW data) and load the real kernel from the same partition, but stored under the certain offset. Signed-off-by: Marek Szyprowski Acked-by: Lukasz Majewski --- drivers/dfu/dfu_mmc.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c index b45e6dc54c..826e70ffec 100644 --- a/drivers/dfu/dfu_mmc.c +++ b/drivers/dfu/dfu_mmc.c @@ -357,6 +357,7 @@ int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr, char *s) struct blk_desc *blk_dev = mmc_get_blk_desc(mmc); int mmcdev = second_arg; int mmcpart = third_arg; + int offset = 0; if (part_get_info(blk_dev, mmcpart, &partinfo) != 0) { pr_err("Couldn't find part #%d on mmc device #%d\n", @@ -364,9 +365,17 @@ int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *devstr, char *s) return -ENODEV; } + /* + * Check for an extra entry at dfu_alt_info env variable + * specifying the mmc HW defined partition number + */ + if (s) + if (!strcmp(strsep(&s, " "), "offset")) + offset = simple_strtoul(s, NULL, 0); + dfu->layout = DFU_RAW_ADDR; - dfu->data.mmc.lba_start = partinfo.start; - dfu->data.mmc.lba_size = partinfo.size; + dfu->data.mmc.lba_start = partinfo.start+offset; + dfu->data.mmc.lba_size = partinfo.size-offset; dfu->data.mmc.lba_blk_size = partinfo.blksz; } else if (!strcmp(entity_type, "fat")) { dfu->layout = DFU_FS_FAT; From patchwork Wed Nov 7 15:03:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 150406 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5277796ljp; Wed, 7 Nov 2018 07:06:38 -0800 (PST) X-Google-Smtp-Source: AJdET5esNug7tJ8UjjNTVFEjiRl9iWbfPX9GZGTKGoFXm93UVJhYCvuXWPtmS+hMo4vk1oK02YnO X-Received: by 2002:a17:906:9a9:: with SMTP id q9-v6mr377621eje.7.1541603198386; Wed, 07 Nov 2018 07:06:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541603198; cv=none; d=google.com; s=arc-20160816; b=rVjokwLVwdvW5vRMqoidrgXQ11qtkujm3ekQmblEmMtVd19CVLqeHClRp8mhtD4baS MxcagmO6AsvV5EbRDURQiWEx7eMqTEOsvP9+923bzBROvHrS2kP4IGS2VqxxPOeuXZfg BdfMvQ2PdsBL5meaCpZX39ZgyPni9KgJDkfsM8MR1rgAzLiO4BzkB88OyH9Fq0RjF8Lt uaWmbd1lR68a2mx7RUJBQT+I1mCcu+7+pShnu2Cer/BDd+HhqBV6c29IsUeRAbmHKBAL eTbmY2ZWdqqZRP2HZvBJu/fkBPiX08Su/ePDPv2wQbpFL9ErgAFPOmkutl0UMNw92t1d 4SSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:cms-type:in-reply-to :message-id:date:to:from:dkim-signature:dkim-filter; bh=VdrYSqDy+KADEAmwwuh6a5833DR4Y2fefEnR4wvWR2M=; b=Mx1deD25pQEVAM5T8XgkebJmrg0XOipmb8jUGNeE79YynOPndy4O9aHCMbHR+/G+73 OzqsjJt6XnKpxa4WNB60/cxWCfnLHeLaG+aHyMt66WTtyD8xX6IJ99IgKBaY4pLGaRSf iTQQv7kituFCc66NOTl08SqJDuibUAqeWrvCKEg211XxQBzGnGSdoHFtEvsA5vUWwydu II9K1JFdbbli3zwrEUX0X62d+4Ki5rUoRyrFMVuo5NYs8nYQ8KWzwMJ0SXRRDVqe34/e rW0cziRCRNIDZ2YOxRLom5LdifvlUj1XpO1lNTLxOvj/YKyLKiMHLZWofvgYD1RtAGRh 8Jdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=ezGxaMrT; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id k24si637449edx.435.2018.11.07.07.06.37; Wed, 07 Nov 2018 07:06:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=ezGxaMrT; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: by lists.denx.de (Postfix, from userid 105) id C164EC224CC; Wed, 7 Nov 2018 15:04:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id C631BC224CC; Wed, 7 Nov 2018 15:04:20 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 37EBFC224FB; Wed, 7 Nov 2018 15:03:18 +0000 (UTC) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lists.denx.de (Postfix) with ESMTPS id C1DB8C224DA for ; Wed, 7 Nov 2018 15:03:14 +0000 (UTC) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181107150314euoutp014d766df0797b1ef869c30018f752c899~k38F1_pLK2202622026euoutp01A; Wed, 7 Nov 2018 15:03:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181107150314euoutp014d766df0797b1ef869c30018f752c899~k38F1_pLK2202622026euoutp01A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1541602994; bh=cwmMRfBa3lRMbHQnCsuv++nDsPcl/CxdffUcPd+XMO4=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=ezGxaMrT+859NoHfVm7NU8wTsBCxEy99tZb5MljgwMYIOF7drl3I723h2SmGIY65m mb6Hv8FGsXo+L39ouRZRvTOs4EZvAGH9bwFyLnhqKFXTZlMimwmZ0vF0+i3x2oUcaa hCNyiPpRAt90zTgb+2+p3W/2cahBbyFMBQ+9+Rxo= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181107150314eucas1p2a7b04189112cd24f6e094b27d4998ef1~k38FaOGQd2090820908eucas1p2z; Wed, 7 Nov 2018 15:03:13 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 39.E5.04294.1BEF2EB5; Wed, 7 Nov 2018 15:03:13 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181107150313eucas1p1a29ae2865d3dbe16dd784e228d3e5124~k38EyCqNb1569715697eucas1p16; Wed, 7 Nov 2018 15:03:13 +0000 (GMT) X-AuditID: cbfec7f4-835ff700000010c6-93-5be2feb101c6 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 5C.51.04284.1BEF2EB5; Wed, 7 Nov 2018 15:03:13 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PHT00D5AWH9FF60@eusync1.samsung.com>; Wed, 07 Nov 2018 15:03:13 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de Date: Wed, 07 Nov 2018 16:03:08 +0100 Message-id: <20181107150308.23267-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20181107150105.23165-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDIsWRmVeSWpSXmKPExsWy7djPc7ob/z2KNpjwzMBi44z1rBY3frWx Wjx/d5nJYu2Ru+wWHUdaGC3e7u1kd2DzmDfrBIvH2Ts7GD36tqxiDGCO4rJJSc3JLEst0rdL 4Mr4sXcSY8E7s4ppR7YxNzA263QxcnJICJhIHJzRz97FyMUhJLCCUaLt93lWCOczo8TtJVcY YarW/d3LBmILCSxjlOi+IgtR1MAkcWBFA1gRm4ChRNfbLrAiEQEJiV/9V8HizALXGCVmbVcE sYUFrCUW/r7MDmKzCKhKfJ9yggXE5hWwlXh5eD0zxDJ5idUbDoDZnAJ2Et09k1lAlkkIfGSV WL79PjtEkYtE4+MuqOuEJV4d3wIVl5Ho7DjIBNHQzCjRPmMWO4TTwyixdc4ONogqa4nDxy+y QpzHJzFp23SgdRxAcV6JjjYhiBIPiRX3H0LDYiKjxMrPO5kmMEouYGRYxSieWlqcm55abJSX Wq5XnJhbXJqXrpecn7uJERhnp/8d/7KDcdefpEOMAhyMSjy8F7Y+jBZiTSwrrsw9xCjBwawk wtu7+lG0EG9KYmVValF+fFFpTmrxIUZpDhYlcd5qhgfRQgLpiSWp2ampBalFMFkmDk6pBsae RKtwht+r5SacSmnOn/8o3Nl2x+XPj99ee/BvhZ/AHPmIc2nFPT9m3JO3dLSpt7FNf5fScICz +Ce/CnuvofmF+1M57qs3n355hvvS5i29K7dX7VOfdK1t7+fuBrbyDbtXylxsf7utY96WQtNZ 0x4yiG/atbvup8DdH9sUD+2dM/Os4ZFDtYc4lFiKMxINtZiLihMBCBLBm68CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFJMWRmVeSWpSXmKPExsVy+t/xy7ob/z2KNri7gd9i44z1rBY3frWx Wjx/d5nJYu2Ru+wWHUdaGC3e7u1kd2DzmDfrBIvH2Ts7GD36tqxiDGCO4rJJSc3JLEst0rdL 4Mr4sXcSY8E7s4ppR7YxNzA263QxcnJICJhIrPu7l62LkYtDSGAJo8T6W/MZIZwmJonDP+Yx g1SxCRhKdL3tYgOxRQQkJH71XwUrYha4wShx5/xPdpCEsIC1xMLfl8FsFgFVie9TTrCA2LwC thIvD69nhlgnL7F6wwEwm1PATqK7ZzJYjRBQzcOr5xknMPIsYGRYxSiSWlqcm55bbKhXnJhb XJqXrpecn7uJERgi24793LyD8dLG4EOMAhyMSjy8GjseRguxJpYVV+YeYpTgYFYS4e1d/Sha iDclsbIqtSg/vqg0J7X4EKM0B4uSOO95g8ooIYH0xJLU7NTUgtQimCwTB6dUA2PlWt/NzWau UXxcZsae+bq3311KXLDjlkzIZ9HuL/f8Y00dzMMtpCc/FOved+Xa/oXbDHUv1VqfnO8bWPUs Yf5Z9oOPvzR7PW6p357KalhnL5O3SD2T/8B73eVPKxIuCh3MOiAWzBs4Z98i4dTatBd5JYuO GPRwvEpd8OljRsVcgaXTp01P2qbEUpyRaKjFXFScCAADAfeXDQIAAA== X-CMS-MailID: 20181107150313eucas1p1a29ae2865d3dbe16dd784e228d3e5124 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181107150313eucas1p1a29ae2865d3dbe16dd784e228d3e5124 References: <20181107150105.23165-1-m.szyprowski@samsung.com> Cc: Bartlomiej Zolnierkiewicz , Marek Szyprowski Subject: [U-Boot] [PATCH 5/9] mmc: dw_mmc: add support for 64bit DMA X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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: Lukasz Majewski DW-MMC module in Samsung Exynos5433 requires 64bit DMA descriptors. This patch adds code for handling them. Signed-off-by: Lukasz Majewski [extracted from old sources and adapted to mainline u-boot, minor fixes] Signed-off-by: Marek Szyprowski --- drivers/mmc/dw_mmc.c | 53 ++++++++++++++++++++++++++++++------- drivers/mmc/exynos_dw_mmc.c | 6 +++++ include/dwmmc.h | 25 +++++++++++++++++ 3 files changed, 74 insertions(+), 10 deletions(-) diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 3c702b3ed8..f50eb29ac9 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -30,8 +30,8 @@ static int dwmci_wait_reset(struct dwmci_host *host, u32 value) return 0; } -static void dwmci_set_idma_desc(struct dwmci_idmac *idmac, - u32 desc0, u32 desc1, u32 desc2) +static void dwmci_set_idma_desc_32bit(void *idmac, + u32 desc0, u32 desc1, u32 desc2) { struct dwmci_idmac *desc = idmac; @@ -41,11 +41,27 @@ static void dwmci_set_idma_desc(struct dwmci_idmac *idmac, desc->next_addr = (ulong)desc + sizeof(struct dwmci_idmac); } +static void dwmci_set_idma_desc_64bit(void *idmac, + u32 desc0, u32 desc1, u32 desc2) +{ + struct dwmci_idmac_64addr *desc = idmac; + + desc->flags = desc0; + desc->_res1 = 0; + desc->cnt = desc1; + desc->_res2 = 0; + desc->addrl = desc2; + desc->addrh = 0; + desc->next_addrl = (ulong)desc + sizeof(struct dwmci_idmac_64addr); + desc->next_addrh = 0; +} + static void dwmci_prepare_data(struct dwmci_host *host, struct mmc_data *data, - struct dwmci_idmac *cur_idmac, + struct dwmci_idmac_64addr *cur_idmac64, void *bounce_buffer) { + struct dwmci_idmac *cur_idmac = (struct dwmci_idmac *)cur_idmac64; unsigned long ctrl; unsigned int i = 0, flags, cnt, blk_cnt; ulong data_start, data_end; @@ -56,7 +72,12 @@ static void dwmci_prepare_data(struct dwmci_host *host, dwmci_wait_reset(host, DWMCI_CTRL_FIFO_RESET); data_start = (ulong)cur_idmac; - dwmci_writel(host, DWMCI_DBADDR, (ulong)cur_idmac); + + if (host->dma_64bit_address) { + dwmci_writel(host, DWMCI_DBADDRU, 0); + dwmci_writel(host, DWMCI_DBADDRL, (ulong)cur_idmac64); + } else + dwmci_writel(host, DWMCI_DBADDR, (ulong)cur_idmac); do { flags = DWMCI_IDMAC_OWN | DWMCI_IDMAC_CH ; @@ -67,17 +88,27 @@ static void dwmci_prepare_data(struct dwmci_host *host, } else cnt = data->blocksize * 8; - dwmci_set_idma_desc(cur_idmac, flags, cnt, - (ulong)bounce_buffer + (i * PAGE_SIZE)); + if (host->dma_64bit_address) + dwmci_set_idma_desc_64bit(cur_idmac64, flags, cnt, + (ulong)bounce_buffer + + (i * PAGE_SIZE)); + else + dwmci_set_idma_desc_32bit(cur_idmac, flags, cnt, + (ulong)bounce_buffer + + (i * PAGE_SIZE)); if (blk_cnt <= 8) break; blk_cnt -= 8; cur_idmac++; + cur_idmac64++; i++; } while(1); - data_end = (ulong)cur_idmac; + if (host->dma_64bit_address) + data_end = (ulong)cur_idmac64; + else + data_end = (ulong)cur_idmac; flush_dcache_range(data_start, data_end + ARCH_DMA_MINALIGN); ctrl = dwmci_readl(host, DWMCI_CTRL); @@ -222,7 +253,7 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, { #endif struct dwmci_host *host = mmc->priv; - ALLOC_CACHE_ALIGN_BUFFER(struct dwmci_idmac, cur_idmac, + ALLOC_CACHE_ALIGN_BUFFER(struct dwmci_idmac_64addr, cur_idmac64, data ? DIV_ROUND_UP(data->blocks, 8) : 0); int ret = 0, flags = 0, i; unsigned int timeout = 500; @@ -256,7 +287,7 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, data->blocksize * data->blocks, GEN_BB_READ); } - dwmci_prepare_data(host, data, cur_idmac, + dwmci_prepare_data(host, data, cur_idmac64, bbstate.bounce_buffer); } } @@ -474,7 +505,9 @@ static int dwmci_init(struct mmc *mmc) dwmci_writel(host, DWMCI_TMOUT, 0xFFFFFFFF); - dwmci_writel(host, DWMCI_IDINTEN, 0); + dwmci_writel(host, host->dma_64bit_address ? + DWMCI_IDINTEN64 : DWMCI_IDINTEN, 0); + dwmci_writel(host, DWMCI_BMOD, 1); if (!host->fifoth_val) { diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c index 435ccac594..3e9d47538c 100644 --- a/drivers/mmc/exynos_dw_mmc.c +++ b/drivers/mmc/exynos_dw_mmc.c @@ -98,6 +98,7 @@ static void exynos_dwmci_board_init(struct dwmci_host *host) static int exynos_dwmci_core_init(struct dwmci_host *host) { + unsigned int addr_config; unsigned int div; unsigned long freq, sclk; @@ -122,6 +123,11 @@ static int exynos_dwmci_core_init(struct dwmci_host *host) host->clksel = exynos_dwmci_clksel; host->get_mmc_clk = exynos_dwmci_get_clk; + addr_config = DWMCI_GET_ADDR_CONFIG(dwmci_readl(host, DWMCI_HCON)); + if (addr_config == 1) + /* host supports IDMAC in 64-bit address mode */ + host->dma_64bit_address = 1; + #ifndef CONFIG_DM_MMC /* Add the mmc channel to be registered with mmc core */ if (add_dwmci(host, DWMMC_MAX_FREQ, DWMMC_MIN_FREQ)) { diff --git a/include/dwmmc.h b/include/dwmmc.h index 0f9d51b557..14db03d7d4 100644 --- a/include/dwmmc.h +++ b/include/dwmmc.h @@ -48,6 +48,17 @@ #define DWMCI_DSCADDR 0x094 #define DWMCI_BUFADDR 0x098 #define DWMCI_DATA 0x200 +/* + * Registers to support idmac 64-bit address mode + */ +#define DWMCI_DBADDRL 0x088 +#define DWMCI_DBADDRU 0x08c +#define DWMCI_IDSTS64 0x090 +#define DWMCI_IDINTEN64 0x094 +#define DWMCI_DSCADDRL 0x098 +#define DWMCI_DSCADDRU 0x09c +#define DWMCI_BUFADDRL 0x0A0 +#define DWMCI_BUFADDRU 0x0A4 /* Interrupt Mask register */ #define DWMCI_INTMSK_ALL 0xffffffff @@ -132,6 +143,7 @@ /* quirks */ #define DWMCI_QUIRK_DISABLE_SMU (1 << 0) +#define DWMCI_GET_ADDR_CONFIG(x) (((x)>>27) & 0x1) /** * struct dwmci_host - Information about a designware MMC host * @@ -145,6 +157,7 @@ * @dev_id: Arbitrary device ID for use by controller * @buswidth: Bus width in bits (8 or 4) * @fifoth_val: Value for FIFOTH register (or 0 to leave unset) + * @dma_64bit_address: True only for devices supporting 64 bit DMA * @mmc: Pointer to generic MMC structure for this device * @priv: Private pointer for use by controller */ @@ -161,6 +174,7 @@ struct dwmci_host { int dev_id; int buswidth; u32 fifoth_val; + int dma_64bit_address; struct mmc *mmc; void *priv; @@ -196,6 +210,17 @@ struct dwmci_idmac { u32 next_addr; } __aligned(ARCH_DMA_MINALIGN); +struct dwmci_idmac_64addr { + u32 flags; + u32 _res1; + u32 cnt; + u32 _res2; + u32 addrl; + u32 addrh; + u32 next_addrl; + u32 next_addrh; +} __aligned(ARCH_DMA_MINALIGN); + static inline void dwmci_writel(struct dwmci_host *host, int reg, u32 val) { writel(val, host->ioaddr + reg); From patchwork Wed Nov 7 15:03:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 150405 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5277346ljp; Wed, 7 Nov 2018 07:06:20 -0800 (PST) X-Google-Smtp-Source: AJdET5etekwzTbYq7dpvbYL5rJLSxswPtRLyf5uNLiZfmqp7OTlXwblmLjhmUvkJcBktcxV/LUls X-Received: by 2002:a17:906:f2d5:: with SMTP id gz21-v6mr370069ejb.81.1541603180021; Wed, 07 Nov 2018 07:06:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541603180; cv=none; d=google.com; s=arc-20160816; b=iZY+MX9/5s/0pcn04eY/5NtLxKFf0iwcOtRV6wkoUToFTVpO74cwnNFYkggN/HKmS5 DGN2izXafej4XASdEdobHOph09IiB2lQaJ8rWvz7/nUpDcAq/pbE3y472bUKCa+0BWco eRVhTzufs+pV9z3otbKgjMPM6SdqCSv+i58fT4We09Guld4V7MUMjzKeCRVBylZxqkya JxPCYhOKqCDcxofxAYk2+HNXGKTneHR0CVJUWQOgMyL3z4MFOCCJxWZH+oG6EN9miDvs QIrchQBMnL1vbeLamc2g6YFKhjMHSAuvOMwgXwfIgJjflLvz3rydkqYA3mw5Jvq/XYqJ F52Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:cms-type:in-reply-to :message-id:date:to:from:dkim-signature:dkim-filter; bh=WqH/XeR6NBARU/8lkqYHj0a2AcEj1UJChuZCCe3xoLQ=; b=kS/H8e54yQbZ49gcnsPr4j/RFRnewfo0ifddwNsYWMOfKVwLQPdAqAaPclTlTi7UvC ThYSLXpISN2JHmi3IsxaANidB/+AGhhI3OVhDdqn7A+kz4VCCtiumUwSBOJWJ4AuLA/Q 4DIMricyrXa2KH0lWDIiiw3mb9aJAnA6ld4YdACW4Mzf98zV/mtNJkxPAofGvNJ6yi3a 3kt3rsYpfuecBRlqu5ryr3slKYYxOm4+zxBnS0Gr6cJ5fyrPUFWpSLOuKMGO0bC+L80p GyCCJPAfGevkVg1jmS8iJRZc1yC3nWJkNEYJfSfWkhnsX4NLr9DAzISgI00rOd0Jer52 HE/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=bivfI8IM; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id z26-v6si569912edx.446.2018.11.07.07.06.19; Wed, 07 Nov 2018 07:06:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=bivfI8IM; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: by lists.denx.de (Postfix, from userid 105) id 996C8C224D3; Wed, 7 Nov 2018 15:05:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4067BC22534; Wed, 7 Nov 2018 15:05:03 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 27E67C2257C; Wed, 7 Nov 2018 15:03:31 +0000 (UTC) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lists.denx.de (Postfix) with ESMTPS id 7D6A9C224F8 for ; Wed, 7 Nov 2018 15:03:28 +0000 (UTC) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181107150328euoutp02fe3fccae3a7c6a207a2238a80d0a1124~k38Sm-_eW0556105561euoutp02N; Wed, 7 Nov 2018 15:03:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181107150328euoutp02fe3fccae3a7c6a207a2238a80d0a1124~k38Sm-_eW0556105561euoutp02N DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1541603008; bh=7P2HpAjkL/vmHrqMIF1Pd3xawM+51jrDRpecEAK6Y00=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=bivfI8IMX4l60ZIzpBuhJ8jbet5b6eFVibSQ2NsRAWMa6dRnoavDyXp12eXiBfpnP +SEM0hk0WMj8kskvk0Yz/VX5lROM4aRB5SoK3P0FtzRajqq61BhoSrB6yMGy4d6Ral Z12oIIK54mSCyi6At7QUABrvp0z9WMDrEWNpkO/Y= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181107150327eucas1p2f6a3375c690e6cfcc090a14d0af57695~k38SNYuxS2478524785eucas1p24; Wed, 7 Nov 2018 15:03:27 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 1E.9B.04806.FBEF2EB5; Wed, 7 Nov 2018 15:03:27 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181107150326eucas1p27aa5f623304a8f20cd964b32916af7c4~k38RdTM3U0331703317eucas1p28; Wed, 7 Nov 2018 15:03:26 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-be-5be2febf767a Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 8B.05.04128.EBEF2EB5; Wed, 7 Nov 2018 15:03:26 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PHT00H4XWHMV510@eusync1.samsung.com>; Wed, 07 Nov 2018 15:03:26 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de Date: Wed, 07 Nov 2018 16:03:22 +0100 Message-id: <20181107150322.23314-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20181107150105.23165-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDIsWRmVeSWpSXmKPExsWy7djP87r7/z2KNtjxRdpi44z1rBY3frWx Wjx/d5nJYu2Ru+wWHUdaGC3e7u1kd2DzmDfrBIvH2Ts7GD36tqxiDGCO4rJJSc3JLEst0rdL 4Mo4tjKn4JRgxY7+eYwNjOv5uhg5OSQETCSOrDjJ1sXIxSEksIJR4u7+hYwQzmdGic8HWtlh qq5vOAdVtYxRYkHLD1YIp4FJovFnCytIFZuAoUTX2y42EFtEQELiV/9VRhCbWeAao8Ss7Yog trBAgMS5vsdgNSwCqhLXbv5nArF5BWwlVvzYxQaxTV5i9YYDzCA2p4CdRHfPZBaQZRICH1kl tky+xwxR5CLx/nETVIOwxKvjW6BOlZG4PLkbqqGZUaJ9xix2CKeHUWLrnB1QHdYSh49fZIU4 j09i0rbpQFM5gOK8Eh1tQhAlHhJvF5yC+nkio8S0O7OZJzBKLmBkWMUonlpanJueWmycl1qu V5yYW1yal66XnJ+7iREYZ6f/Hf+6g3Hfn6RDjAIcjEo8vBe2PowWYk0sK67MPcQowcGsJMLb u/pRtBBvSmJlVWpRfnxRaU5q8SFGaQ4WJXHeaoYH0UIC6YklqdmpqQWpRTBZJg5OqQZGZl42 Wyvb+H/m29K0HRSYFy9pvTj/j3i4B8Nhx2SNwmM8D3fZpIgdW3+9aGXJ78fGu1Zs/b7l2r4S zxDe11P797GLqJa8mXQklumlzt457Hn7JZZuuXH0mpyJsdX73XqJRc0yM54qny75bf1O7YSr 0KJMq8u7tXR2Gz92uec4a7b5Sy3RR2r1SizFGYmGWsxFxYkAfGC9sq8CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBJMWRmVeSWpSXmKPExsVy+t/xy7r7/j2KNtiw1Nhi44z1rBY3frWx Wjx/d5nJYu2Ru+wWHUdaGC3e7u1kd2DzmDfrBIvH2Ts7GD36tqxiDGCO4rJJSc3JLEst0rdL 4Mo4tjKn4JRgxY7+eYwNjOv5uhg5OSQETCSubzjHBmILCSxhlHh/L6WLkQvIbmKSWDD7DitI gk3AUKLrbRdYkYiAhMSv/quMIEXMAjcYJe6c/8kOkhAW8JP4PP08C4jNIqAqce3mfyYQm1fA VmLFj11sENvkJVZvOMAMYnMK2El090xmgdhsK/Hw6nnGCYw8CxgZVjGKpJYW56bnFhvpFSfm Fpfmpesl5+duYgSGx7ZjP7fsYOx6F3yIUYCDUYmHV2PHw2gh1sSy4srcQ4wSHMxKIry9qx9F C/GmJFZWpRblxxeV5qQWH2KU5mBREuc9b1AZJSSQnliSmp2aWpBaBJNl4uCUamAsWWep3hY+ u/FG7Y3mIt+XtZnxy1JvSi2bc7uROXKiyp3sRY2bz0i5rpbvW2uXvT+bMTB9xqxn1/kb1ixa 2NE1dWncXkv3uXW2HPrSnCcudfCoO12IP73ZQrdHTyHt66v8j4uXlgjm+2hwzLGe/7pjwd+m 9II1966xMDD49HKrHJ5huygnNkOJpTgj0VCLuag4EQA9zPVrCwIAAA== X-CMS-MailID: 20181107150326eucas1p27aa5f623304a8f20cd964b32916af7c4 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181107150326eucas1p27aa5f623304a8f20cd964b32916af7c4 References: <20181107150105.23165-1-m.szyprowski@samsung.com> Cc: Bartlomiej Zolnierkiewicz , Marek Szyprowski Subject: [U-Boot] [PATCH 6/9] mmc: exynos_dw_mmc: fix compilation on ARM64-based Exynos X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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: Lukasz Majewski Disable some legacy code to let it work on ARM64 based Exynos SoCs. Signed-off-by: Lukasz Majewski [extracted from old sources and adapted to mainline u-boot, minor fixes] Signed-off-by: Marek Szyprowski --- drivers/mmc/exynos_dw_mmc.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c index 3e9d47538c..c7ba3b6060 100644 --- a/drivers/mmc/exynos_dw_mmc.c +++ b/drivers/mmc/exynos_dw_mmc.c @@ -143,6 +143,7 @@ static struct dwmci_host dwmci_host[DWMMC_MAX_CH_NUM]; static int do_dwmci_init(struct dwmci_host *host) { +#ifdef CONFIG_CPU_V7A int flag, err; flag = host->buswidth == 8 ? PINMUX_FLAG_8BIT_MODE : PINMUX_FLAG_NONE; @@ -151,6 +152,7 @@ static int do_dwmci_init(struct dwmci_host *host) printf("DWMMC%d not configure\n", host->dev_index); return err; } +#endif return exynos_dwmci_core_init(host); } @@ -160,10 +162,15 @@ static int exynos_dwmci_get_config(const void *blob, int node, struct dwmci_exynos_priv_data *priv) { int err = 0; - u32 base, timing[3]; + dma_addr_t base; + u32 timing[3]; +#ifdef CONFIG_CPU_V7A /* Extract device id for each mmc channel */ host->dev_id = pinmux_decode_periph_id(blob, node); +#else + host->dev_id = 0; +#endif host->dev_index = fdtdec_get_int(blob, node, "index", host->dev_id); if (host->dev_index == host->dev_id) @@ -247,19 +254,20 @@ static int exynos_dwmci_process_node(const void *blob, int exynos_dwmmc_init(const void *blob) { int node_list[DWMMC_MAX_CH_NUM]; - int boot_dev_node; int err = 0, count; count = fdtdec_find_aliases_for_id(blob, "mmc", COMPAT_SAMSUNG_EXYNOS_DWMMC, node_list, DWMMC_MAX_CH_NUM); +#ifdef CONFIG_CPU_V7A /* For DWMMC always set boot device as mmc 0 */ if (count >= 3 && get_boot_mode() == BOOT_MODE_SD) { - boot_dev_node = node_list[2]; + int boot_dev_node = node_list[2]; node_list[2] = node_list[0]; node_list[0] = boot_dev_node; } +#endif err = exynos_dwmci_process_node(blob, node_list, count); From patchwork Wed Nov 7 15:04:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 150409 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5279648ljp; Wed, 7 Nov 2018 07:08:02 -0800 (PST) X-Google-Smtp-Source: AJdET5diYFHF0l6XcMx1GSI2AkQ6qbs5XZtZFe7KGCXb9xBc/1kfDZwYT3HZ3lt62N+5uoHQPX6H X-Received: by 2002:a17:906:4204:: with SMTP id z4-v6mr394857ejk.13.1541603282605; Wed, 07 Nov 2018 07:08:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541603282; cv=none; d=google.com; s=arc-20160816; b=Hdl6IJkXT5Mi7YHAMKJ16GncZZmzqIW/dMI39dnxc5642hPuJsCZEX0EMC3UVREwyD r+rKgkze3VUgmBCkIICRMGJhns2L2BR+/GcLnXcx7FNoVfO6P3E5PGscaZdZymfDaIsq 4qGWz+s2NwyVKlbqbAX+iC3i87AcgLy8qqEtxBVOJOOVedStaHrsfxUDb70xNAO4WNRZ M85lxAPiK6v+LanvZX+u0WTUVSqiqp8KWC/ACJSw3ZdBLyaDhF6f1+VDiX5mpy8+qS17 lrmF6whMQH/PKDRpY1R+onqNaq6Zra72+iK3sqY3Bd9h5zyiz0vV9gbcNgYKdWfP7j97 L53Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:cms-type:in-reply-to :message-id:date:to:from:dkim-signature:dkim-filter; bh=mu5C7ijmbqBkIcnK24xlnnQH+ip65rTZcixvi0MbnGg=; b=LwxlhB4x7rMrHDgjHC4QUy7aDBS64gBM+gLL6OKTOfy14g+VG/DCT5keTWM16DyNau 4HX3yiW0FeOjpqfuWgPjdDpeOnFUIyROmai4uQDxhi/FGAl/OE+CvsCEFaNGHUTGXRop i3rbIKyxwsF15vRmH65iecXU3U41TaTXnC7J3SaBjw80Y+th2xoNaDBwOIGbkH7Dm8lA nloyQEjjjW0A3zAu9vFWtdetRrRfum1YzhmVWW+Y+hXBopJ2DEaFJSUH4QqXdpF9Rjxs uwxwMGduAHVRqGqflSxbjDJkTqo1DCkLm+GK66C5poKl8SB54KXFE8HJI4GcK+QNH+/M F1Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=OAsDUt+v; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id u19-v6si544589edb.182.2018.11.07.07.08.02; Wed, 07 Nov 2018 07:08:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=OAsDUt+v; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: by lists.denx.de (Postfix, from userid 105) id 309BBC224F1; Wed, 7 Nov 2018 15:05:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3CF6CC22509; Wed, 7 Nov 2018 15:05:53 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BA46FC224F1; Wed, 7 Nov 2018 15:04:56 +0000 (UTC) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lists.denx.de (Postfix) with ESMTPS id E8D3CC224FF for ; Wed, 7 Nov 2018 15:04:55 +0000 (UTC) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181107150455euoutp0234348b7b440eb3eb392413726e593515~k39kEUrzJ0644106441euoutp02H; Wed, 7 Nov 2018 15:04:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181107150455euoutp0234348b7b440eb3eb392413726e593515~k39kEUrzJ0644106441euoutp02H DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1541603095; bh=CckjrqGGMmH2TkbhMUkpcTlBNV4lWRk2KPbYpzQidzw=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=OAsDUt+vzyFQLqhI0vVrTDiselMgP++z5+pGWhB+NplZhb3RnnpGWb6SPku3/9kXW /s+0PDZ5xZp3mpR4tL9RnTkykOdIRmVluwqssLuXJ8SOlv0XLqqlQtWw0PDJ423Q39 n0AWQRyQLqN0Yu5chnVIwkBft+Qsy0+Y2exkm0d0= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181107150455eucas1p1c44f4519b3e1fdbc0ce9239d903938d8~k39jpHofP2707727077eucas1p1u; Wed, 7 Nov 2018 15:04:55 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 32.EB.04806.61FF2EB5; Wed, 7 Nov 2018 15:04:54 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181107150454eucas1p244fc84b33de1710ab982e7571357890b~k39i-zmyX2612626126eucas1p2A; Wed, 7 Nov 2018 15:04:54 +0000 (GMT) X-AuditID: cbfec7f5-367ff700000012c6-f6-5be2ff161af9 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 3E.35.04128.61FF2EB5; Wed, 7 Nov 2018 15:04:54 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PHT00JSSWJZXN80@eusync1.samsung.com>; Wed, 07 Nov 2018 15:04:54 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de Date: Wed, 07 Nov 2018 16:04:41 +0100 Message-id: <20181107150441.23383-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20181107150105.23165-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOIsWRmVeSWpSXmKPExsWy7djP87pi/x9FG3Q+sLL4tPAEq8XGGetZ LW78amO1eP7uMpPF2iN32S06jrQwWrzd28nuwO7x4eg1No95s06weJy9s4PRo2/LKsYAligu m5TUnMyy1CJ9uwSujObjzWwFLewVt6e+Zm1g/MbaxcjJISFgInHpzUL2LkYuDiGBFYwSK6b1 MUI4nxklVs7qYoGpanzXzQKRWMYocfvkVSingUmi5dUMZpAqNgFDia63XWwgtoiAhMSv/qtg o5gFWpgkpp1fAFYkLBArseT4dKAEBweLgKrE5sXxIGFeAVuJowtfQW2Tl1i94QBYOaeAnUR3 z2SwZRICP1klVi27B1XkIrHsxgo2CFtY4tXxLewQtozE5cndUA3NjBLtM2axQzg9jBJb5+yA 6rCWOHz8IjgImAX4JCZtm84McpGEAK9ER5sQRImHxOWfZ5gh3pzIKDHz1TmmCYySCxgZVjGK p5YW56anFhvnpZbrFSfmFpfmpesl5+duYgRG3+l/x7/uYNz3J+kQowAHoxIP74WtD6OFWBPL iitzDzFKcDArifD2rn4ULcSbklhZlVqUH19UmpNafIhRmoNFSZy3muFBtJBAemJJanZqakFq EUyWiYNTqoFRPPZu0rRXCt0/t6UmXy1wnhiZULJZ6PKq1eJz3Wo/dep/fiA8IfdNAotRdNCG lo1+6ksz7xzmVJM6vsL2NI9YiciKWtvvm/LOCmYxmixU1LjIrSfc5uU7/VLyxXWtM+VeRxd3 uF6zPbbFep2cgJ6m9KLl71dPmbouwGVaJ9eELS//L2bd93KCEktxRqKhFnNRcSIAU/4BHLoC AAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpiluLIzCtJLcpLzFFi42I5/e/4ZV2x/4+iDZZ1C1p8WniC1WLjjPWs Fjd+tbFaPH93mcli7ZG77BYdR1oYLd7u7WR3YPf4cPQam8e8WSdYPM7e2cHo0bdlFWMASxSX TUpqTmZZapG+XQJXRvPxZraCFvaK21NfszYwfmPtYuTkkBAwkWh8180CYgsJLGGUWHzVv4uR C8huYpJoXHOOGSTBJmAo0fW2iw3EFhGQkPjVf5URpIhZoI1J4vX6BWAJYYFYiSXHpwMlODhY BFQlNi+OBwnzCthKHF34igVimbzE6g0HwGZyCthJdPdMhlpsK/Hw6nnGCYw8CxgZVjGKpJYW 56bnFhvpFSfmFpfmpesl5+duYgSGzLZjP7fsYOx6F3yIUYCDUYmHV2PHw2gh1sSy4srcQ4wS HMxKIry9qx9FC/GmJFZWpRblxxeV5qQWH2KU5mBREuc9b1AZJSSQnliSmp2aWpBaBJNl4uCU amAMjhOxl5vHxW81++qfjoKg2ORqpluH7gSV8E+vPmf3/YLSLzVjdZW9RyR4GhtMnx3xzJBU zFOyCE2+OPN/7kWDw8GK67wXaP67rZF5TfPHgqRE6d5n8xuq5RfM8b5azPkyL2e5YLdCjTJv 5+/ustyDegyHw/XuNdZv+v432U7E3WTy9Kfy6UosxRmJhlrMRcWJALx1mF8VAgAA X-CMS-MailID: 20181107150454eucas1p244fc84b33de1710ab982e7571357890b X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181107150454eucas1p244fc84b33de1710ab982e7571357890b References: <20181107150105.23165-1-m.szyprowski@samsung.com> Cc: Bartlomiej Zolnierkiewicz , Marek Szyprowski Subject: [U-Boot] [PATCH 7/9] arm: armv8: add support for boards with broken/unset counter frequency X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" Some boards use legacy firmware which doesn't properly configure ARM architected timer registers. This patch adds a workaround to use the defined COUNTER_FREQUENCY instead of reading its value from the timer registers. Signed-off-by: Marek Szyprowski --- arch/arm/cpu/armv8/generic_timer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/cpu/armv8/generic_timer.c b/arch/arm/cpu/armv8/generic_timer.c index c1706dcec1..5ac62a0a32 100644 --- a/arch/arm/cpu/armv8/generic_timer.c +++ b/arch/arm/cpu/armv8/generic_timer.c @@ -15,9 +15,13 @@ DECLARE_GLOBAL_DATA_PTR; */ unsigned long get_tbclk(void) { +#ifndef COUNTER_FREQUENCY unsigned long cntfrq; asm volatile("mrs %0, cntfrq_el0" : "=r" (cntfrq)); return cntfrq; +#else + return COUNTER_FREQUENCY; +#endif } #ifdef CONFIG_SYS_FSL_ERRATUM_A008585 From patchwork Wed Nov 7 15:04:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 150408 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5279032ljp; Wed, 7 Nov 2018 07:07:35 -0800 (PST) X-Google-Smtp-Source: AJdET5eYLsSBHPRT7ID+6wVV7thHtZfN0yLbyyyP8JygjMq6PmtrMVsooTQ+ckPJSH3sbOOowxui X-Received: by 2002:a17:906:7087:: with SMTP id b7-v6mr385791ejk.194.1541603255086; Wed, 07 Nov 2018 07:07:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541603255; cv=none; d=google.com; s=arc-20160816; b=CgifshT3fdDcOR+eVw3DdB9ZkCtqiOYcWNcrfFhvNqo0+6w3T7dIDHCfoJNyG+Pnas bD1KwDjYcwTPXGLP1kN9mWMvdbDyMyflUTHPCSJDhUj6k3Bn07EHAdKc+K+l0JHDXfl+ bYeBBD4Nu7ljnF5nEbMaJiC9eGVl/2kj1EDZ5mleavZTroHq7GK8SzYmrGnVPRyWFlkI EYEPss1D1oXPko81RTYeFou+mbhTTOraQs+p/wZL/MutIHwyOn6Gvwo8Q4wXMKc6sOaG DiKENT88OoOq7Moo3alPT7ia9Hmalr3XuuLJmyg7KqInPHzz3xjWpD8tG8oz6TYE9SUj VU5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:cms-type:in-reply-to :message-id:date:to:from:dkim-signature:dkim-filter; bh=fikCbaPGVE2nUmfzLcBgUtSRH4K/LvodRMAeizO2O3g=; b=lK3tfGLQd8KKrBQCQ5ori+bh7Ak77dLRtM3jTzKDTADvWcLktx8MPDYldsqRqqkN7s CELEphXHRCyxU3hFSrmrViGlSNWL7nEbeeXkPsv5HgH+UeieofEN5xaRhpuGkBVyyr+D BBgBKoJjVEkazRczLhd07JFlw98PFQoQokHz6vMHnV0GDo+cDT+WxSL0ThR0UZor/8jQ AFC7fxUc29CLOGxAAcC5b8g+6eQGeHTK5U94CGqmB3VRU+c5+YSpWeuVUkxCR6ktpvmX EwZMRThJaPGwJgNcguVJpT8BJDtriw5FVb0vDtaYKnHvUB2Ty5Y4X8EM5dfBIWizy+aa /0Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=fxwrULk6; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id d3-v6si262109edp.215.2018.11.07.07.07.34; Wed, 07 Nov 2018 07:07:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=fxwrULk6; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: by lists.denx.de (Postfix, from userid 105) id B75C9C224F3; Wed, 7 Nov 2018 15:06:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A872BC224CC; Wed, 7 Nov 2018 15:06:02 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DB76AC224D6; Wed, 7 Nov 2018 15:05:14 +0000 (UTC) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lists.denx.de (Postfix) with ESMTPS id 5C5DFC224DD for ; Wed, 7 Nov 2018 15:05:11 +0000 (UTC) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181107150511euoutp02c3eab5309829ca7ddd3a4b0e68ff2f2a~k39ya_jGx0644806448euoutp02f; Wed, 7 Nov 2018 15:05:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181107150511euoutp02c3eab5309829ca7ddd3a4b0e68ff2f2a~k39ya_jGx0644806448euoutp02f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1541603111; bh=A/3Y22sY7q36KE9RybhI8y1xtUiUZ4nzWTw41noaQyQ=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=fxwrULk6SjK5FLPqLgsWwFc1gVupdfumw0ZqIHZmWci448D/g49weIzxQDngknL4e thjYmYLLiO9OcKmG9AL1/+UMfUqqLWyRKOGWbQSgvGwuejgihE51KN+qdANbbeL87+ tnZyprvy2E1wBjg1acgPZUgU27S6xaXptI/bDZag= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181107150510eucas1p142c65910bffced3b8c7f17fe099ac76b~k39yA-k890594605946eucas1p18; Wed, 7 Nov 2018 15:05:10 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id B0.FB.04806.62FF2EB5; Wed, 7 Nov 2018 15:05:10 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181107150509eucas1p19593df267e31a0d07a0a96a3ec02c4f9~k39xRHHvx1875718757eucas1p1V; Wed, 7 Nov 2018 15:05:09 +0000 (GMT) X-AuditID: cbfec7f5-79db79c0000012c6-3a-5be2ff268f18 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 4B.91.04284.52FF2EB5; Wed, 7 Nov 2018 15:05:09 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PHT00JT8WKDXN80@eusync1.samsung.com>; Wed, 07 Nov 2018 15:05:09 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de Date: Wed, 07 Nov 2018 16:04:59 +0100 Message-id: <20181107150459.23431-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20181107150105.23165-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNIsWRmVeSWpSXmKPExsWy7djP87pq/x9FG9x7xmOxccZ6Vosbv9pY LZ6/u8xksfbIXXaLjiMtjBZv93ayO7B5zJt1gsXj7J0djB59W1YxBjBHcdmkpOZklqUW6dsl cGU8nPqMuWCuXsXMvwuZGxh3qnYxcnJICJhIzD03j6WLkYtDSGAFo0TbtFOsEM5nRonrH44y wlQ13v7LBpFYxijx5MZ8KKeBSeJo1y5WkCo2AUOJrrddbCC2iICExK/+q2DdzALXGCVmbVcE sYUFoiQ+bDzO3sXIwcEioCrx5Z47SJhXwFZi1vW5bBDL5CVWbzjADGJzCthJdPdMZoGIf2WV 2P3OG8J2kWjbuxUqLizx6vgWdghbRqKz4yATyG0SAs2MEu0zZrFDOD2MElvn7IDaYC1x+PhF Vojj+CQmbZvODHKQhACvREebEESJh8TjhTOhnpzIKHFm/Wv2CYySCxgZVjGKp5YW56anFhvn pZbrFSfmFpfmpesl5+duYgRG2el/x7/uYNz3J+kQowAHoxIP74WtD6OFWBPLiitzDzFKcDAr ifD2rn4ULcSbklhZlVqUH19UmpNafIhRmoNFSZy3muFBtJBAemJJanZqakFqEUyWiYNTqoHx 9p7jv5izJeaY5j/eZRfkJ9XgUpPHedNwd+vlDYolPtPcpxRdqomffvei0zdZ08AtQtqqshPm 8wqVKT0xS7x/1Oe9odKiYx5+Tk9fn2g/VVQc116tOl1oUUeYJlOAo92h1I28QX5MNz1mNXG+ ZJB4vD+r8eamL4furjwd9juJ/8BTgaB452VKLMUZiYZazEXFiQC45uIJrgIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBJMWRmVeSWpSXmKPExsVy+t/xy7qq/x9FG6zYpG2xccZ6Vosbv9pY LZ6/u8xksfbIXXaLjiMtjBZv93ayO7B5zJt1gsXj7J0djB59W1YxBjBHcdmkpOZklqUW6dsl cGU8nPqMuWCuXsXMvwuZGxh3qnYxcnJICJhINN7+y9bFyMUhJLCEUWLh6zPsIAkhgSYmibdH HEFsNgFDia63XWwgtoiAhMSv/quMIA3MAjcYJe6c/wnWICwQJfFh43Egm4ODRUBV4ss9d5Aw r4CtxKzrc9kglslLrN5wgBnE5hSwk+jumcwCsctW4uHV84wTGHkWMDKsYhRJLS3OTc8tNtQr TswtLs1L10vOz93ECAyPbcd+bt7BeGlj8CFGAQ5GJR5ejR0Po4VYE8uKK3MPMUpwMCuJ8Pau fhQtxJuSWFmVWpQfX1Sak1p8iFGag0VJnPe8QWWUkEB6YklqdmpqQWoRTJaJg1OqgbEg48CJ bZtkrLVYLs+5eOLvBs10b70dq3PLr6jE/7z2rXqSxuLVamuy1AIz/a0W1LZ++7pfRmet24e1 xdcrP564b98v99c7Mv3oxtPTXk1Yn7u5542H9plnzwxbZSOevY9fOyvs6iLnesby5b0t/i8j q5oKhaJU5b7/UlfUtn27sP6ME7/VqVglluKMREMt5qLiRAAMqknwCwIAAA== X-CMS-MailID: 20181107150509eucas1p19593df267e31a0d07a0a96a3ec02c4f9 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181107150509eucas1p19593df267e31a0d07a0a96a3ec02c4f9 References: <20181107150105.23165-1-m.szyprowski@samsung.com> Cc: Bartlomiej Zolnierkiewicz , Marek Szyprowski Subject: [U-Boot] [PATCH 8/9] ARM: Exynos: Add minimal support for ARM 64bit based Exynos5433 SoC X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" This patch adds minimal support for Exynos5433 SoC (ARM64 based). The following devices are supported: - mmc0 (for eMMC) - serial1 (for debug/console) - gpa0..3 and gpb0..2 GPIO banks Based on earlier work done by Lukasz Majewski . Signed-off-by: Marek Szyprowski --- arch/arm/cpu/armv8/Kconfig | 2 +- arch/arm/dts/exynos5433.dtsi | 84 ++++++++++++++++++++++++++++++++ arch/arm/mach-exynos/Kconfig | 7 +++ arch/arm/mach-exynos/mmu-arm64.c | 24 +++++++++ arch/arm/mach-exynos/soc.c | 3 ++ drivers/gpio/s5p_gpio.c | 1 + scripts/config_whitelist.txt | 1 + 7 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos5433.dtsi diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig index c8bebabdf6..295cdd4653 100644 --- a/arch/arm/cpu/armv8/Kconfig +++ b/arch/arm/cpu/armv8/Kconfig @@ -96,7 +96,7 @@ endmenu config PSCI_RESET bool "Use PSCI for reset and shutdown" default y - depends on !ARCH_EXYNOS7 && !ARCH_BCM283X && \ + depends on !ARCH_EXYNOS5433 && !ARCH_EXYNOS7 && !ARCH_BCM283X && \ !TARGET_LS2080A_SIMU && !TARGET_LS2080AQDS && \ !TARGET_LS2080ARDB && !TARGET_LS2080A_EMU && \ !TARGET_LS1088ARDB && !TARGET_LS1088AQDS && \ diff --git a/arch/arm/dts/exynos5433.dtsi b/arch/arm/dts/exynos5433.dtsi new file mode 100644 index 0000000000..509b39a95f --- /dev/null +++ b/arch/arm/dts/exynos5433.dtsi @@ -0,0 +1,84 @@ +/* + * SAMSUNG EXYNOS5433 SoC device tree source + * + * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +#include "skeleton.dtsi" + +/ { + mmc_0: mmc@15540000 { + compatible = "samsung,exynos-dwmmc"; + reg = <0x0 0x15540000 0x0 0x1000>; + samsung,bus-width = <8>; + samsung,timing = <1 3 3>; + samsung,removable = <0>; + samsung,pre-init; + fifoth_val = <0x201f0020>; + status = "disabled"; + }; + + pinctrl_alive: pinctrl@10580000 { + compatible = "samsung,exynos5433-pinctrl"; + reg = <0x10580000 0x1a20>, <0x11090000 0x100>; + /* gpa0..3, gpf1..5 */ + + gpa0: gpa0 { + gpio-controller; + #gpio-cells = <2>; + }; + + gpa1: gpa1 { + gpio-controller; + #gpio-cells = <2>; + }; + + gpa2: gpa2 { + gpio-controller; + #gpio-cells = <2>; + }; + + gpa3: gpa3 { + gpio-controller; + #gpio-cells = <2>; + + }; + }; + + pinctrl_peric: pinctrl@14cc0000 { + compatible = "samsung,exynos5433-pinctrl"; + reg = <0x14cc0000 0x1100>; + /* gpv7, gpb0, gpc0..3, gpg0, gpd0..4,6,8,7, gpg1..3 */ + + gpv7: gpv7 { + gpio-controller; + #gpio-cells = <2>; + }; + + gpb0: gpb0 { + gpio-controller; + #gpio-cells = <2>; + }; + + gpb1: gpb1 { + gpio-controller; + #gpio-cells = <2>; + }; + + gpb2: gpb2 { + gpio-controller; + #gpio-cells = <2>; + }; + }; + + serial_1: serial@14c20000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x14c20000 0x100>; + id = <1>; + status = "disabled"; + }; +}; diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index ed04369cfa..4a49c8dcc2 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -29,6 +29,13 @@ config ARCH_EXYNOS5 Cortex-A7 CPU in big.LITTLE configuration). There are multiple SoCs in this family including Exynos5250, Exynos5420 and Exynos5800. +config ARCH_EXYNOS5433 + bool "Exynos5433 SoC family" + select ARM64 + help + Samsung Exynos5433 SoC family are based on ARM Cortex-A57 CPU and + Cortex-A53 CPU (in a big.LITTLE configuration). + config ARCH_EXYNOS7 bool "Exynos7 SoC family" select ARM64 diff --git a/arch/arm/mach-exynos/mmu-arm64.c b/arch/arm/mach-exynos/mmu-arm64.c index 46b8169d19..a857a7318e 100644 --- a/arch/arm/mach-exynos/mmu-arm64.c +++ b/arch/arm/mach-exynos/mmu-arm64.c @@ -29,3 +29,27 @@ static struct mm_region exynos7420_mem_map[] = { struct mm_region *mem_map = exynos7420_mem_map; #endif + +#ifdef CONFIG_EXYNOS5433 +static struct mm_region exynos5433_mem_map[] = { + { + .virt = 0x00000000UL, + .phys = 0x00000000UL, + .size = 0x20000000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | + PTE_BLOCK_NON_SHARE | + PTE_BLOCK_PXN | PTE_BLOCK_UXN + }, { + .virt = 0x20000000UL, + .phys = 0x20000000UL, + .size = 0xC0000000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | + PTE_BLOCK_INNER_SHARE + }, { + /* List terminator */ + 0, + } +}; + +struct mm_region *mem_map = exynos5433_mem_map; +#endif diff --git a/arch/arm/mach-exynos/soc.c b/arch/arm/mach-exynos/soc.c index 589e16c5ad..215cbb8f70 100644 --- a/arch/arm/mach-exynos/soc.c +++ b/arch/arm/mach-exynos/soc.c @@ -23,6 +23,9 @@ void reset_cpu(ulong addr) #ifdef CONFIG_CPU_V7A writel(0x1, samsung_get_base_swreset()); #endif +#ifdef CONFIG_ARCH_EXYNOS5433 + writel(0x1, (void *)0x105C0400); +#endif } #ifndef CONFIG_SYS_DCACHE_OFF diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c index e4b5383d0f..fcaad1c4a6 100644 --- a/drivers/gpio/s5p_gpio.c +++ b/drivers/gpio/s5p_gpio.c @@ -357,6 +357,7 @@ static const struct udevice_id exynos_gpio_ids[] = { { .compatible = "samsung,exynos4x12-pinctrl" }, { .compatible = "samsung,exynos5250-pinctrl" }, { .compatible = "samsung,exynos5420-pinctrl" }, + { .compatible = "samsung,exynos5433-pinctrl" }, { } }; diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 94c0f1ff82..6438686fc4 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -571,6 +571,7 @@ CONFIG_EXYNOS4210 CONFIG_EXYNOS5 CONFIG_EXYNOS5250 CONFIG_EXYNOS5420 +CONFIG_EXYNOS5433 CONFIG_EXYNOS5_DT CONFIG_EXYNOS7420 CONFIG_EXYNOS_ACE_SHA From patchwork Wed Nov 7 15:05:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 150407 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5278495ljp; Wed, 7 Nov 2018 07:07:10 -0800 (PST) X-Google-Smtp-Source: AJdET5fd9jTmrrARD9r3TkUlgNnBB48Mvmxk07T1dYxeJkCj/yNmPq1F/eiPZYKRXmYxQ2dFrlKD X-Received: by 2002:a50:e185:: with SMTP id k5-v6mr455394edl.195.1541603230420; Wed, 07 Nov 2018 07:07:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541603230; cv=none; d=google.com; s=arc-20160816; b=r940lMXDhD2lYWM/qpoRa0UuqqPmQNuDwgivq4dqU7rzP8ROcDettBYSGQ3nmYjfe2 WNvjRfeM3A+bJJJUucYWi/3dnZCjjv1ykluJoaLM+WcnC+dw3hUPzNYrYXS71o9kkCNv fS/eaJawB6KqcUMlx9xbSEGP6xNythc2K7y/xSazWDtNDo2BUtyedlstm43Y0vhVfGBZ KQroWpdvsJ4JcUF7zww+p3HknDUsnm3N3OrY0dR7fGGzq5reLBTBicrVGAf6rAg/imX0 g8FoiFsQ5I+Vocac33L9/ib/vKruu+lX5yFKKjh96qLDe9v3o802L5qigxHajU+YcizW aP8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:cms-type:in-reply-to :message-id:date:to:from:dkim-signature:dkim-filter; bh=Hh3GAInxQP/67JyUn5lmNhluWuiGqtYExAuDmCuR6gg=; b=xWx1WOlzwCLfV9nmg0xho6vWC27Akx/qCMMooZZdPx+MqbSXua/LBX8m43OUtnz5IF yDhlpp+VgLtDEIpkouT9uFbK7tT1GTzZd90d0W9FeY7n1tmy3pPy8uzxCuPMnIrGJ0XG Zx5Vi3oFOTVyLq451W33qDQ7NEfOCaIAwbhKG8GiJaZpuvVrSCUh4dhzaL1SkeiqQLYh c9pPH/WVxj5F1NGc5v4oqJidrqbvKkyUYL+LG+8Oyl+auGHLUxHHB6okiYjqriPNRRDT LuN5wKZbamXTXjSiXOEm2MN/cA1MsB7oOaskjDZHbxmdYvpbNrrwTsKjkMzn981EonFK KlKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=SURzb5QY; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id o58-v6si648829edc.152.2018.11.07.07.07.10; Wed, 07 Nov 2018 07:07:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=SURzb5QY; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: by lists.denx.de (Postfix, from userid 105) id EADE7C224C3; Wed, 7 Nov 2018 15:06:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=LOTS_OF_MONEY, SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 98AABC224C8; Wed, 7 Nov 2018 15:06:55 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 56E43C224D2; Wed, 7 Nov 2018 15:05:21 +0000 (UTC) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lists.denx.de (Postfix) with ESMTPS id B0CE8C224C3 for ; Wed, 7 Nov 2018 15:05:21 +0000 (UTC) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181107150521euoutp0246a45c3c40473ac60ae6ae398561518e~k398E1Npd0680406804euoutp02Q; Wed, 7 Nov 2018 15:05:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181107150521euoutp0246a45c3c40473ac60ae6ae398561518e~k398E1Npd0680406804euoutp02Q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1541603121; bh=7SrAByG6v33x0eNue7d+wNznZX7YUeVjiGODi+NP2/8=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=SURzb5QYYiQkhDk30ByG+CX6JKTdM4P7ylZlrPZxlgx+UyZsFyW1hd+Io5pg/4KeH unlqcUb3yDyLJFwp7RceWBWp6KO87k6ZH7TZhGPG4nmHZ6PG6UX7evjPBzSKaUqXTL GUoI1w4JoxvVWHLvxXUuCini71ks7y6FbKIy59d0= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181107150521eucas1p205224d4f235a65cc7f15787e1d85f1c9~k397r2V3U2787127871eucas1p2X; Wed, 7 Nov 2018 15:05:20 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 9A.2C.04441.03FF2EB5; Wed, 7 Nov 2018 15:05:20 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181107150520eucas1p21ea47acca16615028ce92c21f3000de9~k3960Mw8l2787127871eucas1p2W; Wed, 7 Nov 2018 15:05:20 +0000 (GMT) X-AuditID: cbfec7f2-5e3ff70000001159-fb-5be2ff3060f8 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 21.55.04128.F2FF2EB5; Wed, 7 Nov 2018 15:05:19 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PHT00FB3WKS2810@eusync4.samsung.com>; Wed, 07 Nov 2018 15:05:19 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de Date: Wed, 07 Nov 2018 16:05:14 +0100 Message-id: <20181107150514.23479-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20181107150105.23165-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprJIsWRmVeSWpSXmKPExsWy7djPc7oG/x9FGxw6r22xccZ6Vosbv9pY LZ6/u8xksfbIXXaLjiMtjBZv93ayO7B5zJt1gsXj7J0djB59W1YxBjBHcdmkpOZklqUW6dsl cGXs3X6WteBZdMWV+R9ZGhi3+XQxcnJICJhIPPl5i6WLkYtDSGAFo8SPvafYIZzPjBLPNp8A ynCAVbX9N4eIL2OUmNTzlhWkW0iggUnix0FPEJtNwFCi620XG4gtIiAh8av/KiOIzSxwjVFi 1nZFEFtYwENiyqL9TCAzWQRUJVrWloOEeQVsJS5+XcYGcZC8xOoNB5hBbE4BO4nunslgx0kI /GSVuLBkEdQ9LhKnPidB1AtLvDq+hR3ClpG4PLkbqr6ZUaJ9xix2CKeHUWLrnB1QG6wlDh+/ yApxHJ/EpG3TmSGG8kp0tAlBlHhIdH6eDw2IiYwSt1o72SYwSi5gZFjFKJ5aWpybnlpsmJda rlecmFtcmpeul5yfu4kRGGGn/x3/tIPx66WkQ4wCHIxKPLwXtj6MFmJNLCuuzD3EKMHBrCTC 27v6UbQQb0piZVVqUX58UWlOavEhRmkOFiVx3mqGB9FCAumJJanZqakFqUUwWSYOTqkGRjbN MAtJpyqpd9tMrmonMiU0yf/Yvuzl72U738xf9nDnktSEvac3ipo2rHKyvT6P+eZJTVe16422 +eZVd/P3lam+OnvBsU1+gjhP241K5jhJsXXLCjbLJDusmnk+PniTUeQ0y/XJU3+sVTzy7sFe ve7dB485H73ts6HyxBfuz4lnKy7/23e21kOJpTgj0VCLuag4EQDxcE4ErAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBJMWRmVeSWpSXmKPExsVy+t/xa7r6/x9FG5w4Y22xccZ6Vosbv9pY LZ6/u8xksfbIXXaLjiMtjBZv93ayO7B5zJt1gsXj7J0djB59W1YxBjBHcdmkpOZklqUW6dsl cGXs3X6WteBZdMWV+R9ZGhi3+XQxcnBICJhItP0372Lk4hASWMIosWfXThYIp4lJ4vXa/6xd jJwcbAKGEl1vu9hAbBEBCYlf/VcZQYqYBW4wStw5/5MdJCEs4CExZdF+JpCpLAKqEi1ry0HC vAK2Ehe/LgPrlRCQl1i94QAziM0pYCfR3TOZBcQWAqp5ePU84wRGngWMDKsYRVJLi3PTc4uN 9IoTc4tL89L1kvNzNzECw2PbsZ9bdjB2vQs+xCjAwajEw6ux42G0EGtiWXFl7iFGCQ5mJRHe 3tWPooV4UxIrq1KL8uOLSnNSiw8xSnOwKInznjeojBISSE8sSc1OTS1ILYLJMnFwSjUwznwz c+vLc/tFm515jm04b/ToY+ktJoP9fFnur5YpHFjANoebW+QA8y894brsotNzXl59+KD3oiw3 g4BDzUkRj5NLDy5ljLY+tV249tblxQX8uRcvHHrv9eHE5LDv2UIr+dU+7ti6dPYe9T/z7MWE tR/usH/zXF75xIOPYSxLbrVNYT352TQr64ASS3FGoqEWc1FxIgDPqL+wCwIAAA== X-CMS-MailID: 20181107150520eucas1p21ea47acca16615028ce92c21f3000de9 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181107150520eucas1p21ea47acca16615028ce92c21f3000de9 References: <20181107150105.23165-1-m.szyprowski@samsung.com> Cc: Bartlomiej Zolnierkiewicz , Marek Szyprowski Subject: [U-Boot] [PATCH 9/9] ARM: Exynos: Add Exynos5433 based TM2 board support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" This patch adds support for Exynos5433 based TM2 and TM2e boards. u-boot is used to load and decompress kernel image or alternatively (when 'volume down' button is pressed during boot) provide THOR download USB feature for flashing kernel and rootfs images. Based on earlier work done by Lukasz Majewski . Signed-off-by: Marek Szyprowski --- arch/arm/dts/Makefile | 3 + arch/arm/dts/exynos5433-tm2.dts | 37 ++++++++++ arch/arm/mach-exynos/Kconfig | 14 ++++ board/samsung/tm2/Kconfig | 14 ++++ board/samsung/tm2/Makefile | 8 ++ board/samsung/tm2/tm2.c | 127 ++++++++++++++++++++++++++++++++ configs/tm2_defconfig | 52 +++++++++++++ include/configs/tm2.h | 60 +++++++++++++++ 8 files changed, 315 insertions(+) create mode 100644 arch/arm/dts/exynos5433-tm2.dts create mode 100644 board/samsung/tm2/Kconfig create mode 100644 board/samsung/tm2/Makefile create mode 100644 board/samsung/tm2/tm2.c create mode 100644 configs/tm2_defconfig create mode 100644 include/configs/tm2.h diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index d36447d18d..f8c671589a 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -25,6 +25,9 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5800-peach-pi.dtb \ exynos5422-odroidxu3.dtb dtb-$(CONFIG_EXYNOS7420) += exynos7420-espresso7420.dtb + +dtb-$(CONFIG_TARGET_TM2) += exynos5433-tm2.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3036-sdk.dtb \ rk3128-evb.dtb \ diff --git a/arch/arm/dts/exynos5433-tm2.dts b/arch/arm/dts/exynos5433-tm2.dts new file mode 100644 index 0000000000..c9b178efdc --- /dev/null +++ b/arch/arm/dts/exynos5433-tm2.dts @@ -0,0 +1,37 @@ +/* + * TM2 device tree source + * + * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +#include "exynos5433.dtsi" + +/ { + model = "TM2 based on EXYNOS5433"; + compatible = "samsung,tm2", "samsung,exynos5433"; + + aliases { + serial0 = &serial_1; + console = &serial_1; + i2c0 = &i2c; + }; + + i2c: i2c { + compatible = "i2c-gpio"; + gpios = <&gpb0 0 0>, /* sda */ + <&gpb0 1 0>; /* scl */ + i2c-gpio,delay-us = <2>; /* ~100 kHz */ + }; +}; + +&mmc_0 { + status = "okay"; +}; + +&serial_1 { + status = "okay"; +}; diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 4a49c8dcc2..cf3bed57f3 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -137,6 +137,19 @@ config TARGET_PEACH_PIT endchoice endif +if ARCH_EXYNOS5433 + +choice + prompt "EXYNOS5433 board select" + +config TARGET_TM2 + bool "TM2 board" + select ARM64 + select OF_CONTROL + +endchoice +endif + if ARCH_EXYNOS7 choice @@ -168,6 +181,7 @@ source "board/samsung/odroid/Kconfig" source "board/samsung/arndale/Kconfig" source "board/samsung/smdk5250/Kconfig" source "board/samsung/smdk5420/Kconfig" +source "board/samsung/tm2/Kconfig" source "board/samsung/espresso7420/Kconfig" config SPL_LDSCRIPT diff --git a/board/samsung/tm2/Kconfig b/board/samsung/tm2/Kconfig new file mode 100644 index 0000000000..745faf6a95 --- /dev/null +++ b/board/samsung/tm2/Kconfig @@ -0,0 +1,14 @@ +if TARGET_TM2 + +config SYS_BOARD + default "tm2" + help + TM2 is Exynos5433 SoC based board, Tizen reference board. + +config SYS_VENDOR + default "samsung" + +config SYS_CONFIG_NAME + default "tm2" + +endif diff --git a/board/samsung/tm2/Makefile b/board/samsung/tm2/Makefile new file mode 100644 index 0000000000..53621774dd --- /dev/null +++ b/board/samsung/tm2/Makefile @@ -0,0 +1,8 @@ +# +# Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved. +# Lukasz Majewski +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := tm2.o diff --git a/board/samsung/tm2/tm2.c b/board/samsung/tm2/tm2.c new file mode 100644 index 0000000000..31ec8f5641 --- /dev/null +++ b/board/samsung/tm2/tm2.c @@ -0,0 +1,127 @@ +/* + * (C) Copyright 2018 Samsung + * + * SPDX-License-Identifier: GPL-2.0+ + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +int board_init(void) +{ + /* start Multi Core Timer to get ARM Architected Timers working */ + writel(1 << 8, 0x101c0240); + return 0; +} + +int dram_init(void) +{ + gd->ram_size = PHYS_SDRAM_1_SIZE; + return 0; +} + +int dram_init_banksize(void) +{ + gd->bd->bi_dram[0].start = PHYS_SDRAM_1; + gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; + return 0; +} + +unsigned long get_uart_clk(int id) +{ + return 200000000; +} + +unsigned long get_mmc_clk(int id) +{ + return 100000000; +} + +unsigned long set_mmc_clk(int id, int div) +{ + return 0; +} + +unsigned long get_i2c_clk(int id) +{ + return 66666667; +} + +#ifdef CONFIG_USB_DWC3 +static struct dwc3_device dwc3_device_data = { + .maximum_speed = USB_SPEED_SUPER, + .base = 0x15400000, + .dr_mode = USB_DR_MODE_PERIPHERAL, + .index = 0, +}; + +int usb_gadget_handle_interrupts(void) +{ + dwc3_uboot_handle_interrupt(0); + return 0; +} + +int board_usb_init(int index, enum usb_init_type init) +{ + void *base = (void *)0x15500000; /* Exynos5433 DRD PHY */ + + /* CMU TOP: set SCLK_USBDRD30_RATIO divider to 1 */ + writel(0x0007770b, (void *)0x10030634); + + /* CMU FSYS: set PHYCLK_USBDRD30_UDRD30_PHYCLOCK and + PHYCLK_USBDRD30_UDRD30_PIPE_PCLK muxes to 1 */ + writel(0x00000011, (void *)0x156e0208); + + /* CMU FSYS: enable MUX_SCLK_USBDRD30_USER gate and + keep other gates enabled */ + writel(0x01101001, (void *)0x156e0204); + + /* CMU: TOP: set MUX_SCLK_USBDRD30 mux source to pll */ + writel(0x00000101, (void *)0x10030234); + + /* PMU: bypass USB DEV PHY isolation */ + writel(0x00000001, (void *)0x105c0704); + + /* copied from Linux kernel register dump */ + writel(0x0, base + 0x14); + writel(0x0, base + 0x34); + writel(0x8000040, base + 0x4); + writel(0x24d466e4, base + 0x1c); + writel(0x4, base + 0x30); + writel(0x24d466e4, base + 0x1c); + writel(0x3fff81c, base + 0x20); + writel(0x40, base + 0x8); + writel(0x0, base + 0x28); + writel(0xc41805bf, base + 0x10); + udelay(10); + writel(0xc41805bd, base + 0x10); + writel(0x3fff81c, base + 0x20); + writel(0x0, base + 0x28); + writel(0xc41b40bf, base + 0x10); + udelay(10); + writel(0xc41b40bd, base + 0x10); + + return dwc3_uboot_init(&dwc3_device_data); +} +#endif + +int checkboard(void) +{ + const char *board_info; + + board_info = fdt_getprop(gd->fdt_blob, 0, "model", NULL); + printf("Board: %s\n", board_info ? board_info : "unknown"); + + return 0; +} diff --git a/configs/tm2_defconfig b/configs/tm2_defconfig new file mode 100644 index 0000000000..4080366c97 --- /dev/null +++ b/configs/tm2_defconfig @@ -0,0 +1,52 @@ +CONFIG_ARM=y +# CONFIG_ARM64_SUPPORT_AARCH32 is not set +CONFIG_ARCH_EXYNOS=y +CONFIG_SYS_TEXT_BASE=0x20080000 +CONFIG_ARCH_EXYNOS5433=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_IDENT_STRING="\nSamsung Exynos5433 TM2" +CONFIG_FIT=y +CONFIG_BOOTDELAY=-2 +CONFIG_SYS_CONSOLE_INFO_QUIET=y +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_HUSH_PARSER=y +# CONFIG_CMD_CONSOLE is not set +# CONFIG_CMD_ELF is not set +# CONFIG_CMD_GO is not set +CONFIG_CMD_THOR_DOWNLOAD=y +# CONFIG_CMD_EXPORTENV is not set +# CONFIG_CMD_IMPORTENV is not set +# CONFIG_CMD_EDITENV is not set +# CONFIG_CMD_SAVEENV is not set +# CONFIG_CMD_ENV_EXISTS is not set +# CONFIG_CMD_DM is not set +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_GPIO=y +CONFIG_CMD_GPT=y +# CONFIG_RANDOM_UUID is not set +CONFIG_CMD_I2C=y +# CONFIG_CMD_LOADB is not set +# CONFIG_CMD_LOADS is not set +CONFIG_CMD_MMC=y +CONFIG_CMD_PART=y +# CONFIG_CMD_SOURCE is not set +# CONFIG_CMD_SETEXPR is not set +# CONFIG_CMD_NET is not set +CONFIG_CMD_FS_GENERIC=y +CONFIG_DEFAULT_DEVICE_TREE="exynos5433-tm2" +# CONFIG_DM_DEVICE_REMOVE is not set +CONFIG_DFU_MMC=y +CONFIG_DM_I2C_GPIO=y +CONFIG_DM_MMC=y +CONFIG_MMC_DW=y +CONFIG_USB=y +CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GADGET=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_VENDOR_NUM=0x04e8 +CONFIG_USB_GADGET_PRODUCT_NUM=0x685D +CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_USB_FUNCTION_MASS_STORAGE=y +CONFIG_USB_FUNCTION_THOR=y +# CONFIG_SYS_WHITE_ON_BLACK is not set +# CONFIG_EFI_LOADER is not set diff --git a/include/configs/tm2.h b/include/configs/tm2.h new file mode 100644 index 0000000000..ce656b494a --- /dev/null +++ b/include/configs/tm2.h @@ -0,0 +1,60 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2018 Samsung Electronics + * Marek Szyprowski + * + * Configuation settings for the Exynos5433 TM2 board. + */ + +#ifndef __SAMSUNG_TM2_H +#define __SAMSUNG_TM2_H + +#include +#include + +/* High Level Configuration Options */ +#define CONFIG_SAMSUNG /* in a SAMSUNG core */ +#define CONFIG_EXYNOS5433 /* Exynos5433 Family */ +#define CONFIG_S5P + +/* Timer input clock frequency */ +#define COUNTER_FREQUENCY 24000000 + +/* SD/MMC configuration */ +#define CONFIG_BOUNCE_BUFFER + +/* THOR */ +#define CONFIG_G_DNL_THOR_VENDOR_NUM CONFIG_USB_GADGET_VENDOR_NUM +#define CONFIG_G_DNL_THOR_PRODUCT_NUM 0x685D + +/* required to avoid build break */ +#define CONFIG_G_DNL_UMS_VENDOR_NUM CONFIG_USB_GADGET_VENDOR_NUM +#define CONFIG_G_DNL_UMS_PRODUCT_NUM 0xA4A5 + +#define PHYS_SDRAM_1 0x20000000 +#define PHYS_SDRAM_1_SIZE 0xbf700000 + +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0) +#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x80000) + +/* Size of malloc() pool */ +#define CONFIG_SYS_MALLOC_LEN (80 << 20) +#define CONFIG_SYS_BOOTM_LEN (130 << 20) + +/* Initial environment variables */ +#define CONFIG_BOOTCOMMAND "run modedetect" +#define CONFIG_EXTRA_ENV_SETTINGS "dfu_alt_info=kernel part 0 9 offset 0x400;rootfs part 0 18;system-data part 0 19;user part 0 21\0" \ + "modedetect=if gpio input gpa21 || itest.l *0x105c080c == 0x12345671; then run download; else run bootkernel; fi; reset\0" \ + "fdt_high=0xffffffffffffffff\0" \ + "bootargs=console=ttySAC1,115200 earlycon=exynos4210,0x14C20000 ess_setup=0x26000000 loglevel=7 root=/dev/mmcblk0p18 rootfstype=ext4 rootwait\0" \ + "bootkernel=echo Booting kernel; run boarddetect; run loadkernel; bootm 0x30080000#$board\0" \ + "boarddetect=if itest.l *0x138000b4 == 0x0063f9ff; then setenv board tm2e; elif itest.l *0x138000b4 == 0x0059f9ff; then setenv board tm2; else setenv board unknown; fi; echo Detected $board board\0" \ + "loadkernel=part start mmc 0 9 kernel_sect; part size mmc 0 9 kernel_size; mmc read 0x30000000 $kernel_sect $kernel_size\0" \ + "muicsetusb=i2c dev 0; i2c mw 25 c 9; i2c mw 25 d 3b; i2c mw 25 e 05; i2c mw 25 16 10\0" \ + "displayimg=unzip 200d0000 67000000; mw.l 138000b4 0059f9ff; mw.l 138001a0 67e10000; mw.l 13800200 00001680; mw.l 13801410 1; mw.l 13802040 e0000018; sleep 1; mw.l 13802040 e0000008\0" \ + "download=echo Thor mode enabled; run muicsetusb; run displayimg; mw.l 0x105c080c 0; thor 0 mmc 0\0" + +#define CONFIG_ENV_SIZE 0x1000 + +#endif /* __SAMSUNG_TM2_H */