diff options
author | John Crispin <john@openwrt.org> | 2016-01-19 10:15:04 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2016-01-19 10:15:04 +0000 |
commit | 373594fb4b8bafb77d93a3ef6e678006f9e25fd3 (patch) | |
tree | f137312f8ef740c19a573cf0e5080b1ab21c63f7 /target/linux/at91/patches-3.18/200-ARM-at91-udc-clockfix-backport.patch | |
parent | 999d8c87b2011b8dc03d8cd5111303ae54010416 (diff) | |
download | upstream-373594fb4b8bafb77d93a3ef6e678006f9e25fd3.tar.gz upstream-373594fb4b8bafb77d93a3ef6e678006f9e25fd3.tar.bz2 upstream-373594fb4b8bafb77d93a3ef6e678006f9e25fd3.zip |
at91: add 4.4 support
This puts the existing patches and config in a 3.18 folder and introduces
a 4.4 config and patches.
The USB clock fix patch is no longer necessary, and the patches applying
to non DT boards has been dropped as the platform has been converted.
4.4 config was generated by copying 3.18 and running make kernel_menuconfig,
scripts/kconfig.pl filled in the gaps.
Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
SVN-Revision: 48349
Diffstat (limited to 'target/linux/at91/patches-3.18/200-ARM-at91-udc-clockfix-backport.patch')
-rw-r--r-- | target/linux/at91/patches-3.18/200-ARM-at91-udc-clockfix-backport.patch | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/target/linux/at91/patches-3.18/200-ARM-at91-udc-clockfix-backport.patch b/target/linux/at91/patches-3.18/200-ARM-at91-udc-clockfix-backport.patch new file mode 100644 index 0000000000..32e1ac540d --- /dev/null +++ b/target/linux/at91/patches-3.18/200-ARM-at91-udc-clockfix-backport.patch @@ -0,0 +1,82 @@ +--- a/drivers/usb/gadget/udc/at91_udc.c ++++ b/drivers/usb/gadget/udc/at91_udc.c +@@ -870,8 +870,6 @@ static void clk_on(struct at91_udc *udc) + return; + udc->clocked = 1; + +- if (IS_ENABLED(CONFIG_COMMON_CLK)) +- clk_enable(udc->uclk); + clk_enable(udc->iclk); + clk_enable(udc->fclk); + } +@@ -884,8 +882,6 @@ static void clk_off(struct at91_udc *udc + udc->gadget.speed = USB_SPEED_UNKNOWN; + clk_disable(udc->fclk); + clk_disable(udc->iclk); +- if (IS_ENABLED(CONFIG_COMMON_CLK)) +- clk_disable(udc->uclk); + } + + /* +@@ -1766,27 +1762,18 @@ static int at91udc_probe(struct platform + udc_reinit(udc); + + /* get interface and function clocks */ +- udc->iclk = clk_get(dev, "udc_clk"); +- udc->fclk = clk_get(dev, "udpck"); +- if (IS_ENABLED(CONFIG_COMMON_CLK)) +- udc->uclk = clk_get(dev, "usb_clk"); +- if (IS_ERR(udc->iclk) || IS_ERR(udc->fclk) || +- (IS_ENABLED(CONFIG_COMMON_CLK) && IS_ERR(udc->uclk))) { ++ udc->iclk = clk_get(dev, "pclk"); ++ udc->fclk = clk_get(dev, "hclk"); ++ if (IS_ERR(udc->iclk) || IS_ERR(udc->fclk)) { + DBG("clocks missing\n"); + retval = -ENODEV; + goto fail1; + } + +- /* don't do anything until we have both gadget driver and VBUS */ +- if (IS_ENABLED(CONFIG_COMMON_CLK)) { +- clk_set_rate(udc->uclk, 48000000); +- retval = clk_prepare(udc->uclk); +- if (retval) +- goto fail1; +- } ++ clk_set_rate(udc->fclk, 48000000); + retval = clk_prepare(udc->fclk); + if (retval) +- goto fail1a; ++ goto fail1; + + retval = clk_prepare_enable(udc->iclk); + if (retval) +@@ -1860,12 +1847,7 @@ fail1c: + clk_unprepare(udc->iclk); + fail1b: + clk_unprepare(udc->fclk); +-fail1a: +- if (IS_ENABLED(CONFIG_COMMON_CLK)) +- clk_unprepare(udc->uclk); + fail1: +- if (IS_ENABLED(CONFIG_COMMON_CLK) && !IS_ERR(udc->uclk)) +- clk_put(udc->uclk); + if (!IS_ERR(udc->fclk)) + clk_put(udc->fclk); + if (!IS_ERR(udc->iclk)) +@@ -1911,15 +1893,11 @@ static int __exit at91udc_remove(struct + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + release_mem_region(res->start, resource_size(res)); + +- if (IS_ENABLED(CONFIG_COMMON_CLK)) +- clk_unprepare(udc->uclk); + clk_unprepare(udc->fclk); + clk_unprepare(udc->iclk); + + clk_put(udc->iclk); + clk_put(udc->fclk); +- if (IS_ENABLED(CONFIG_COMMON_CLK)) +- clk_put(udc->uclk); + + return 0; + } |