From patchwork Wed Oct 2 13:39:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1170677 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="CjnpHb4Y"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46jy1M5rjxz9sPq for ; Wed, 2 Oct 2019 23:39:49 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 6F047C21E49; Wed, 2 Oct 2019 13:39:42 +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=KHOP_BIG_TO_CC, RCVD_IN_MSPIKE_H2, 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 2A2E4C21C93; Wed, 2 Oct 2019 13:39:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C873AC21C93; Wed, 2 Oct 2019 13:39:37 +0000 (UTC) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by lists.denx.de (Postfix) with ESMTPS id 7ACFCC21C38 for ; Wed, 2 Oct 2019 13:39:37 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id i1so19735432wro.4 for ; Wed, 02 Oct 2019 06:39:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id; bh=i4u/wtKyjNnwBEGZVtzIV+z/XIS5gPzVDcVwQdkgKxg=; b=CjnpHb4YAvGqeVhETnKIbSeneEaTKNeAsCgNOH8Da76UZF7uZLRpcq8I5kUc7j8NnV 2axf1IIrd9MU23S9f8HzId9FYnd6CPHtIo+dBV/J2T37iDD1A3hC3YI/Ht9dLkijrNH/ eM40peJJ/y6SHtxaevNzEYt+piI4H7ruLOHRw88S8YuhWOHN2aNJnqnCvYysZ6wbeihV k7YCJqBRRgWj6WgjFpf/knWCk8z0CT9em6acwSHyB7pp0SXRusCI80BzwahVDrR3XqCq BFBigvQM8KKsUY9cd2w7ptN1uuRMrzpWBuLyGaL185qr1zVVDSy/vYjL4c4TMgvz/tAw 89Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=i4u/wtKyjNnwBEGZVtzIV+z/XIS5gPzVDcVwQdkgKxg=; b=IuHp1bQb/LdvEVkDGrc64DzNuHsadrw5tgS1Fb/PP2PUJYZ7JowOLCCSsDx7q9Pm5z JoNvEOs2v4iylYRPhDJ6vZ/KWOru2kSAz1+Zxr8193rVV75EtVH5VdAtjlp4rPeUuVF/ N6LFa0VSuOn3/zcui0hSosU1reCOAuGGZhw8H1864cDdgmNj07yWP02rQ2odPPQQcwx7 jbNuGjQwAyrzZ0WIyJISKZ8F+KuPSAzWf2NzP+JIlvJXU2O5CKmqo2Y/h7rEIcFuNudD EnAxYSEAkUxLiats2M2t1C1Xb2463Fb5YHDwTZNklfYNHSUWLojVJb7WGlnLhWSA9/9/ AZSw== X-Gm-Message-State: APjAAAVvILgzlEbRdLTBQNR74/AZ/UBpe9FYIE/O38Hpu9DvOMKfZ1w/ i0K8putyF5lbw41PlacdsVhIhtgzmwaDxwOt X-Google-Smtp-Source: APXvYqyjBaSLoOPxgFaJe8Lixrim884Nshp7sgMt9N0cwKRdUiSudgYKZKvxKoez91R81gq3unfYsA== X-Received: by 2002:adf:e849:: with SMTP id d9mr2830374wrn.358.1570023576733; Wed, 02 Oct 2019 06:39:36 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id z3sm5642158wmi.30.2019.10.02.06.39.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Oct 2019 06:39:35 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Date: Wed, 2 Oct 2019 15:39:18 +0200 Message-Id: X-Mailer: git-send-email 2.17.1 Cc: ibai.erkiaga-elorza@xilinx.com, Ryder Lee , Loic Pallardy , Heinrich Schuchardt , Krzysztof Kozlowski , Stefan Roese , luca@lucaceresoli.net, Rajan Vaja , Amit Kucheria , Li Yang , Mounika Grace Akula , Fabien Dessenne Subject: [U-Boot] [PATCH v2 00/13] arm64: zynqmp: Clean communication with PMUFW 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" Hi, This patch series using ZynqMP firmware driver to provide a interface to communicate with the PMU Firmware. As part of the series a mailbox driver is also implemented to handle communication through ipi interface. There are two new wiring: 1. Reading PMUFW version via firmware driver - mailbox driver in case of SPL - SMC in case of full U-Boot 2. Using the same patch for loading PMUFW configuration object The whole series is based on several patches I have sent already that's why I am providing a branch which also contains this series. https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze/tree/next Thanks, Michal Changes in v2: - Check error separately - Reported by Luca - Align ret handling - Also handle error from mbox_recv/mbox_send - Move pm_api_id higher - Reported by Luca - Fix macros for header protection - pass rex_maxlen to ipi_req - reported by Luca Ibai Erkiaga (10): mailbox: check ops prior calling mailbox: allow subnode for mbox regs mailbox: zynqmp: ipi mailbox driver firmware: zynqmp: Add zynqmp-power support arm64: zynqmp: add firmware and mailbox node to DT firmware: zynqmp: get fw version with mailbox driver firmware: zynqmp: create firmware header arm64: zynqmp: use firmware driver to get version arm64: zynqmp: remove old fw version function arm64: zynqmp: probe firmware driver Michal Simek (3): arm64: zynqmp: Cleanup PM SMC macro composition firmware: zynqmp: Separate function for sending message via mailbox arm64: zynqmp: Use mailbox driver for PMUFW config loading MAINTAINERS | 2 + arch/arm/Kconfig | 3 + arch/arm/dts/zynqmp.dtsi | 44 +++++- arch/arm/mach-zynqmp/Makefile | 4 - arch/arm/mach-zynqmp/cpu.c | 24 +-- arch/arm/mach-zynqmp/include/mach/sys_proto.h | 24 +-- arch/arm/mach-zynqmp/pmu_ipc.c | 112 -------------- board/xilinx/zynqmp/cmds.c | 1 + board/xilinx/zynqmp/zynqmp.c | 19 +-- drivers/firmware/Kconfig | 2 + drivers/firmware/firmware-zynqmp.c | 142 ++++++++++++++++++ drivers/fpga/zynqmppl.c | 5 +- drivers/mailbox/Kconfig | 6 + drivers/mailbox/Makefile | 1 + drivers/mailbox/mailbox-uclass.c | 19 ++- drivers/mailbox/zynqmp-ipi.c | 134 +++++++++++++++++ include/zynqmp_firmware.h | 37 +++++ 17 files changed, 399 insertions(+), 180 deletions(-) delete mode 100644 arch/arm/mach-zynqmp/pmu_ipc.c create mode 100644 drivers/mailbox/zynqmp-ipi.c create mode 100644 include/zynqmp_firmware.h