From patchwork Wed Oct 5 14:14:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sangwook X-Patchwork-Id: 4520 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 259A223EF5 for ; Wed, 5 Oct 2011 14:16:49 +0000 (UTC) Received: from mail-gx0-f180.google.com (mail-gx0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id C6499A18B91 for ; Wed, 5 Oct 2011 14:16:48 +0000 (UTC) Received: by ggni2 with SMTP id i2so1193440ggn.11 for ; Wed, 05 Oct 2011 07:16:48 -0700 (PDT) Received: by 10.223.55.136 with SMTP id u8mr3676181fag.46.1317824207666; Wed, 05 Oct 2011 07:16:47 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.23.170 with SMTP id n10cs94109laf; Wed, 5 Oct 2011 07:16:46 -0700 (PDT) Received: by 10.213.15.207 with SMTP id l15mr1196564eba.71.1317824204934; Wed, 05 Oct 2011 07:16:44 -0700 (PDT) Received: from mail-ey0-f178.google.com (mail-ey0-f178.google.com [209.85.215.178]) by mx.google.com with ESMTPS id 3si126143eex.183.2011.10.05.07.16.43 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Oct 2011 07:16:44 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.178 is neither permitted nor denied by best guess record for domain of sangwook.lee@linaro.org) client-ip=209.85.215.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.215.178 is neither permitted nor denied by best guess record for domain of sangwook.lee@linaro.org) smtp.mail=sangwook.lee@linaro.org Received: by eye27 with SMTP id 27so1814038eye.37 for ; Wed, 05 Oct 2011 07:16:43 -0700 (PDT) Received: by 10.216.132.9 with SMTP id n9mr6726776wei.22.1317824202897; Wed, 05 Oct 2011 07:16:42 -0700 (PDT) Received: from localhost.localdomain (host109-149-107-208.range109-149.btcentralplus.com. [109.149.107.208]) by mx.google.com with ESMTPS id n21sm3190066wbp.2.2011.10.05.07.16.40 (version=SSLv3 cipher=OTHER); Wed, 05 Oct 2011 07:16:41 -0700 (PDT) From: Sangwook Lee To: kvalo@qca.qualcomm.com Cc: linux-wireless@vger.kernel.org, patches@linaro.org, Sangwook Lee Subject: [PATCH] ath6kl:Fix execution address of OTP AR6003 HW2.0 Date: Wed, 5 Oct 2011 15:14:37 +0100 Message-Id: <1317824077-13476-1-git-send-email-sangwook.lee@linaro.org> X-Mailer: git-send-email 1.7.4.1 Fix OTP execution address for AR6003 HW2.0 ath6kl: writing otp to 0x543180 (3689 B) ath6kl: bmi LZ stream start: addr: 0x543180) ath6kl: bmi send LZ data: len: 3688) ath6kl: bmi send LZ data: len: 4) ath6kl: bmi LZ stream start: addr: 0x0) ath6kl: bmi read memory: device: addr: 0x54061c, len: 4 ath6kl: app_start_override_addr 0x0 ath6kl: executing OTP at 0x0 ath6kl: bmi execute: addr: 0x0, param: 0) ath6kl: bmi_recv_buf FIFO empty ath6kl: Unable to read from the device: -22 Signed-off-by: Sangwook Lee --- drivers/net/wireless/ath/ath6kl/init.c | 3 +++ drivers/net/wireless/ath/ath6kl/target.h | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index b277111..bfe802b 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c @@ -1211,6 +1211,9 @@ static int ath6kl_upload_otp(struct ath6kl *ar) return ret; } + if (ar->version.target_ver == AR6003_REV2_VERSION) + address = AR6003_REV2_APP_START_OVERRIDE; + ar->hw.app_start_override_addr = address; ath6kl_dbg(ATH6KL_DBG_BOOT, "app_start_override_addr 0x%x\n", diff --git a/drivers/net/wireless/ath/ath6kl/target.h b/drivers/net/wireless/ath/ath6kl/target.h index c9a7605..253c489 100644 --- a/drivers/net/wireless/ath/ath6kl/target.h +++ b/drivers/net/wireless/ath/ath6kl/target.h @@ -331,6 +331,7 @@ struct host_interest { (((target_type) == TARGET_TYPE_AR6003) ? AR6003_VTOP(vaddr) : \ (((target_type) == TARGET_TYPE_AR6004) ? AR6004_VTOP(vaddr) : 0)) +#define AR6003_REV2_APP_START_OVERRIDE 0x944C00 #define AR6003_REV2_APP_LOAD_ADDRESS 0x543180 #define AR6003_REV2_BOARD_EXT_DATA_ADDRESS 0x57E500 #define AR6003_REV2_DATASET_PATCH_ADDRESS 0x57e884