All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: <Ajay.Kathat@microchip.com>
Cc: <linux-wireless@vger.kernel.org>, <Claudiu.Beznea@microchip.com>
Subject: Re: [PATCH 08/12] wilc1000: invoke chip reset register while FW download
Date: Thu, 24 Jun 2021 12:32:34 +0300	[thread overview]
Message-ID: <87a6nfip59.fsf@tynnyri.adurom.net> (raw)
In-Reply-To: <20210423182925.5865-9-ajay.kathat@microchip.com> (Ajay Kathat's message of "Fri, 23 Apr 2021 18:29:47 +0000")

<Ajay.Kathat@microchip.com> writes:

> From: Ajay Singh <ajay.kathat@microchip.com>
>
> Added chip-reset command before firmware download to initialize the
> chip. Also configure chip in wake state, ready to accept the FW
> binary.

"Added" -> "Add"

This repeats many times, so I don't comment on that anymore.

> @@ -1088,10 +1089,22 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
>  		return -EIO;
>  
>  	offset = 0;
> +	pr_info("%s: Downloading firmware size = %d\n", __func__, buffer_size);
> +
> +	acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP);
> +
> +	wilc->hif_func->hif_read_reg(wilc, WILC_GLB_RESET_0, &reg);
> +	reg &= ~BIT(10);
> +	ret = wilc->hif_func->hif_write_reg(wilc, WILC_GLB_RESET_0, reg);
> +	wilc->hif_func->hif_read_reg(wilc, WILC_GLB_RESET_0, &reg);
> +	if (reg & BIT(10))
> +		pr_err("%s: Failed to reset\n", __func__);
> +
> +	release_bus(wilc, WILC_BUS_RELEASE_ONLY);
>  	do {
>  		addr = get_unaligned_le32(&buffer[offset]);
>  		size = get_unaligned_le32(&buffer[offset + 4]);
> -		acquire_bus(wilc, WILC_BUS_ACQUIRE_ONLY);
> +		acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP);
>  		offset += 8;
>  		while (((int)size) && (offset < buffer_size)) {
>  			if (size <= blksz)
> @@ -1109,10 +1122,13 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
>  			offset += size2;
>  			size -= size2;
>  		}
> -		release_bus(wilc, WILC_BUS_RELEASE_ONLY);
> +		release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP);
>  
> -		if (ret)
> +		if (ret) {
> +			pr_err("%s Bus error\n", __func__);
>  			goto fail;
> +		}
> +		pr_info("%s Offset = %d\n", __func__, offset);

Please use pr_info() sparingly, it's only for important messages like
hardware info, firmware version/features and so on. I think pr_info()
calls in this function should be debug messages instead.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  reply	other threads:[~2021-06-24  9:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23 18:29 [PATCH 00/12] wilc1000: added chip wakeup support and few fixes Ajay.Kathat
2021-04-23 18:29 ` [PATCH 02/12] wilc1000: fix possible memory leak in cfg_scan_result() Ajay.Kathat
2021-04-23 18:29 ` [PATCH 01/12] wilc1000: move 'deinit_lock' lock init/destory inside module probe Ajay.Kathat
2021-06-24  5:43   ` Ajay.Kathat
2021-06-24  5:55     ` Kalle Valo
2021-04-23 18:29 ` [PATCH 03/12] wilc1000: added new WID to pass WOW info to firmware Ajay.Kathat
2021-06-24  9:25   ` Kalle Valo
2021-06-24 11:00     ` Ajay.Kathat
2021-04-23 18:29 ` [PATCH 04/12] wilc1000: setup registers to support chip wakeup sequence Ajay.Kathat
2021-06-24  9:27   ` Kalle Valo
2021-04-23 18:29 ` [PATCH 05/12] wilc1000: add reset/terminate/repeat command support for SPI bus Ajay.Kathat
2021-06-24  9:28   ` Kalle Valo
2021-04-23 18:29 ` [PATCH 06/12] wilc1000: handle register read fail issue " Ajay.Kathat
2021-04-23 18:29 ` [PATCH 07/12] wilc1000: ignore error response for SPI clockless registers Ajay.Kathat
2021-04-23 18:29 ` [PATCH 08/12] wilc1000: invoke chip reset register while FW download Ajay.Kathat
2021-06-24  9:32   ` Kalle Valo [this message]
2021-04-23 18:29 ` [PATCH 09/12] wilc1000: avoid 'isinit' static by moving inside priv data Ajay.Kathat
2021-06-24  9:40   ` Kalle Valo
2021-04-23 18:29 ` [PATCH 11/12] wilc1000: use write command after read in wilc_spi_sync_ext() Ajay.Kathat
2021-06-24  9:42   ` Kalle Valo
2021-04-23 18:29 ` [PATCH 10/12] wilc1000: added initialized variable check before processing Ajay.Kathat
2021-06-24  9:41   ` Kalle Valo
2021-04-23 18:29 ` [PATCH 12/12] wilc1000: increase WILC_CFG_PKTS_TIMEOUT timeout value Ajay.Kathat
2021-06-24  9:42   ` Kalle Valo

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=87a6nfip59.fsf@tynnyri.adurom.net \
    --to=kvalo@codeaurora.org \
    --cc=Ajay.Kathat@microchip.com \
    --cc=Claudiu.Beznea@microchip.com \
    --cc=linux-wireless@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.