1 #ifndef _ISP1760_HCD_H_
2 #define _ISP1760_HCD_H_
4 #include <linux/spinlock.h>
13 * - 32 blocks @ 256 bytes
14 * - 20 blocks @ 1024 bytes
15 * - 4 blocks @ 8192 bytes
18 #define BLOCK_1_NUM 32
19 #define BLOCK_2_NUM 20
22 #define BLOCK_1_SIZE 256
23 #define BLOCK_2_SIZE 1024
24 #define BLOCK_3_SIZE 8192
25 #define BLOCKS (BLOCK_1_NUM + BLOCK_2_NUM + BLOCK_3_NUM)
26 #define MAX_PAYLOAD_SIZE BLOCK_3_SIZE
27 #define PAYLOAD_AREA_SIZE 0xf000
29 struct isp1760_slotinfo
{
30 struct isp1760_qh
*qh
;
31 struct isp1760_qtd
*qtd
;
32 unsigned long timestamp
;
35 /* chip memory management */
36 struct isp1760_memory_chunk
{
42 enum isp1760_queue_head_types
{
50 #ifdef CONFIG_USB_ISP1760_HCD
55 struct isp1760_slotinfo atl_slots
[32];
57 struct isp1760_slotinfo int_slots
[32];
59 struct isp1760_memory_chunk memory_pool
[BLOCKS
];
60 struct list_head qh_list
[QH_END
];
62 /* periodic schedule support */
63 #define DEFAULT_I_TDPS 1024
64 unsigned periodic_size
;
66 unsigned long reset_done
;
67 unsigned long next_statechange
;
71 #ifdef CONFIG_USB_ISP1760_HCD
72 int isp1760_hcd_register(struct isp1760_hcd
*priv
, void __iomem
*regs
,
73 struct resource
*mem
, int irq
, unsigned long irqflags
,
75 void isp1760_hcd_unregister(struct isp1760_hcd
*priv
);
77 int isp1760_init_kmem_once(void);
78 void isp1760_deinit_kmem_cache(void);
80 static inline int isp1760_hcd_register(struct isp1760_hcd
*priv
,
81 void __iomem
*regs
, struct resource
*mem
,
82 int irq
, unsigned long irqflags
,
88 static inline void isp1760_hcd_unregister(struct isp1760_hcd
*priv
)
92 static inline int isp1760_init_kmem_once(void)
97 static inline void isp1760_deinit_kmem_cache(void)
102 #endif /* _ISP1760_HCD_H_ */