Forum Discussion
Altera_Forum
Honored Contributor
20 years agoISP1761 USB driver
There's a good news. Philips semi had opened their ISP1761 driver on sf.net as GPL. It does support ISO transfer. ( the current ISP1362 driver does not support ISO transfer) It is for 2.6.9 ...
Altera_Forum
Honored Contributor
19 years ago --- Quote Start --- originally posted by hippo@Feb 7 2007, 10:08 AM please check if it is endian issue.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=21328)
--- quote end ---
--- Quote End --- I assume you mean the payload... the QTD header & payload are (in BE format here): (These are reversed in the ISP1761 memory) Dir: 0 Recp: 0 ReqType: USB_TYPE_STANDARD USB_RECIP_DEVICE USB_REQ_SET_ADDRESS - req:0x00000005 le:wValue:0x00000200 le:wIndex:0x00000000 le:wLength:0x00000000 PEHCI_CHECK: qtd at mapLoc: 1 is being scheduled c2473a80, device 2,map 1 pehci_hcd_dump_qha : (pehci_hcd_schedule_pending_ptds) --------------------- td_info1 (DW0):0x21000041 V: 1 NrBytesToTrans : 00000008 MaxPacketLength: 00000064 Multi: 1 td_info2 (DW1):0x00000000 Split: 0000 TransType :0000 Token :0000 DevAddr:0000 EP:0000 td_info3 (DW2):0x1e018000 RL : 15 Data Start Addr: 0x00000180 (0x00001000) td_info4 (DW3):0x82780000 Active :0001 Halt :0000 Babble :0000 XactErr:0000 DToggle:0001 Cerr :0000 NakCnt :0015 NrB Tx :0000 ---------------------------------- ISP1761 Register Dump... - HC_CHIP_ID_REG (0x0304) : 0x00011761 (=0x00011761) - HC_HW_MODE_REG (0x0300) : 0x00000107 - HC_USBCMD_REG (0x0020) : 0x00000001 - HC_USBSTS_REG (0x0024) : 0x00000004 - HC_CONFIGFLAG_REG (0x0060) : 0x00000001 - HC_PORTSC1_REG (0x0064) : 0x00001005 - HC_SPARAMS_REG (0x0004) : 0x00000011 - HC_CPARAMS_REG (0x0008) : 0x00000086 - HC_INTERRUPT_REG_EHCI (0x0028) : 0x00000000 - HC_FRINDEX_REG (0x002c) : 0x00001f75 - HC_INTERRUPT_REG (0x0310) : 0x00000053 - HC_INTENABLE_REG (0x0314) : 0x00000002 - HC_DMACONFIG_REG (0x0330) : 0x00000000 - HC_TRANS_COUNT_REG (0x0334) : 0x00000000 - HC_BUFFER_STAT_REG (0x0338) : 0x00000000 - HC_MEM_READ_REG (0x033c) : 0x00000000 - OTG_CTRL_REG (0x0374) : 0x04800480 ---------------------------------- dev(0xc0355c80) - Writing QHA Header(0xc0c416c0) to ISP1761 0xc00... Dumping ISP1761 Shared Memory Region from 0x00000bf0 for 64 bytes (BE format)... 0x00000bf0: 0x00000000 0x00000000 0x00000000 0x00000000 ->0x00000c00: 0x21000041 0x00000000 0x1e018000 0x82780000 0x00000c10: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000c20: 0x00000000 0x00000000 0x00000000 0x00000000 ---------------------------------- Dumping ISP1761 Shared Memory Region from 0x00000ff0 for 64 bytes (BE format)... 0x00000ff0: 0x00000000 0x00000000 0x00000000 0x00000000 ->0x00001000: 0x00050200 0x00000000 0x00000000 0x00000000 0x00001010: 0x00000000 0x00000000 0x00000000 0x00000000 0x00001020: 0x00000000 0x00000000 0x00000000 0x00000000 ---------------------------------- The driver uses readl and writew via these four utility functions: isp1761_reg_read32 isp1761_reg_write32 isp1761_mem_read32 isp1761_mem_write32 In these, there is EIEIO & ndelay(100), along with the 0x334 write for mem-reads. I believe the readl and writew are converting from BE to LE. For data pointer manipulation cpu_to_le32 is used as in original example code. The code is very similar to that of the Philips example code. I've added EIEIO & delays. Does this look like a valid USB setup-message (USB_REQ_SET_ADDRESS) in BE format? 0x00001000: 0x00050200 0x00000000 This is using the old-style device detection in hub.c. Mike.