Changeset 42291
- Timestamp:
- 2014-08-25T18:31:05+02:00 (3 years ago)
- Location:
- trunk/target/linux/ramips/patches-3.14
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/target/linux/ramips/patches-3.14/0037-USB-phy-add-ralink-SoC-driver.patch
r42040 r42291 12 12 create mode 100644 drivers/usb/phy/ralink-phy.c 13 13 14 diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig15 index 7d1451d..fc04d76 100644 16 --- a/drivers/usb/phy/Kconfig17 +++ b/drivers/usb/phy/Kconfig18 @@ -251,6 +251,14 @@ config USB_RCAR_GEN2_PHY14 Index: linux-3.14.16/drivers/usb/phy/Kconfig 15 =================================================================== 16 --- linux-3.14.16.orig/drivers/usb/phy/Kconfig 2014-08-08 01:50:59.000000000 +0200 17 +++ linux-3.14.16/drivers/usb/phy/Kconfig 2014-08-24 12:39:21.094371467 +0200 18 @@ -251,6 +251,14 @@ 19 19 To compile this driver as a module, choose M here: the 20 20 module will be called phy-rcar-gen2-usb. … … 31 31 bool "Generic ULPI Transceiver Driver" 32 32 depends on ARM 33 diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile34 index be58ada..52d59c1 100644 35 --- a/drivers/usb/phy/Makefile36 +++ b/drivers/usb/phy/Makefile37 @@ -33,3 +33,4 @@ obj-$(CONFIG_USB_RCAR_GEN2_PHY) += phy-rcar-gen2-usb.o33 Index: linux-3.14.16/drivers/usb/phy/Makefile 34 =================================================================== 35 --- linux-3.14.16.orig/drivers/usb/phy/Makefile 2014-08-08 01:50:59.000000000 +0200 36 +++ linux-3.14.16/drivers/usb/phy/Makefile 2014-08-24 12:39:21.094371467 +0200 37 @@ -33,3 +33,4 @@ 38 38 obj-$(CONFIG_USB_ULPI) += phy-ulpi.o 39 39 obj-$(CONFIG_USB_ULPI_VIEWPORT) += phy-ulpi-viewport.o 40 40 obj-$(CONFIG_KEYSTONE_USB_PHY) += phy-keystone.o 41 41 +obj-$(CONFIG_RALINK_USBPHY) += ralink-phy.o 42 diff --git a/drivers/usb/phy/ralink-phy.c b/drivers/usb/phy/ralink-phy.c 43 new file mode 100644 44 index 0000000..28046e5 45 --- /dev/null 46 +++ b/drivers/usb/phy/ralink-phy.c 47 @@ -0,0 +1,190 @@ 42 Index: linux-3.14.16/drivers/usb/phy/ralink-phy.c 43 =================================================================== 44 --- /dev/null 1970-01-01 00:00:00.000000000 +0000 45 +++ linux-3.14.16/drivers/usb/phy/ralink-phy.c 2014-08-24 14:28:35.886531881 +0200 46 @@ -0,0 +1,191 @@ 48 47 +/* 49 48 + * Copyright (C) 2013 John Crispin <blogic@openwrt.org> … … 76 75 + 77 76 +#define MT7620_CLKCFG1_UPHY0_CLK_EN BIT(25) 77 +#define MT7620_CLKCFG1_UPHY1_CLK_EN BIT(22) 78 78 +#define RT_CLKCFG1_UPHY1_CLK_EN BIT(20) 79 79 +#define RT_CLKCFG1_UPHY0_CLK_EN BIT(18) … … 159 159 +static const struct of_device_id ralink_usbphy_dt_match[] = { 160 160 + { .compatible = "ralink,rt3xxx-usbphy", .data = (void *) (RT_CLKCFG1_UPHY1_CLK_EN | RT_CLKCFG1_UPHY0_CLK_EN) }, 161 + { .compatible = "ralink,mt7620a-usbphy", .data = (void *) MT7620_CLKCFG1_UPHY0_CLK_EN},161 + { .compatible = "ralink,mt7620a-usbphy", .data = (void *) (MT7620_CLKCFG1_UPHY1_CLK_EN | MT7620_CLKCFG1_UPHY0_CLK_EN) }, 162 162 + {}, 163 163 +}; … … 236 236 +MODULE_DESCRIPTION("Ralink USB phy"); 237 237 +MODULE_AUTHOR("John Crispin <blogic@openwrt.org>"); 238 --239 1.7.10.4240 -
trunk/target/linux/ramips/patches-3.14/0038-USB-add-OHCI-EHCI-OF-binding.patch
r42040 r42291 13 13 3 files changed, 50 insertions(+), 11 deletions(-) 14 14 15 diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile16 index 1ae2bf3..aaa15d9 100644 17 --- a/drivers/usb/Makefile18 +++ b/drivers/usb/Makefile19 @@ -11,6 +11,8 @@ obj-$(CONFIG_USB_DWC2) += dwc2/15 Index: linux-3.14.16/drivers/usb/Makefile 16 =================================================================== 17 --- linux-3.14.16.orig/drivers/usb/Makefile 2014-08-08 01:50:59.000000000 +0200 18 +++ linux-3.14.16/drivers/usb/Makefile 2014-08-24 14:33:57.590539754 +0200 19 @@ -11,6 +11,8 @@ 20 20 21 21 obj-$(CONFIG_USB_MON) += mon/ … … 26 26 obj-$(CONFIG_USB_EHCI_HCD) += host/ 27 27 obj-$(CONFIG_USB_ISP116X_HCD) += host/ 28 @@ -41,7 +43,6 @@ obj-$(CONFIG_USB_TMC) += class/28 @@ -41,7 +43,6 @@ 29 29 obj-$(CONFIG_USB_STORAGE) += storage/ 30 30 obj-$(CONFIG_USB) += storage/ … … 34 34 35 35 obj-$(CONFIG_USB_SERIAL) += serial/ 36 diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c37 index 01536cf..1b9a8f4 100644 38 --- a/drivers/usb/host/ehci-platform.c39 +++ b/drivers/usb/host/ehci-platform.c36 Index: linux-3.14.16/drivers/usb/host/ehci-platform.c 37 =================================================================== 38 --- linux-3.14.16.orig/drivers/usb/host/ehci-platform.c 2014-08-24 12:39:18.806371411 +0200 39 +++ linux-3.14.16/drivers/usb/host/ehci-platform.c 2014-08-24 12:39:21.102371467 +0200 40 40 @@ -29,6 +29,8 @@ 41 41 #include <linux/usb.h> … … 47 47 #include "ehci.h" 48 48 49 @@ -12 3,6 +125,15 @@ static int ehci_platform_probe(struct platform_device *dev)49 @@ -124,6 +126,15 @@ 50 50 hcd->rsrc_start = res_mem->start; 51 51 hcd->rsrc_len = resource_size(res_mem); … … 63 63 if (IS_ERR(hcd->regs)) { 64 64 err = PTR_ERR(hcd->regs); 65 @@ -16 0,6 +171,9 @@ static int ehci_platform_remove(struct platform_device *dev)65 @@ -161,6 +172,9 @@ 66 66 if (pdata == &ehci_platform_defaults) 67 67 dev->dev.platform_data = NULL; … … 73 73 } 74 74 75 @@ -20 4,9 +218,8 @@ static int ehci_platform_resume(struct device *dev)75 @@ -205,9 +219,8 @@ 76 76 #define ehci_platform_resume NULL 77 77 #endif /* CONFIG_PM */ … … 85 85 }; 86 86 87 @@ -23 0,7 +243,7 @@ static struct platform_driver ehci_platform_driver = {87 @@ -231,7 +244,7 @@ 88 88 .owner = THIS_MODULE, 89 89 .name = "ehci-platform", … … 94 94 }; 95 95 96 diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c 97 index 68f674c..2a73fed 100644 98 --- a/drivers/usb/host/ohci-platform.c 99 +++ b/drivers/usb/host/ohci-platform.c 100 @@ -23,17 +23,20 @@ 96 Index: linux-3.14.16/drivers/usb/host/ohci-platform.c 97 =================================================================== 98 --- linux-3.14.16.orig/drivers/usb/host/ohci-platform.c 2014-08-08 01:50:59.000000000 +0200 99 +++ linux-3.14.16/drivers/usb/host/ohci-platform.c 2014-08-24 12:41:51.422375146 +0200 100 @@ -22,18 +22,22 @@ 101 #include <linux/platform_device.h> 101 102 #include <linux/usb/ohci_pdriver.h> 102 103 #include <linux/usb.h> 104 +#include <linux/usb/phy.h> 103 105 #include <linux/usb/hcd.h> 104 106 +#include <linux/dma-mapping.h> … … 116 118 struct platform_device *pdev = to_platform_device(hcd->self.controller); 117 119 - struct usb_ohci_pdata *pdata = dev_get_platdata(&pdev->dev); 118 + struct usb_ohci_pdata *pdata ;120 + struct usb_ohci_pdata *pdata = dev_get_platdata(&pdev->dev);; 119 121 struct ohci_hcd *ohci = hcd_to_ohci(hcd); 120 122 121 123 if (pdata->big_endian_desc) 122 @@ -63,11 +6 6,18 @@ static int ohci_platform_probe(struct platform_device *dev)124 @@ -63,11 +67,18 @@ 123 125 int irq; 124 126 int err = -ENOMEM; … … 128 130 - return -ENODEV; 129 131 - } 130 -131 132 + /* 132 133 + * use reasonable defaults so platforms don't have to provide these. … … 139 140 + if (!dev->dev.coherent_dma_mask) 140 141 + dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); 141 + 142 142 143 + pdata = dev->dev.platform_data; 143 144 if (usb_disabled()) 144 145 return -ENODEV; 145 146 146 @@ -99,6 +1 09,12 @@ static int ohci_platform_probe(struct platform_device *dev)147 @@ -99,6 +110,12 @@ 147 148 hcd->rsrc_start = res_mem->start; 148 149 hcd->rsrc_len = resource_size(res_mem); … … 157 158 if (IS_ERR(hcd->regs)) { 158 159 err = PTR_ERR(hcd->regs); 159 @@ -134,6 +15 0,9 @@ static int ohci_platform_remove(struct platform_device *dev)160 @@ -134,6 +151,9 @@ 160 161 if (pdata->power_off) 161 162 pdata->power_off(dev); … … 167 168 } 168 169 169 @@ -180,6 + 199,11 @@ static int ohci_platform_resume(struct device *dev)170 @@ -180,6 +200,11 @@ 170 171 #define ohci_platform_resume NULL 171 172 #endif /* CONFIG_PM */ … … 179 180 { "ohci-platform", 0 }, 180 181 { } 181 @@ -200,6 +22 4,7 @@ static struct platform_driver ohci_platform_driver = {182 @@ -200,6 +225,7 @@ 182 183 .owner = THIS_MODULE, 183 184 .name = "ohci-platform", … … 187 188 }; 188 189 189 --190 1.7.10.4191
Note: See TracChangeset
for help on using the changeset viewer.