forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/usb/host/ehci-tegra.c
....@@ -42,12 +42,10 @@
4242 };
4343
4444 struct tegra_ehci_hcd {
45
- struct tegra_usb_phy *phy;
4645 struct clk *clk;
4746 struct reset_control *rst;
4847 int port_resuming;
4948 bool needs_double_reset;
50
- enum tegra_usb_phy_port_speed port_speed;
5149 };
5250
5351 static int tegra_reset_usb_controller(struct platform_device *pdev)
....@@ -284,7 +282,7 @@
284282 struct dma_aligned_buffer {
285283 void *kmalloc_ptr;
286284 void *old_xfer_buffer;
287
- u8 data[0];
285
+ u8 data[];
288286 };
289287
290288 static void free_dma_aligned_buffer(struct urb *urb)
....@@ -480,16 +478,9 @@
480478 }
481479 u_phy->otg->host = hcd_to_bus(hcd);
482480
483
- err = usb_phy_set_suspend(hcd->usb_phy, 0);
484
- if (err) {
485
- dev_err(&pdev->dev, "Failed to power on the phy\n");
486
- goto cleanup_phy;
487
- }
488
-
489481 irq = platform_get_irq(pdev, 0);
490
- if (!irq) {
491
- dev_err(&pdev->dev, "Failed to get IRQ\n");
492
- err = -ENODEV;
482
+ if (irq < 0) {
483
+ err = irq;
493484 goto cleanup_phy;
494485 }
495486
....@@ -521,16 +512,10 @@
521512 struct tegra_ehci_hcd *tegra =
522513 (struct tegra_ehci_hcd *)hcd_to_ehci(hcd)->priv;
523514
524
- otg_set_host(hcd->usb_phy->otg, NULL);
525
-
526
- usb_phy_shutdown(hcd->usb_phy);
527515 usb_remove_hcd(hcd);
528
-
529
- reset_control_assert(tegra->rst);
530
- udelay(1);
531
-
516
+ otg_set_host(hcd->usb_phy->otg, NULL);
517
+ usb_phy_shutdown(hcd->usb_phy);
532518 clk_disable_unprepare(tegra->clk);
533
-
534519 usb_put_hcd(hcd);
535520
536521 return 0;