mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-04 14:00:19 +00:00 
			
		
		
		
	usb: gadget: ux500: Convert interrupt handling to usb_gadget_generic_ops
Implement .handle_interrupts callback as a replacement for deprecated dm_usb_gadget_handle_interrupts() function. The new callback allows for each DM capable USB gadget controller driver to define its own IRQ handling implementation without colliding with other controller drivers. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # vim3 Link: https://lore.kernel.org/r/20240614005309.34433-10-marek.vasut+renesas@mailbox.org Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
This commit is contained in:
		
							parent
							
								
									281eaf1ed8
								
							
						
					
					
						commit
						ac4bf5d48a
					
				@ -91,14 +91,6 @@ static const struct musb_platform_ops ux500_musb_ops = {
 | 
				
			|||||||
	.disable	= ux500_musb_disable,
 | 
						.disable	= ux500_musb_disable,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int dm_usb_gadget_handle_interrupts(struct udevice *dev)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct ux500_glue *glue = dev_get_priv(dev);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	glue->mdata.host->isr(0, glue->mdata.host);
 | 
					 | 
				
			||||||
	return 0;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int ux500_musb_probe(struct udevice *dev)
 | 
					static int ux500_musb_probe(struct udevice *dev)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef CONFIG_USB_MUSB_HOST
 | 
					#ifdef CONFIG_USB_MUSB_HOST
 | 
				
			||||||
@ -155,6 +147,19 @@ static int ux500_musb_remove(struct udevice *dev)
 | 
				
			|||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int ux500_gadget_handle_interrupts(struct udevice *dev)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						struct ux500_glue *glue = dev_get_priv(dev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						glue->mdata.host->isr(0, glue->mdata.host);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static const struct usb_gadget_generic_ops ux500_gadget_ops = {
 | 
				
			||||||
 | 
						.handle_interrupts	= ux500_gadget_handle_interrupts,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const struct udevice_id ux500_musb_ids[] = {
 | 
					static const struct udevice_id ux500_musb_ids[] = {
 | 
				
			||||||
	{ .compatible = "stericsson,db8500-musb" },
 | 
						{ .compatible = "stericsson,db8500-musb" },
 | 
				
			||||||
	{ }
 | 
						{ }
 | 
				
			||||||
@ -168,6 +173,7 @@ U_BOOT_DRIVER(ux500_musb) = {
 | 
				
			|||||||
	.id		= UCLASS_USB_GADGET_GENERIC,
 | 
						.id		= UCLASS_USB_GADGET_GENERIC,
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	.of_match	= ux500_musb_ids,
 | 
						.of_match	= ux500_musb_ids,
 | 
				
			||||||
 | 
						.ops		= &ux500_gadget_ops,
 | 
				
			||||||
	.probe		= ux500_musb_probe,
 | 
						.probe		= ux500_musb_probe,
 | 
				
			||||||
	.remove		= ux500_musb_remove,
 | 
						.remove		= ux500_musb_remove,
 | 
				
			||||||
#ifdef CONFIG_USB_MUSB_HOST
 | 
					#ifdef CONFIG_USB_MUSB_HOST
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user