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

Side by Side Diff: chromeos/drivers/ath6kl/hif/common/hif_sdio_common.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
« no previous file with comments | « chromeos/drivers/ath6kl/bmi/src/makefile ('k') | chromeos/drivers/ath6kl/hif/sdio/Makefile » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 //------------------------------------------------------------------------------
2 // <copyright file="hif_sdio_common.h" company="Atheros">
3 // Copyright (c) 2009 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 // common header file for HIF modules designed for SDIO
18 //
19 // Author(s): ="Atheros"
20 //==============================================================================
21
22 #ifndef HIF_SDIO_COMMON_H_
23 #define HIF_SDIO_COMMON_H_
24
25 /* SDIO manufacturer ID and Codes */
26 #define MANUFACTURER_ID_AR6001_BASE 0x100
27 #define MANUFACTURER_ID_AR6002_BASE 0x200
28 #define MANUFACTURER_ID_AR6003_BASE 0x300
29 #define MANUFACTURER_ID_AR6K_BASE_MASK 0xFF00
30 #define FUNCTION_CLASS 0x0
31 #define MANUFACTURER_CODE 0x271 /* Atheros */
32
33 /* Mailbox address in SDIO address space */
34 #define HIF_MBOX_BASE_ADDR 0x800
35 #define HIF_MBOX_WIDTH 0x800
36 #define HIF_MBOX_START_ADDR(mbox) \
37 ( HIF_MBOX_BASE_ADDR + mbox * HIF_MBOX_WIDTH)
38
39 #define HIF_MBOX_END_ADDR(mbox) \
40 (HIF_MBOX_START_ADDR(mbox) + HIF_MBOX_WIDTH - 1)
41
42 /* extended MBOX address for larger MBOX writes to MBOX 0*/
43 #define HIF_MBOX0_EXTENDED_BASE_ADDR 0x2800
44 #define HIF_MBOX0_EXTENDED_WIDTH_AR6002 (6*1024)
45 #define HIF_MBOX0_EXTENDED_WIDTH_AR6003 (18*1024)
46
47 /* version 1 of the chip has only a 12K extended mbox range */
48 #define HIF_MBOX0_EXTENDED_BASE_ADDR_AR6003_V1 0x4000
49 #define HIF_MBOX0_EXTENDED_WIDTH_AR6003_V1 (12*1024)
50
51 /* GMBOX addresses */
52 #define HIF_GMBOX_BASE_ADDR 0x7000
53 #define HIF_GMBOX_WIDTH 0x4000
54
55 /* for SDIO we recommend a 128-byte block size */
56 #define HIF_DEFAULT_IO_BLOCK_SIZE 128
57
58 /* set extended MBOX window information for SDIO interconnects */
59 static INLINE void SetExtendedMboxWindowInfo(A_UINT16 Manfid, HIF_DEVICE_MBOX_IN FO *pInfo)
60 {
61 switch (Manfid & MANUFACTURER_ID_AR6K_BASE_MASK) {
62 case MANUFACTURER_ID_AR6001_BASE :
63 /* no extended MBOX */
64 break;
65 case MANUFACTURER_ID_AR6002_BASE :
66 /* MBOX 0 has an extended range */
67 pInfo->MboxProp[0].ExtendedAddress = HIF_MBOX0_EXTENDED_BASE_ADDR;
68 pInfo->MboxProp[0].ExtendedSize = HIF_MBOX0_EXTENDED_WIDTH_AR6002;
69 break;
70 case MANUFACTURER_ID_AR6003_BASE :
71 /* MBOX 0 has an extended range */
72 pInfo->MboxProp[0].ExtendedAddress = HIF_MBOX0_EXTENDED_BASE_ADDR_AR 6003_V1;
73 pInfo->MboxProp[0].ExtendedSize = HIF_MBOX0_EXTENDED_WIDTH_AR6003_V1 ;
74 pInfo->GMboxAddress = HIF_GMBOX_BASE_ADDR;
75 pInfo->GMboxSize = HIF_GMBOX_WIDTH;
76 break;
77 default:
78 A_ASSERT(FALSE);
79 break;
80 }
81 }
82
83 /* special CCCR (func 0) registers */
84
85 #define CCCR_SDIO_IRQ_MODE_REG 0xF0 /* interrupt mode register */
86 #define SDIO_IRQ_MODE_ASYNC_4BIT_IRQ (1 << 0) /* mode to enable special 4-b it interrupt assertion without clock*/
87
88 #endif /*HIF_SDIO_COMMON_H_*/
OLDNEW
« no previous file with comments | « chromeos/drivers/ath6kl/bmi/src/makefile ('k') | chromeos/drivers/ath6kl/hif/sdio/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698