Devicetree
 help / color / mirror / Atom feed
From: Paul Menzel <pmenzel@molgen.mpg.de>
To: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Cc: marcel@holtmann.org, luiz.dentz@gmail.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	amitkumar.karwar@nxp.com, rohit.fule@nxp.com, sherry.sun@nxp.com,
	ziniu.wang_1@nxp.com, haibo.chen@nxp.com, LnxRevLi@nxp.com,
	regressions@lists.linux.dev
Subject: Re: [PATCH v3 2/2] Bluetooth: btnxpuart: Update firmware names
Date: Wed, 29 May 2024 12:05:42 +0200	[thread overview]
Message-ID: <52ccf0c1-e5dd-412b-9e47-7829ca0f6ffc@molgen.mpg.de> (raw)
In-Reply-To: <20240529095347.22186-3-neeraj.sanjaykale@nxp.com>

[Cc: regressions@]

Dear Neeraj,


Am 29.05.24 um 11:53 schrieb Neeraj Sanjay Kale:
> This updates the firmware names of 3 chipsets: w8987, w8997, w9098.
> These changes are been done to standardize chip specific firmware
> file names.

Can you please describe the new naming schema in the commit message?

> To allow user to use older firmware file names, a new device tree
> property has been introduced called firmware-name, which will override
> the hardcoded firmware names in the driver.

So users updating the Linux kernel but not updating the devicetree with 
the new property are going to see a regression, right? I think this 
violates Linux’ no regression policy. If so, please implement a way to 
support old and new names.

> Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
> ---
> v2: Remove "nxp/" from all firmware name definitions to be inline with
> firware file name read from device tree file. (Krzysztof)

fir*m*ware

> ---
>   drivers/bluetooth/btnxpuart.c | 28 +++++++++++++++++-----------
>   1 file changed, 17 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
> index 0b93c2ff29e4..4442d911eba8 100644
> --- a/drivers/bluetooth/btnxpuart.c
> +++ b/drivers/bluetooth/btnxpuart.c
> @@ -33,16 +33,16 @@
>   /* NXP HW err codes */
>   #define BTNXPUART_IR_HW_ERR		0xb0
>   
> -#define FIRMWARE_W8987		"nxp/uartuart8987_bt.bin"
> -#define FIRMWARE_W8997		"nxp/uartuart8997_bt_v4.bin"
> -#define FIRMWARE_W9098		"nxp/uartuart9098_bt_v1.bin"
> -#define FIRMWARE_IW416		"nxp/uartiw416_bt_v0.bin"
> -#define FIRMWARE_IW612		"nxp/uartspi_n61x_v1.bin.se"
> -#define FIRMWARE_IW624		"nxp/uartiw624_bt.bin"
> -#define FIRMWARE_SECURE_IW624	"nxp/uartiw624_bt.bin.se"
> -#define FIRMWARE_AW693		"nxp/uartaw693_bt.bin"
> -#define FIRMWARE_SECURE_AW693	"nxp/uartaw693_bt.bin.se"
> -#define FIRMWARE_HELPER		"nxp/helper_uart_3000000.bin"
> +#define FIRMWARE_W8987		"uart8987_bt_v0.bin"
> +#define FIRMWARE_W8997		"uart8997_bt_v4.bin"
> +#define FIRMWARE_W9098		"uart9098_bt_v1.bin"
> +#define FIRMWARE_IW416		"uartiw416_bt_v0.bin"
> +#define FIRMWARE_IW612		"uartspi_n61x_v1.bin.se"
> +#define FIRMWARE_IW624		"uartiw624_bt.bin"
> +#define FIRMWARE_SECURE_IW624	"uartiw624_bt.bin.se"
> +#define FIRMWARE_AW693		"uartaw693_bt.bin"
> +#define FIRMWARE_SECURE_AW693	"uartaw693_bt.bin.se"
> +#define FIRMWARE_HELPER		"helper_uart_3000000.bin"
>   
>   #define CHIP_ID_W9098		0x5c03
>   #define CHIP_ID_IW416		0x7201
> @@ -685,13 +685,19 @@ static bool process_boot_signature(struct btnxpuart_dev *nxpdev)
>   static int nxp_request_firmware(struct hci_dev *hdev, const char *fw_name)
>   {
>   	struct btnxpuart_dev *nxpdev = hci_get_drvdata(hdev);
> +	const char *fw_name_dt;
>   	int err = 0;
>   
>   	if (!fw_name)
>   		return -ENOENT;
>   
>   	if (!strlen(nxpdev->fw_name)) {
> -		snprintf(nxpdev->fw_name, MAX_FW_FILE_NAME_LEN, "%s", fw_name);
> +		if (strcmp(fw_name, FIRMWARE_HELPER) &&
> +		    !device_property_read_string(&nxpdev->serdev->dev,
> +						 "firmware-name",
> +						 &fw_name_dt))
> +			fw_name = fw_name_dt;
> +		snprintf(nxpdev->fw_name, MAX_FW_FILE_NAME_LEN, "nxp/%s", fw_name);
>   
>   		bt_dev_dbg(hdev, "Request Firmware: %s", nxpdev->fw_name);
>   		err = request_firmware(&nxpdev->fw, nxpdev->fw_name, &hdev->dev);


Kind regards,

Paul

  reply	other threads:[~2024-05-29 10:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-29  9:53 [PATCH v3 0/2] Bluetooth: btnxpuart: Update firmware names Neeraj Sanjay Kale
2024-05-29  9:53 ` [PATCH v3 1/2] dt-bindings: net: bluetooth: nxp: Add firmware-name property Neeraj Sanjay Kale
2024-05-29  9:53 ` [PATCH v3 2/2] Bluetooth: btnxpuart: Update firmware names Neeraj Sanjay Kale
2024-05-29 10:05   ` Paul Menzel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-14  9:13 [PATCH v3 0/2] " Neeraj Sanjay Kale
2024-05-14  9:13 ` [PATCH v3 2/2] " Neeraj Sanjay Kale
2024-04-10  8:10 [PATCH v3 0/2] " Neeraj Sanjay Kale
2024-04-10  8:10 ` [PATCH v3 2/2] " Neeraj Sanjay Kale

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=52ccf0c1-e5dd-412b-9e47-7829ca0f6ffc@molgen.mpg.de \
    --to=pmenzel@molgen.mpg.de \
    --cc=LnxRevLi@nxp.com \
    --cc=amitkumar.karwar@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=haibo.chen@nxp.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=neeraj.sanjaykale@nxp.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=regressions@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=rohit.fule@nxp.com \
    --cc=sherry.sun@nxp.com \
    --cc=ziniu.wang_1@nxp.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