2 * Copyright (c) 2010 Broadcom Corporation
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 #include <ucode_loader.h>
22 D11UCODE_NAMETAG_START
= 0,
32 D11UCODE_OVERSIGHT16_MIMO
,
33 D11UCODE_OVERSIGHT16_MIMOSZ
,
34 D11UCODE_OVERSIGHT24_LCN
,
35 D11UCODE_OVERSIGHT24_LCNSZ
,
36 D11UCODE_OVERSIGHT_BOMMAJOR
,
37 D11UCODE_OVERSIGHT_BOMMINOR
40 struct d11init
*d11lcn0bsinitvals24
;
41 struct d11init
*d11lcn0initvals24
;
42 struct d11init
*d11lcn1bsinitvals24
;
43 struct d11init
*d11lcn1initvals24
;
44 struct d11init
*d11lcn2bsinitvals24
;
45 struct d11init
*d11lcn2initvals24
;
46 struct d11init
*d11n0absinitvals16
;
47 struct d11init
*d11n0bsinitvals16
;
48 struct d11init
*d11n0initvals16
;
50 u32 bcm43xx_16_mimosz
;
54 static u32
*bcm43xx_bommajor
;
55 static u32
*bcm43xx_bomminor
;
57 int brcms_ucode_data_init(struct brcms_info
*wl
)
60 rc
= brcms_check_firmwares(wl
);
63 brcms_ucode_init_buf(wl
, (void **)&d11lcn0bsinitvals24
,
65 rc
= rc
< 0 ? rc
: brcms_ucode_init_buf(wl
, (void **)&d11lcn0initvals24
,
68 brcms_ucode_init_buf(wl
, (void **)&d11lcn1bsinitvals24
,
70 rc
= rc
< 0 ? rc
: brcms_ucode_init_buf(wl
, (void **)&d11lcn1initvals24
,
73 brcms_ucode_init_buf(wl
, (void **)&d11lcn2bsinitvals24
,
75 rc
= rc
< 0 ? rc
: brcms_ucode_init_buf(wl
, (void **)&d11lcn2initvals24
,
78 brcms_ucode_init_buf(wl
, (void **)&d11n0absinitvals16
,
80 rc
= rc
< 0 ? rc
: brcms_ucode_init_buf(wl
, (void **)&d11n0bsinitvals16
,
82 rc
= rc
< 0 ? rc
: brcms_ucode_init_buf(wl
, (void **)&d11n0initvals16
,
84 rc
= rc
< 0 ? rc
: brcms_ucode_init_buf(wl
, (void **)&bcm43xx_16_mimo
,
85 D11UCODE_OVERSIGHT16_MIMO
);
86 rc
= rc
< 0 ? rc
: brcms_ucode_init_uint(wl
, &bcm43xx_16_mimosz
,
87 D11UCODE_OVERSIGHT16_MIMOSZ
);
88 rc
= rc
< 0 ? rc
: brcms_ucode_init_buf(wl
, (void **)&bcm43xx_24_lcn
,
89 D11UCODE_OVERSIGHT24_LCN
);
90 rc
= rc
< 0 ? rc
: brcms_ucode_init_uint(wl
, &bcm43xx_24_lcnsz
,
91 D11UCODE_OVERSIGHT24_LCNSZ
);
92 rc
= rc
< 0 ? rc
: brcms_ucode_init_buf(wl
, (void **)&bcm43xx_bommajor
,
93 D11UCODE_OVERSIGHT_BOMMAJOR
);
94 rc
= rc
< 0 ? rc
: brcms_ucode_init_buf(wl
, (void **)&bcm43xx_bomminor
,
95 D11UCODE_OVERSIGHT_BOMMINOR
);
99 void brcms_ucode_data_free(void)
101 brcms_ucode_free_buf((void *)d11lcn0bsinitvals24
);
102 brcms_ucode_free_buf((void *)d11lcn0initvals24
);
103 brcms_ucode_free_buf((void *)d11lcn1bsinitvals24
);
104 brcms_ucode_free_buf((void *)d11lcn1initvals24
);
105 brcms_ucode_free_buf((void *)d11lcn2bsinitvals24
);
106 brcms_ucode_free_buf((void *)d11lcn2initvals24
);
107 brcms_ucode_free_buf((void *)d11n0absinitvals16
);
108 brcms_ucode_free_buf((void *)d11n0bsinitvals16
);
109 brcms_ucode_free_buf((void *)d11n0initvals16
);
110 brcms_ucode_free_buf((void *)bcm43xx_16_mimo
);
111 brcms_ucode_free_buf((void *)bcm43xx_24_lcn
);
112 brcms_ucode_free_buf((void *)bcm43xx_bommajor
);
113 brcms_ucode_free_buf((void *)bcm43xx_bomminor
);