debugfs.c (58527421489dcc1110f6bcfd3b50d479199af4e0) | debugfs.c (74997a53d257e327699e359b78b3ecfd33f80cab) |
---|---|
1/* 2 * Copyright (c) 2012-2016 Qualcomm Atheros, Inc. 3 * 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. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 23 unchanged lines hidden (view full) --- 32static u32 dbg_vring_index; /* 24+ for Rx, 0..23 for Tx */ 33u32 vring_idle_trsh = 16; /* HW fetches up to 16 descriptors at once */ 34 35enum dbg_off_type { 36 doff_u32 = 0, 37 doff_x32 = 1, 38 doff_ulong = 2, 39 doff_io32 = 3, | 1/* 2 * Copyright (c) 2012-2016 Qualcomm Atheros, Inc. 3 * 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. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 23 unchanged lines hidden (view full) --- 32static u32 dbg_vring_index; /* 24+ for Rx, 0..23 for Tx */ 33u32 vring_idle_trsh = 16; /* HW fetches up to 16 descriptors at once */ 34 35enum dbg_off_type { 36 doff_u32 = 0, 37 doff_x32 = 1, 38 doff_ulong = 2, 39 doff_io32 = 3, |
40 doff_u8 = 4 |
|
40}; 41 42/* offset to "wil" */ 43struct dbg_off { 44 const char *name; 45 umode_t mode; 46 ulong off; 47 enum dbg_off_type type; --- 293 unchanged lines hidden (view full) --- 341 f = wil_debugfs_create_ulong(tbl[i].name, tbl[i].mode, 342 dbg, base + tbl[i].off); 343 break; 344 case doff_io32: 345 f = wil_debugfs_create_iomem_x32(tbl[i].name, 346 tbl[i].mode, dbg, 347 base + tbl[i].off); 348 break; | 41}; 42 43/* offset to "wil" */ 44struct dbg_off { 45 const char *name; 46 umode_t mode; 47 ulong off; 48 enum dbg_off_type type; --- 293 unchanged lines hidden (view full) --- 342 f = wil_debugfs_create_ulong(tbl[i].name, tbl[i].mode, 343 dbg, base + tbl[i].off); 344 break; 345 case doff_io32: 346 f = wil_debugfs_create_iomem_x32(tbl[i].name, 347 tbl[i].mode, dbg, 348 base + tbl[i].off); 349 break; |
350 case doff_u8: 351 f = debugfs_create_u8(tbl[i].name, tbl[i].mode, dbg, 352 base + tbl[i].off); 353 break; |
|
349 default: 350 f = ERR_PTR(-EINVAL); 351 } 352 if (IS_ERR_OR_NULL(f)) 353 wil_err(wil, "Create file \"%s\": err %ld\n", 354 tbl[i].name, PTR_ERR(f)); 355 } 356} --- 1160 unchanged lines hidden (view full) --- 1517/* fields in struct wil6210_priv */ 1518static const struct dbg_off dbg_wil_off[] = { 1519 WIL_FIELD(privacy, S_IRUGO, doff_u32), 1520 WIL_FIELD(status[0], S_IRUGO | S_IWUSR, doff_ulong), 1521 WIL_FIELD(fw_version, S_IRUGO, doff_u32), 1522 WIL_FIELD(hw_version, S_IRUGO, doff_x32), 1523 WIL_FIELD(recovery_count, S_IRUGO, doff_u32), 1524 WIL_FIELD(ap_isolate, S_IRUGO, doff_u32), | 354 default: 355 f = ERR_PTR(-EINVAL); 356 } 357 if (IS_ERR_OR_NULL(f)) 358 wil_err(wil, "Create file \"%s\": err %ld\n", 359 tbl[i].name, PTR_ERR(f)); 360 } 361} --- 1160 unchanged lines hidden (view full) --- 1522/* fields in struct wil6210_priv */ 1523static const struct dbg_off dbg_wil_off[] = { 1524 WIL_FIELD(privacy, S_IRUGO, doff_u32), 1525 WIL_FIELD(status[0], S_IRUGO | S_IWUSR, doff_ulong), 1526 WIL_FIELD(fw_version, S_IRUGO, doff_u32), 1527 WIL_FIELD(hw_version, S_IRUGO, doff_x32), 1528 WIL_FIELD(recovery_count, S_IRUGO, doff_u32), 1529 WIL_FIELD(ap_isolate, S_IRUGO, doff_u32), |
1530 WIL_FIELD(discovery_mode, S_IRUGO | S_IWUSR, doff_u8), |
|
1525 {}, 1526}; 1527 1528static const struct dbg_off dbg_wil_regs[] = { 1529 {"RGF_MAC_MTRL_COUNTER_0", S_IRUGO, HOSTADDR(RGF_MAC_MTRL_COUNTER_0), 1530 doff_io32}, 1531 {"RGF_USER_USAGE_1", S_IRUGO, HOSTADDR(RGF_USER_USAGE_1), doff_io32}, 1532 {}, --- 47 unchanged lines hidden --- | 1531 {}, 1532}; 1533 1534static const struct dbg_off dbg_wil_regs[] = { 1535 {"RGF_MAC_MTRL_COUNTER_0", S_IRUGO, HOSTADDR(RGF_MAC_MTRL_COUNTER_0), 1536 doff_io32}, 1537 {"RGF_USER_USAGE_1", S_IRUGO, HOSTADDR(RGF_USER_USAGE_1), doff_io32}, 1538 {}, --- 47 unchanged lines hidden --- |