diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2013-06-01 17:42:26 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-06-11 03:10:46 -0400 |
commit | 463c824bb708b47a7a249bde07af4d701cacd54e (patch) | |
tree | 4cfec8f6b45afe03f7c1d67720e795adadc56fc1 /drivers/usb | |
parent | 84a812da09887a473f596a107096e8e1671505c9 (diff) |
phy-rcar-usb: remove EHCI internal buffer setup
Now that the EHCI internal buffer setup is done by the platform code, we can
remove such code from this driver as it never really belonged here. We also
no longer need the 2nd memory region now (2nd EHCI controller is simply missing
in e.g. R8A7778 SoC).
The patch has been tested on the Marzen and BOCK-W boards.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/phy/phy-rcar-usb.c | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/drivers/usb/phy/phy-rcar-usb.c b/drivers/usb/phy/phy-rcar-usb.c index a35681b0c501..4893dbde4ee1 100644 --- a/drivers/usb/phy/phy-rcar-usb.c +++ b/drivers/usb/phy/phy-rcar-usb.c | |||
@@ -23,8 +23,6 @@ | |||
23 | #define USBEH0 0x080C | 23 | #define USBEH0 0x080C |
24 | #define USBOH0 0x081C | 24 | #define USBOH0 0x081C |
25 | #define USBCTL0 0x0858 | 25 | #define USBCTL0 0x0858 |
26 | #define EIIBC1 0x0094 | ||
27 | #define EIIBC2 0x009C | ||
28 | 26 | ||
29 | /* USBPCTRL1 */ | 27 | /* USBPCTRL1 */ |
30 | #define PHY_RST (1 << 2) | 28 | #define PHY_RST (1 << 2) |
@@ -40,7 +38,6 @@ struct rcar_usb_phy_priv { | |||
40 | spinlock_t lock; | 38 | spinlock_t lock; |
41 | 39 | ||
42 | void __iomem *reg0; | 40 | void __iomem *reg0; |
43 | void __iomem *reg1; | ||
44 | int counter; | 41 | int counter; |
45 | }; | 42 | }; |
46 | 43 | ||
@@ -59,7 +56,6 @@ static int rcar_usb_phy_init(struct usb_phy *phy) | |||
59 | struct rcar_usb_phy_priv *priv = usb_phy_to_priv(phy); | 56 | struct rcar_usb_phy_priv *priv = usb_phy_to_priv(phy); |
60 | struct device *dev = phy->dev; | 57 | struct device *dev = phy->dev; |
61 | void __iomem *reg0 = priv->reg0; | 58 | void __iomem *reg0 = priv->reg0; |
62 | void __iomem *reg1 = priv->reg1; | ||
63 | int i; | 59 | int i; |
64 | u32 val; | 60 | u32 val; |
65 | unsigned long flags; | 61 | unsigned long flags; |
@@ -97,19 +93,6 @@ static int rcar_usb_phy_init(struct usb_phy *phy) | |||
97 | iowrite32(0x00000000, (reg0 + USBPCTRL0)); | 93 | iowrite32(0x00000000, (reg0 + USBPCTRL0)); |
98 | 94 | ||
99 | /* | 95 | /* |
100 | * EHCI IP internal buffer setting | ||
101 | * EHCI IP internal buffer enable | ||
102 | * | ||
103 | * These are recommended value of a datasheet | ||
104 | * see [USB :: EHCI internal buffer setting] | ||
105 | */ | ||
106 | iowrite32(0x00ff0040, (reg0 + EIIBC1)); | ||
107 | iowrite32(0x00ff0040, (reg1 + EIIBC1)); | ||
108 | |||
109 | iowrite32(0x00000001, (reg0 + EIIBC2)); | ||
110 | iowrite32(0x00000001, (reg1 + EIIBC2)); | ||
111 | |||
112 | /* | ||
113 | * Bus alignment settings | 96 | * Bus alignment settings |
114 | */ | 97 | */ |
115 | 98 | ||
@@ -145,14 +128,13 @@ static void rcar_usb_phy_shutdown(struct usb_phy *phy) | |||
145 | static int rcar_usb_phy_probe(struct platform_device *pdev) | 128 | static int rcar_usb_phy_probe(struct platform_device *pdev) |
146 | { | 129 | { |
147 | struct rcar_usb_phy_priv *priv; | 130 | struct rcar_usb_phy_priv *priv; |
148 | struct resource *res0, *res1; | 131 | struct resource *res0; |
149 | struct device *dev = &pdev->dev; | 132 | struct device *dev = &pdev->dev; |
150 | void __iomem *reg0, *reg1; | 133 | void __iomem *reg0; |
151 | int ret; | 134 | int ret; |
152 | 135 | ||
153 | res0 = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 136 | res0 = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
154 | res1 = platform_get_resource(pdev, IORESOURCE_MEM, 1); | 137 | if (!res0) { |
155 | if (!res0 || !res1) { | ||
156 | dev_err(dev, "Not enough platform resources\n"); | 138 | dev_err(dev, "Not enough platform resources\n"); |
157 | return -EINVAL; | 139 | return -EINVAL; |
158 | } | 140 | } |
@@ -164,8 +146,7 @@ static int rcar_usb_phy_probe(struct platform_device *pdev) | |||
164 | * this driver can't use devm_request_and_ioremap(dev, res) here | 146 | * this driver can't use devm_request_and_ioremap(dev, res) here |
165 | */ | 147 | */ |
166 | reg0 = devm_ioremap_nocache(dev, res0->start, resource_size(res0)); | 148 | reg0 = devm_ioremap_nocache(dev, res0->start, resource_size(res0)); |
167 | reg1 = devm_ioremap_nocache(dev, res1->start, resource_size(res1)); | 149 | if (!reg0) { |
168 | if (!reg0 || !reg1) { | ||
169 | dev_err(dev, "ioremap error\n"); | 150 | dev_err(dev, "ioremap error\n"); |
170 | return -ENOMEM; | 151 | return -ENOMEM; |
171 | } | 152 | } |
@@ -177,7 +158,6 @@ static int rcar_usb_phy_probe(struct platform_device *pdev) | |||
177 | } | 158 | } |
178 | 159 | ||
179 | priv->reg0 = reg0; | 160 | priv->reg0 = reg0; |
180 | priv->reg1 = reg1; | ||
181 | priv->counter = 0; | 161 | priv->counter = 0; |
182 | priv->phy.dev = dev; | 162 | priv->phy.dev = dev; |
183 | priv->phy.label = dev_name(dev); | 163 | priv->phy.label = dev_name(dev); |