From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E35DA199385 for ; Tue, 28 Apr 2026 20:26:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777407993; cv=none; b=WE+2LwZr6VVhitaUWircMHF5pDziO+MudZjUp8TamRCs0Nj5lyC0lW4MkSMcvM8LXXBwkb/d3selMnJ5jFDDaMJETZuEKcSvgFYhB1xnjEb8kqKV4gfOXb0aYDhXjyEeDV9/V2qq7NC+Q4H4Z6uTNEs7rimvKvu/PNvu41CaocU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777407993; c=relaxed/simple; bh=bikCYCChr7YkCUSK+pLWX18yTfLp9aN20MtL2K2GstY=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=LLZOgGRUAgVM+PwHmuUNqk2OchUPlKkVNNg604IJ3k7nees5B/78HVkWWQF+Hggn2Il0vv2km4dF51sbQ1h94nSRpmu734rzYSbOb1kQxw4bnF2P7dF/it93yxMKQGLFNtT+XSqAOnaqvWOlj0FcwucDBEa7GOoIWGZNxWxoS10= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=UZ7Uy8nI; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="UZ7Uy8nI" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-488a9033b2cso124575285e9.2 for ; Tue, 28 Apr 2026 13:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1777407989; x=1778012789; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=U2z5CJStQaZH5C1yDNgwonipIcrAGaww4SYiAIYI8F8=; b=UZ7Uy8nI2+NOm8dpnjNNSb11MMuUBVTWQorG96Z9b22UBZwbnwkPAlHmmG85il8AD9 Sw/7FzGb5F4wzlj8+Y3OyDOM4ppwwpIirs7Kj3J+v8VNDqbrfgsGVQF1EvygTCYRou3L /Mk49+Yniu2XxoFd6+lkgHP2oXe0dukmmxcS6r03r6O20G0jXHVP0+omwb7zryAdhZej J1FNxtA4O8j7148p3VYhlRRKwwiJuk9NLnFv4JZ5f0nS9wYYNlDucsZZA4HmU9veB9Bq WmYG3AlKNL5FdweLUdqaLopCeDszF0c/l50xoXhP0Ci557j7xiRsUfwhi2wOcotYdI6y yCkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777407989; x=1778012789; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=U2z5CJStQaZH5C1yDNgwonipIcrAGaww4SYiAIYI8F8=; b=f3k5z2/UNN4SF9AU0uyz7qXnmj8mky8l5F6dJ8ILNoWcQ8y2urjc8cEgLBLAGYbO3f GJWG7Y8xDVOyMDR/iXqUxmMu0PWDzH4rPG8y0L8B5vOEtRpqh6W7KKGCPJWAIDcsqRhf RUCusMMhur1jHi0yaq0tnaCF9F5Vkn+NIWlR0h2TtK6pjBLjwelx7uuGYvqntoMy4CRC 0tjxJJ7jYjzS5QnZ4MeK0QhBx/NQkLqswyymh0ESBg6iYUbnT1uQ2P6DPqQ5xP9DymU4 VNcmfjA9T2PBDMsIVthIh4KA/qMR4btQ6lKBZM96ENnGFoNDCyh6ShY+M8iFt3YHnfRJ 39nA== X-Forwarded-Encrypted: i=1; AFNElJ/IYaW0qD/AGNDCx8VZrZzO2a5IXnwSTvBb1t29RVYxzIS80f0DMMsBq38mdtNzvFt0hHIU67aUIFlDDYw=@vger.kernel.org X-Gm-Message-State: AOJu0Yw33cDCPliKRNKbLK1VgjtpGl6Mqf+bk4em9/dV8qcQXLBjIaOM WlH9cIP+u7AUNHO9FROset50E5pSuEnBTpbHhmwbE48/uyhe4LXVGhEp7RZjrEhksPU= X-Gm-Gg: AeBDievEo8BuKJgOwltkPdDF6KVWh1TFQ1woKSkUbtX1HAj2PKkG2jnAYpJE99y4z6f m6htsO+IcAQDLvXYXEMxjQysJMJ7EA5Bf12b7tD96GSSrEPBG3PqAMFaDJeRrz8wL01sjp+y+C+ RN/2f2VNux6MweCu+eT3+XUkSoe+BGMPy1lFsZoOj6ufpQH4v8pmGeB6sWm+9DPuR+gnMdkXwtm u0Iq5hbb1S5GuWQm354regGwLGdwoztJFsC8yutf2UbnZNsx62qaZO5l5TxqGShTYCjXNejmWm3 bD+Hdrr0xlLrpBXADAO2+/y3Iu/KEw4khNDS3qrYnjT31NG48cDZUdM5/AwiQLu6flAo0CwMRyi 6+blLmgTv6JzPnqrfb4702FuKbsrGmw6mPBvdrKBIrrN5vMwaJ5EE54xhlkDwNk7MWT4JOQ5hIw G37n7pRtLPZWbXXdYNYXLdlKibfqLbP0aQRjhlyMl+B8uu3Gy8O0+hDGYymN1MyQJxGLF+ZHcvL xyyyouTcAEgeTE1ro5NdnEV X-Received: by 2002:a05:600c:4f0c:b0:489:1c2d:211e with SMTP id 5b1f17b1804b1-48a77ae5386mr75966715e9.5.1777407989369; Tue, 28 Apr 2026 13:26:29 -0700 (PDT) Received: from localhost ([94.4.195.193]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a7bc11fcbsm10511235e9.3.2026.04.28.13.26.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Apr 2026 13:26:28 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 28 Apr 2026 21:26:27 +0100 Message-Id: Cc: "Krzysztof Kozlowski" , "Sylwester Nawrocki" , "Chanwoo Choi" , "Alim Akhtar" , "Sam Protsenko" , "Michael Turquette" , "Stephen Boyd" , "Rob Herring" , "Conor Dooley" , "Jassi Brar" , "Krzysztof Kozlowski" , "Peter Griffin" , , , , , Subject: Re: [PATCH v2 2/3] mailbox: exynos: Add support for Exynos850 mailbox From: "Alexey Klimov" To: "Tudor Ambarus" X-Mailer: aerc 0.21.0 References: <20260402-exynos850-ap2apm-mailbox-v2-0-ca5ffdff99d4@linaro.org> <20260402-exynos850-ap2apm-mailbox-v2-2-ca5ffdff99d4@linaro.org> In-Reply-To: On Wed Apr 8, 2026 at 2:08 PM BST, Alexey Klimov wrote: [...] > On Thu Apr 2, 2026 at 9:42 AM BST, Tudor Ambarus wrote: >>> static int exynos_mbox_send_data(struct mbox_chan *chan, void *data) >>> @@ -57,7 +104,8 @@ static int exynos_mbox_send_data(struct mbox_chan *c= han, void *data) >>> return -EINVAL; >>> } >>> =20 >>> - writel(BIT(msg->chan_id), exynos_mbox->regs + EXYNOS_MBOX_INTGR1); >>> + writel(BIT(msg->chan_id) << exynos_mbox->data->irq_doorbell_shift, >>> + exynos_mbox->regs + exynos_mbox->data->irq_doorbell_offset); >> >> Use FIELD_PREP from please. You will use a mask inste= ad of >> a shift. >> >> I would rename irq_doorbell_offset to intgr. It aligns with the register= name >> from the datasheet. You won't need to prepend _offset to the name, we al= ready >> see it's an offset when doing the writel(). > > Sure. Thanks. Let's use FIELD_PREP. + /* Ring the doorbell */ + writel(BIT(msg->chan_id) << exynos_mbox->data->intgr_shift, + exynos_mbox->regs + exynos_mbox->data->intgr); FIELD_PREP() wants a mask as a compile-time constant. Unless you want me to add switch/case for different SoCs or I misunderstood something I don't see how this is gonna fly. Best regards, Alexey