mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Junhao Xie <bigfoot@radxa.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>
Cc: Xilin Wu <sophon@radxa.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-mtd@lists.infradead.org
Subject: Re: [PATCH 2/2] mtd: devices: Add Qualcomm SCM storage driver
Date: Mon, 22 Dec 2025 10:43:15 +0100	[thread overview]
Message-ID: <1b40552e-b292-4207-b7eb-9f50e37fd7e4@oss.qualcomm.com> (raw)
In-Reply-To: <4AB2F6CA8EF1ED90+cd685c52-a4c2-492d-9445-b081d4d857f7@radxa.com>

On 12/19/25 6:12 PM, Junhao Xie wrote:
> On 2025/12/19 20:05, Konrad Dybcio wrote:
>> On 12/18/25 7:02 PM, Junhao Xie wrote:
>>> Add MTD driver for accessing storage devices managed by Qualcomm's
>>> TrustZone firmware. On some platforms, BIOS/firmware storage (typically
>>> SPI NOR flash) is not directly accessible from the non-secure world and
>>> all operations must go through SCM (Secure Channel Manager) calls.
>>>
>>> Signed-off-by: Junhao Xie <bigfoot@radxa.com>
>>> Tested-by: Xilin Wu <sophon@radxa.com>
>>> ---

[...]

>>> +	host->buffer_size = SZ_256K;
>> Should this just be = host->info->page_size?
> 
> The value of page_size is smaller than what we want for
> buffering SCM transfers. The buffer is intended for batching
> larger operations, so a larger fixed size is used here.
> 
> struct qcom_scm_storage_info:
>   total_blocks = 8192
>   block_size = 4096
>   page_size = 256
>   num_physical = 0
>   manufacturer_id = 0
>   serial_num = 1663215
>   fw_version = 
>   memory_type = NOR

I don't see how the big buffer is any useful TBF - you read into this
buffer before outputting to *buf and copy data from *buf into the
host_buffer instead of writing straight from the former. If anything,
that's an unnecessary copy.

Konrad

  reply	other threads:[~2025-12-22  9:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20251218180205.930961-1-bigfoot@radxa.com>
2025-12-18 18:02 ` [PATCH 1/2] firmware: qcom: scm: Add SCM storage interface support Junhao Xie
2025-12-19 11:45   ` Konrad Dybcio
2025-12-19 17:16     ` Junhao Xie
2026-01-03 17:22   ` Bjorn Andersson
2026-01-05 14:00     ` Junhao Xie
2025-12-18 18:02 ` [PATCH 2/2] mtd: devices: Add Qualcomm SCM storage driver Junhao Xie
2025-12-19 12:05   ` Konrad Dybcio
2025-12-19 17:12     ` Junhao Xie
2025-12-22  9:43       ` Konrad Dybcio [this message]
2025-12-24 11:26         ` Junhao Xie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1b40552e-b292-4207-b7eb-9f50e37fd7e4@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=bigfoot@radxa.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=sophon@radxa.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®