{"action":"created","issue":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/1021","labels_url":"https://api.github.com/repos/raspberrypi/linux/issues/1021/labels{/name}","comments_url":"https://api.github.com/repos/raspberrypi/linux/issues/1021/comments","events_url":"https://api.github.com/repos/raspberrypi/linux/issues/1021/events","html_url":"https://github.com/raspberrypi/linux/issues/1021","id":87369638,"number":1021,"title":"ARCH_BCM2835 dwc_otg FIQ hack","user":{"login":"notro","id":530887,"avatar_url":"https://avatars.githubusercontent.com/u/530887?v=3","gravatar_id":"","url":"https://api.github.com/users/notro","html_url":"https://github.com/notro","followers_url":"https://api.github.com/users/notro/followers","following_url":"https://api.github.com/users/notro/following{/other_user}","gists_url":"https://api.github.com/users/notro/gists{/gist_id}","starred_url":"https://api.github.com/users/notro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notro/subscriptions","organizations_url":"https://api.github.com/users/notro/orgs","repos_url":"https://api.github.com/users/notro/repos","events_url":"https://api.github.com/users/notro/events{/privacy}","received_events_url":"https://api.github.com/users/notro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-11T14:41:12Z","updated_at":"2015-06-12T13:34:12Z","closed_at":null,"body":"Looks as if I might have FIQ working on ARCH_BCM2835.\r\nPatch including intrumentation: https://gist.github.com/notro/3c345f09f29a3a8fed62\r\nOverlay so I can switch between dwc2 and dwc_otg: https://gist.github.com/notro/3f2be7402629b25c00e4\r\nAdd config: ```CONFIG_USB_DWCOTG=y```\r\n\r\nI have hardcoded the fiq interrupt number in the ARCH_BCM2835 case, I need to look more into how I can map to the right number from d->hwirq.\r\nI implemented bcm2835_enable_fiq() on both arch's when testing this.\r\n\r\nARCH_BCM2835\r\n```\r\n[    1.870597] dwc_otg 20980000.usb: Calling disable_global_interrupts\r\n\r\n[    1.878693] armctrl_xlate(2 0) => 64\r\n[    1.884066] platform_get_irq('20980000.usb', num=0) DT => 56\r\n[    1.891557] dwc_otg 20980000.usb: Calling request_irq(56)\r\n[    1.898711] genirq: request_threaded_irq(irq=56, 'dwc_otg')\r\n\r\n[    1.906117] dwc_otg 20980000.usb: Calling dwc_otg_core_init\r\n[    2.113639] Using Buffer DMA mode\r\n[    2.118704] Periodic Transfer Interrupt Enhancement - disabled\r\n[    2.126357] Multiprocessor Interrupt Enhancement - disabled\r\n[    2.133775] OTG VER PARAM: 0, OTG VER FLAG: 0\r\n[    2.139929] dwc_otg 20980000.usb: Calling pcd_init\r\n[    2.146449] Dedicated Tx FIFOs mode\r\n\r\n[    2.152046] armctrl_xlate(2 0) => 64\r\n[    2.157373] platform_get_irq('20980000.usb', num=0) DT => 56\r\n[    2.164855] genirq: request_threaded_irq(irq=56, 'dwc_otg_pcd')\r\n\r\n[    2.172635] dwc_otg 20980000.usb: Calling hcd_init\r\n[    2.179361] WARN::dwc_otg_hcd_init:1047: FIQ DMA bounce buffers: virt = 0xdb854000 dma = 0x1b854000 len=9024\r\n[    2.192681] FIQ FSM acceleration enabled for :\r\n[    2.192681] Non-periodic Split Transactions\r\n[    2.192681] Periodic Split Transactions\r\n[    2.192681] High-Speed Isochronous Endpoints\r\n[    2.216474] dwc_otg: Microframe scheduler enabled\r\n[    2.223162] WARN::hcd_init_fiq:414: FIQ on core 0 at 0xc041b65c\r\n[    2.230882] WARN::hcd_init_fiq:415: FIQ ASM at 0xc041b8fc length 36\r\n[    2.238895] WARN::hcd_init_fiq:440: MPHI regs_base at 0xf0006000\r\n\r\n[    2.246646] armctrl_xlate(1 9) => 41\r\n[    2.251898] platform_get_irq('20980000.usb', num=1) DT => 33\r\n[    2.259253] hcd_init_fiq: pdev=dad29400, irq=33\r\n[    2.265462] bcm2835_enable_fiq(33): d->hwirq=41\r\n[    2.271640] bcm2835_enable_fiq: addr=f000b20c\r\n\r\n[    2.277741] armctrl_xlate(2 0) => 64\r\n[    2.283028] platform_get_irq('20980000.usb', num=0) DT => 56\r\n[    2.290455] dwc_otg 20980000.usb: DWC OTG Controller\r\n[    2.297177] dwc_otg 20980000.usb: new USB bus registered, assigned bus number 1\r\n[    2.306298] genirq: request_threaded_irq(irq=56, 'dwc_otg_hcd:usb1')\r\n[    2.314494] dwc_otg 20980000.usb: irq 56, io mem 0x00000000\r\n[    2.321880] Init: Port Power? op_state=1\r\n\r\n```\r\n\r\nARCH_BCM2708\r\n```\r\n[    1.990259] dwc_otg 20980000.usb: Calling disable_global_interrupts\r\n\r\n[    1.998287] armctrl_xlate(2 0) => 32 32\r\n[    2.003739] platform_get_irq('20980000.usb', num=0) DT => 32\r\n[    2.011062] dwc_otg 20980000.usb: Calling request_irq(32)\r\n[    2.018122] genirq: request_threaded_irq(irq=32, 'dwc_otg')\r\n\r\n[    2.025336] dwc_otg 20980000.usb: Calling dwc_otg_core_init\r\n[    2.232389] Using Buffer DMA mode\r\n[    2.237302] Periodic Transfer Interrupt Enhancement - disabled\r\n[    2.244829] Multiprocessor Interrupt Enhancement - disabled\r\n[    2.252075] OTG VER PARAM: 0, OTG VER FLAG: 0\r\n[    2.258071] dwc_otg 20980000.usb: Calling pcd_init\r\n[    2.264450] Dedicated Tx FIFOs mode\r\n\r\n[    2.269866] armctrl_xlate(2 0) => 32 32\r\n[    2.275315] platform_get_irq('20980000.usb', num=0) DT => 32\r\n[    2.282635] genirq: request_threaded_irq(irq=32, 'dwc_otg_pcd')\r\n\r\n[    2.290253] dwc_otg 20980000.usb: Calling hcd_init\r\n[    2.296762] WARN::dwc_otg_hcd_init:1047: FIQ DMA bounce buffers: virt = 0xdbc14000 dma = 0x5bc14000 len=9024\r\n[    2.309774] FIQ FSM acceleration enabled for :\r\n[    2.309774] Non-periodic Split Transactions\r\n[    2.309774] Periodic Split Transactions\r\n[    2.309774] High-Speed Isochronous Endpoints\r\n[    2.332830] dwc_otg: Microframe scheduler enabled\r\n[    2.339345] WARN::hcd_init_fiq:414: FIQ on core 0 at 0xc040f0c0\r\n[    2.346904] WARN::hcd_init_fiq:415: FIQ ASM at 0xc040f398 length 36\r\n[    2.354754] WARN::hcd_init_fiq:440: MPHI regs_base at 0xdc896000\r\n\r\n[    2.362361] armctrl_xlate(1 9) => 9 75\r\n[    2.367651] platform_get_irq('20980000.usb', num=1) DT => 75\r\n[    2.374855] hcd_init_fiq: pdev=dad25000, irq=75\r\n[    2.380916] bcm2835_enable_fiq(75): data=9\r\n[    2.386512] bcm2835_enable_fiq: addr=f200b20c\r\n\r\n[    2.392466] armctrl_xlate(2 0) => 32 32\r\n[    2.397874] platform_get_irq('20980000.usb', num=0) DT => 32\r\n[    2.405095] dwc_otg 20980000.usb: DWC OTG Controller\r\n[    2.411698] dwc_otg 20980000.usb: new USB bus registered, assigned bus number 1\r\n[    2.420685] genirq: request_threaded_irq(irq=32, 'dwc_otg_hcd:usb1')\r\n[    2.428729] dwc_otg 20980000.usb: irq 32, io mem 0x00000000\r\n[    2.435898] Init: Port Power? op_state=1\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/comments/111494407","html_url":"https://github.com/raspberrypi/linux/issues/1021#issuecomment-111494407","issue_url":"https://api.github.com/repos/raspberrypi/linux/issues/1021","id":111494407,"user":{"login":"notro","id":530887,"avatar_url":"https://avatars.githubusercontent.com/u/530887?v=3","gravatar_id":"","url":"https://api.github.com/users/notro","html_url":"https://github.com/notro","followers_url":"https://api.github.com/users/notro/followers","following_url":"https://api.github.com/users/notro/following{/other_user}","gists_url":"https://api.github.com/users/notro/gists{/gist_id}","starred_url":"https://api.github.com/users/notro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notro/subscriptions","organizations_url":"https://api.github.com/users/notro/orgs","repos_url":"https://api.github.com/users/notro/repos","events_url":"https://api.github.com/users/notro/events{/privacy}","received_events_url":"https://api.github.com/users/notro/received_events","type":"User","site_admin":false},"created_at":"2015-06-12T13:34:12Z","updated_at":"2015-06-12T13:34:12Z","body":"> The FIQ selector doesn't use the basic pending bits.\r\n\r\nI don't understand, is this an issue with my proposal?"}}