| Index: chromeos/drivers/ath6kl/include/common/targaddrs.h
|
| diff --git a/chromeos/drivers/ath6kl/include/targaddrs.h b/chromeos/drivers/ath6kl/include/common/targaddrs.h
|
| similarity index 86%
|
| rename from chromeos/drivers/ath6kl/include/targaddrs.h
|
| rename to chromeos/drivers/ath6kl/include/common/targaddrs.h
|
| index f0b3a26c38f337ce9e57963dc48c6de4e15bad8f..e8cf70354d21f9bdca7892d96cc6036a82380d9d 100644
|
| --- a/chromeos/drivers/ath6kl/include/targaddrs.h
|
| +++ b/chromeos/drivers/ath6kl/include/common/targaddrs.h
|
| @@ -1,27 +1,31 @@
|
| //------------------------------------------------------------------------------
|
| -// <copyright file="targaddrs.h" company="Atheros">
|
| -// Copyright (c) 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;
|
| +// Copyright (c) 2010 Atheros Corporation. All rights reserved.
|
| +//
|
| +//
|
| +// 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.
|
| //
|
| -// 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.
|
| //
|
| //
|
| -//------------------------------------------------------------------------------
|
| -//==============================================================================
|
| // Author(s): ="Atheros"
|
| -//==============================================================================
|
| +//------------------------------------------------------------------------------
|
|
|
| #ifndef __TARGADDRS_H__
|
| #define __TARGADDRS_H__
|
| -#if defined(AR6001)
|
| -#include "AR6001/addrs.h"
|
| +
|
| +#ifndef ATH_TARGET
|
| +#include "athstartpack.h"
|
| #endif
|
| +
|
| #if defined(AR6002)
|
| #include "AR6002/addrs.h"
|
| #endif
|
| @@ -53,7 +57,6 @@
|
| * write a single binary that works with all Target Types.
|
| * May be used in assembler code as well as C.
|
| */
|
| -#define AR6001_HOST_INTEREST_ADDRESS 0x80000600
|
| #define AR6002_HOST_INTEREST_ADDRESS 0x00500400
|
| #define AR6003_HOST_INTEREST_ADDRESS 0x00540600
|
|
|
| @@ -75,7 +78,7 @@ struct dbglog_hdr_s;
|
| *
|
| * More items may be added at the end.
|
| */
|
| -struct host_interest_s {
|
| +PREPACK struct host_interest_s {
|
| /*
|
| * Pointer to application-defined area, if any.
|
| * Set by Target application during startup.
|
| @@ -173,7 +176,10 @@ struct host_interest_s {
|
| * 0xa9 - [7:0]: wakeup timeout in ms
|
| * 0xaa, 0xab - [15:0]: idle timeout in ms
|
| */
|
| -};
|
| + /* Pointer to extended board Data */
|
| + A_UINT32 hi_board_ext_data; /* 0xac */
|
| + A_UINT32 hi_board_ext_data_initialized; /* 0xb0 */
|
| +} POSTPACK;
|
|
|
| /* Bits defined in hi_option_flag */
|
| #define HI_OPTION_TIMER_WAR 0x01 /* Enable timer workaround */
|
| @@ -198,16 +204,13 @@ struct host_interest_s {
|
| /*
|
| * Intended for use by Host software, this macro returns the Target RAM
|
| * address of any item in the host_interest structure.
|
| - * Example: target_addr = AR6001_HOST_INTEREST_ITEM_ADDRESS(hi_board_data);
|
| + * Example: target_addr = AR6002_HOST_INTEREST_ITEM_ADDRESS(hi_board_data);
|
| */
|
| -#define AR6001_HOST_INTEREST_ITEM_ADDRESS(item) \
|
| - ((A_UINT32)&((((struct host_interest_s *)(AR6001_HOST_INTEREST_ADDRESS))->item)))
|
| -
|
| #define AR6002_HOST_INTEREST_ITEM_ADDRESS(item) \
|
| - ((A_UINT32)&((((struct host_interest_s *)(AR6002_HOST_INTEREST_ADDRESS))->item)))
|
| + (A_UINT32)((unsigned long)&((((struct host_interest_s *)(AR6002_HOST_INTEREST_ADDRESS))->item)))
|
|
|
| #define AR6003_HOST_INTEREST_ITEM_ADDRESS(item) \
|
| - ((A_UINT32)&((((struct host_interest_s *)(AR6003_HOST_INTEREST_ADDRESS))->item)))
|
| + (A_UINT32)((unsigned long)&((((struct host_interest_s *)(AR6003_HOST_INTEREST_ADDRESS))->item)))
|
|
|
| #define HOST_INTEREST_DBGLOG_IS_ENABLED() \
|
| (!(HOST_INTEREST->hi_option_flag & HI_OPTION_DISABLE_DBGLOG))
|
| @@ -216,12 +219,10 @@ struct host_interest_s {
|
| (HOST_INTEREST->hi_option_flag & HI_OPTION_ENABLE_PROFILE)
|
|
|
| /* Convert a Target virtual address into a Target physical address */
|
| -#define AR6001_VTOP(vaddr) ((vaddr) & 0x0fffffff)
|
| #define AR6002_VTOP(vaddr) ((vaddr) & 0x001fffff)
|
| #define AR6003_VTOP(vaddr) ((vaddr) & 0x001fffff)
|
| #define TARG_VTOP(TargetType, vaddr) \
|
| - (((TargetType) == TARGET_TYPE_AR6001) ? AR6001_VTOP(vaddr) : \
|
| - (((TargetType) == TARGET_TYPE_AR6002) ? AR6002_VTOP(vaddr) : AR6003_VTOP(vaddr)))
|
| + (((TargetType) == TARGET_TYPE_AR6002) ? AR6002_VTOP(vaddr) : AR6003_VTOP(vaddr))
|
|
|
| /* override REV2 ROM's app start address */
|
| #define AR6002_REV2_APP_START_OVERRIDE 0x911A00
|
| @@ -229,6 +230,7 @@ struct host_interest_s {
|
| #define AR6003_REV1_OTP_DATA_ADDRESS 0x542800
|
| #define AR6003_REV2_APP_START_OVERRIDE 0x945000
|
| #define AR6003_REV2_OTP_DATA_ADDRESS 0x543800
|
| +#define AR6003_BOARD_EXT_DATA_ADDRESS 0x57E600
|
|
|
|
|
| /* # of A_UINT32 entries in targregs, used by DIAG_FETCH_TARG_REGS */
|
| @@ -236,4 +238,8 @@ struct host_interest_s {
|
|
|
| #endif /* !__ASSEMBLER__ */
|
|
|
| +#ifndef ATH_TARGET
|
| +#include "athendpack.h"
|
| +#endif
|
| +
|
| #endif /* __TARGADDRS_H__ */
|
|
|