Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp51246pxv; Thu, 24 Jun 2021 02:33:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwe1F6KEyi5IhBmtzV5inclfjuWOsgcO7/jzyQ8yWejHVvmQ1mi5pJ1bQd8JtJcEarCMjSm X-Received: by 2002:a17:906:d54b:: with SMTP id cr11mr4354055ejc.98.1624527203381; Thu, 24 Jun 2021 02:33:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624527203; cv=none; d=google.com; s=arc-20160816; b=rafjStfouwP17/uvbqlwKIqp0MBOOPuWuUjw2AdSZ3snIpRJpFG+JBtokHxTogGLrw 2EZwMka0DXc0tqyV0D1Trskd+XZgZZCVOWnq9iUCGGfRSJARb/rvrSEB52/iuVkmBbT1 9PnCf4683pJ/08jQoAx3+dItCaU0dMQSolKQjcOvH9Le7or77hOUuvlqvkAl+CiWfB/x lvgPhiFnsDlShHvMLFa8HKQz+ErU7wtd1Rx/j51fxFjbH42usSE8wwSGPM+9g8hsIx9Y n1rICYDp2WXRReSHu8PxrPPLb2ECLWNSpjkOMO9Pj/DwUJC4w+haWOvXEnn8lNnzbzr1 ajMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dmarc-filter:sender :dkim-signature; bh=K/Gl+vrtz8Ce8ioTXxwLnLrxUrfk2l9JlS7AIFYI1qQ=; b=TPGATRZHlsdJSM9PnlNEkvyoC6FyLsZufz5NEJjPcXoLDZWO5gNjOyqoL5AE+px2IJ EvMZ+RdaBrBHB1KahHE3SBZ3d5xuUyT70FIsUI/jBAbjh5Zqpps2GFTn4et0UOh3amqc n++5ZSdMEOwO7Kx1c8t3BF/hxmDd+L+WVGgVdh2AX5UgLI4Q8+6c5DQt/oXkophFxDi6 LxXqFJBMB+1w5kVklzgK855TAKEF5WkLdBpR4SMB/AYzUaqRsHShz9TL/RB83Ptp109L 6A6akghTNi9cmZC4cSBFCm6fjqvrStRICrPhXCZ6XoyFx+dJZjwGC6rgxlOPgiG9gGFL L3PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=WrWd047T; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a19si2488389edr.397.2021.06.24.02.33.00; Thu, 24 Jun 2021 02:33:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=WrWd047T; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231929AbhFXJe7 (ORCPT + 99 others); Thu, 24 Jun 2021 05:34:59 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:61723 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230299AbhFXJe7 (ORCPT ); Thu, 24 Jun 2021 05:34:59 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1624527160; h=Content-Type: MIME-Version: Message-ID: In-Reply-To: Date: References: Subject: Cc: To: From: Sender; bh=K/Gl+vrtz8Ce8ioTXxwLnLrxUrfk2l9JlS7AIFYI1qQ=; b=WrWd047Twy5Pnou+l3MlrUE9Q/F8WOTQ9RopdAY3zD7VMqPirrssGu9Ahsf/lxLQ/HVYEssP 3UrMH6mJ2VO+QTfZ9Mf4lIn20QWuIKUpdIqKimNOZ1XjTwq0mOk2z7s4dGg9j6oFE5ZpN1aW mixf9J1m7aZeaq7Tw2glPn5F2h8= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n04.prod.us-west-2.postgun.com with SMTP id 60d451372a2a9a9761faf30d (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 24 Jun 2021 09:32:39 GMT Sender: kvalo=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id BC379C4338A; Thu, 24 Jun 2021 09:32:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from tynnyri.adurom.net (tynnyri.adurom.net [51.15.11.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6665FC433F1; Thu, 24 Jun 2021 09:32:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6665FC433F1 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Cc: , Subject: Re: [PATCH 08/12] wilc1000: invoke chip reset register while FW download References: <20210423182925.5865-1-ajay.kathat@microchip.com> <20210423182925.5865-9-ajay.kathat@microchip.com> Date: Thu, 24 Jun 2021 12:32:34 +0300 In-Reply-To: <20210423182925.5865-9-ajay.kathat@microchip.com> (Ajay Kathat's message of "Fri, 23 Apr 2021 18:29:47 +0000") Message-ID: <87a6nfip59.fsf@tynnyri.adurom.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org writes: > From: Ajay Singh > > 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 &= ~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, ®); > + 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