diff options
author | Tomasz Figa <t.figa@samsung.com> | 2014-07-02 17:34:32 (GMT) |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-07-18 19:32:10 (GMT) |
commit | 28c8331d386a0c4122501a848a8fc3680bb65427 (patch) | |
tree | a4c1eac3003e6e45be6e70255509b4d17074a897 /arch/arm/mach-s5pv210/setup-usb-phy.c | |
parent | b672b27d232e337c848f51a371538b665ca4fcf3 (diff) | |
download | linux-28c8331d386a0c4122501a848a8fc3680bb65427.tar.xz |
ARM: S5PV210: Remove support for board files
Since all in-tree boards have been moved to device tree, we can now drop
legacy code and make mach-s5pv210 DT-only. This patch does it.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv210/setup-usb-phy.c')
-rw-r--r-- | arch/arm/mach-s5pv210/setup-usb-phy.c | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/arch/arm/mach-s5pv210/setup-usb-phy.c b/arch/arm/mach-s5pv210/setup-usb-phy.c deleted file mode 100644 index b2ee533..0000000 --- a/arch/arm/mach-s5pv210/setup-usb-phy.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2012 Samsung Electronics Co.Ltd - * Author: Joonyoung Shim <jy0922.shim@samsung.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundationr - */ - -#include <linux/clk.h> -#include <linux/delay.h> -#include <linux/err.h> -#include <linux/io.h> -#include <linux/platform_device.h> - -#include <mach/map.h> - -#include <plat/cpu.h> -#include <plat/regs-usb-hsotg-phy.h> -#include <plat/usb-phy.h> - -#define S5PV210_USB_PHY_CON (S3C_VA_SYS + 0xE80C) -#define S5PV210_USB_PHY0_EN (1 << 0) -#define S5PV210_USB_PHY1_EN (1 << 1) - -static int s5pv210_usb_otgphy_init(struct platform_device *pdev) -{ - struct clk *xusbxti; - u32 phyclk; - - writel(readl(S5PV210_USB_PHY_CON) | S5PV210_USB_PHY0_EN, - S5PV210_USB_PHY_CON); - - /* set clock frequency for PLL */ - phyclk = readl(S3C_PHYCLK) & ~S3C_PHYCLK_CLKSEL_MASK; - - xusbxti = clk_get(&pdev->dev, "xusbxti"); - if (xusbxti && !IS_ERR(xusbxti)) { - switch (clk_get_rate(xusbxti)) { - case 12 * MHZ: - phyclk |= S3C_PHYCLK_CLKSEL_12M; - break; - case 24 * MHZ: - phyclk |= S3C_PHYCLK_CLKSEL_24M; - break; - default: - case 48 * MHZ: - /* default reference clock */ - break; - } - clk_put(xusbxti); - } - - /* TODO: select external clock/oscillator */ - writel(phyclk | S3C_PHYCLK_CLK_FORCE, S3C_PHYCLK); - - /* set to normal OTG PHY */ - writel((readl(S3C_PHYPWR) & ~S3C_PHYPWR_NORMAL_MASK), S3C_PHYPWR); - mdelay(1); - - /* reset OTG PHY and Link */ - writel(S3C_RSTCON_PHY | S3C_RSTCON_HCLK | S3C_RSTCON_PHYCLK, - S3C_RSTCON); - udelay(20); /* at-least 10uS */ - writel(0, S3C_RSTCON); - - return 0; -} - -static int s5pv210_usb_otgphy_exit(struct platform_device *pdev) -{ - writel((readl(S3C_PHYPWR) | S3C_PHYPWR_ANALOG_POWERDOWN | - S3C_PHYPWR_OTG_DISABLE), S3C_PHYPWR); - - writel(readl(S5PV210_USB_PHY_CON) & ~S5PV210_USB_PHY0_EN, - S5PV210_USB_PHY_CON); - - return 0; -} - -int s5p_usb_phy_init(struct platform_device *pdev, int type) -{ - if (type == USB_PHY_TYPE_DEVICE) - return s5pv210_usb_otgphy_init(pdev); - - return -EINVAL; -} - -int s5p_usb_phy_exit(struct platform_device *pdev, int type) -{ - if (type == USB_PHY_TYPE_DEVICE) - return s5pv210_usb_otgphy_exit(pdev); - - return -EINVAL; -} |