| OLD | NEW |
| 1 //------------------------------------------------------------------------------ | 1 //------------------------------------------------------------------------------ |
| 2 // <copyright file="hif_internal.h" company="Atheros"> | 2 // <copyright file="hif_internal.h" company="Atheros"> |
| 3 // Copyright (c) 2004-2007 Atheros Corporation. All rights reserved. | 3 // Copyright (c) 2004-2010 Atheros Corporation. All rights reserved. |
| 4 // | 4 // |
| 5 // This program is free software; you can redistribute it and/or modify | |
| 6 // it under the terms of the GNU General Public License version 2 as | |
| 7 // published by the Free Software Foundation; | |
| 8 // | 5 // |
| 9 // Software distributed under the License is distributed on an "AS | 6 // Permission to use, copy, modify, and/or distribute this software for any |
| 10 // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or | 7 // purpose with or without fee is hereby granted, provided that the above |
| 11 // implied. See the License for the specific language governing | 8 // copyright notice and this permission notice appear in all copies. |
| 12 // rights and limitations under the License. | 9 // |
| 10 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 11 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 12 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 13 // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 14 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 15 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 16 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 13 // | 17 // |
| 14 // | 18 // |
| 15 //------------------------------------------------------------------------------ | 19 //------------------------------------------------------------------------------ |
| 16 //============================================================================== | 20 //============================================================================== |
| 17 // internal header file for hif layer | 21 // internal header file for hif layer |
| 18 // | 22 // |
| 19 // Author(s): ="Atheros" | 23 // Author(s): ="Atheros" |
| 20 //============================================================================== | 24 //============================================================================== |
| 21 #ifndef _HIF_INTERNAL_H_ | 25 #ifndef _HIF_INTERNAL_H_ |
| 22 #define _HIF_INTERNAL_H_ | 26 #define _HIF_INTERNAL_H_ |
| 23 | 27 |
| 24 #include "a_config.h" | 28 #include "a_config.h" |
| 25 #include "athdefs.h" | 29 #include "athdefs.h" |
| 26 #include "a_types.h" | 30 #include "a_types.h" |
| 27 #include "a_osapi.h" | 31 #include "a_osapi.h" |
| 28 #include "hif.h" | 32 #include "hif.h" |
| 29 #include "../../../common/hif_sdio_common.h" | 33 #include "../../../common/hif_sdio_common.h" |
| 30 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) | |
| 31 #include <linux/scatterlist.h> | 34 #include <linux/scatterlist.h> |
| 32 #define HIF_LINUX_MMC_SCATTER_SUPPORT | 35 #define HIF_LINUX_MMC_SCATTER_SUPPORT |
| 33 #endif | |
| 34 | 36 |
| 35 #define BUS_REQUEST_MAX_NUM 64 | 37 #define BUS_REQUEST_MAX_NUM 64 |
| 36 | 38 |
| 37 #define SDIO_CLOCK_FREQUENCY_DEFAULT 25000000 | 39 #define SDIO_CLOCK_FREQUENCY_DEFAULT 25000000 |
| 38 #define SDWLAN_ENABLE_DISABLE_TIMEOUT 20 | 40 #define SDWLAN_ENABLE_DISABLE_TIMEOUT 20 |
| 39 #define FLAGS_CARD_ENAB 0x02 | 41 #define FLAGS_CARD_ENAB 0x02 |
| 40 #define FLAGS_CARD_IRQ_UNMSK 0x04 | 42 #define FLAGS_CARD_IRQ_UNMSK 0x04 |
| 41 | 43 |
| 42 #define HIF_MBOX_BLOCK_SIZE HIF_DEFAULT_IO_BLOCK_SIZE | 44 #define HIF_MBOX_BLOCK_SIZE HIF_DEFAULT_IO_BLOCK_SIZE |
| 43 #define HIF_MBOX0_BLOCK_SIZE 1 | 45 #define HIF_MBOX0_BLOCK_SIZE 1 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 71 BUS_REQUEST *taskreq; /* async tasklet data */ | 73 BUS_REQUEST *taskreq; /* async tasklet data */ |
| 72 spinlock_t lock; | 74 spinlock_t lock; |
| 73 BUS_REQUEST *s_busRequestFreeQueue; /* free list */ | 75 BUS_REQUEST *s_busRequestFreeQueue; /* free list */ |
| 74 BUS_REQUEST busRequest[BUS_REQUEST_MAX_NUM]; /* available bus requests */ | 76 BUS_REQUEST busRequest[BUS_REQUEST_MAX_NUM]; /* available bus requests */ |
| 75 void *claimedContext; | 77 void *claimedContext; |
| 76 HTC_CALLBACKS htcCallbacks; | 78 HTC_CALLBACKS htcCallbacks; |
| 77 A_UINT8 *dma_buffer; | 79 A_UINT8 *dma_buffer; |
| 78 DL_LIST ScatterReqHead; /* scatter request list head */ | 80 DL_LIST ScatterReqHead; /* scatter request list head */ |
| 79 A_BOOL scatter_enabled; /* scatter enabled flag */ | 81 A_BOOL scatter_enabled; /* scatter enabled flag */ |
| 80 A_BOOL is_suspend; | 82 A_BOOL is_suspend; |
| 83 A_BOOL is_disabled; |
| 81 atomic_t irqHandling; | 84 atomic_t irqHandling; |
| 85 HIF_DEVICE_POWER_CHANGE_TYPE powerConfig; |
| 86 const struct sdio_device_id *id; |
| 82 }; | 87 }; |
| 83 | 88 |
| 84 #define HIF_DMA_BUFFER_SIZE (32 * 1024) | 89 #define HIF_DMA_BUFFER_SIZE (32 * 1024) |
| 85 #define CMD53_FIXED_ADDRESS 1 | 90 #define CMD53_FIXED_ADDRESS 1 |
| 86 #define CMD53_INCR_ADDRESS 2 | 91 #define CMD53_INCR_ADDRESS 2 |
| 87 | 92 |
| 88 BUS_REQUEST *hifAllocateBusRequest(HIF_DEVICE *device); | 93 BUS_REQUEST *hifAllocateBusRequest(HIF_DEVICE *device); |
| 89 void hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest); | 94 void hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest); |
| 90 void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest); | 95 void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest); |
| 91 | 96 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 120 { | 125 { |
| 121 return A_ENOTSUP; | 126 return A_ENOTSUP; |
| 122 } | 127 } |
| 123 | 128 |
| 124 #define CleanupHIFScatterResources(d) { } | 129 #define CleanupHIFScatterResources(d) { } |
| 125 | 130 |
| 126 #endif // HIF_LINUX_MMC_SCATTER_SUPPORT | 131 #endif // HIF_LINUX_MMC_SCATTER_SUPPORT |
| 127 | 132 |
| 128 #endif // _HIF_INTERNAL_H_ | 133 #endif // _HIF_INTERNAL_H_ |
| 129 | 134 |
| OLD | NEW |