From patchwork Fri Dec 11 14:29:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grzegorz Jaszczyk X-Patchwork-Id: 11968331 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 799A6C4167B for ; Fri, 11 Dec 2020 15:13:37 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3669120657 for ; Fri, 11 Dec 2020 15:13:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3669120657 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=ejB6LsDUqq9sMspRYUsElyCcaM71NwpJGnjmt0xX7OM=; b=YQJqc3FyqabFCopPmam4lxTW8G OYl+LhCUh0Nj+X9G14WlCu5Ul2G9SHp4dDg8ysf9uGGpfjWW4iWyMvzbIpGidLm1luqfE+GiHSrwR UecI03PhYCx0WeOofTxmqe4O38k3XSi7OUyEsVjHQUsyCijpISeS6BbVwzD8jgdvX99+i13y9Ta+B Qh2xhktiSDR8UhggU+PJgLPfe837aDPCNy7pWRvA/yfSpnOZLc9o8jXjGjfNrSD5w6qAB0Z7jx04I b12MPx8/BpZpP8uep4yFGOKhCVXADUZ0jFw6B+IYGK5ylWijtJhV7Cmh/ceaWvNgDNXEBbIt1xDQn ZjYhIc3A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1knjRZ-0002oH-TN; Fri, 11 Dec 2020 14:30:49 +0000 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1knjRW-0002n4-9r for linux-arm-kernel@lists.infradead.org; Fri, 11 Dec 2020 14:30:48 +0000 Received: by mail-lj1-x241.google.com with SMTP id f24so11043544ljk.13 for ; Fri, 11 Dec 2020 06:30:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vMLkq6TErLQR5vl7wxICpib93GEBHjpKENXEhX4v8c8=; b=kvhdV0PCnbzmkIJAaCEZ3dsAnkIQvSsDvvJTYVCHZC4CI19JDyqXcede+Oor6XRB5j 9RTmcz+B8PBhHF2FvHIZZv5Je++tCM1N1p9uLRF+YTS+JVXJqTTJk2ooqmA3co/WQzKd ZazFfrOeijWGnHdjFo3paTzvSMAhqbphCjtnrSYZv4UQ2rTNfD3zH3F2P8gDrRD7hr5G kclJ2o7NOSMFgXEoFZ3WzJ1BLspGVFSOKQAxwQkKfmX9yc7Yv8IA+zyDgPt5iKJf80YM pzgzPnEH3rf7gcVCPOJmi8nL+xnrTblTgfW5mn4Rnqe9pmSrPwk9DZ6qjUI/dLHAOIPT efDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vMLkq6TErLQR5vl7wxICpib93GEBHjpKENXEhX4v8c8=; b=oLPIXgJFTkSAabRu6kWCi2vefKza3b9FS41L3ka05P5DSK9iLJEYp5ZL5fIwJmN70D PX8Nez4rTJnYEoFgj85AybUsiOnP9rNgYqWtp7QZQl1JjKRLPGHT92jJVE5sTCVsY/Yr R7UqI7/oYfBzbCA5m1B7Xve59ibwpdJ2iz4HsGtJghFRMzH2vakQRUp+R8WeudiI2asU buKqRkvxT/wlCUgFWKIybxVAEVgtDIeDPUYI+znDvQmz2rzh+f2/LXgdnSQqYYN+bkFb sNRP2iH3dGkZfFKj1xU7bK9DWamZxm4xJ6861ILecnoDVpeD8+kfQbeI6bpf1YihjiP8 C+nw== X-Gm-Message-State: AOAM532kVomjsa6vFjYzzxzxN0Agkof/HgDCkE5Dj8TNknSOQmo18KlZ 9VzE3oW7bT9DRl18y5Mr8g75+Q== X-Google-Smtp-Source: ABdhPJzrp7FD+oZWEwUT74Mzv+wIVpgVHhKRUDwchTjcreY+7vEBHLOcTh+vZ1yeB1g8R0GH/5kj9A== X-Received: by 2002:a05:651c:112c:: with SMTP id e12mr1047555ljo.66.1607697042013; Fri, 11 Dec 2020 06:30:42 -0800 (PST) Received: from gilgamesh.semihalf.com (193-106-246-138.noc.fibertech.net.pl. [193.106.246.138]) by smtp.gmail.com with ESMTPSA id x26sm906491lfq.112.2020.12.11.06.30.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Dec 2020 06:30:41 -0800 (PST) From: Grzegorz Jaszczyk To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, robh+dt@kernel.org, s-anna@ti.com, ssantosh@kernel.org Subject: [PATCH 0/5] Introduce PRU remoteproc consumer API Date: Fri, 11 Dec 2020 15:29:28 +0100 Message-Id: <20201211142933.25784-1-grzegorz.jaszczyk@linaro.org> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201211_093046_674127_746A3209 X-CRM114-Status: GOOD ( 12.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, grzegorz.jaszczyk@linaro.org, praneeth@ti.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, lee.jones@linaro.org, linux-arm-kernel@lists.infradead.org, rogerq@ti.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi All, The Programmable Real-Time Unit and Industrial Communication Subsystem (PRU-ICSS or simply PRUSS) on various TI SoCs consists of dual 32-bit RISC cores (Programmable Real-Time Units, or PRUs) for program execution. There are 3 foundation component for PRUSS subsystem: the PRUSS platform driver, the PRUSS INTC driver and the PRUSS remoteproc driver. Two first were already merged and can be found under: 1) drivers/soc/ti/pruss.c Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml 2) drivers/irqchip/irq-pruss-intc.c Documentation/devicetree/bindings/interrupt-controller/ti,pruss-intc.yaml The third one [1] was accepted and applied to andersson/remoteproc.git (refs/heads/for-next): [2] but is not merged yet. The programmable nature of the PRUs provide flexibility to implement custom peripheral interfaces, fast real-time responses, or specialized data handling. Example of a PRU consumer drivers will be: - Software UART over PRUSS - PRU-ICSS Ethernet EMAC In order to make usage of common PRU resources and allow the consumer drivers to configure the PRU hardware for specific usage the PRU API is introduced. This patch set depends on not merged (but applied to remoteproc/for-next) PRUSS remoteproc driver [1][2] and two remoteproc related patches [3] and [4]. [1] https://patchwork.kernel.org/project/linux-arm-kernel/cover/20201208141002.17777-1-grzegorz.jaszczyk@linaro.org/ [2] https://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc.git/commit/?h=for-next&id=b44786c9bdc46eac8388843f0a6116369cb18bca [3] https://patchwork.kernel.org/project/linux-remoteproc/patch/20201121032042.6195-1-s-anna@ti.com/ [4] https://patchwork.kernel.org/project/linux-remoteproc/patch/20201121030156.22857-3-s-anna@ti.com/ Best regards, Grzegorz Roger Quadros (1): remoteproc: pru: Add pru_rproc_set_ctable() function Suman Anna (2): dt-bindings: remoteproc: Add PRU consumer bindings remoteproc: pru: Deny rproc sysfs ops for PRU client driven boots Tero Kristo (2): remoteproc: pru: Add APIs to get and put the PRU cores remoteproc: pru: Configure firmware based on client setup .../bindings/remoteproc/ti,pru-consumer.yaml | 64 +++++ drivers/remoteproc/pru_rproc.c | 221 +++++++++++++++++- include/linux/pruss.h | 78 +++++++ 3 files changed, 360 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/remoteproc/ti,pru-consumer.yaml create mode 100644 include/linux/pruss.h