Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: EXYNOS: Update & move usb-phy types to generic include layer

Updating the names of usb-phy types to more generic names:
USB_PHY_TYPE_DEIVCE & USB_PHY_TYPE_HOST; and further update
its dependencies.

Signed-off-by: Praveen Paneri <p.paneri@samsung.com>
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>

authored by

Vivek Gautam and committed by
Felipe Balbi
b506eebc 69f0946a

+26 -8
+5 -4
drivers/usb/host/ehci-s5p.c
··· 17 17 #include <linux/platform_device.h> 18 18 #include <linux/of_gpio.h> 19 19 #include <linux/platform_data/usb-ehci-s5p.h> 20 + #include <linux/usb/samsung_usb_phy.h> 20 21 #include <plat/usb-phy.h> 21 22 22 23 #define EHCI_INSNREG00(base) (base + 0x90) ··· 165 164 } 166 165 167 166 if (pdata->phy_init) 168 - pdata->phy_init(pdev, S5P_USB_PHY_HOST); 167 + pdata->phy_init(pdev, USB_PHY_TYPE_HOST); 169 168 170 169 ehci = hcd_to_ehci(hcd); 171 170 ehci->caps = hcd->regs; ··· 199 198 usb_remove_hcd(hcd); 200 199 201 200 if (pdata && pdata->phy_exit) 202 - pdata->phy_exit(pdev, S5P_USB_PHY_HOST); 201 + pdata->phy_exit(pdev, USB_PHY_TYPE_HOST); 203 202 204 203 clk_disable_unprepare(s5p_ehci->clk); 205 204 ··· 230 229 rc = ehci_suspend(hcd, do_wakeup); 231 230 232 231 if (pdata && pdata->phy_exit) 233 - pdata->phy_exit(pdev, S5P_USB_PHY_HOST); 232 + pdata->phy_exit(pdev, USB_PHY_TYPE_HOST); 234 233 235 234 clk_disable_unprepare(s5p_ehci->clk); 236 235 ··· 247 246 clk_prepare_enable(s5p_ehci->clk); 248 247 249 248 if (pdata && pdata->phy_init) 250 - pdata->phy_init(pdev, S5P_USB_PHY_HOST); 249 + pdata->phy_init(pdev, USB_PHY_TYPE_HOST); 251 250 252 251 /* DMA burst Enable */ 253 252 writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs));
+5 -4
drivers/usb/host/ohci-exynos.c
··· 15 15 #include <linux/of.h> 16 16 #include <linux/platform_device.h> 17 17 #include <linux/platform_data/usb-exynos.h> 18 + #include <linux/usb/samsung_usb_phy.h> 18 19 #include <plat/usb-phy.h> 19 20 20 21 struct exynos_ohci_hcd { ··· 154 153 } 155 154 156 155 if (pdata->phy_init) 157 - pdata->phy_init(pdev, S5P_USB_PHY_HOST); 156 + pdata->phy_init(pdev, USB_PHY_TYPE_HOST); 158 157 159 158 ohci = hcd_to_ohci(hcd); 160 159 ohci_hcd_init(ohci); ··· 185 184 usb_remove_hcd(hcd); 186 185 187 186 if (pdata && pdata->phy_exit) 188 - pdata->phy_exit(pdev, S5P_USB_PHY_HOST); 187 + pdata->phy_exit(pdev, USB_PHY_TYPE_HOST); 189 188 190 189 clk_disable_unprepare(exynos_ohci->clk); 191 190 ··· 230 229 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); 231 230 232 231 if (pdata && pdata->phy_exit) 233 - pdata->phy_exit(pdev, S5P_USB_PHY_HOST); 232 + pdata->phy_exit(pdev, USB_PHY_TYPE_HOST); 234 233 235 234 clk_disable_unprepare(exynos_ohci->clk); 236 235 ··· 250 249 clk_prepare_enable(exynos_ohci->clk); 251 250 252 251 if (pdata && pdata->phy_init) 253 - pdata->phy_init(pdev, S5P_USB_PHY_HOST); 252 + pdata->phy_init(pdev, USB_PHY_TYPE_HOST); 254 253 255 254 ohci_resume(hcd, false); 256 255
+16
include/linux/usb/samsung_usb_phy.h
··· 1 + /* 2 + * Copyright (C) 2012 Samsung Electronics Co.Ltd 3 + * http://www.samsung.com/ 4 + * 5 + * Defines phy types for samsung usb phy controllers - HOST or DEIVCE. 6 + * 7 + * This program is free software; you can redistribute it and/or modify it 8 + * under the terms of the GNU General Public License as published by the 9 + * Free Software Foundation; either version 2 of the License, or (at your 10 + * option) any later version. 11 + */ 12 + 13 + enum samsung_usb_phy_type { 14 + USB_PHY_TYPE_DEVICE, 15 + USB_PHY_TYPE_HOST, 16 + };