From patchwork Thu Mar 15 16:07:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 131808 Delivered-To: patch@linaro.org Received: by 10.80.210.197 with SMTP id q5csp1663250edg; Thu, 15 Mar 2018 09:08:01 -0700 (PDT) X-Google-Smtp-Source: AG47ELuvZLNP/Ku8wVVwIFuA7QcVliSXRGKkzXQ6gxh+TYoTmh3M8i0GcnsFPFiMGYxs8RuIkVBL X-Received: by 10.99.113.25 with SMTP id m25mr7266383pgc.164.1521130081557; Thu, 15 Mar 2018 09:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521130081; cv=none; d=google.com; s=arc-20160816; b=V2/WOihh+A8lXnakEOTMV2sTq+egx7r4LLAo7tcE3guJgJn38M0evJjyR1DcjJQ4GD wSRk+v9l6H35PLP7oKjHqxeAks1PLPQkSxsDUxb4wnGOANNEPqPIqJuLbdkaB42eIgm2 zMb2lED6fv1TS/hNbl9sOJrtFoFEAl4g9dkLB5B0aUdAruxdmLGpzwmDte+ShPTrSv3A SzrHVlM3JonIvN5BRc0qlxcVDQxa0wZ1UWWTRpnjRpGdvFZGKRll/+pN/BSBH6OunQB7 gBV9t0WbDa8MmX6dglWfYfvkKijzM7Elqa76O8cYBBEPBeMi90fVTE1IwzhzTANvwG0c MDoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=NDW75I4BCRafx380AteT/HVADFlRJXcbtMLu/lLGbYQ=; b=BgcT1OF9h+JQ3bDtjI9jpQqQkTBAg8sI2HHNdS57uuYzs9Hhv1TL0uLjZSIwna3ru5 FXfWQGUKdA1IwtW//Og2lhXhToyHWuXeurOB0zAkqfpn9nkUl3dQSq7W31hslRs6JxMY 8oT4J7O+hpl+ZEpCmSwL73JXzaxhAEuv7XLvOdvCEaayrJIQFwJPLSCIgi0ozpeSIhT8 D2qorbaos6mgXtKSmX90o00EcawZRvhYHWu2xlgdy+w/+wvGZV7vaPxEwGjR+bRTi21w /mcUzitt4gb14OJB9fvU+ZL1OO4UEQFOU/rIGumMkXxA5xRqAv7nsWGVVfj5VTJmWGvy j9Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LcX8HIjN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si3598792pgc.732.2018.03.15.09.08.01; Thu, 15 Mar 2018 09:08:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LcX8HIjN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751618AbeCOQH6 (ORCPT + 28 others); Thu, 15 Mar 2018 12:07:58 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:52859 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751475AbeCOQHz (ORCPT ); Thu, 15 Mar 2018 12:07:55 -0400 Received: by mail-wm0-f65.google.com with SMTP id t3so11451414wmc.2 for ; Thu, 15 Mar 2018 09:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=NDW75I4BCRafx380AteT/HVADFlRJXcbtMLu/lLGbYQ=; b=LcX8HIjNqOjj3YhvPUJz2eyWi5UqSLqZBpz85+v3+3o5evEQQAr2pHxpX7NcHxgCXv f1kezUvYFux7j9/cmpcHPRldWUt5+4k0vZAd5bUmB8C0NAMKnFiV5CGCNN1n0ZcMxUfJ qr3/6WO84AXm7UnE1BtwsAnQHF0O5E2haxD/4= 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; bh=NDW75I4BCRafx380AteT/HVADFlRJXcbtMLu/lLGbYQ=; b=I+SsMHLKyJ8a2hC0uLzqm4ItilE5bjaJbBwKBMrTFBBwSi2G/6R6pZWiUyVKyFWQ0l NKfIR1DgtRQTbMjLDU0PqCjWKk3ZANLPY9Jh1YkWTU3MLx5BtrnoUI1nb6sy+qKJMTru mYRVpui8eOF/8t1vV9EpJ/+AoCq6iHjhzDeoZLn68/gNLlILU0Gcmz3iNiMtbS1TrXZq iHOXLHyROzSjzKDsM8pkV9n4gkRuUw2Lr69HcbCxHlkeJ5CyTDk0ddPMhvLoxyB43J0Q EBp06y8peWkpUj+kfQNsaEm9KuI8XZYM1lSMoYjtoeKbj1OUZ6ryJQNSyjbZOlNFIl/i yUtQ== X-Gm-Message-State: AElRT7E/V1+4WuBOMLOs7FjEDRTd83Ho/2PyEqubp1mhCK5S+4/a5KfS acO+XJUu4bBJYw2QjeCKNvxAwA== X-Received: by 10.28.150.138 with SMTP id y132mr5488377wmd.104.1521130074100; Thu, 15 Mar 2018 09:07:54 -0700 (PDT) Received: from localhost.localdomain (li622-172.members.linode.com. [212.71.249.172]) by smtp.gmail.com with ESMTPSA id z7sm5389707wrg.1.2018.03.15.09.07.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Mar 2018 09:07:52 -0700 (PDT) From: Leo Yan To: Rob Herring , Mark Rutland , Wei Xu , Jassi Brar , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Kaihua Zhong , Guodong Xu , Haojian Zhuang , Ruyi Wang Cc: Leo Yan Subject: [PATCH v7 0/3] Add support for Hi3660 mailbox driver Date: Fri, 16 Mar 2018 00:07:35 +0800 Message-Id: <1521130058-24796-1-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi3660 mailbox controller is used to send message within multiple processors, MCU, HIFI, etc. This patch series is to implement an initial version for Hi3660 mailbox driver with "automatic acknowledge" mode. The patch set have been verified with Hi3660 stub clock driver, so we can send message to MCU to execute CPU frequency scaling. This is tested on 96boards Hikey960. Changes from v6: * Rebased patches on latest mainline kernel: commit 0aa3fdb8b3a6 ("Merge branch 'percpu_ref-rcu-audit-fixes' of git://git.kernel.org/ pub/scm/linux/kernel/git/tj/misc") Changes from v5: * Changed to use writel()/readl() to replace {writel|readl}_relaxed() to make safe for memory ordering; Changes from v4: * According to Jassi suggestion, refactored mailbox driver and removed "inline" for function declaration; Changes from v3: * According to Jassi suggestion, refined structure name to "struct hi3660_chan_info"; * According to Jassi suggestion, moved channel 'lock'+'acquire' operations into .startup(); Changes from v2: * According to Mark Rutland suggestions, removed sev()/wfe() from driver, the system has no two masters sharing the same channel for data transferring so we don't need these instructions; * Refined DT binding and doc according to Rob suggestions; * Refined driver according to Julien suggestions; Changes from v1: * Added cover letter to track the changelog; * Added document for DT binding; * Refactored and simplized mailbox driver with "automatic ack" mode; * Refined commit logs for patches; Kaihua Zhong (2): mailbox: Add support for Hi3660 mailbox dts: arm64: Add mailbox binding for hi3660 Leo Yan (1): dt-bindings: mailbox: Introduce Hi3660 controller binding .../bindings/mailbox/hisilicon,hi3660-mailbox.txt | 51 ++++ arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 8 + drivers/mailbox/Kconfig | 8 + drivers/mailbox/Makefile | 2 + drivers/mailbox/hi3660-mailbox.c | 312 +++++++++++++++++++++ 5 files changed, 381 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/hisilicon,hi3660-mailbox.txt create mode 100644 drivers/mailbox/hi3660-mailbox.c -- 1.9.1