Index: chromeos/drivers/ath6kl/include/hif.h |
diff --git a/chromeos/drivers/ath6kl/include/hif.h b/chromeos/drivers/ath6kl/include/hif.h |
index bc6e6a5b3448ffad69cdb17865886ce5cbdf1a5a..2a082678512c550da18fc52e91a2765f1687a2b8 100644 |
--- a/chromeos/drivers/ath6kl/include/hif.h |
+++ b/chromeos/drivers/ath6kl/include/hif.h |
@@ -1,15 +1,19 @@ |
//------------------------------------------------------------------------------ |
// <copyright file="hif.h" 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. |
// |
// |
//------------------------------------------------------------------------------ |
@@ -226,6 +230,11 @@ typedef struct { |
#define HIF_MBOX_FLAG_NO_BUNDLING (1 << 0) /* do not allow bundling over the mailbox */ |
+typedef enum _MBOX_BUF_IF_TYPE { |
+ MBOX_BUS_IF_SDIO = 0, |
+ MBOX_BUS_IF_SPI = 1, |
+} MBOX_BUF_IF_TYPE; |
+ |
typedef struct { |
A_UINT32 MboxAddresses[4]; /* must be first element for legacy HIFs that return the address in |
and ARRAY of 32-bit words */ |
@@ -237,6 +246,7 @@ typedef struct { |
A_UINT32 GMboxAddress; |
A_UINT32 GMboxSize; |
A_UINT32 Flags; /* flags to describe mbox behavior or usage */ |
+ MBOX_BUF_IF_TYPE MboxBusIFType; /* mailbox bus interface type */ |
} HIF_DEVICE_MBOX_INFO; |
typedef enum { |
@@ -326,6 +336,7 @@ typedef struct osdrv_callbacks { |
A_STATUS (* deviceSuspendHandler)(void *context); |
A_STATUS (* deviceResumeHandler)(void *context); |
A_STATUS (* deviceWakeupHandler)(void *context); |
+ A_STATUS (* devicePowerChangeHandler)(void *context, HIF_DEVICE_POWER_CHANGE_TYPE config); |
} OSDRV_CALLBACKS; |
#define HIF_OTHER_EVENTS (1 << 0) /* other interrupts (non-Recv) are pending, host |
@@ -336,6 +347,10 @@ typedef struct _HIF_PENDING_EVENTS_INFO { |
A_UINT32 Events; |
A_UINT32 LookAhead; |
A_UINT32 AvailableRecvBytes; |
+#ifdef THREAD_X |
+ A_UINT32 Polling; |
+ A_UINT32 INT_CAUSE_REG; |
+#endif |
} HIF_PENDING_EVENTS_INFO; |
/* function to get pending events , some HIF modules use special mechanisms |
@@ -409,11 +424,33 @@ void HIFAckInterrupt(HIF_DEVICE *device); |
void HIFMaskInterrupt(HIF_DEVICE *device); |
void HIFUnMaskInterrupt(HIF_DEVICE *device); |
+ |
+#ifdef THREAD_X |
+/* |
+ * This set of functions are to be used by the bus driver to notify |
+ * the HIF module about various events. |
+ * These are not implemented if the bus driver provides an alternative |
+ * way for this notification though callbacks for instance. |
+ */ |
+int HIFInsertEventNotify(void); |
+ |
+int HIFRemoveEventNotify(void); |
+ |
+int HIFIRQEventNotify(void); |
+ |
+int HIFRWCompleteEventNotify(void); |
+#endif |
A_STATUS |
HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode, |
void *config, A_UINT32 configLen); |
+/* |
+ * This API wait for the remaining MBOX messages to be drained |
+ * This should be moved to HTC AR6K layer |
+ */ |
+A_STATUS hifWaitForPendingRecv(HIF_DEVICE *device); |
+ |
#ifdef __cplusplus |
} |
#endif |