Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(604)

Side by Side Diff: chromeos/drivers/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h

Issue 646055: Atheros AR600x driver + build glue (Closed)
Patch Set: Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 //------------------------------------------------------------------------------
2 // <copyright file="hif_internal.h" company="Atheros">
3 // Copyright (c) 2004-2007 Atheros Corporation. All rights reserved.
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 //
9 // Software distributed under the License is distributed on an "AS
10 // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
11 // implied. See the License for the specific language governing
12 // rights and limitations under the License.
13 //
14 //
15 //------------------------------------------------------------------------------
16 //==============================================================================
17 // internal header file for hif layer
18 //
19 // Author(s): ="Atheros"
20 //==============================================================================
21 #include "a_config.h"
22 #include "athdefs.h"
23 #include "a_types.h"
24 #include "a_osapi.h"
25 #include "hif.h"
26 #include "../../../common/hif_sdio_common.h"
27
28 #define BUS_REQUEST_MAX_NUM 64
29
30 #define SDIO_CLOCK_FREQUENCY_DEFAULT 25000000
31 #define SDWLAN_ENABLE_DISABLE_TIMEOUT 20
32 #define FLAGS_CARD_ENAB 0x02
33 #define FLAGS_CARD_IRQ_UNMSK 0x04
34
35 #define HIF_MBOX_BLOCK_SIZE HIF_DEFAULT_IO_BLOCK_SIZE
36 #define HIF_MBOX0_BLOCK_SIZE 1
37 #define HIF_MBOX1_BLOCK_SIZE HIF_MBOX_BLOCK_SIZE
38 #define HIF_MBOX2_BLOCK_SIZE HIF_MBOX_BLOCK_SIZE
39 #define HIF_MBOX3_BLOCK_SIZE HIF_MBOX_BLOCK_SIZE
40
41 typedef struct bus_request {
42 struct bus_request *next; /* link list of available requests */
43 struct bus_request *inusenext; /* link list of in use requests */
44 struct semaphore sem_req;
45 A_UINT32 address; /* request data */
46 A_UCHAR *buffer;
47 A_UINT32 length;
48 A_UINT32 request;
49 void *context;
50 A_STATUS status;
51 } BUS_REQUEST;
52
53 struct hif_device {
54 struct sdio_func *func;
55 spinlock_t asynclock;
56 struct task_struct* async_task; /* task to handle async commands */
57 struct semaphore sem_async; /* wake up for async task */
58 int async_shutdown; /* stop the async task */
59 struct completion async_completion; /* thread completion */
60 BUS_REQUEST *asyncreq; /* request for async tasklet */
61 BUS_REQUEST *taskreq; /* async tasklet data */
62 spinlock_t lock;
63 BUS_REQUEST *s_busRequestFreeQueue; /* free list */
64 BUS_REQUEST busRequest[BUS_REQUEST_MAX_NUM]; /* available bus requests */
65 void *claimedContext;
66 HTC_CALLBACKS htcCallbacks;
67 A_UINT8 *dma_buffer;
68 };
69
70 #define HIF_DMA_BUFFER_SIZE (32 * 1024)
71 #define CMD53_FIXED_ADDRESS 1
72 #define CMD53_INCR_ADDRESS 2
OLDNEW
« no previous file with comments | « chromeos/drivers/ath6kl/hif/sdio/Makefile ('k') | chromeos/drivers/ath6kl/hif/sdio/linux_sdio/nativemmcstack_readme.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698