diff options
author | Tomasz Figa <t.figa@samsung.com> | 2013-05-16 09:57:08 (GMT) |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-05-28 17:06:39 (GMT) |
commit | 0aa823a2ca02cd21c587713e8195a2ffb8bd7872 (patch) | |
tree | 74f6e7bdbc4a60f899d0bb504593fe1dab7cc8a3 /drivers/usb/phy/phy-samsung-usb.h | |
parent | 87331b069761a292c7d832fc3bb34cde56418982 (diff) | |
download | linux-fsl-qoriq-0aa823a2ca02cd21c587713e8195a2ffb8bd7872.tar.xz |
usb: phy: samsung: Consolidate reference clock rate handling
This patch cleans up handling of reference clock rate in Samsung USB PHY
drivers. It is mostly a cosmetic change but improves error handling in
case of failing to get reference clock or invalid clock rate.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/phy/phy-samsung-usb.h')
-rw-r--r-- | drivers/usb/phy/phy-samsung-usb.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/phy/phy-samsung-usb.h b/drivers/usb/phy/phy-samsung-usb.h index 70a9cae..0336f6b 100644 --- a/drivers/usb/phy/phy-samsung-usb.h +++ b/drivers/usb/phy/phy-samsung-usb.h @@ -244,6 +244,8 @@ enum samsung_cpu_type { TYPE_EXYNOS5250, }; +struct samsung_usbphy; + /* * struct samsung_usbphy_drvdata - driver data for various SoC variants * @cpu_type: machine identifier @@ -268,6 +270,7 @@ struct samsung_usbphy_drvdata { int hostphy_en_mask; u32 devphy_reg_offset; u32 hostphy_reg_offset; + int (*rate_to_clksel)(struct samsung_usbphy *, unsigned long); }; /* @@ -325,3 +328,7 @@ extern void samsung_usbphy_cfg_sel(struct samsung_usbphy *sphy); extern int samsung_usbphy_set_type(struct usb_phy *phy, enum samsung_usb_phy_type phy_type); extern int samsung_usbphy_get_refclk_freq(struct samsung_usbphy *sphy); +extern int samsung_usbphy_rate_to_clksel_64xx(struct samsung_usbphy *sphy, + unsigned long rate); +extern int samsung_usbphy_rate_to_clksel_4x12(struct samsung_usbphy *sphy, + unsigned long rate); |