Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 1 | /* |
Uwe Bugla | 1589a99 | 2009-03-29 07:46:58 -0300 | [diff] [blame] | 2 | * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III |
| 3 | * flexcop-sram.c - functions for controlling the SRAM |
| 4 | * see flexcop.c for copyright information |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 5 | */ |
| 6 | #include "flexcop.h" |
| 7 | |
Uwe Bugla | 1589a99 | 2009-03-29 07:46:58 -0300 | [diff] [blame] | 8 | static void flexcop_sram_set_chip(struct flexcop_device *fc, |
| 9 | flexcop_sram_type_t type) |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 10 | { |
Uwe Bugla | 1589a99 | 2009-03-29 07:46:58 -0300 | [diff] [blame] | 11 | flexcop_set_ibi_value(wan_ctrl_reg_71c, sram_chip, type); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 12 | } |
| 13 | |
| 14 | int flexcop_sram_init(struct flexcop_device *fc) |
| 15 | { |
| 16 | switch (fc->rev) { |
Uwe Bugla | 1589a99 | 2009-03-29 07:46:58 -0300 | [diff] [blame] | 17 | case FLEXCOP_II: |
| 18 | case FLEXCOP_IIB: |
| 19 | flexcop_sram_set_chip(fc, FC_SRAM_1_32KB); |
| 20 | break; |
| 21 | case FLEXCOP_III: |
| 22 | flexcop_sram_set_chip(fc, FC_SRAM_1_48KB); |
| 23 | break; |
| 24 | default: |
| 25 | return -EINVAL; |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 26 | } |
| 27 | return 0; |
| 28 | } |
| 29 | |
Uwe Bugla | 1589a99 | 2009-03-29 07:46:58 -0300 | [diff] [blame] | 30 | int flexcop_sram_set_dest(struct flexcop_device *fc, flexcop_sram_dest_t dest, |
| 31 | flexcop_sram_dest_target_t target) |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 32 | { |
| 33 | flexcop_ibi_value v; |
Uwe Bugla | 1589a99 | 2009-03-29 07:46:58 -0300 | [diff] [blame] | 34 | v = fc->read_ibi_reg(fc, sram_dest_reg_714); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 35 | |
| 36 | if (fc->rev != FLEXCOP_III && target == FC_SRAM_DEST_TARGET_FC3_CA) { |
| 37 | err("SRAM destination target to available on FlexCopII(b)\n"); |
| 38 | return -EINVAL; |
| 39 | } |
Uwe Bugla | 1589a99 | 2009-03-29 07:46:58 -0300 | [diff] [blame] | 40 | deb_sram("sram dest: %x target: %x\n", dest, target); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 41 | |
| 42 | if (dest & FC_SRAM_DEST_NET) |
| 43 | v.sram_dest_reg_714.NET_Dest = target; |
| 44 | if (dest & FC_SRAM_DEST_CAI) |
| 45 | v.sram_dest_reg_714.CAI_Dest = target; |
| 46 | if (dest & FC_SRAM_DEST_CAO) |
| 47 | v.sram_dest_reg_714.CAO_Dest = target; |
| 48 | if (dest & FC_SRAM_DEST_MEDIA) |
| 49 | v.sram_dest_reg_714.MEDIA_Dest = target; |
| 50 | |
| 51 | fc->write_ibi_reg(fc,sram_dest_reg_714,v); |
| 52 | udelay(1000); /* TODO delay really necessary */ |
| 53 | |
| 54 | return 0; |
| 55 | } |
| 56 | EXPORT_SYMBOL(flexcop_sram_set_dest); |
| 57 | |
| 58 | void flexcop_wan_set_speed(struct flexcop_device *fc, flexcop_wan_speed_t s) |
| 59 | { |
| 60 | flexcop_set_ibi_value(wan_ctrl_reg_71c,wan_speed_sig,s); |
| 61 | } |
| 62 | EXPORT_SYMBOL(flexcop_wan_set_speed); |
| 63 | |
| 64 | void flexcop_sram_ctrl(struct flexcop_device *fc, int usb_wan, int sramdma, int maximumfill) |
| 65 | { |
| 66 | flexcop_ibi_value v = fc->read_ibi_reg(fc,sram_dest_reg_714); |
| 67 | v.sram_dest_reg_714.ctrl_usb_wan = usb_wan; |
| 68 | v.sram_dest_reg_714.ctrl_sramdma = sramdma; |
| 69 | v.sram_dest_reg_714.ctrl_maximumfill = maximumfill; |
| 70 | fc->write_ibi_reg(fc,sram_dest_reg_714,v); |
| 71 | } |
| 72 | EXPORT_SYMBOL(flexcop_sram_ctrl); |
| 73 | |
| 74 | #if 0 |
| 75 | static void flexcop_sram_write(struct adapter *adapter, u32 bank, u32 addr, u8 *buf, u32 len) |
| 76 | { |
| 77 | int i, retries; |
| 78 | u32 command; |
| 79 | |
| 80 | for (i = 0; i < len; i++) { |
| 81 | command = bank | addr | 0x04000000 | (*buf << 0x10); |
| 82 | |
| 83 | retries = 2; |
| 84 | |
| 85 | while (((read_reg_dw(adapter, 0x700) & 0x80000000) != 0) && (retries > 0)) { |
| 86 | mdelay(1); |
| 87 | retries--; |
| 88 | }; |
| 89 | |
| 90 | if (retries == 0) |
Harvey Harrison | 7bca449 | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 91 | printk("%s: SRAM timeout\n", __func__); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 92 | |
| 93 | write_reg_dw(adapter, 0x700, command); |
| 94 | |
| 95 | buf++; |
| 96 | addr++; |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | static void flex_sram_read(struct adapter *adapter, u32 bank, u32 addr, u8 *buf, u32 len) |
| 101 | { |
| 102 | int i, retries; |
| 103 | u32 command, value; |
| 104 | |
| 105 | for (i = 0; i < len; i++) { |
| 106 | command = bank | addr | 0x04008000; |
| 107 | |
| 108 | retries = 10000; |
| 109 | |
| 110 | while (((read_reg_dw(adapter, 0x700) & 0x80000000) != 0) && (retries > 0)) { |
| 111 | mdelay(1); |
| 112 | retries--; |
| 113 | }; |
| 114 | |
| 115 | if (retries == 0) |
Harvey Harrison | 7bca449 | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 116 | printk("%s: SRAM timeout\n", __func__); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 117 | |
| 118 | write_reg_dw(adapter, 0x700, command); |
| 119 | |
| 120 | retries = 10000; |
| 121 | |
| 122 | while (((read_reg_dw(adapter, 0x700) & 0x80000000) != 0) && (retries > 0)) { |
| 123 | mdelay(1); |
| 124 | retries--; |
| 125 | }; |
| 126 | |
| 127 | if (retries == 0) |
Harvey Harrison | 7bca449 | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 128 | printk("%s: SRAM timeout\n", __func__); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 129 | |
| 130 | value = read_reg_dw(adapter, 0x700) >> 0x10; |
| 131 | |
| 132 | *buf = (value & 0xff); |
| 133 | |
| 134 | addr++; |
| 135 | buf++; |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | static void sram_write_chunk(struct adapter *adapter, u32 addr, u8 *buf, u16 len) |
| 140 | { |
| 141 | u32 bank; |
| 142 | |
| 143 | bank = 0; |
| 144 | |
| 145 | if (adapter->dw_sram_type == 0x20000) { |
| 146 | bank = (addr & 0x18000) << 0x0d; |
| 147 | } |
| 148 | |
| 149 | if (adapter->dw_sram_type == 0x00000) { |
| 150 | if ((addr >> 0x0f) == 0) |
| 151 | bank = 0x20000000; |
| 152 | else |
| 153 | bank = 0x10000000; |
| 154 | } |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 155 | flex_sram_write(adapter, bank, addr & 0x7fff, buf, len); |
| 156 | } |
| 157 | |
| 158 | static void sram_read_chunk(struct adapter *adapter, u32 addr, u8 *buf, u16 len) |
| 159 | { |
| 160 | u32 bank; |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 161 | bank = 0; |
| 162 | |
| 163 | if (adapter->dw_sram_type == 0x20000) { |
| 164 | bank = (addr & 0x18000) << 0x0d; |
| 165 | } |
| 166 | |
| 167 | if (adapter->dw_sram_type == 0x00000) { |
| 168 | if ((addr >> 0x0f) == 0) |
| 169 | bank = 0x20000000; |
| 170 | else |
| 171 | bank = 0x10000000; |
| 172 | } |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 173 | flex_sram_read(adapter, bank, addr & 0x7fff, buf, len); |
| 174 | } |
| 175 | |
| 176 | static void sram_read(struct adapter *adapter, u32 addr, u8 *buf, u32 len) |
| 177 | { |
| 178 | u32 length; |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 179 | while (len != 0) { |
| 180 | length = len; |
Uwe Bugla | 1589a99 | 2009-03-29 07:46:58 -0300 | [diff] [blame] | 181 | /* check if the address range belongs to the same |
| 182 | * 32K memory chip. If not, the data is read |
| 183 | * from one chip at a time */ |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 184 | if ((addr >> 0x0f) != ((addr + len - 1) >> 0x0f)) { |
| 185 | length = (((addr >> 0x0f) + 1) << 0x0f) - addr; |
| 186 | } |
| 187 | |
| 188 | sram_read_chunk(adapter, addr, buf, length); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 189 | addr = addr + length; |
| 190 | buf = buf + length; |
| 191 | len = len - length; |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | static void sram_write(struct adapter *adapter, u32 addr, u8 *buf, u32 len) |
| 196 | { |
| 197 | u32 length; |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 198 | while (len != 0) { |
| 199 | length = len; |
| 200 | |
Uwe Bugla | 1589a99 | 2009-03-29 07:46:58 -0300 | [diff] [blame] | 201 | /* check if the address range belongs to the same |
| 202 | * 32K memory chip. If not, the data is |
| 203 | * written to one chip at a time */ |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 204 | if ((addr >> 0x0f) != ((addr + len - 1) >> 0x0f)) { |
| 205 | length = (((addr >> 0x0f) + 1) << 0x0f) - addr; |
| 206 | } |
| 207 | |
| 208 | sram_write_chunk(adapter, addr, buf, length); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 209 | addr = addr + length; |
| 210 | buf = buf + length; |
| 211 | len = len - length; |
| 212 | } |
| 213 | } |
| 214 | |
| 215 | static void sram_set_size(struct adapter *adapter, u32 mask) |
| 216 | { |
Uwe Bugla | 1589a99 | 2009-03-29 07:46:58 -0300 | [diff] [blame] | 217 | write_reg_dw(adapter, 0x71c, |
| 218 | (mask | (~0x30000 & read_reg_dw(adapter, 0x71c)))); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 219 | } |
| 220 | |
| 221 | static void sram_init(struct adapter *adapter) |
| 222 | { |
| 223 | u32 tmp; |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 224 | tmp = read_reg_dw(adapter, 0x71c); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 225 | write_reg_dw(adapter, 0x71c, 1); |
| 226 | |
| 227 | if (read_reg_dw(adapter, 0x71c) != 0) { |
| 228 | write_reg_dw(adapter, 0x71c, tmp); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 229 | adapter->dw_sram_type = tmp & 0x30000; |
Harvey Harrison | 7bca449 | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 230 | ddprintk("%s: dw_sram_type = %x\n", __func__, adapter->dw_sram_type); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 231 | } else { |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 232 | adapter->dw_sram_type = 0x10000; |
Harvey Harrison | 7bca449 | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 233 | ddprintk("%s: dw_sram_type = %x\n", __func__, adapter->dw_sram_type); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 234 | } |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 235 | } |
| 236 | |
| 237 | static int sram_test_location(struct adapter *adapter, u32 mask, u32 addr) |
| 238 | { |
| 239 | u8 tmp1, tmp2; |
Harvey Harrison | 7bca449 | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 240 | dprintk("%s: mask = %x, addr = %x\n", __func__, mask, addr); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 241 | |
| 242 | sram_set_size(adapter, mask); |
| 243 | sram_init(adapter); |
| 244 | |
| 245 | tmp2 = 0xa5; |
| 246 | tmp1 = 0x4f; |
| 247 | |
| 248 | sram_write(adapter, addr, &tmp2, 1); |
| 249 | sram_write(adapter, addr + 4, &tmp1, 1); |
| 250 | |
| 251 | tmp2 = 0; |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 252 | mdelay(20); |
| 253 | |
| 254 | sram_read(adapter, addr, &tmp2, 1); |
| 255 | sram_read(adapter, addr, &tmp2, 1); |
| 256 | |
Harvey Harrison | 7bca449 | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 257 | dprintk("%s: wrote 0xa5, read 0x%2x\n", __func__, tmp2); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 258 | |
| 259 | if (tmp2 != 0xa5) |
| 260 | return 0; |
| 261 | |
| 262 | tmp2 = 0x5a; |
| 263 | tmp1 = 0xf4; |
| 264 | |
| 265 | sram_write(adapter, addr, &tmp2, 1); |
| 266 | sram_write(adapter, addr + 4, &tmp1, 1); |
| 267 | |
| 268 | tmp2 = 0; |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 269 | mdelay(20); |
| 270 | |
| 271 | sram_read(adapter, addr, &tmp2, 1); |
| 272 | sram_read(adapter, addr, &tmp2, 1); |
| 273 | |
Harvey Harrison | 7bca449 | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 274 | dprintk("%s: wrote 0x5a, read 0x%2x\n", __func__, tmp2); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 275 | |
| 276 | if (tmp2 != 0x5a) |
| 277 | return 0; |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 278 | return 1; |
| 279 | } |
| 280 | |
| 281 | static u32 sram_length(struct adapter *adapter) |
| 282 | { |
| 283 | if (adapter->dw_sram_type == 0x10000) |
Uwe Bugla | 1589a99 | 2009-03-29 07:46:58 -0300 | [diff] [blame] | 284 | return 32768; /* 32K */ |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 285 | if (adapter->dw_sram_type == 0x00000) |
Uwe Bugla | 1589a99 | 2009-03-29 07:46:58 -0300 | [diff] [blame] | 286 | return 65536; /* 64K */ |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 287 | if (adapter->dw_sram_type == 0x20000) |
Uwe Bugla | 1589a99 | 2009-03-29 07:46:58 -0300 | [diff] [blame] | 288 | return 131072; /* 128K */ |
| 289 | return 32768; /* 32K */ |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 290 | } |
| 291 | |
| 292 | /* FlexcopII can work with 32K, 64K or 128K of external SRAM memory. |
Uwe Bugla | 1589a99 | 2009-03-29 07:46:58 -0300 | [diff] [blame] | 293 | - for 128K there are 4x32K chips at bank 0,1,2,3. |
| 294 | - for 64K there are 2x32K chips at bank 1,2. |
| 295 | - for 32K there is one 32K chip at bank 0. |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 296 | |
| 297 | FlexCop works only with one bank at a time. The bank is selected |
| 298 | by bits 28-29 of the 0x700 register. |
| 299 | |
| 300 | bank 0 covers addresses 0x00000-0x07fff |
| 301 | bank 1 covers addresses 0x08000-0x0ffff |
| 302 | bank 2 covers addresses 0x10000-0x17fff |
Uwe Bugla | 1589a99 | 2009-03-29 07:46:58 -0300 | [diff] [blame] | 303 | bank 3 covers addresses 0x18000-0x1ffff */ |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 304 | |
| 305 | static int flexcop_sram_detect(struct flexcop_device *fc) |
| 306 | { |
Uwe Bugla | 1589a99 | 2009-03-29 07:46:58 -0300 | [diff] [blame] | 307 | flexcop_ibi_value r208, r71c_0, vr71c_1; |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 308 | r208 = fc->read_ibi_reg(fc, ctrl_208); |
| 309 | fc->write_ibi_reg(fc, ctrl_208, ibi_zero); |
| 310 | |
| 311 | r71c_0 = fc->read_ibi_reg(fc, wan_ctrl_reg_71c); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 312 | write_reg_dw(adapter, 0x71c, 1); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 313 | tmp3 = read_reg_dw(adapter, 0x71c); |
Harvey Harrison | 7bca449 | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 314 | dprintk("%s: tmp3 = %x\n", __func__, tmp3); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 315 | write_reg_dw(adapter, 0x71c, tmp2); |
| 316 | |
| 317 | // check for internal SRAM ??? |
| 318 | tmp3--; |
| 319 | if (tmp3 != 0) { |
| 320 | sram_set_size(adapter, 0x10000); |
| 321 | sram_init(adapter); |
| 322 | write_reg_dw(adapter, 0x208, tmp); |
Harvey Harrison | 7bca449 | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 323 | dprintk("%s: sram size = 32K\n", __func__); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 324 | return 32; |
| 325 | } |
| 326 | |
| 327 | if (sram_test_location(adapter, 0x20000, 0x18000) != 0) { |
| 328 | sram_set_size(adapter, 0x20000); |
| 329 | sram_init(adapter); |
| 330 | write_reg_dw(adapter, 0x208, tmp); |
Harvey Harrison | 7bca449 | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 331 | dprintk("%s: sram size = 128K\n", __func__); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 332 | return 128; |
| 333 | } |
| 334 | |
| 335 | if (sram_test_location(adapter, 0x00000, 0x10000) != 0) { |
| 336 | sram_set_size(adapter, 0x00000); |
| 337 | sram_init(adapter); |
| 338 | write_reg_dw(adapter, 0x208, tmp); |
Harvey Harrison | 7bca449 | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 339 | dprintk("%s: sram size = 64K\n", __func__); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 340 | return 64; |
| 341 | } |
| 342 | |
| 343 | if (sram_test_location(adapter, 0x10000, 0x00000) != 0) { |
| 344 | sram_set_size(adapter, 0x10000); |
| 345 | sram_init(adapter); |
| 346 | write_reg_dw(adapter, 0x208, tmp); |
Harvey Harrison | 7bca449 | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 347 | dprintk("%s: sram size = 32K\n", __func__); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 348 | return 32; |
| 349 | } |
| 350 | |
| 351 | sram_set_size(adapter, 0x10000); |
| 352 | sram_init(adapter); |
| 353 | write_reg_dw(adapter, 0x208, tmp); |
Harvey Harrison | 7bca449 | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 354 | dprintk("%s: SRAM detection failed. Set to 32K \n", __func__); |
Johannes Stezenbach | 2add87a | 2005-05-16 21:54:10 -0700 | [diff] [blame] | 355 | return 0; |
| 356 | } |
| 357 | |
| 358 | static void sll_detect_sram_size(struct adapter *adapter) |
| 359 | { |
| 360 | sram_detect_for_flex2(adapter); |
| 361 | } |
| 362 | |
| 363 | #endif |