| Index: chromeos/drivers/ath6kl/miscdrv/common_drv.c
|
| diff --git a/chromeos/drivers/ath6kl/miscdrv/common_drv.c b/chromeos/drivers/ath6kl/miscdrv/common_drv.c
|
| index 56f95d6fee57e62e2056f9470c03975dc52c0230..6754fde467deafdcca5c132b776b34ef71de4806 100644
|
| --- a/chromeos/drivers/ath6kl/miscdrv/common_drv.c
|
| +++ b/chromeos/drivers/ath6kl/miscdrv/common_drv.c
|
| @@ -1,15 +1,19 @@
|
| //------------------------------------------------------------------------------
|
| // <copyright file="common_drv.c" company="Atheros">
|
| -// Copyright (c) 2004-2008 Atheros Corporation. All rights reserved.
|
| +// Copyright (c) 2004-2010 Atheros Corporation. All rights reserved.
|
| //
|
| -// This program is free software; you can redistribute it and/or modify
|
| -// it under the terms of the GNU General Public License version 2 as
|
| -// published by the Free Software Foundation;
|
| //
|
| -// Software distributed under the License is distributed on an "AS
|
| -// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
| -// implied. See the License for the specific language governing
|
| -// rights and limitations under the License.
|
| +// Permission to use, copy, modify, and/or distribute this software for any
|
| +// purpose with or without fee is hereby granted, provided that the above
|
| +// copyright notice and this permission notice appear in all copies.
|
| +//
|
| +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
| +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
| +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
| +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
| +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
| +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
| +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
| //
|
| //
|
| //------------------------------------------------------------------------------
|
| @@ -21,16 +25,16 @@
|
| #include "athdefs.h"
|
| #include "a_types.h"
|
|
|
| -#include "AR6002/hw/mbox_host_reg.h"
|
| -#include "AR6002/hw/apb_map.h"
|
| -#include "AR6002/hw/si_reg.h"
|
| -#include "AR6002/hw/gpio_reg.h"
|
| -#include "AR6002/hw/rtc_reg.h"
|
| -#include "AR6002/hw/vmc_reg.h"
|
| -#include "AR6002/hw/mbox_reg.h"
|
| +#include "AR6002/hw2.0/hw/mbox_host_reg.h"
|
| +#include "AR6002/hw2.0/hw/apb_map.h"
|
| +#include "AR6002/hw2.0/hw/si_reg.h"
|
| +#include "AR6002/hw2.0/hw/gpio_reg.h"
|
| +#include "AR6002/hw2.0/hw/rtc_reg.h"
|
| +#include "AR6002/hw2.0/hw/vmc_reg.h"
|
| +#include "AR6002/hw2.0/hw/mbox_reg.h"
|
|
|
| -#include "targaddrs.h"
|
| #include "a_osapi.h"
|
| +#include "targaddrs.h"
|
| #include "hif.h"
|
| #include "htc_api.h"
|
| #include "wmi.h"
|
| @@ -45,7 +49,7 @@ static ATH_DEBUG_MODULE_DBG_INFO *g_pModuleInfoHead = NULL;
|
| static A_MUTEX_T g_ModuleListLock;
|
| static A_BOOL g_ModuleDebugInit = FALSE;
|
|
|
| -#ifdef DEBUG
|
| +#ifdef ATH_DEBUG_MODULE
|
|
|
| ATH_DEBUG_INSTANTIATE_MODULE_VAR(misc,
|
| "misc",
|
| @@ -57,9 +61,8 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(misc,
|
| #endif
|
|
|
| #define HOST_INTEREST_ITEM_ADDRESS(target, item) \
|
| - (((target) == TARGET_TYPE_AR6001) ? AR6001_HOST_INTEREST_ITEM_ADDRESS(item) : \
|
| - (((target) == TARGET_TYPE_AR6002) ? AR6002_HOST_INTEREST_ITEM_ADDRESS(item) : \
|
| - (((target) == TARGET_TYPE_AR6003) ? AR6003_HOST_INTEREST_ITEM_ADDRESS(item) : 0)))
|
| + ((((target) == TARGET_TYPE_AR6002) ? AR6002_HOST_INTEREST_ITEM_ADDRESS(item) : \
|
| + (((target) == TARGET_TYPE_AR6003) ? AR6003_HOST_INTEREST_ITEM_ADDRESS(item) : 0)))
|
|
|
|
|
| #define AR6001_LOCAL_COUNT_ADDRESS 0x0c014080
|
| @@ -364,9 +367,7 @@ _delay_until_target_alive(HIF_DEVICE *hifDevice, A_INT32 wait_msecs, A_UINT32 Ta
|
| actual_wait = 0;
|
|
|
| /* Hardcode the address of LOCAL_COUNT_ADDRESS based on the target type */
|
| - if (TargetType == TARGET_TYPE_AR6001) {
|
| - address = AR6001_LOCAL_COUNT_ADDRESS;
|
| - } else if (TargetType == TARGET_TYPE_AR6002) {
|
| + if (TargetType == TARGET_TYPE_AR6002) {
|
| address = AR6002_LOCAL_COUNT_ADDRESS;
|
| } else if (TargetType == TARGET_TYPE_AR6003) {
|
| address = AR6003_LOCAL_COUNT_ADDRESS;
|
| @@ -416,9 +417,7 @@ A_STATUS ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, A_BOOL
|
| }
|
|
|
| /* Hardcode the address of RESET_CONTROL_ADDRESS based on the target type */
|
| - if (TargetType == TARGET_TYPE_AR6001) {
|
| - address = AR6001_RESET_CONTROL_ADDRESS;
|
| - } else if (TargetType == TARGET_TYPE_AR6002) {
|
| + if (TargetType == TARGET_TYPE_AR6002) {
|
| address = AR6002_RESET_CONTROL_ADDRESS;
|
| } else if (TargetType == TARGET_TYPE_AR6003) {
|
| address = AR6003_RESET_CONTROL_ADDRESS;
|
| @@ -448,9 +447,7 @@ A_STATUS ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, A_BOOL
|
|
|
| // address = RESET_CAUSE_ADDRESS;
|
| /* Hardcode the address of RESET_CAUSE_ADDRESS based on the target type */
|
| - if (TargetType == TARGET_TYPE_AR6001) {
|
| - address = 0x0C0000CC;
|
| - } else if (TargetType == TARGET_TYPE_AR6002) {
|
| + if (TargetType == TARGET_TYPE_AR6002) {
|
| address = 0x000040C0;
|
| } else if (TargetType == TARGET_TYPE_AR6003) {
|
| address = 0x000040C0;
|
| @@ -571,12 +568,7 @@ void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, A_UINT32 TargetType)
|
| address = HOST_INTEREST_ITEM_ADDRESS(TargetType, hi_failure_state);
|
| address = TARG_VTOP(TargetType, address);
|
|
|
| - if (TargetType == TARGET_TYPE_AR6001) {
|
| - /* for AR6001, this is a fixed location because the ptr is actually stuck in cache,
|
| - * this may be fixed in later firmware versions */
|
| - address = 0x18a0;
|
| - regDumpCount = REG_DUMP_COUNT_AR6001;
|
| - } else if (TargetType == TARGET_TYPE_AR6002) {
|
| + if (TargetType == TARGET_TYPE_AR6002) {
|
| regDumpCount = REG_DUMP_COUNT_AR6002;
|
| } else if (TargetType == TARGET_TYPE_AR6003) {
|
| regDumpCount = REG_DUMP_COUNT_AR6003;
|
|
|