/kernel/linux/linux-5.10/drivers/usb/gadget/udc/aspeed-vhub/ |
H A D | core.c | 3 * aspeed-vhub -- Driver for Aspeed SoC "vHub" USB gadget 33 #include "vhub.h" 39 struct ast_vhub *vhub = ep->vhub; in ast_vhub_done() local 50 usb_gadget_unmap_request_by_dev(&vhub->pdev->dev, in ast_vhub_done() 60 spin_unlock(&ep->vhub->lock); in ast_vhub_done() 62 spin_lock(&ep->vhub->lock); in ast_vhub_done() 101 struct ast_vhub *vhub = data; in ast_vhub_irq() local 106 if (!vhub->ep0_bufs) in ast_vhub_irq() 109 spin_lock(&vhub in ast_vhub_irq() 174 ast_vhub_init_hw(struct ast_vhub *vhub) ast_vhub_init_hw() argument 264 struct ast_vhub *vhub = platform_get_drvdata(pdev); ast_vhub_remove() local 305 struct ast_vhub *vhub; ast_vhub_probe() local [all...] |
H A D | hub.c | 3 * aspeed-vhub -- Driver for Aspeed SoC "vHub" USB gadget 37 #include "vhub.h" 179 if (ep->vhub->wakeup_en) in ast_vhub_hub_dev_status() 196 if (ep->vhub->ep1_stalled) in ast_vhub_hub_ep_status() 214 ep->vhub->wakeup_en = is_set; in ast_vhub_hub_dev_feature() 242 ep->vhub->ep1_stalled = is_set; in ast_vhub_hub_ep_feature() 243 reg = readl(ep->vhub->regs + AST_VHUB_EP1_CTRL); in ast_vhub_hub_ep_feature() 250 writel(reg, ep->vhub->regs + AST_VHUB_EP1_CTRL); in ast_vhub_hub_ep_feature() 259 struct ast_vhub *vhub = ep->vhub; in ast_vhub_rep_desc() local 309 ast_vhub_collect_languages(struct ast_vhub *vhub, void *buf, size_t size) ast_vhub_collect_languages() argument 335 ast_vhub_lookup_string(struct ast_vhub *vhub, u16 lang_id) ast_vhub_lookup_string() argument 356 struct ast_vhub *vhub = ep->vhub; ast_vhub_rep_string() local 380 struct ast_vhub *vhub = ep->vhub; ast_vhub_std_hub_request() local 455 ast_vhub_update_hub_ep1(struct ast_vhub *vhub, unsigned int port) ast_vhub_update_hub_ep1() argument 468 ast_vhub_change_port_stat(struct ast_vhub *vhub, unsigned int port, u16 clr_flags, u16 set_flags, bool set_c) ast_vhub_change_port_stat() argument 507 ast_vhub_send_host_wakeup(struct ast_vhub *vhub) ast_vhub_send_host_wakeup() argument 515 ast_vhub_device_connect(struct ast_vhub *vhub, unsigned int port, bool on) ast_vhub_device_connect() argument 537 struct ast_vhub *vhub = container_of(work, ast_vhub_wake_work() local 563 ast_vhub_hub_wake_all(struct ast_vhub *vhub) ast_vhub_hub_wake_all() argument 573 ast_vhub_port_reset(struct ast_vhub *vhub, u8 port) ast_vhub_port_reset() argument 629 struct ast_vhub *vhub = ep->vhub; ast_vhub_set_port_feature() local 672 struct ast_vhub *vhub = ep->vhub; ast_vhub_clr_port_feature() local 718 struct ast_vhub *vhub = ep->vhub; ast_vhub_get_port_stat() local 787 ast_vhub_hub_suspend(struct ast_vhub *vhub) ast_vhub_hub_suspend() argument 810 ast_vhub_hub_resume(struct ast_vhub *vhub) ast_vhub_hub_resume() argument 833 ast_vhub_hub_reset(struct ast_vhub *vhub) ast_vhub_hub_reset() argument 879 ast_vhub_of_parse_dev_desc(struct ast_vhub *vhub, const struct device_node *vhub_np) ast_vhub_of_parse_dev_desc() argument 899 ast_vhub_fixup_usb1_dev_desc(struct ast_vhub *vhub) ast_vhub_fixup_usb1_dev_desc() argument 906 ast_vhub_str_container_alloc(struct ast_vhub *vhub) ast_vhub_str_container_alloc() argument 942 ast_vhub_str_alloc_add(struct ast_vhub *vhub, const struct usb_gadget_strings *src_str) ast_vhub_str_alloc_add() argument 969 ast_vhub_of_parse_str_desc(struct ast_vhub *vhub, const struct device_node *desc_np) ast_vhub_of_parse_str_desc() argument 1011 ast_vhub_init_desc(struct ast_vhub *vhub) ast_vhub_init_desc() argument 1046 ast_vhub_init_hub(struct ast_vhub *vhub) ast_vhub_init_hub() argument [all...] |
H A D | dev.c | 3 * aspeed-vhub -- Driver for Aspeed SoC "vHub" USB gadget 35 #include "vhub.h" 72 reg = readl(d->vhub->regs + AST_VHUB_IER); in ast_vhub_dev_enable() 74 writel(reg, d->vhub->regs + AST_VHUB_IER); in ast_vhub_dev_enable() 104 reg = readl(d->vhub->regs + AST_VHUB_IER); in ast_vhub_dev_disable() 106 writel(reg, d->vhub->regs + AST_VHUB_IER); in ast_vhub_dev_disable() 234 d->gadget.speed = ep->vhub->speed; in ast_vhub_std_dev_request() 277 spin_lock_irqsave(&d->vhub->lock, flags); in ast_vhub_udc_wakeup() 284 ast_vhub_hub_wake_all(d->vhub); in ast_vhub_udc_wakeup() 287 spin_unlock_irqrestore(&d->vhub in ast_vhub_udc_wakeup() 537 ast_vhub_init_dev(struct ast_vhub *vhub, unsigned int idx) ast_vhub_init_dev() argument [all...] |
H A D | epn.c | 3 * aspeed-vhub -- Driver for Aspeed SoC "vHub" USB gadget 33 #include "vhub.h" 338 struct ast_vhub *vhub = ep->vhub; in ast_vhub_epn_queue() local 345 dev_warn(&vhub->pdev->dev, "Bogus EPn request ! u_req=%p\n", u_req); in ast_vhub_epn_queue() 347 dev_warn(&vhub->pdev->dev, "complete=%p internal=%d\n", in ast_vhub_epn_queue() 379 rc = usb_gadget_map_request_by_dev(&vhub->pdev->dev, u_req, in ast_vhub_epn_queue() 382 dev_warn(&vhub->pdev->dev, in ast_vhub_epn_queue() 401 spin_lock_irqsave(&vhub->lock, flags); in ast_vhub_epn_queue() 412 spin_unlock_irqrestore(&vhub in ast_vhub_epn_queue() 473 struct ast_vhub *vhub = ep->vhub; ast_vhub_epn_dequeue() local 521 struct ast_vhub *vhub = ep->vhub; ast_vhub_set_halt_and_wedge() local 562 struct ast_vhub *vhub = ep->vhub; ast_vhub_epn_disable() local 601 struct ast_vhub *vhub; ast_vhub_epn_enable() local 799 struct ast_vhub *vhub = d->vhub; ast_vhub_alloc_epn() local [all...] |
H A D | ep0.c | 3 * aspeed-vhub -- Driver for Aspeed SoC "vHub" USB gadget 33 #include "vhub.h" 59 spin_unlock(&ep->vhub->lock); in ast_vhub_reply() 64 spin_lock(&ep->vhub->lock); in ast_vhub_reply() 157 spin_unlock(&ep->vhub->lock); in ast_vhub_ep0_handle_setup() 159 spin_lock(&ep->vhub->lock); in ast_vhub_ep0_handle_setup() 275 struct ast_vhub *vhub = ep->vhub; in ast_vhub_ep0_handle_ack() local 276 struct device *dev = &vhub->pdev->dev; in ast_vhub_ep0_handle_ack() 363 struct ast_vhub *vhub in ast_vhub_ep0_queue() local 440 struct ast_vhub *vhub = ep->vhub; ast_vhub_ep0_dequeue() local 487 ast_vhub_init_ep0(struct ast_vhub *vhub, struct ast_vhub_ep *ep, struct ast_vhub_dev *dev) ast_vhub_init_ep0() argument [all...] |
H A D | vhub.h | 210 * existing AST2400/AST2500 platforms. AST2600 and future vhub revisions 265 * or internal use vhub EP0. vhub EP1 doesn't have an 281 struct ast_vhub *vhub; member 292 /* EP0 (either device or vhub) */ 342 struct ast_vhub *vhub; member 367 /* Per vhub port stateinfo structure */ 383 /* Global vhub structure */ 396 /* EP0 of the vhub itself */ 399 /* State of vhub ep [all...] |
H A D | Makefile | 2 obj-$(CONFIG_USB_ASPEED_VHUB) += aspeed-vhub.o 3 aspeed-vhub-y := core.o ep0.o epn.o dev.o hub.o
|
/kernel/linux/linux-6.6/drivers/usb/gadget/udc/aspeed-vhub/ |
H A D | core.c | 3 * aspeed-vhub -- Driver for Aspeed SoC "vHub" USB gadget 27 #include "vhub.h" 33 struct ast_vhub *vhub = ep->vhub; in ast_vhub_done() local 44 usb_gadget_unmap_request_by_dev(&vhub->pdev->dev, in ast_vhub_done() 54 spin_unlock(&ep->vhub->lock); in ast_vhub_done() 56 spin_lock(&ep->vhub->lock); in ast_vhub_done() 95 struct ast_vhub *vhub = data; in ast_vhub_irq() local 100 if (!vhub->ep0_bufs) in ast_vhub_irq() 103 spin_lock(&vhub in ast_vhub_irq() 168 ast_vhub_init_hw(struct ast_vhub *vhub) ast_vhub_init_hw() argument 258 struct ast_vhub *vhub = platform_get_drvdata(pdev); ast_vhub_remove() local 297 struct ast_vhub *vhub; ast_vhub_probe() local [all...] |
H A D | hub.c | 3 * aspeed-vhub -- Driver for Aspeed SoC "vHub" USB gadget 31 #include "vhub.h" 185 if (ep->vhub->wakeup_en) in ast_vhub_hub_dev_status() 202 if (ep->vhub->ep1_stalled) in ast_vhub_hub_ep_status() 220 ep->vhub->wakeup_en = is_set; in ast_vhub_hub_dev_feature() 227 val = readl(ep->vhub->regs + AST_VHUB_CTRL); in ast_vhub_hub_dev_feature() 230 writel(val, ep->vhub->regs + AST_VHUB_CTRL); in ast_vhub_hub_dev_feature() 259 ep->vhub->ep1_stalled = is_set; in ast_vhub_hub_ep_feature() 260 reg = readl(ep->vhub->regs + AST_VHUB_EP1_CTRL); in ast_vhub_hub_ep_feature() 267 writel(reg, ep->vhub in ast_vhub_hub_ep_feature() 276 struct ast_vhub *vhub = ep->vhub; ast_vhub_rep_desc() local 332 ast_vhub_collect_languages(struct ast_vhub *vhub, void *buf, size_t size) ast_vhub_collect_languages() argument 358 ast_vhub_lookup_string(struct ast_vhub *vhub, u16 lang_id) ast_vhub_lookup_string() argument 379 struct ast_vhub *vhub = ep->vhub; ast_vhub_rep_string() local 403 struct ast_vhub *vhub = ep->vhub; ast_vhub_std_hub_request() local 480 ast_vhub_update_hub_ep1(struct ast_vhub *vhub, unsigned int port) ast_vhub_update_hub_ep1() argument 493 ast_vhub_change_port_stat(struct ast_vhub *vhub, unsigned int port, u16 clr_flags, u16 set_flags, bool set_c) ast_vhub_change_port_stat() argument 532 ast_vhub_send_host_wakeup(struct ast_vhub *vhub) ast_vhub_send_host_wakeup() argument 540 ast_vhub_device_connect(struct ast_vhub *vhub, unsigned int port, bool on) ast_vhub_device_connect() argument 562 struct ast_vhub *vhub = container_of(work, ast_vhub_wake_work() local 588 ast_vhub_hub_wake_all(struct ast_vhub *vhub) ast_vhub_hub_wake_all() argument 598 ast_vhub_port_reset(struct ast_vhub *vhub, u8 port) ast_vhub_port_reset() argument 654 struct ast_vhub *vhub = ep->vhub; ast_vhub_set_port_feature() local 697 struct ast_vhub *vhub = ep->vhub; ast_vhub_clr_port_feature() local 743 struct ast_vhub *vhub = ep->vhub; ast_vhub_get_port_stat() local 812 ast_vhub_hub_suspend(struct ast_vhub *vhub) ast_vhub_hub_suspend() argument 835 ast_vhub_hub_resume(struct ast_vhub *vhub) ast_vhub_hub_resume() argument 858 ast_vhub_hub_reset(struct ast_vhub *vhub) ast_vhub_hub_reset() argument 904 ast_vhub_of_parse_dev_desc(struct ast_vhub *vhub, const struct device_node *vhub_np) ast_vhub_of_parse_dev_desc() argument 924 ast_vhub_fixup_usb1_dev_desc(struct ast_vhub *vhub) ast_vhub_fixup_usb1_dev_desc() argument 931 ast_vhub_str_container_alloc(struct ast_vhub *vhub) ast_vhub_str_container_alloc() argument 967 ast_vhub_str_alloc_add(struct ast_vhub *vhub, const struct usb_gadget_strings *src_str) ast_vhub_str_alloc_add() argument 994 ast_vhub_of_parse_str_desc(struct ast_vhub *vhub, const struct device_node *desc_np) ast_vhub_of_parse_str_desc() argument 1036 ast_vhub_init_desc(struct ast_vhub *vhub) ast_vhub_init_desc() argument 1075 ast_vhub_init_hub(struct ast_vhub *vhub) ast_vhub_init_hub() argument [all...] |
H A D | epn.c | 3 * aspeed-vhub -- Driver for Aspeed SoC "vHub" USB gadget 27 #include "vhub.h" 340 struct ast_vhub *vhub = ep->vhub; in ast_vhub_epn_queue() local 347 dev_warn(&vhub->pdev->dev, "Bogus EPn request ! u_req=%p\n", u_req); in ast_vhub_epn_queue() 349 dev_warn(&vhub->pdev->dev, "complete=%p internal=%d\n", in ast_vhub_epn_queue() 381 rc = usb_gadget_map_request_by_dev(&vhub->pdev->dev, u_req, in ast_vhub_epn_queue() 384 dev_warn(&vhub->pdev->dev, in ast_vhub_epn_queue() 403 spin_lock_irqsave(&vhub->lock, flags); in ast_vhub_epn_queue() 414 spin_unlock_irqrestore(&vhub in ast_vhub_epn_queue() 475 struct ast_vhub *vhub = ep->vhub; ast_vhub_epn_dequeue() local 525 struct ast_vhub *vhub = ep->vhub; ast_vhub_set_halt_and_wedge() local 566 struct ast_vhub *vhub = ep->vhub; ast_vhub_epn_disable() local 605 struct ast_vhub *vhub; ast_vhub_epn_enable() local 803 struct ast_vhub *vhub = d->vhub; ast_vhub_alloc_epn() local [all...] |
H A D | dev.c | 3 * aspeed-vhub -- Driver for Aspeed SoC "vHub" USB gadget 29 #include "vhub.h" 66 reg = readl(d->vhub->regs + AST_VHUB_IER); in ast_vhub_dev_enable() 68 writel(reg, d->vhub->regs + AST_VHUB_IER); in ast_vhub_dev_enable() 98 reg = readl(d->vhub->regs + AST_VHUB_IER); in ast_vhub_dev_disable() 100 writel(reg, d->vhub->regs + AST_VHUB_IER); in ast_vhub_dev_disable() 123 val = readl(d->vhub->regs + AST_VHUB_CTRL); in ast_vhub_dev_feature() 126 writel(val, d->vhub->regs + AST_VHUB_CTRL); in ast_vhub_dev_feature() 239 d->gadget.speed = ep->vhub->speed; in ast_vhub_std_dev_request() 282 spin_lock_irqsave(&d->vhub in ast_vhub_udc_wakeup() 542 ast_vhub_init_dev(struct ast_vhub *vhub, unsigned int idx) ast_vhub_init_dev() argument [all...] |
H A D | ep0.c | 3 * aspeed-vhub -- Driver for Aspeed SoC "vHub" USB gadget 27 #include "vhub.h" 53 spin_unlock(&ep->vhub->lock); in ast_vhub_reply() 58 spin_lock(&ep->vhub->lock); in ast_vhub_reply() 151 spin_unlock(&ep->vhub->lock); in ast_vhub_ep0_handle_setup() 153 spin_lock(&ep->vhub->lock); in ast_vhub_ep0_handle_setup() 276 struct ast_vhub *vhub = ep->vhub; in ast_vhub_ep0_handle_ack() local 277 struct device *dev = &vhub->pdev->dev; in ast_vhub_ep0_handle_ack() 364 struct ast_vhub *vhub in ast_vhub_ep0_queue() local 441 struct ast_vhub *vhub = ep->vhub; ast_vhub_ep0_dequeue() local 488 ast_vhub_init_ep0(struct ast_vhub *vhub, struct ast_vhub_ep *ep, struct ast_vhub_dev *dev) ast_vhub_init_ep0() argument [all...] |
H A D | vhub.h | 210 * existing AST2400/AST2500 platforms. AST2600 and future vhub revisions 265 * or internal use vhub EP0. vhub EP1 doesn't have an 281 struct ast_vhub *vhub; member 292 /* EP0 (either device or vhub) */ 342 struct ast_vhub *vhub; member 367 /* Per vhub port stateinfo structure */ 383 /* Global vhub structure */ 396 /* EP0 of the vhub itself */ 399 /* State of vhub ep [all...] |
H A D | Makefile | 2 obj-$(CONFIG_USB_ASPEED_VHUB) += aspeed-vhub.o 3 aspeed-vhub-y := core.o ep0.o epn.o dev.o hub.o
|
/kernel/linux/linux-5.10/drivers/usb/gadget/udc/ |
H A D | Makefile | 43 obj-$(CONFIG_USB_ASPEED_VHUB) += aspeed-vhub/
|
/kernel/linux/linux-6.6/drivers/usb/gadget/udc/ |
H A D | Makefile | 41 obj-$(CONFIG_USB_ASPEED_VHUB) += aspeed-vhub/
|