From owner-svn-src-head@freebsd.org Mon May 25 16:18:46 2020 Return-Path: Delivered-To: svn-src-head@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 D913B32B45A; Mon, 25 May 2020 16:18:46 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) (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 49W2Mp5Srfz45XX; Mon, 25 May 2020 16:18:46 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-il1-x142.google.com with SMTP id c20so17756975ilk.6; Mon, 25 May 2020 09:18:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NzcyzMkMTOmROzT1QkToZ0CUCvVxHCakO9uMHPoEZwk=; b=UmZ6oFXe2X5+3sPFeZx2P/RQG7qiPv/RlYQBlXocaZSFBI5dm2bxygAGurcgeF9aSF +veUi/wc9eSrRQzYzBauAvwHhv3N3kl3vqOXjg/IopRfEg9GCPrPWe6xKLSdE8LCiTWO qidpsrII1Q0sPWZgLrHpp5KatoAjeWmJOiexmhu6QMRVRd1TzCDETnvGnmFgoep/LVb0 qhQkfXpHLvzGv7WTVndYjBhhLww9Y7ex1EEPRakZMoDRJZy39cmWCaAemAf3idaFLwlt gHTeCu80B3NWao9tXwtTBimkPR11e6M47bSF0pnxcbykKRg8xyrnxkYYyIcx1EdClK7m LF/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NzcyzMkMTOmROzT1QkToZ0CUCvVxHCakO9uMHPoEZwk=; b=IzQixhTiqt6vpMV8pmLdfH4x9Rt5svxa8AdLMgtoXg0LkRfBtnnZTgXjdB0uKBkOUl Nra2CbNctrKU8rVZ/4eelq/m4teRd41yv5EIffP3QoqvNVCOMIdrR2dh713itQeXWSZd QhjKLkA/bT3h6Z9IrelgEU7MEcw7CyJkBGwlJkat9Z23TtXw42UZ7JzDUJSwa7rdBQhw Q1ZnIm29UPedEA6pfbA+jy9wy91Evg/kcxCU1yh529Q3Pu5n+Xn2RV89KK48Lk2+XcEz bBijzq/F+eqT3Ww8ottzLgZIjjPN+hC2609UwkiTXay2EyFwvk4+ksZUIyj6V/z6x7vg Kf+Q== X-Gm-Message-State: AOAM533rb/CpA8MYYHwYLNLmITwMADguxz3OOOUuqOT/abukZVfKL6+p 3TgsXzOfC3Or0chQ8cL+kFbwCwTYTok= X-Google-Smtp-Source: ABdhPJxCFSRw/vogZxgRmnPXCHSpFylbp7jAYLxcDZeQgBsGuFMAObvz+ICAKherpKsP4J5ssfQbGw== X-Received: by 2002:a92:da52:: with SMTP id p18mr25843714ilq.173.1590423525725; Mon, 25 May 2020 09:18:45 -0700 (PDT) Received: from titan.knownspace (173-19-125-130.client.mchsi.com. [173.19.125.130]) by smtp.gmail.com with ESMTPSA id n27sm9717473ild.76.2020.05.25.09.18.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 09:18:45 -0700 (PDT) Date: Mon, 25 May 2020 11:18:43 -0500 From: Justin Hibbits To: Marcin Wojtas Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r361460 - in head/sys: arm64/conf arm64/qoriq conf Message-ID: <20200525111843.0f858315@titan.knownspace> In-Reply-To: <202005251455.04PEtbSp021864@repo.freebsd.org> References: <202005251455.04PEtbSp021864@repo.freebsd.org> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; powerpc64-portbld-freebsd13.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49W2Mp5Srfz45XX X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2020 16:18:46 -0000 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 > ============================================================================== > --- 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 > ============================================================================== > --- /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 = 0x0, > + OPEN_DRAIN = 0x4, > + DATA = 0x8, > + INT_EV = 0xC, > + INT_MASK = 0x10, > + INT_CTRL = 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? - Justin