From caa73eb95c490e850d517cb558e4161c2f06d86f Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Wed, 5 Aug 2015 13:55:14 +0000 Subject: [PATCH] kernel: update 4.1 to 4.1.4 Changelog: * https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.4 Signed-off-by: Daniel Golle [jogo: fix brcm2708 patches, refresh target patches] Signed-off-by: Jonas Gorski SVN-Revision: 46560 --- include/kernel-version.mk | 4 +- ...d-gpio-func-register-for-QCA955x-SoC.patch | 2 +- .../813-MIPS-ath79-add-ap147-support.patch | 6 +- .../patches-4.1/0004-Add-dwc_otg-driver.patch | 2 +- ...meter-to-mmc-multi_io_quirk-callback.patch | 2 +- ...-request-1059-from-pelwell-rpi-4.0.y.patch | 130 ++------------- .../140-overlayfs_readdir_locking_fix.patch | 148 ------------------ .../patches-4.1/834-ledtrig-libata.patch | 10 +- ...to-downstream-clocks-during-set_rate.patch | 10 +- .../136-clk-Add-safe-switch-hook.patch | 12 +- .../0030-GPIO-add-named-gpio-exports.patch | 4 +- .../0032-USB-fix-roothub-for-IFXHCD.patch | 2 +- .../patches-4.1/100-mxs-select-syscon.patch | 2 - .../patches-4.1/101-mxs-add-mxs_power.patch | 9 +- .../102-mxs-add-regulator-driver.patch | 9 +- .../patches-4.1/103-dt-enable-regulator.patch | 4 - .../mxs/patches-4.1/120-dt-add-i2c.patch | 4 +- 17 files changed, 42 insertions(+), 318 deletions(-) delete mode 100644 target/linux/generic/patches-4.1/140-overlayfs_readdir_locking_fix.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index e03590f03a..9f68716a11 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -4,11 +4,11 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .19 LINUX_VERSION-4.0 = .9 -LINUX_VERSION-4.1 = .3 +LINUX_VERSION-4.1 = .4 LINUX_KERNEL_MD5SUM-3.18.19 = a143f9421bd8413752609d0d771c2955 LINUX_KERNEL_MD5SUM-4.0.9 = 40fc5f6e2d718e539b45e6601c71985b -LINUX_KERNEL_MD5SUM-4.1.3 = 96c2c77b1c54ba01cfd8fc2d13fbf828 +LINUX_KERNEL_MD5SUM-4.1.4 = 32cb4dd9f14d37bf71bafa6ed368f769 ifdef KERNEL_PATCHVER LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER))) diff --git a/target/linux/ar71xx/patches-4.1/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch b/target/linux/ar71xx/patches-4.1/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch index 24ce7d83c5..23425dca65 100644 --- a/target/linux/ar71xx/patches-4.1/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch +++ b/target/linux/ar71xx/patches-4.1/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch @@ -1,6 +1,6 @@ --- a/arch/mips/ath79/gpio.c +++ b/arch/mips/ath79/gpio.c -@@ -185,15 +185,27 @@ void __init ath79_gpio_output_select(uns +@@ -221,15 +221,27 @@ void __init ath79_gpio_output_select(uns { void __iomem *base = ath79_gpio_base; unsigned long flags; diff --git a/target/linux/ar71xx/patches-4.1/813-MIPS-ath79-add-ap147-support.patch b/target/linux/ar71xx/patches-4.1/813-MIPS-ath79-add-ap147-support.patch index 2ca9a1ecea..ed0d9847bd 100644 --- a/target/linux/ar71xx/patches-4.1/813-MIPS-ath79-add-ap147-support.patch +++ b/target/linux/ar71xx/patches-4.1/813-MIPS-ath79-add-ap147-support.patch @@ -1,6 +1,6 @@ --- a/arch/mips/ath79/Kconfig +++ b/arch/mips/ath79/Kconfig -@@ -118,6 +118,19 @@ config ATH79_MACH_AP143 +@@ -138,6 +138,19 @@ config ATH79_MACH_AP143 Say 'Y' here if you want your kernel to support the Atheros AP143 reference board. @@ -22,7 +22,7 @@ select SOC_AR913X --- a/arch/mips/ath79/Makefile +++ b/arch/mips/ath79/Makefile -@@ -47,6 +47,7 @@ obj-$(CONFIG_ATH79_MACH_AP121) += mach- +@@ -49,6 +49,7 @@ obj-$(CONFIG_ATH79_MACH_AP121) += mach- obj-$(CONFIG_ATH79_MACH_AP132) += mach-ap132.o obj-$(CONFIG_ATH79_MACH_AP136) += mach-ap136.o obj-$(CONFIG_ATH79_MACH_AP143) += mach-ap143.o @@ -32,7 +32,7 @@ obj-$(CONFIG_ATH79_MACH_AP96) += mach-ap96.o --- a/arch/mips/ath79/machtypes.h +++ b/arch/mips/ath79/machtypes.h -@@ -29,6 +29,7 @@ enum ath79_mach_type { +@@ -31,6 +31,7 @@ enum ath79_mach_type { ATH79_MACH_AP136_010, /* Atheros AP136-010 reference board */ ATH79_MACH_AP136_020, /* Atheros AP136-020 reference board */ ATH79_MACH_AP143, /* Atheros AP143 reference board */ diff --git a/target/linux/brcm2708/patches-4.1/0004-Add-dwc_otg-driver.patch b/target/linux/brcm2708/patches-4.1/0004-Add-dwc_otg-driver.patch index 378d33b945..8af34f2239 100644 --- a/target/linux/brcm2708/patches-4.1/0004-Add-dwc_otg-driver.patch +++ b/target/linux/brcm2708/patches-4.1/0004-Add-dwc_otg-driver.patch @@ -894,7 +894,7 @@ dwc_otg: Fix crash when fiq_enable=0 } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -4922,7 +4922,7 @@ static void port_event(struct usb_hub *h +@@ -4906,7 +4906,7 @@ static void port_event(struct usb_hub *h if (portchange & USB_PORT_STAT_C_OVERCURRENT) { u16 status = 0, unused; diff --git a/target/linux/brcm2708/patches-4.1/0066-Add-blk_pos-parameter-to-mmc-multi_io_quirk-callback.patch b/target/linux/brcm2708/patches-4.1/0066-Add-blk_pos-parameter-to-mmc-multi_io_quirk-callback.patch index 6d6aa92c55..8ac90ce4bb 100644 --- a/target/linux/brcm2708/patches-4.1/0066-Add-blk_pos-parameter-to-mmc-multi_io_quirk-callback.patch +++ b/target/linux/brcm2708/patches-4.1/0066-Add-blk_pos-parameter-to-mmc-multi_io_quirk-callback.patch @@ -13,7 +13,7 @@ Subject: [PATCH 066/121] Add blk_pos parameter to mmc multi_io_quirk callback --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c -@@ -1413,6 +1413,7 @@ static void mmc_blk_rw_rq_prep(struct mm +@@ -1415,6 +1415,7 @@ static void mmc_blk_rw_rq_prep(struct mm brq->data.blocks = card->host->ops->multi_io_quirk(card, (rq_data_dir(req) == READ) ? MMC_DATA_READ : MMC_DATA_WRITE, diff --git a/target/linux/brcm2708/patches-4.1/0119-Merge-pull-request-1059-from-pelwell-rpi-4.0.y.patch b/target/linux/brcm2708/patches-4.1/0119-Merge-pull-request-1059-from-pelwell-rpi-4.0.y.patch index 6280f75a48..ddb70dfa0e 100644 --- a/target/linux/brcm2708/patches-4.1/0119-Merge-pull-request-1059-from-pelwell-rpi-4.0.y.patch +++ b/target/linux/brcm2708/patches-4.1/0119-Merge-pull-request-1059-from-pelwell-rpi-4.0.y.patch @@ -51,41 +51,7 @@ w1_therm: Back-port locking improvements from 4.2-rc1 +representing the device index in the bus starting at 0. --- a/drivers/w1/slaves/w1_therm.c +++ b/drivers/w1/slaves/w1_therm.c -@@ -59,16 +59,32 @@ MODULE_ALIAS("w1-family-" __stringify(W1 - static int w1_strong_pullup = 1; - module_param_named(strong_pullup, w1_strong_pullup, int, 0); - -+struct w1_therm_family_data { -+ uint8_t rom[9]; -+ atomic_t refcnt; -+}; -+ -+/* return the address of the refcnt in the family data */ -+#define THERM_REFCNT(family_data) \ -+ (&((struct w1_therm_family_data*)family_data)->refcnt) -+ - static int w1_therm_add_slave(struct w1_slave *sl) - { -- sl->family_data = kzalloc(9, GFP_KERNEL); -+ sl->family_data = kzalloc(sizeof(struct w1_therm_family_data), -+ GFP_KERNEL); - if (!sl->family_data) - return -ENOMEM; -+ atomic_set(THERM_REFCNT(sl->family_data), 1); - return 0; - } - - static void w1_therm_remove_slave(struct w1_slave *sl) - { -+ int refcnt = atomic_sub_return(1, THERM_REFCNT(sl->family_data)); -+ while(refcnt) { -+ msleep(1000); -+ refcnt = atomic_read(THERM_REFCNT(sl->family_data)); -+ } - kfree(sl->family_data); - sl->family_data = NULL; - } -@@ -76,13 +92,24 @@ static void w1_therm_remove_slave(struct +@@ -92,13 +92,24 @@ static void w1_therm_remove_slave(struct static ssize_t w1_slave_show(struct device *device, struct device_attribute *attr, char *buf); @@ -110,7 +76,7 @@ w1_therm: Back-port locking improvements from 4.2-rc1 static struct w1_family_ops w1_therm_fops = { .add_slave = w1_therm_add_slave, -@@ -90,6 +117,12 @@ static struct w1_family_ops w1_therm_fop +@@ -106,6 +117,12 @@ static struct w1_family_ops w1_therm_fop .groups = w1_therm_groups, }; @@ -123,7 +89,7 @@ w1_therm: Back-port locking improvements from 4.2-rc1 static struct w1_family w1_therm_family_DS18S20 = { .fid = W1_THERM_DS18S20, .fops = &w1_therm_fops, -@@ -107,7 +140,7 @@ static struct w1_family w1_therm_family_ +@@ -123,7 +140,7 @@ static struct w1_family w1_therm_family_ static struct w1_family w1_therm_family_DS28EA00 = { .fid = W1_THERM_DS28EA00, @@ -132,86 +98,10 @@ w1_therm: Back-port locking improvements from 4.2-rc1 }; static struct w1_family w1_therm_family_DS1825 = { -@@ -194,13 +227,22 @@ static ssize_t w1_slave_show(struct devi - struct w1_slave *sl = dev_to_w1_slave(device); - struct w1_master *dev = sl->master; - u8 rom[9], crc, verdict, external_power; -- int i, max_trying = 10; -+ int i, ret, max_trying = 10; - ssize_t c = PAGE_SIZE; -+ u8 *family_data = sl->family_data; - -- i = mutex_lock_interruptible(&dev->bus_mutex); -- if (i != 0) -- return i; -+ ret = mutex_lock_interruptible(&dev->bus_mutex); -+ if (ret != 0) -+ goto post_unlock; -+ -+ if(!sl->family_data) -+ { -+ ret = -ENODEV; -+ goto pre_unlock; -+ } - -+ /* prevent the slave from going away in sleep */ -+ atomic_inc(THERM_REFCNT(family_data)); - memset(rom, 0, sizeof(rom)); - - while (max_trying--) { -@@ -230,17 +272,19 @@ static ssize_t w1_slave_show(struct devi - mutex_unlock(&dev->bus_mutex); - - sleep_rem = msleep_interruptible(tm); -- if (sleep_rem != 0) -- return -EINTR; -+ if (sleep_rem != 0) { -+ ret = -EINTR; -+ goto post_unlock; -+ } - -- i = mutex_lock_interruptible(&dev->bus_mutex); -- if (i != 0) -- return i; -+ ret = mutex_lock_interruptible(&dev->bus_mutex); -+ if (ret != 0) -+ goto post_unlock; - } else if (!w1_strong_pullup) { - sleep_rem = msleep_interruptible(tm); - if (sleep_rem != 0) { -- mutex_unlock(&dev->bus_mutex); -- return -EINTR; -+ ret = -EINTR; -+ goto pre_unlock; - } - } - -@@ -269,19 +313,107 @@ static ssize_t w1_slave_show(struct devi - c -= snprintf(buf + PAGE_SIZE - c, c, ": crc=%02x %s\n", - crc, (verdict) ? "YES" : "NO"); - if (verdict) -- memcpy(sl->family_data, rom, sizeof(rom)); -+ memcpy(family_data, rom, sizeof(rom)); - else - dev_warn(device, "Read failed CRC check\n"); - - for (i = 0; i < 9; ++i) - c -= snprintf(buf + PAGE_SIZE - c, c, "%02x ", -- ((u8 *)sl->family_data)[i]); -+ ((u8 *)family_data)[i]); - - c -= snprintf(buf + PAGE_SIZE - c, c, "t=%d\n", - w1_convert_temp(rom, sl->family->fid)); -+ ret = PAGE_SIZE - c; -+ -+pre_unlock: - mutex_unlock(&dev->bus_mutex); +@@ -316,6 +333,89 @@ post_unlock: + return ret; + } -+post_unlock: -+ atomic_dec(THERM_REFCNT(family_data)); -+ return ret; -+} -+ +#define W1_42_CHAIN 0x99 +#define W1_42_CHAIN_OFF 0x3C +#define W1_42_CHAIN_OFF_INV 0xC3 @@ -289,10 +179,12 @@ w1_therm: Back-port locking improvements from 4.2-rc1 + mutex_unlock(&sl->master->bus_mutex); + + c -= snprintf(buf + PAGE_SIZE - c, c, "%d\n", seq); - return PAGE_SIZE - c; ++ return PAGE_SIZE - c; +error: + mutex_unlock(&sl->master->bus_mutex); + return -EIO; - } - ++} ++ static int __init w1_therm_init(void) + { + int err, i; diff --git a/target/linux/generic/patches-4.1/140-overlayfs_readdir_locking_fix.patch b/target/linux/generic/patches-4.1/140-overlayfs_readdir_locking_fix.patch deleted file mode 100644 index 67dff987d3..0000000000 --- a/target/linux/generic/patches-4.1/140-overlayfs_readdir_locking_fix.patch +++ /dev/null @@ -1,148 +0,0 @@ -Patch by: Miklos Szeredi - -Some filesystems (e.g. jffs2) lock the same resources for both readdir -and lookup, leading to a deadlock in ovl_cache_entry_new, which is called -from the filldir, and calls lookup itself. - ---- a/fs/overlayfs/readdir.c -+++ b/fs/overlayfs/readdir.c -@@ -23,6 +23,7 @@ struct ovl_cache_entry { - u64 ino; - struct list_head l_node; - struct rb_node node; -+ struct ovl_cache_entry *next_maybe_whiteout; - bool is_whiteout; - char name[]; - }; -@@ -39,7 +40,7 @@ struct ovl_readdir_data { - struct rb_root root; - struct list_head *list; - struct list_head middle; -- struct dentry *dir; -+ struct ovl_cache_entry *first_maybe_whiteout; - int count; - int err; - }; -@@ -79,7 +80,7 @@ static struct ovl_cache_entry *ovl_cache - return NULL; - } - --static struct ovl_cache_entry *ovl_cache_entry_new(struct dentry *dir, -+static struct ovl_cache_entry *ovl_cache_entry_new(struct ovl_readdir_data *rdd, - const char *name, int len, - u64 ino, unsigned int d_type) - { -@@ -98,29 +99,8 @@ static struct ovl_cache_entry *ovl_cache - p->is_whiteout = false; - - if (d_type == DT_CHR) { -- struct dentry *dentry; -- const struct cred *old_cred; -- struct cred *override_cred; -- -- override_cred = prepare_creds(); -- if (!override_cred) { -- kfree(p); -- return NULL; -- } -- -- /* -- * CAP_DAC_OVERRIDE for lookup -- */ -- cap_raise(override_cred->cap_effective, CAP_DAC_OVERRIDE); -- old_cred = override_creds(override_cred); -- -- dentry = lookup_one_len(name, dir, len); -- if (!IS_ERR(dentry)) { -- p->is_whiteout = ovl_is_whiteout(dentry); -- dput(dentry); -- } -- revert_creds(old_cred); -- put_cred(override_cred); -+ p->next_maybe_whiteout = rdd->first_maybe_whiteout; -+ rdd->first_maybe_whiteout = p; - } - return p; - } -@@ -148,7 +128,7 @@ static int ovl_cache_entry_add_rb(struct - return 0; - } - -- p = ovl_cache_entry_new(rdd->dir, name, len, ino, d_type); -+ p = ovl_cache_entry_new(rdd, name, len, ino, d_type); - if (p == NULL) - return -ENOMEM; - -@@ -169,7 +149,7 @@ static int ovl_fill_lower(struct ovl_rea - if (p) { - list_move_tail(&p->l_node, &rdd->middle); - } else { -- p = ovl_cache_entry_new(rdd->dir, name, namelen, ino, d_type); -+ p = ovl_cache_entry_new(rdd, name, namelen, ino, d_type); - if (p == NULL) - rdd->err = -ENOMEM; - else -@@ -219,6 +199,43 @@ static int ovl_fill_merge(struct dir_con - return ovl_fill_lower(rdd, name, namelen, offset, ino, d_type); - } - -+static int ovl_check_whiteouts(struct dentry *dir, struct ovl_readdir_data *rdd) -+{ -+ int err = 0; -+ -+ mutex_lock(&dir->d_inode->i_mutex); -+ while (rdd->first_maybe_whiteout) { -+ struct dentry *dentry; -+ const struct cred *old_cred; -+ struct cred *override_cred; -+ struct ovl_cache_entry *p = rdd->first_maybe_whiteout; -+ -+ rdd->first_maybe_whiteout = p->next_maybe_whiteout; -+ -+ override_cred = prepare_creds(); -+ if (!override_cred) { -+ err = -ENOMEM; -+ break; -+ } -+ /* -+ * CAP_DAC_OVERRIDE for lookup -+ */ -+ cap_raise(override_cred->cap_effective, CAP_DAC_OVERRIDE); -+ old_cred = override_creds(override_cred); -+ -+ dentry = lookup_one_len(p->name, dir, p->len); -+ if (!IS_ERR(dentry)) { -+ p->is_whiteout = ovl_is_whiteout(dentry); -+ dput(dentry); -+ } -+ revert_creds(old_cred); -+ put_cred(override_cred); -+ } -+ mutex_unlock(&dir->d_inode->i_mutex); -+ -+ return err; -+} -+ - static inline int ovl_dir_read(struct path *realpath, - struct ovl_readdir_data *rdd) - { -@@ -229,7 +246,7 @@ static inline int ovl_dir_read(struct pa - if (IS_ERR(realfile)) - return PTR_ERR(realfile); - -- rdd->dir = realpath->dentry; -+ rdd->first_maybe_whiteout = NULL; - rdd->ctx.pos = 0; - do { - rdd->count = 0; -@@ -238,6 +255,10 @@ static inline int ovl_dir_read(struct pa - if (err >= 0) - err = rdd->err; - } while (!err && rdd->count); -+ -+ if (!err && rdd->first_maybe_whiteout) -+ err = ovl_check_whiteouts(realpath->dentry, rdd); -+ - fput(realfile); - - return err; diff --git a/target/linux/generic/patches-4.1/834-ledtrig-libata.patch b/target/linux/generic/patches-4.1/834-ledtrig-libata.patch index 2a0fb073f0..b794c46663 100644 --- a/target/linux/generic/patches-4.1/834-ledtrig-libata.patch +++ b/target/linux/generic/patches-4.1/834-ledtrig-libata.patch @@ -69,7 +69,7 @@ Signed-off-by: Daniel Golle /** * ata_build_rw_tf - Build ATA taskfile for given read/write request * @tf: Target ATA taskfile -@@ -4774,6 +4787,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -4789,6 +4802,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (tag < 0) return NULL; } @@ -79,7 +79,7 @@ Signed-off-by: Daniel Golle qc = __ata_qc_from_tag(ap, tag); qc->tag = tag; -@@ -5671,6 +5687,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -5686,6 +5702,9 @@ struct ata_port *ata_port_alloc(struct a ap->stats.unhandled_irq = 1; ap->stats.idle_irq = 1; #endif @@ -89,7 +89,7 @@ Signed-off-by: Daniel Golle ata_sff_port_init(ap); return ap; -@@ -5692,6 +5711,12 @@ static void ata_host_release(struct devi +@@ -5707,6 +5726,12 @@ static void ata_host_release(struct devi kfree(ap->pmp_link); kfree(ap->slave_link); @@ -102,7 +102,7 @@ Signed-off-by: Daniel Golle kfree(ap); host->ports[i] = NULL; } -@@ -6138,7 +6163,23 @@ int ata_host_register(struct ata_host *h +@@ -6153,7 +6178,23 @@ int ata_host_register(struct ata_host *h host->ports[i]->print_id = atomic_inc_return(&ata_print_id); host->ports[i]->local_port_no = i + 1; } @@ -138,7 +138,7 @@ Signed-off-by: Daniel Golle /* * Define if arch has non-standard setup. This is a _PCI_ standard -@@ -873,6 +876,12 @@ struct ata_port { +@@ -876,6 +879,12 @@ struct ata_port { #ifdef CONFIG_ATA_ACPI struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ #endif diff --git a/target/linux/ipq806x/patches-4.1/135-clk-Avoid-sending-high-rates-to-downstream-clocks-during-set_rate.patch b/target/linux/ipq806x/patches-4.1/135-clk-Avoid-sending-high-rates-to-downstream-clocks-during-set_rate.patch index 8063860985..143e0795f0 100644 --- a/target/linux/ipq806x/patches-4.1/135-clk-Avoid-sending-high-rates-to-downstream-clocks-during-set_rate.patch +++ b/target/linux/ipq806x/patches-4.1/135-clk-Avoid-sending-high-rates-to-downstream-clocks-during-set_rate.patch @@ -47,7 +47,7 @@ drivers/clk/clk.c | 34 ++++++++++++++++++++++------------ --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -1743,21 +1743,24 @@ static struct clk_core *clk_propagate_ra +@@ -1744,21 +1744,24 @@ static struct clk_core *clk_propagate_ra * walk down a subtree and set the new rates notifying the rate * change on the way */ @@ -79,7 +79,7 @@ drivers/clk/clk.c | 34 ++++++++++++++++++++++------------ if (clk->new_parent && clk->new_parent != clk->parent) { old_parent = __clk_set_parent_before(clk, clk->new_parent); -@@ -1783,7 +1786,7 @@ static void clk_change_rate(struct clk_c +@@ -1784,7 +1787,7 @@ static void clk_change_rate(struct clk_c trace_clk_set_rate_complete(clk, clk->new_rate); @@ -88,7 +88,7 @@ drivers/clk/clk.c | 34 ++++++++++++++++++++++------------ if (clk->notifier_count && old_rate != clk->rate) __clk_notify(clk, POST_RATE_CHANGE, old_rate, clk->rate); -@@ -1796,12 +1799,13 @@ static void clk_change_rate(struct clk_c +@@ -1797,12 +1800,13 @@ static void clk_change_rate(struct clk_c /* Skip children who will be reparented to another clock */ if (child->new_parent && child->new_parent != clk) continue; @@ -105,7 +105,7 @@ drivers/clk/clk.c | 34 ++++++++++++++++++++++------------ } static int clk_core_set_rate_nolock(struct clk_core *clk, -@@ -1810,6 +1814,7 @@ static int clk_core_set_rate_nolock(stru +@@ -1811,6 +1815,7 @@ static int clk_core_set_rate_nolock(stru struct clk_core *top, *fail_clk; unsigned long rate = req_rate; int ret = 0; @@ -113,7 +113,7 @@ drivers/clk/clk.c | 34 ++++++++++++++++++++++------------ if (!clk) return 0; -@@ -1835,8 +1840,13 @@ static int clk_core_set_rate_nolock(stru +@@ -1836,8 +1841,13 @@ static int clk_core_set_rate_nolock(stru return -EBUSY; } diff --git a/target/linux/ipq806x/patches-4.1/136-clk-Add-safe-switch-hook.patch b/target/linux/ipq806x/patches-4.1/136-clk-Add-safe-switch-hook.patch index 0cf4eb331e..b0d89a9681 100644 --- a/target/linux/ipq806x/patches-4.1/136-clk-Add-safe-switch-hook.patch +++ b/target/linux/ipq806x/patches-4.1/136-clk-Add-safe-switch-hook.patch @@ -47,7 +47,7 @@ handles that problem on Krait, but on other platforms it won't work. struct clk_core *new_parent; struct clk_core *new_child; unsigned long flags; -@@ -1595,7 +1598,8 @@ out: +@@ -1596,7 +1599,8 @@ out: static void clk_calc_subtree(struct clk_core *clk, unsigned long new_rate, struct clk_core *new_parent, u8 p_index) { @@ -57,7 +57,7 @@ handles that problem on Krait, but on other platforms it won't work. clk->new_rate = new_rate; clk->new_parent = new_parent; -@@ -1605,6 +1609,18 @@ static void clk_calc_subtree(struct clk_ +@@ -1606,6 +1610,18 @@ static void clk_calc_subtree(struct clk_ if (new_parent && new_parent != clk->parent) new_parent->new_child = clk; @@ -76,7 +76,7 @@ handles that problem on Krait, but on other platforms it won't work. hlist_for_each_entry(child, &clk->children, child_node) { child->new_rate = clk_recalc(child, new_rate); clk_calc_subtree(child, child->new_rate, NULL, 0); -@@ -1709,14 +1725,43 @@ static struct clk_core *clk_propagate_ra +@@ -1710,14 +1726,43 @@ static struct clk_core *clk_propagate_ra unsigned long event) { struct clk_core *child, *tmp_clk, *fail_clk = NULL; @@ -123,7 +123,7 @@ handles that problem on Krait, but on other platforms it won't work. fail_clk = clk; } -@@ -1762,7 +1807,8 @@ clk_change_rate(struct clk_core *clk, un +@@ -1763,7 +1808,8 @@ clk_change_rate(struct clk_core *clk, un old_rate = clk->rate; @@ -133,7 +133,7 @@ handles that problem on Krait, but on other platforms it won't work. old_parent = __clk_set_parent_before(clk, clk->new_parent); trace_clk_set_parent(clk, clk->new_parent); -@@ -1788,9 +1834,6 @@ clk_change_rate(struct clk_core *clk, un +@@ -1789,9 +1835,6 @@ clk_change_rate(struct clk_core *clk, un clk->rate = clk->new_rate; @@ -143,7 +143,7 @@ handles that problem on Krait, but on other platforms it won't work. /* * Use safe iteration, as change_rate can actually swap parents * for certain clock types. -@@ -1850,6 +1893,8 @@ static int clk_core_set_rate_nolock(stru +@@ -1851,6 +1894,8 @@ static int clk_core_set_rate_nolock(stru clk->req_rate = req_rate; diff --git a/target/linux/lantiq/patches-4.1/0030-GPIO-add-named-gpio-exports.patch b/target/linux/lantiq/patches-4.1/0030-GPIO-add-named-gpio-exports.patch index a72a6dad68..6badfe30fa 100644 --- a/target/linux/lantiq/patches-4.1/0030-GPIO-add-named-gpio-exports.patch +++ b/target/linux/lantiq/patches-4.1/0030-GPIO-add-named-gpio-exports.patch @@ -109,7 +109,7 @@ Signed-off-by: John Crispin { --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h -@@ -446,6 +446,7 @@ static inline int desc_to_gpio(const str +@@ -461,6 +461,7 @@ static inline struct gpio_desc *devm_get #if IS_ENABLED(CONFIG_GPIOLIB) && IS_ENABLED(CONFIG_GPIO_SYSFS) @@ -117,7 +117,7 @@ Signed-off-by: John Crispin int gpiod_export(struct gpio_desc *desc, bool direction_may_change); int gpiod_export_link(struct device *dev, const char *name, struct gpio_desc *desc); -@@ -454,6 +455,13 @@ void gpiod_unexport(struct gpio_desc *de +@@ -469,6 +470,13 @@ void gpiod_unexport(struct gpio_desc *de #else /* CONFIG_GPIOLIB && CONFIG_GPIO_SYSFS */ diff --git a/target/linux/lantiq/patches-4.1/0032-USB-fix-roothub-for-IFXHCD.patch b/target/linux/lantiq/patches-4.1/0032-USB-fix-roothub-for-IFXHCD.patch index c32e2bb597..79c811705e 100644 --- a/target/linux/lantiq/patches-4.1/0032-USB-fix-roothub-for-IFXHCD.patch +++ b/target/linux/lantiq/patches-4.1/0032-USB-fix-roothub-for-IFXHCD.patch @@ -20,7 +20,7 @@ Subject: [PATCH 32/36] USB: fix roothub for IFXHCD choice --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -4314,7 +4314,7 @@ hub_port_init (struct usb_hub *hub, stru +@@ -4298,7 +4298,7 @@ hub_port_init (struct usb_hub *hub, stru udev->ttport = hdev->ttport; } else if (udev->speed != USB_SPEED_HIGH && hdev->speed == USB_SPEED_HIGH) { diff --git a/target/linux/mxs/patches-4.1/100-mxs-select-syscon.patch b/target/linux/mxs/patches-4.1/100-mxs-select-syscon.patch index 96173c12fb..81ebec4774 100644 --- a/target/linux/mxs/patches-4.1/100-mxs-select-syscon.patch +++ b/target/linux/mxs/patches-4.1/100-mxs-select-syscon.patch @@ -1,5 +1,3 @@ -diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig -index 8479413..bf04d38 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig @@ -17,6 +17,7 @@ config ARCH_MXS diff --git a/target/linux/mxs/patches-4.1/101-mxs-add-mxs_power.patch b/target/linux/mxs/patches-4.1/101-mxs-add-mxs_power.patch index 8c087dcb98..104736c7c0 100644 --- a/target/linux/mxs/patches-4.1/101-mxs-add-mxs_power.patch +++ b/target/linux/mxs/patches-4.1/101-mxs-add-mxs_power.patch @@ -1,5 +1,3 @@ -diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig -index 4091fb0..0fcc158 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -43,6 +43,14 @@ config MAX8925_POWER @@ -17,11 +15,9 @@ index 4091fb0..0fcc158 100644 config WM831X_BACKUP tristate "WM831X backup battery charger support" depends on MFD_WM831X -diff --git a/drivers/power/Makefile b/drivers/power/Makefile -index b7b0181..8edcad7 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile -@@ -10,6 +10,7 @@ obj-$(CONFIG_GENERIC_ADC_BATTERY) += generic-adc-battery.o +@@ -10,6 +10,7 @@ obj-$(CONFIG_GENERIC_ADC_BATTERY) += gen obj-$(CONFIG_PDA_POWER) += pda_power.o obj-$(CONFIG_APM_POWER) += apm_power.o obj-$(CONFIG_MAX8925_POWER) += max8925_power.o @@ -29,9 +25,6 @@ index b7b0181..8edcad7 100644 obj-$(CONFIG_WM831X_BACKUP) += wm831x_backup.o obj-$(CONFIG_WM831X_POWER) += wm831x_power.o obj-$(CONFIG_WM8350_POWER) += wm8350_power.o -diff --git a/drivers/power/mxs_power.c b/drivers/power/mxs_power.c -new file mode 100644 -index 0000000..669bfb1 --- /dev/null +++ b/drivers/power/mxs_power.c @@ -0,0 +1,136 @@ diff --git a/target/linux/mxs/patches-4.1/102-mxs-add-regulator-driver.patch b/target/linux/mxs/patches-4.1/102-mxs-add-regulator-driver.patch index 7ca14f114c..4690b3c6d4 100644 --- a/target/linux/mxs/patches-4.1/102-mxs-add-regulator-driver.patch +++ b/target/linux/mxs/patches-4.1/102-mxs-add-regulator-driver.patch @@ -1,5 +1,3 @@ -diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig -index a6f116a..7b525f5 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -450,6 +450,14 @@ config REGULATOR_MT6397 @@ -17,11 +15,9 @@ index a6f116a..7b525f5 100644 config REGULATOR_PALMAS tristate "TI Palmas PMIC Regulators" depends on MFD_PALMAS -diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile -index 2c4da15..a3ebf23 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile -@@ -60,6 +60,7 @@ obj-$(CONFIG_REGULATOR_MC13783) += mc13783-regulator.o +@@ -60,6 +60,7 @@ obj-$(CONFIG_REGULATOR_MC13783) += mc137 obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o obj-$(CONFIG_REGULATOR_MT6397) += mt6397-regulator.o @@ -29,9 +25,6 @@ index 2c4da15..a3ebf23 100644 obj-$(CONFIG_REGULATOR_QCOM_RPM) += qcom_rpm-regulator.o obj-$(CONFIG_REGULATOR_PALMAS) += palmas-regulator.o obj-$(CONFIG_REGULATOR_PFUZE100) += pfuze100-regulator.o -diff --git a/drivers/regulator/mxs-regulator.c b/drivers/regulator/mxs-regulator.c -new file mode 100644 -index 0000000..e53707b --- /dev/null +++ b/drivers/regulator/mxs-regulator.c @@ -0,0 +1,540 @@ diff --git a/target/linux/mxs/patches-4.1/103-dt-enable-regulator.patch b/target/linux/mxs/patches-4.1/103-dt-enable-regulator.patch index 3fed18257d..bfcf247f85 100644 --- a/target/linux/mxs/patches-4.1/103-dt-enable-regulator.patch +++ b/target/linux/mxs/patches-4.1/103-dt-enable-regulator.patch @@ -1,5 +1,3 @@ -diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi -index bbcfb5a..efdd702 100644 --- a/arch/arm/boot/dts/imx23.dtsi +++ b/arch/arm/boot/dts/imx23.dtsi @@ -404,8 +404,46 @@ @@ -50,8 +48,6 @@ index bbcfb5a..efdd702 100644 }; saif1: saif@80046000 { -diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi -index 25e25f8..378b1f2 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi @@ -1035,8 +1035,46 @@ diff --git a/target/linux/mxs/patches-4.1/120-dt-add-i2c.patch b/target/linux/mxs/patches-4.1/120-dt-add-i2c.patch index 2aa7250584..79c162aece 100644 --- a/target/linux/mxs/patches-4.1/120-dt-add-i2c.patch +++ b/target/linux/mxs/patches-4.1/120-dt-add-i2c.patch @@ -1,6 +1,6 @@ --- a/arch/arm/boot/dts/imx23.dtsi +++ b/arch/arm/boot/dts/imx23.dtsi -@@ -146,6 +146,39 @@ +@@ -147,6 +147,39 @@ fsl,pull-up = ; }; @@ -40,7 +40,7 @@ auart0_pins_a: auart0@0 { reg = <0>; fsl,pinmux-ids = < -@@ -444,7 +477,12 @@ +@@ -484,7 +517,12 @@ }; i2c@80058000 { -- 2.25.1