diff options
Diffstat (limited to 'drivers/usb/host/whci/wusb.c')
-rw-r--r-- | drivers/usb/host/whci/wusb.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/drivers/usb/host/whci/wusb.c b/drivers/usb/host/whci/wusb.c index 540021a0971..f24efdebad1 100644 --- a/drivers/usb/host/whci/wusb.c +++ b/drivers/usb/host/whci/wusb.c | |||
@@ -18,43 +18,16 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/uwb/umc.h> | 20 | #include <linux/uwb/umc.h> |
21 | #define D_LOCAL 1 | ||
22 | #include <linux/uwb/debug.h> | ||
23 | 21 | ||
24 | #include "../../wusbcore/wusbhc.h" | 22 | #include "../../wusbcore/wusbhc.h" |
25 | 23 | ||
26 | #include "whcd.h" | 24 | #include "whcd.h" |
27 | 25 | ||
28 | #if D_LOCAL >= 1 | ||
29 | static void dump_di(struct whc *whc, int idx) | ||
30 | { | ||
31 | struct di_buf_entry *di = &whc->di_buf[idx]; | ||
32 | struct device *dev = &whc->umc->dev; | ||
33 | char buf[128]; | ||
34 | |||
35 | bitmap_scnprintf(buf, sizeof(buf), (unsigned long *)di->availability_info, UWB_NUM_MAS); | ||
36 | |||
37 | d_printf(1, dev, "DI[%d]\n", idx); | ||
38 | d_printf(1, dev, " availability: %s\n", buf); | ||
39 | d_printf(1, dev, " %c%c key idx: %d dev addr: %d\n", | ||
40 | (di->addr_sec_info & WHC_DI_SECURE) ? 'S' : ' ', | ||
41 | (di->addr_sec_info & WHC_DI_DISABLE) ? 'D' : ' ', | ||
42 | (di->addr_sec_info & WHC_DI_KEY_IDX_MASK) >> 8, | ||
43 | (di->addr_sec_info & WHC_DI_DEV_ADDR_MASK)); | ||
44 | } | ||
45 | #else | ||
46 | static inline void dump_di(struct whc *whc, int idx) | ||
47 | { | ||
48 | } | ||
49 | #endif | ||
50 | |||
51 | static int whc_update_di(struct whc *whc, int idx) | 26 | static int whc_update_di(struct whc *whc, int idx) |
52 | { | 27 | { |
53 | int offset = idx / 32; | 28 | int offset = idx / 32; |
54 | u32 bit = 1 << (idx % 32); | 29 | u32 bit = 1 << (idx % 32); |
55 | 30 | ||
56 | dump_di(whc, idx); | ||
57 | |||
58 | le_writel(bit, whc->base + WUSBDIBUPDATED + offset); | 31 | le_writel(bit, whc->base + WUSBDIBUPDATED + offset); |
59 | 32 | ||
60 | return whci_wait_for(&whc->umc->dev, | 33 | return whci_wait_for(&whc->umc->dev, |