From owner-svn-src-all@freebsd.org Mon May 25 19:36:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 001142C8B98 for ; Mon, 25 May 2020 19:36:36 +0000 (UTC) (envelope-from mw@semihalf.com) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49W6m36gFFz4Rqg for ; Mon, 25 May 2020 19:36:35 +0000 (UTC) (envelope-from mw@semihalf.com) Received: by mail-qk1-x72d.google.com with SMTP id w3so12867458qkb.6 for ; Mon, 25 May 2020 12:36:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=+TnBh131y/ljWTEQCvgj/aKaIhDAiuD5NJjXsNJNUPw=; b=jMc7yi7KFax+CmVNJ97+pebxd+JK8LIcBDlS9LYrRdis1cPVne0uTWIoB3YOfP7EO4 V1D7N0Rq7iZMtDf00cpXIfW9QoPcHUIPIXfkifoE91qbmSQGP3jZd2XHB3ZU5zcHtBxM XZ4DTWWV5RK4HaK53bTR0302gtx5EWTOYt+rwWcMyJjlio5LJklNO98ymzM9o14Wpts1 461V4dfpunZcL40Lgzx2YmT4m/VYmX4PrWf1jML9deP+qVzuO4nmuM9VbGyGD28sl/Nt II5WPnUAxr90PObn6MRkwx55OTAxLcZ5GSP/f9r2gCnC1H+5tpSWH7KmdEEeSFrg0unB 44Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=+TnBh131y/ljWTEQCvgj/aKaIhDAiuD5NJjXsNJNUPw=; b=BaQCTiOjEk+WzyKbXycldgb5xeYsAhaU0peBdNhANcSqpP80omYVFqV5XMbDXIxvNe bpSXM5w/mc3w1cETj6+SWfTdmzPGNRmHo7noh7T/DEIOvk0MaJRr6rcCRmcG+u4KYjfH GAo81taS0IY2Am8iqi/EmJAmyKljeDLNC/0yZmHHoQgr7YGeyMDmm1Gdv+Xe+r/AELW8 OZny2IBIfJfQt6AlqMujHlMQQpbJNB1s+4PnyAdtgPDm5PojnLPC7h1Y7b0Yr4p5Vp1K 5+JfRnLSg+LujTOpg/qxa4o9tdJTcu9Gh/9nogGSUdHTM+Ta2VAfj6JKrlspMsw9toFS uOdA== X-Gm-Message-State: AOAM531KRdeh3DNIKYbiCeVHMOM1h6Ee+O9FUULIGEZo5Cdo3yV6/9u1 MkvTREPw+MWlsNCROFxrWCr+XcUVCqNjkwAXLHaLzg== X-Google-Smtp-Source: ABdhPJwumxGYsKSrTtHIj9PLLM4h9GtJtlGqjQUUzXOsnUU6fznwgQaGBf/kPKh9hV+qKoFrZmORYoTd64Whlypl/Js= X-Received: by 2002:a05:620a:4e2:: with SMTP id b2mr14986863qkh.16.1590435394574; Mon, 25 May 2020 12:36:34 -0700 (PDT) MIME-Version: 1.0 References: <202005251455.04PEtbSp021864@repo.freebsd.org> <20200525111843.0f858315@titan.knownspace> In-Reply-To: <20200525111843.0f858315@titan.knownspace> From: Marcin Wojtas Date: Mon, 25 May 2020 21:36:23 +0200 Message-ID: Subject: Re: svn commit: r361460 - in head/sys: arm64/conf arm64/qoriq conf To: Justin Hibbits Cc: Marcin Wojtas , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 49W6m36gFFz4Rqg X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=jMc7yi7K; dmarc=none; spf=none (mx1.freebsd.org: domain of mw@semihalf.com has no SPF policy when checking 2607:f8b0:4864:20::72d) smtp.mailfrom=mw@semihalf.com X-Spamd-Result: default: False [-2.20 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.94)[-0.941]; R_DKIM_ALLOW(-0.20)[semihalf-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.00)[0.004]; NEURAL_HAM_LONG(-0.96)[-0.960]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[semihalf.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[semihalf-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72d:from]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2020 19:36:37 -0000 Hi Justin, pon., 25 maj 2020 o 18:18 Justin Hibbits napisa=C5= =82(a): > > Hi Marcin, > > On Mon, 25 May 2020 14:55:37 +0000 (UTC) > Marcin Wojtas wrote: > > > Author: mw > > Date: Mon May 25 14:55:37 2020 > > New Revision: 361460 > > URL: https://svnweb.freebsd.org/changeset/base/361460 > > > > Log: > > Add GPIO support for QorIQ boards. > > > > This patch adds a GPIO controller support targeted for NXP LS1046A > > SoC. The driver implements the following features: > > * setting direction of each pin (IN or OUT) > > * setting the mode of output pins (PUSHPULL or OPENDRAIN) > > * setting the state of each output pin (1 or 0) > > * reading the state of each input pin (1 or 0) > > > > Submitted by: Kamil Koczurek > > Dawid Gorecki > > Reviewed by: manu > > Obtained from: Semihalf > > Sponsored by: Alstom Group > > Differential Revision: https://reviews.freebsd.org/D24353 > > > > Added: > > head/sys/arm64/qoriq/ls1046_gpio.c (contents, props changed) > > Modified: > > head/sys/arm64/conf/GENERIC > > head/sys/conf/files.arm64 > > > > Modified: head/sys/arm64/conf/GENERIC > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/arm64/conf/GENERIC Mon May 25 14:45:18 > > 2020 (r361459) +++ head/sys/arm64/conf/GENERIC Mon May > > 25 14:55:37 2020 (r361460) @@ -248,6 +248,7 @@ device > > gpio device gpioled > > device fdt_pinctrl > > device gpioregulator > > +device ls1046_gpio # LS1046A GPIO controller > > device mv_gpio # Marvell GPIO > > controller device mvebu_pinctrl # Marvell > > Pinmux Controller device rk_gpio # > > RockChip GPIO Controller > > > > Added: head/sys/arm64/qoriq/ls1046_gpio.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- /dev/null 00:00:00 1970 (empty, because file is > > newly added) +++ head/sys/arm64/qoriq/ls1046_gpio.c Mon May 25 > > 14:55:37 2020 (r361460) @@ -0,0 +1,586 @@ > > +/*- > > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > > + * > > + * Copyright (c) 2020 Alstom Group. > > + * Copyright (c) 2020 Semihalf. > > + * > > + * Redistribution and use in source and binary forms, with or without > > + * modification, are permitted provided that the following conditions > > + * are met: > > + * 1. Redistributions of source code must retain the above copyright > > + * notice, this list of conditions and the following disclaimer. > > + * 2. Redistributions in binary form must reproduce the above > > copyright > > + * notice, this list of conditions and the following disclaimer > > in the > > + * documentation and/or other materials provided with the > > distribution. > > + * > > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS > > IS'' AND > > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, > > THE > > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A > > PARTICULAR PURPOSE > > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE > > LIABLE > > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > > CONSEQUENTIAL > > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE > > GOODS > > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > > INTERRUPTION) > > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > > CONTRACT, STRICT > > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN > > ANY WAY > > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > > POSSIBILITY OF > > + * SUCH DAMAGE. > > + */ > > + > > +#include > > +__FBSDID("$FreeBSD$"); > > + > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > + > > +#include "gpio_if.h" > > + > > +/* constants */ > > +enum { > > + DIRECTION =3D 0x0, > > + OPEN_DRAIN =3D 0x4, > > + DATA =3D 0x8, > > + INT_EV =3D 0xC, > > + INT_MASK =3D 0x10, > > + INT_CTRL =3D 0x14 > > +}; > > This looks a lot like the GPIO module whose driver is in > sys/powerpc/mpc85xx/qoriq_gpio.c. Is there any difference in hardware? > If not, can you merge this driver with that, if there's anything to > merge, to reduce duplication? > Thanks, will check. Best regards, Marcin