mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-18 04:41:35 +00:00
Attached cubox-i default to stock, next to 5.2.y
* Attached cubox-i to stock kernel. Tested. Sadly ZRAM has some issues, so it must ramain disabled * more imx6 updates for cubox/udoo * Enable HDMI on Cubox-i Signed-off-by: Igor Pecovnik <igor.pecovnik@gmail.com>
This commit is contained in:
parent
631296f2e6
commit
31a077cfbe
94 changed files with 70377 additions and 10459 deletions
|
@ -3,9 +3,7 @@ BOARD_NAME="Cubox i2eX/i4"
|
|||
BOARDFAMILY="cubox"
|
||||
BOOTCONFIG="mx6_cubox-i_config"
|
||||
#
|
||||
MODULES="dw_hdmi_i2s_audio dw_hdmi_ahb_audio dw_hdmi_imx imx_sdma imxdrm"
|
||||
MODULES_NEXT="dw_hdmi_i2s_audio dw_axi_dmac_platform dw_hdmi_ahb_audio dw_hdmi_imx imx_pxp imx_sdma imxdrm"
|
||||
MODULES=""
|
||||
MODULES_NEXT="dw_hdmi_i2s_audio dw_hdmi_ahb_audio imx_pxp"
|
||||
#
|
||||
KERNEL_TARGET="default,next,dev"
|
||||
CLI_TARGET="buster,bionic:default,next"
|
||||
DESKTOP_TARGET="buster,bionic:default,next"
|
||||
|
|
|
@ -5,6 +5,6 @@ BOOTCONFIG="udoo_defconfig"
|
|||
MODULES=""
|
||||
MODULES_NEXT=""
|
||||
#
|
||||
KERNEL_TARGET="next"
|
||||
KERNEL_TARGET="next,dev"
|
||||
CLI_TARGET="buster,bionic:next"
|
||||
DESKTOP_TARGET=""
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
5546
config/kernel/linux-udoo-dev.config
Normal file
5546
config/kernel/linux-udoo-dev.config
Normal file
File diff suppressed because it is too large
Load diff
|
@ -19,13 +19,14 @@ case $BRANCH in
|
|||
|
||||
default)
|
||||
|
||||
KERNELBRANCH='branch:linux-4.14.y'
|
||||
|
||||
KERNELSOURCE='https://github.com/SolidRun/linux-stable'
|
||||
KERNELBRANCH='branch:linux-4.9.y-imx6'
|
||||
KERNELDIR='linux-imx6'
|
||||
;;
|
||||
|
||||
next)
|
||||
|
||||
KERNELBRANCH='branch:linux-5.1.y'
|
||||
KERNELBRANCH='branch:linux-5.2.y'
|
||||
|
||||
;;
|
||||
|
||||
|
@ -67,9 +68,7 @@ fi
|
|||
|
||||
family_tweaks()
|
||||
{
|
||||
# TODO: Fix the workaround in firstrun?
|
||||
#chroot $SDCARD /bin/bash -c "LC_ALL=C LANG=C update-rc.d brcm4330-patch defaults > /dev/null"
|
||||
echo ""
|
||||
chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools"
|
||||
}
|
||||
|
||||
family_tweaks_bsp()
|
||||
|
|
|
@ -19,6 +19,13 @@ case $BRANCH in
|
|||
KERNEL_USE_GCC='> 6.0'
|
||||
;;
|
||||
|
||||
dev)
|
||||
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
KERNELBRANCH='branch:linux-5.2.y'
|
||||
KERNEL_USE_GCC='> 7.0'
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
CPUMIN=392000
|
||||
|
|
File diff suppressed because it is too large
Load diff
400
patch/kernel/cubox-default/0002-aufs4.9.patch
Normal file
400
patch/kernel/cubox-default/0002-aufs4.9.patch
Normal file
|
@ -0,0 +1,400 @@
|
|||
diff --git a/fs/dcache.c b/fs/dcache.c
|
||||
index fc74297..98de99a 100644
|
||||
--- a/fs/dcache.c
|
||||
+++ b/fs/dcache.c
|
||||
@@ -1272,6 +1272,7 @@ void d_walk(struct dentry *parent, void *data,
|
||||
seq = 1;
|
||||
goto again;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(d_walk);
|
||||
|
||||
/*
|
||||
* Search for at least 1 mount point in the dentry's subdirs.
|
||||
@@ -2858,6 +2859,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
|
||||
|
||||
write_sequnlock(&rename_lock);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(d_exchange);
|
||||
|
||||
/**
|
||||
* d_ancestor - search for an ancestor
|
||||
diff --git a/fs/exec.c b/fs/exec.c
|
||||
index 67e8657..70f15ed 100644
|
||||
--- a/fs/exec.c
|
||||
+++ b/fs/exec.c
|
||||
@@ -104,6 +104,7 @@ bool path_noexec(const struct path *path)
|
||||
return (path->mnt->mnt_flags & MNT_NOEXEC) ||
|
||||
(path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(path_noexec);
|
||||
|
||||
#ifdef CONFIG_USELIB
|
||||
/*
|
||||
diff --git a/fs/fcntl.c b/fs/fcntl.c
|
||||
index 6f42279..04fd33c 100644
|
||||
--- a/fs/fcntl.c
|
||||
+++ b/fs/fcntl.c
|
||||
@@ -82,6 +82,7 @@ int setfl(int fd, struct file * filp, unsigned long arg)
|
||||
out:
|
||||
return error;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(setfl);
|
||||
|
||||
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
|
||||
int force)
|
||||
diff --git a/fs/file_table.c b/fs/file_table.c
|
||||
index ad17e05..ae9f267 100644
|
||||
--- a/fs/file_table.c
|
||||
+++ b/fs/file_table.c
|
||||
@@ -147,6 +147,7 @@ struct file *get_empty_filp(void)
|
||||
}
|
||||
return ERR_PTR(-ENFILE);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(get_empty_filp);
|
||||
|
||||
/**
|
||||
* alloc_file - allocate and initialize a 'struct file'
|
||||
@@ -258,6 +259,7 @@ void flush_delayed_fput(void)
|
||||
{
|
||||
delayed_fput(NULL);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(flush_delayed_fput);
|
||||
|
||||
static DECLARE_DELAYED_WORK(delayed_fput_work, delayed_fput);
|
||||
|
||||
@@ -300,6 +302,7 @@ void __fput_sync(struct file *file)
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(fput);
|
||||
+EXPORT_SYMBOL_GPL(__fput_sync);
|
||||
|
||||
void put_filp(struct file *file)
|
||||
{
|
||||
@@ -308,6 +311,7 @@ void put_filp(struct file *file)
|
||||
file_free(file);
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(put_filp);
|
||||
|
||||
void __init files_init(void)
|
||||
{
|
||||
diff --git a/fs/inode.c b/fs/inode.c
|
||||
index 9a9ba3a..a3a18d8 100644
|
||||
--- a/fs/inode.c
|
||||
+++ b/fs/inode.c
|
||||
@@ -1651,6 +1651,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
|
||||
|
||||
return update_time(inode, time, flags);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(update_time);
|
||||
|
||||
/**
|
||||
* touch_atime - update the access time
|
||||
diff --git a/fs/namespace.c b/fs/namespace.c
|
||||
index 7cea503..acd0e21 100644
|
||||
--- a/fs/namespace.c
|
||||
+++ b/fs/namespace.c
|
||||
@@ -466,6 +466,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
|
||||
mnt_dec_writers(real_mount(mnt));
|
||||
preempt_enable();
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(__mnt_drop_write);
|
||||
|
||||
/**
|
||||
* mnt_drop_write - give up write access to a mount
|
||||
@@ -1847,6 +1848,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(iterate_mounts);
|
||||
|
||||
static void cleanup_group_ids(struct mount *mnt, struct mount *end)
|
||||
{
|
||||
diff --git a/fs/notify/group.c b/fs/notify/group.c
|
||||
index fbe3cbe..bdfc61e 100644
|
||||
--- a/fs/notify/group.c
|
||||
+++ b/fs/notify/group.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/srcu.h>
|
||||
#include <linux/rculist.h>
|
||||
#include <linux/wait.h>
|
||||
+#include <linux/module.h>
|
||||
|
||||
#include <linux/fsnotify_backend.h>
|
||||
#include "fsnotify.h"
|
||||
@@ -100,6 +101,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
|
||||
{
|
||||
atomic_inc(&group->refcnt);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_get_group);
|
||||
|
||||
/*
|
||||
* Drop a reference to a group. Free it if it's through.
|
||||
@@ -109,6 +111,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
|
||||
if (atomic_dec_and_test(&group->refcnt))
|
||||
fsnotify_final_destroy_group(group);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_put_group);
|
||||
|
||||
/*
|
||||
* Create a new fsnotify_group and hold a reference for the group returned.
|
||||
@@ -137,6 +140,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
|
||||
|
||||
return group;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_alloc_group);
|
||||
|
||||
int fsnotify_fasync(int fd, struct file *file, int on)
|
||||
{
|
||||
diff --git a/fs/notify/mark.c b/fs/notify/mark.c
|
||||
index d3fea0b..5fc06ad 100644
|
||||
--- a/fs/notify/mark.c
|
||||
+++ b/fs/notify/mark.c
|
||||
@@ -113,6 +113,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
|
||||
mark->free_mark(mark);
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_put_mark);
|
||||
|
||||
/* Calculate mask of events for a list of marks */
|
||||
u32 fsnotify_recalc_mask(struct hlist_head *head)
|
||||
@@ -230,6 +231,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
|
||||
mutex_unlock(&group->mark_mutex);
|
||||
fsnotify_free_mark(mark);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_destroy_mark);
|
||||
|
||||
void fsnotify_destroy_marks(struct hlist_head *head, spinlock_t *lock)
|
||||
{
|
||||
@@ -415,6 +417,7 @@ int fsnotify_add_mark_locked(struct fsnotify_mark *mark,
|
||||
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_add_mark);
|
||||
|
||||
int fsnotify_add_mark(struct fsnotify_mark *mark, struct fsnotify_group *group,
|
||||
struct inode *inode, struct vfsmount *mnt, int allow_dups)
|
||||
@@ -533,6 +536,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
|
||||
atomic_set(&mark->refcnt, 1);
|
||||
mark->free_mark = free_mark;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_init_mark);
|
||||
|
||||
/*
|
||||
* Destroy all marks in destroy_list, waits for SRCU period to finish before
|
||||
diff --git a/fs/open.c b/fs/open.c
|
||||
index d3ed817..20d2494 100644
|
||||
--- a/fs/open.c
|
||||
+++ b/fs/open.c
|
||||
@@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
|
||||
inode_unlock(dentry->d_inode);
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(do_truncate);
|
||||
|
||||
long vfs_truncate(const struct path *path, loff_t length)
|
||||
{
|
||||
@@ -695,6 +696,7 @@ int open_check_o_direct(struct file *f)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(open_check_o_direct);
|
||||
|
||||
static int do_dentry_open(struct file *f,
|
||||
struct inode *inode,
|
||||
diff --git a/fs/read_write.c b/fs/read_write.c
|
||||
index 4052813..7dfd732 100644
|
||||
--- a/fs/read_write.c
|
||||
+++ b/fs/read_write.c
|
||||
@@ -525,6 +525,7 @@ vfs_readf_t vfs_readf(struct file *file)
|
||||
return new_sync_read;
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(vfs_readf);
|
||||
|
||||
vfs_writef_t vfs_writef(struct file *file)
|
||||
{
|
||||
@@ -536,6 +537,7 @@ vfs_writef_t vfs_writef(struct file *file)
|
||||
return new_sync_write;
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(vfs_writef);
|
||||
|
||||
ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t *pos)
|
||||
{
|
||||
diff --git a/fs/splice.c b/fs/splice.c
|
||||
index 608a98b..e50c4ec 100644
|
||||
--- a/fs/splice.c
|
||||
+++ b/fs/splice.c
|
||||
@@ -868,6 +868,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
|
||||
|
||||
return splice_write(pipe, out, ppos, len, flags);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(do_splice_from);
|
||||
|
||||
/*
|
||||
* Attempt to initiate a splice from a file to a pipe.
|
||||
@@ -897,6 +898,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
|
||||
|
||||
return splice_read(in, ppos, pipe, len, flags);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(do_splice_to);
|
||||
|
||||
/**
|
||||
* splice_direct_to_actor - splices data directly between two non-pipes
|
||||
diff --git a/fs/sync.c b/fs/sync.c
|
||||
index 7a5fa3f..c9b9d46 100644
|
||||
--- a/fs/sync.c
|
||||
+++ b/fs/sync.c
|
||||
@@ -38,6 +38,7 @@ int __sync_filesystem(struct super_block *sb, int wait)
|
||||
sb->s_op->sync_fs(sb, wait);
|
||||
return __sync_blockdev(sb->s_bdev, wait);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(__sync_filesystem);
|
||||
|
||||
/*
|
||||
* Write out and wait upon all dirty data associated with this
|
||||
diff --git a/fs/xattr.c b/fs/xattr.c
|
||||
index 2d13b4e..41c2bcd 100644
|
||||
--- a/fs/xattr.c
|
||||
+++ b/fs/xattr.c
|
||||
@@ -296,6 +296,7 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
|
||||
*xattr_value = value;
|
||||
return error;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(vfs_getxattr_alloc);
|
||||
|
||||
ssize_t
|
||||
__vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name,
|
||||
diff --git a/kernel/task_work.c b/kernel/task_work.c
|
||||
index d513051..e056d54 100644
|
||||
--- a/kernel/task_work.c
|
||||
+++ b/kernel/task_work.c
|
||||
@@ -119,3 +119,4 @@ void task_work_run(void)
|
||||
} while (work);
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(task_work_run);
|
||||
diff --git a/security/commoncap.c b/security/commoncap.c
|
||||
index 8df676f..6b5cc07 100644
|
||||
--- a/security/commoncap.c
|
||||
+++ b/security/commoncap.c
|
||||
@@ -1061,12 +1061,14 @@ int cap_mmap_addr(unsigned long addr)
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(cap_mmap_addr);
|
||||
|
||||
int cap_mmap_file(struct file *file, unsigned long reqprot,
|
||||
unsigned long prot, unsigned long flags)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(cap_mmap_file);
|
||||
|
||||
#ifdef CONFIG_SECURITY
|
||||
|
||||
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
|
||||
index 03c1652..f88c84b 100644
|
||||
--- a/security/device_cgroup.c
|
||||
+++ b/security/device_cgroup.c
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <linux/device_cgroup.h>
|
||||
#include <linux/cgroup.h>
|
||||
#include <linux/ctype.h>
|
||||
+#include <linux/export.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/seq_file.h>
|
||||
@@ -849,6 +850,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
|
||||
return __devcgroup_check_permission(type, imajor(inode), iminor(inode),
|
||||
access);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(__devcgroup_inode_permission);
|
||||
|
||||
int devcgroup_inode_mknod(int mode, dev_t dev)
|
||||
{
|
||||
diff --git a/security/security.c b/security/security.c
|
||||
index f825304..8dd441d 100644
|
||||
--- a/security/security.c
|
||||
+++ b/security/security.c
|
||||
@@ -443,6 +443,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
|
||||
return 0;
|
||||
return call_int_hook(path_rmdir, 0, dir, dentry);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_rmdir);
|
||||
|
||||
int security_path_unlink(const struct path *dir, struct dentry *dentry)
|
||||
{
|
||||
@@ -459,6 +460,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry,
|
||||
return 0;
|
||||
return call_int_hook(path_symlink, 0, dir, dentry, old_name);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_symlink);
|
||||
|
||||
int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
|
||||
struct dentry *new_dentry)
|
||||
@@ -467,6 +469,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
|
||||
return 0;
|
||||
return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_link);
|
||||
|
||||
int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
|
||||
const struct path *new_dir, struct dentry *new_dentry,
|
||||
@@ -494,6 +497,7 @@ int security_path_truncate(const struct path *path)
|
||||
return 0;
|
||||
return call_int_hook(path_truncate, 0, path);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_truncate);
|
||||
|
||||
int security_path_chmod(const struct path *path, umode_t mode)
|
||||
{
|
||||
@@ -501,6 +505,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
|
||||
return 0;
|
||||
return call_int_hook(path_chmod, 0, path, mode);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_chmod);
|
||||
|
||||
int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
|
||||
{
|
||||
@@ -508,6 +513,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
|
||||
return 0;
|
||||
return call_int_hook(path_chown, 0, path, uid, gid);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_chown);
|
||||
|
||||
int security_path_chroot(const struct path *path)
|
||||
{
|
||||
@@ -593,6 +599,7 @@ int security_inode_readlink(struct dentry *dentry)
|
||||
return 0;
|
||||
return call_int_hook(inode_readlink, 0, dentry);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_inode_readlink);
|
||||
|
||||
int security_inode_follow_link(struct dentry *dentry, struct inode *inode,
|
||||
bool rcu)
|
||||
@@ -608,6 +615,7 @@ int security_inode_permission(struct inode *inode, int mask)
|
||||
return 0;
|
||||
return call_int_hook(inode_permission, 0, inode, mask);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_inode_permission);
|
||||
|
||||
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
|
||||
{
|
||||
@@ -779,6 +787,7 @@ int security_file_permission(struct file *file, int mask)
|
||||
|
||||
return fsnotify_perm(file, mask);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_file_permission);
|
||||
|
||||
int security_file_alloc(struct file *file)
|
||||
{
|
||||
@@ -838,6 +847,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
|
||||
return ret;
|
||||
return ima_file_mmap(file, prot);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_mmap_file);
|
||||
|
||||
int security_mmap_addr(unsigned long addr)
|
||||
{
|
|
@ -1,173 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
index 14fff4ee6516..b20508237046 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
@@ -64,38 +64,34 @@
|
||||
};
|
||||
};
|
||||
|
||||
- regulators {
|
||||
- compatible = "simple-bus";
|
||||
-
|
||||
- reg_3p3v: 3p3v {
|
||||
- compatible = "regulator-fixed";
|
||||
- regulator-name = "3P3V";
|
||||
- regulator-min-microvolt = <3300000>;
|
||||
- regulator-max-microvolt = <3300000>;
|
||||
- regulator-always-on;
|
||||
- };
|
||||
+ reg_3p3v: 3p3v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "3P3V";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
|
||||
- reg_usbh1_vbus: usb-h1-vbus {
|
||||
- compatible = "regulator-fixed";
|
||||
- enable-active-high;
|
||||
- gpio = <&gpio1 0 0>;
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pinctrl_cubox_i_usbh1_vbus>;
|
||||
- regulator-name = "usb_h1_vbus";
|
||||
- regulator-min-microvolt = <5000000>;
|
||||
- regulator-max-microvolt = <5000000>;
|
||||
- };
|
||||
+ reg_usbh1_vbus: usb-h1-vbus {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio1 0 0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_cubox_i_usbh1_vbus>;
|
||||
+ regulator-name = "usb_h1_vbus";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ };
|
||||
|
||||
- reg_usbotg_vbus: usb-otg-vbus {
|
||||
- compatible = "regulator-fixed";
|
||||
- enable-active-high;
|
||||
- gpio = <&gpio3 22 0>;
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pinctrl_cubox_i_usbotg_vbus>;
|
||||
- regulator-name = "usb_otg_vbus";
|
||||
- regulator-min-microvolt = <5000000>;
|
||||
- regulator-max-microvolt = <5000000>;
|
||||
- };
|
||||
+ reg_usbotg_vbus: usb-otg-vbus {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio3 22 0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_cubox_i_usbotg_vbus>;
|
||||
+ regulator-name = "usb_otg_vbus";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
};
|
||||
|
||||
sound-spdif {
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
index 37c07c0748aa..0a0a7e4b956b 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
@@ -53,38 +53,34 @@
|
||||
pinctrl-0 = <&pinctrl_hummingboard_gpio3_5>;
|
||||
};
|
||||
|
||||
- regulators {
|
||||
- compatible = "simple-bus";
|
||||
-
|
||||
- reg_3p3v: 3p3v {
|
||||
- compatible = "regulator-fixed";
|
||||
- regulator-name = "3P3V";
|
||||
- regulator-min-microvolt = <3300000>;
|
||||
- regulator-max-microvolt = <3300000>;
|
||||
- regulator-always-on;
|
||||
- };
|
||||
+ reg_3p3v: 3p3v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "3P3V";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
|
||||
- reg_usbh1_vbus: usb-h1-vbus {
|
||||
- compatible = "regulator-fixed";
|
||||
- enable-active-high;
|
||||
- gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pinctrl_hummingboard_usbh1_vbus>;
|
||||
- regulator-name = "usb_h1_vbus";
|
||||
- regulator-min-microvolt = <5000000>;
|
||||
- regulator-max-microvolt = <5000000>;
|
||||
- };
|
||||
+ reg_usbh1_vbus: usb-h1-vbus {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard_usbh1_vbus>;
|
||||
+ regulator-name = "usb_h1_vbus";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ };
|
||||
|
||||
- reg_usbotg_vbus: usb-otg-vbus {
|
||||
- compatible = "regulator-fixed";
|
||||
- enable-active-high;
|
||||
- gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pinctrl_hummingboard_usbotg_vbus>;
|
||||
- regulator-name = "usb_otg_vbus";
|
||||
- regulator-min-microvolt = <5000000>;
|
||||
- regulator-max-microvolt = <5000000>;
|
||||
- };
|
||||
+ reg_usbotg_vbus: usb-otg-vbus {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard_usbotg_vbus>;
|
||||
+ regulator-name = "usb_otg_vbus";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
};
|
||||
|
||||
sound-sgtl5000 {
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-microsom.dtsi b/arch/arm/boot/dts/imx6qdl-microsom.dtsi
|
||||
index 6a410160c9ee..f7266ae2534c 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-microsom.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-microsom.dtsi
|
||||
@@ -48,20 +48,16 @@
|
||||
enable-gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
- regulators {
|
||||
- compatible = "simple-bus";
|
||||
-
|
||||
- reg_brcm: brcm-reg {
|
||||
- compatible = "regulator-fixed";
|
||||
- enable-active-high;
|
||||
- gpio = <&gpio3 19 0>;
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pinctrl_microsom_brcm_reg>;
|
||||
- regulator-name = "brcm_reg";
|
||||
- regulator-min-microvolt = <3300000>;
|
||||
- regulator-max-microvolt = <3300000>;
|
||||
- startup-delay-us = <200000>;
|
||||
- };
|
||||
+ reg_brcm: brcm-reg {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio3 19 0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_microsom_brcm_reg>;
|
||||
+ regulator-name = "brcm_reg";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ startup-delay-us = <200000>;
|
||||
};
|
||||
|
||||
usdhc1_pwrseq: usdhc1_pwrseq {
|
|
@ -1,212 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6q-h100.dts b/arch/arm/boot/dts/imx6q-h100.dts
|
||||
index a3269f57df2b..bf5dfc9c8127 100644
|
||||
--- a/arch/arm/boot/dts/imx6q-h100.dts
|
||||
+++ b/arch/arm/boot/dts/imx6q-h100.dts
|
||||
@@ -43,7 +43,6 @@
|
||||
|
||||
#include "imx6q.dtsi"
|
||||
#include "imx6qdl-microsom.dtsi"
|
||||
-#include "imx6qdl-microsom-ar8035.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Auvidea H100";
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
index b20508237046..57ce2dbb6ad9 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
@@ -39,7 +39,6 @@
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include "imx6qdl-microsom.dtsi"
|
||||
-#include "imx6qdl-microsom-ar8035.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
index 0a0a7e4b956b..afd981e9b5e3 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
@@ -39,7 +39,6 @@
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include "imx6qdl-microsom.dtsi"
|
||||
-#include "imx6qdl-microsom-ar8035.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi b/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi
|
||||
deleted file mode 100644
|
||||
index 900e8c781f91..000000000000
|
||||
--- a/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi
|
||||
+++ /dev/null
|
||||
@@ -1,99 +0,0 @@
|
||||
-/*
|
||||
- * Copyright (C) 2013,2014 Russell King
|
||||
- *
|
||||
- * This describes the hookup for an AR8035 to the iMX6 on the SolidRun
|
||||
- * MicroSOM.
|
||||
- *
|
||||
- * This file is dual-licensed: you can use it either under the terms
|
||||
- * of the GPL or the X11 license, at your option. Note that this dual
|
||||
- * licensing only applies to this file, and not this project as a
|
||||
- * whole.
|
||||
- *
|
||||
- * a) This file 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 Foundation.
|
||||
- *
|
||||
- * This file is distributed in the hope that it will be useful,
|
||||
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
- * GNU General Public License for more details.
|
||||
- *
|
||||
- * Or, alternatively,
|
||||
- *
|
||||
- * b) Permission is hereby granted, free of charge, to any person
|
||||
- * obtaining a copy of this software and associated documentation
|
||||
- * files (the "Software"), to deal in the Software without
|
||||
- * restriction, including without limitation the rights to use,
|
||||
- * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
- * sell copies of the Software, and to permit persons to whom the
|
||||
- * Software is furnished to do so, subject to the following
|
||||
- * conditions:
|
||||
- *
|
||||
- * The above copyright notice and this permission notice shall be
|
||||
- * included in all copies or substantial portions of the Software.
|
||||
- *
|
||||
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
- * OTHER DEALINGS IN THE SOFTWARE.
|
||||
- */
|
||||
-&fec {
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pinctrl_microsom_enet_ar8035>;
|
||||
- phy-mode = "rgmii";
|
||||
- phy-reset-duration = <2>;
|
||||
- phy-reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
|
||||
- status = "okay";
|
||||
-};
|
||||
-
|
||||
-&iomuxc {
|
||||
- enet {
|
||||
- pinctrl_microsom_enet_ar8035: microsom-enet-ar8035 {
|
||||
- fsl,pins = <
|
||||
- MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b8b0
|
||||
- MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0
|
||||
- /* AR8035 reset */
|
||||
- MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x130b0
|
||||
- /* AR8035 interrupt */
|
||||
- MX6QDL_PAD_DI0_PIN2__GPIO4_IO18 0x80000000
|
||||
- /* GPIO16 -> AR8035 25MHz */
|
||||
- MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0xc0000000
|
||||
- MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x80000000
|
||||
- MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b030
|
||||
- MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b030
|
||||
- MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b030
|
||||
- MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b030
|
||||
- MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b030
|
||||
- /* AR8035 CLK_25M --> ENET_REF_CLK (V22) */
|
||||
- MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x0a0b1
|
||||
- /* AR8035 pin strapping: IO voltage: pull up */
|
||||
- MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b030
|
||||
- /* AR8035 pin strapping: PHYADDR#0: pull down */
|
||||
- MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x13030
|
||||
- /* AR8035 pin strapping: PHYADDR#1: pull down */
|
||||
- MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x13030
|
||||
- /* AR8035 pin strapping: MODE#1: pull up */
|
||||
- MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b030
|
||||
- /* AR8035 pin strapping: MODE#3: pull up */
|
||||
- MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b030
|
||||
- /* AR8035 pin strapping: MODE#0: pull down */
|
||||
- MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x13030
|
||||
-
|
||||
- /*
|
||||
- * As the RMII pins are also connected to RGMII
|
||||
- * so that an AR8030 can be placed, set these
|
||||
- * to high-z with the same pulls as above.
|
||||
- * Use the GPIO settings to avoid changing the
|
||||
- * input select registers.
|
||||
- */
|
||||
- MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25 0x03000
|
||||
- MX6QDL_PAD_ENET_RXD0__GPIO1_IO27 0x03000
|
||||
- MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x03000
|
||||
- >;
|
||||
- };
|
||||
- };
|
||||
-};
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-microsom.dtsi b/arch/arm/boot/dts/imx6qdl-microsom.dtsi
|
||||
index f7266ae2534c..c1541f2ecf3a 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-microsom.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-microsom.dtsi
|
||||
@@ -69,6 +69,15 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&fec {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_microsom_enet_ar8035>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ phy-reset-duration = <2>;
|
||||
+ phy-reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&iomuxc {
|
||||
microsom {
|
||||
pinctrl_microsom_brcm_bt: microsom-brcm-bt {
|
||||
@@ -100,6 +109,50 @@
|
||||
>;
|
||||
};
|
||||
|
||||
+ pinctrl_microsom_enet_ar8035: microsom-enet-ar8035 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b8b0
|
||||
+ MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0
|
||||
+ /* AR8035 reset */
|
||||
+ MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x130b0
|
||||
+ /* AR8035 interrupt */
|
||||
+ MX6QDL_PAD_DI0_PIN2__GPIO4_IO18 0x80000000
|
||||
+ /* GPIO16 -> AR8035 25MHz */
|
||||
+ MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0xc0000000
|
||||
+ MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x80000000
|
||||
+ MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b030
|
||||
+ MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b030
|
||||
+ MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b030
|
||||
+ MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b030
|
||||
+ MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b030
|
||||
+ /* AR8035 CLK_25M --> ENET_REF_CLK (V22) */
|
||||
+ MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x0a0b1
|
||||
+ /* AR8035 pin strapping: IO voltage: pull up */
|
||||
+ MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b030
|
||||
+ /* AR8035 pin strapping: PHYADDR#0: pull down */
|
||||
+ MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x13030
|
||||
+ /* AR8035 pin strapping: PHYADDR#1: pull down */
|
||||
+ MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x13030
|
||||
+ /* AR8035 pin strapping: MODE#1: pull up */
|
||||
+ MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b030
|
||||
+ /* AR8035 pin strapping: MODE#3: pull up */
|
||||
+ MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b030
|
||||
+ /* AR8035 pin strapping: MODE#0: pull down */
|
||||
+ MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x13030
|
||||
+
|
||||
+ /*
|
||||
+ * As the RMII pins are also connected to RGMII
|
||||
+ * so that an AR8030 can be placed, set these
|
||||
+ * to high-z with the same pulls as above.
|
||||
+ * Use the GPIO settings to avoid changing the
|
||||
+ * input select registers.
|
||||
+ */
|
||||
+ MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25 0x03000
|
||||
+ MX6QDL_PAD_ENET_RXD0__GPIO1_IO27 0x03000
|
||||
+ MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x03000
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
pinctrl_microsom_uart1: microsom-uart1 {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA 0x1b0b1
|
|
@ -1,43 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6q-h100.dts b/arch/arm/boot/dts/imx6q-h100.dts
|
||||
index bf5dfc9c8127..815e9437e3f0 100644
|
||||
--- a/arch/arm/boot/dts/imx6q-h100.dts
|
||||
+++ b/arch/arm/boot/dts/imx6q-h100.dts
|
||||
@@ -42,7 +42,7 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "imx6q.dtsi"
|
||||
-#include "imx6qdl-microsom.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Auvidea H100";
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
index 57ce2dbb6ad9..0bc1734d8bdf 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
@@ -38,7 +38,7 @@
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
-#include "imx6qdl-microsom.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
index afd981e9b5e3..246984992ad0 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
@@ -38,7 +38,7 @@
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
-#include "imx6qdl-microsom.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-microsom.dtsi b/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
|
||||
similarity index 100%
|
||||
rename from arch/arm/boot/dts/imx6qdl-microsom.dtsi
|
||||
rename to arch/arm/boot/dts/imx6qdl-sr-som.dtsi
|
|
@ -1,72 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6dl-cubox-i.dts b/arch/arm/boot/dts/imx6dl-cubox-i.dts
|
||||
index f10a36b8647d..045e59de5ffe 100644
|
||||
--- a/arch/arm/boot/dts/imx6dl-cubox-i.dts
|
||||
+++ b/arch/arm/boot/dts/imx6dl-cubox-i.dts
|
||||
@@ -41,6 +41,7 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "imx6dl.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
#include "imx6qdl-cubox-i.dtsi"
|
||||
|
||||
/ {
|
||||
diff --git a/arch/arm/boot/dts/imx6dl-hummingboard.dts b/arch/arm/boot/dts/imx6dl-hummingboard.dts
|
||||
index 39c2602fa87c..c3b826f4cab9 100644
|
||||
--- a/arch/arm/boot/dts/imx6dl-hummingboard.dts
|
||||
+++ b/arch/arm/boot/dts/imx6dl-hummingboard.dts
|
||||
@@ -42,6 +42,7 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "imx6dl.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
#include "imx6qdl-hummingboard.dtsi"
|
||||
|
||||
/ {
|
||||
diff --git a/arch/arm/boot/dts/imx6q-cubox-i.dts b/arch/arm/boot/dts/imx6q-cubox-i.dts
|
||||
index b68aa0e57f20..b9f581d0fa86 100644
|
||||
--- a/arch/arm/boot/dts/imx6q-cubox-i.dts
|
||||
+++ b/arch/arm/boot/dts/imx6q-cubox-i.dts
|
||||
@@ -41,6 +41,7 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "imx6q.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
#include "imx6qdl-cubox-i.dtsi"
|
||||
|
||||
/ {
|
||||
diff --git a/arch/arm/boot/dts/imx6q-hummingboard.dts b/arch/arm/boot/dts/imx6q-hummingboard.dts
|
||||
index 69a7a0a1cb21..5f218856c3e5 100644
|
||||
--- a/arch/arm/boot/dts/imx6q-hummingboard.dts
|
||||
+++ b/arch/arm/boot/dts/imx6q-hummingboard.dts
|
||||
@@ -42,6 +42,7 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "imx6q.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
#include "imx6qdl-hummingboard.dtsi"
|
||||
|
||||
/ {
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
index 0bc1734d8bdf..98ec7ce1f2a3 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
@@ -38,7 +38,6 @@
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
-#include "imx6qdl-sr-som.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
index 246984992ad0..84e6392fee1f 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
@@ -38,7 +38,6 @@
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
-#include "imx6qdl-sr-som.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
|
@ -1,18 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-sr-som.dtsi b/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
|
||||
index c1541f2ecf3a..2b332db6c20d 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
|
||||
@@ -116,10 +116,10 @@
|
||||
/* AR8035 reset */
|
||||
MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x130b0
|
||||
/* AR8035 interrupt */
|
||||
- MX6QDL_PAD_DI0_PIN2__GPIO4_IO18 0x80000000
|
||||
+ MX6QDL_PAD_DI0_PIN2__GPIO4_IO18 0x1b0b0
|
||||
/* GPIO16 -> AR8035 25MHz */
|
||||
- MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0xc0000000
|
||||
- MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x80000000
|
||||
+ MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0b0
|
||||
+ MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x13030
|
||||
MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b030
|
||||
MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b030
|
||||
MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b030
|
|
@ -1,338 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6dl-cubox-i.dts b/arch/arm/boot/dts/imx6dl-cubox-i.dts
|
||||
index 045e59de5ffe..2b1b3e193f53 100644
|
||||
--- a/arch/arm/boot/dts/imx6dl-cubox-i.dts
|
||||
+++ b/arch/arm/boot/dts/imx6dl-cubox-i.dts
|
||||
@@ -42,6 +42,7 @@
|
||||
|
||||
#include "imx6dl.dtsi"
|
||||
#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-brcm.dtsi"
|
||||
#include "imx6qdl-cubox-i.dtsi"
|
||||
|
||||
/ {
|
||||
diff --git a/arch/arm/boot/dts/imx6dl-hummingboard.dts b/arch/arm/boot/dts/imx6dl-hummingboard.dts
|
||||
index c3b826f4cab9..cbd02eb486e1 100644
|
||||
--- a/arch/arm/boot/dts/imx6dl-hummingboard.dts
|
||||
+++ b/arch/arm/boot/dts/imx6dl-hummingboard.dts
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#include "imx6dl.dtsi"
|
||||
#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-brcm.dtsi"
|
||||
#include "imx6qdl-hummingboard.dtsi"
|
||||
|
||||
/ {
|
||||
diff --git a/arch/arm/boot/dts/imx6q-cubox-i.dts b/arch/arm/boot/dts/imx6q-cubox-i.dts
|
||||
index b9f581d0fa86..1c7b262e3709 100644
|
||||
--- a/arch/arm/boot/dts/imx6q-cubox-i.dts
|
||||
+++ b/arch/arm/boot/dts/imx6q-cubox-i.dts
|
||||
@@ -42,6 +42,7 @@
|
||||
|
||||
#include "imx6q.dtsi"
|
||||
#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-brcm.dtsi"
|
||||
#include "imx6qdl-cubox-i.dtsi"
|
||||
|
||||
/ {
|
||||
diff --git a/arch/arm/boot/dts/imx6q-h100.dts b/arch/arm/boot/dts/imx6q-h100.dts
|
||||
index 815e9437e3f0..743c11f1ad4e 100644
|
||||
--- a/arch/arm/boot/dts/imx6q-h100.dts
|
||||
+++ b/arch/arm/boot/dts/imx6q-h100.dts
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#include "imx6q.dtsi"
|
||||
#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-brcm.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Auvidea H100";
|
||||
diff --git a/arch/arm/boot/dts/imx6q-hummingboard.dts b/arch/arm/boot/dts/imx6q-hummingboard.dts
|
||||
index 5f218856c3e5..8c9e94e648a7 100644
|
||||
--- a/arch/arm/boot/dts/imx6q-hummingboard.dts
|
||||
+++ b/arch/arm/boot/dts/imx6q-hummingboard.dts
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#include "imx6q.dtsi"
|
||||
#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-brcm.dtsi"
|
||||
#include "imx6qdl-hummingboard.dtsi"
|
||||
|
||||
/ {
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-sr-som-brcm.dtsi b/arch/arm/boot/dts/imx6qdl-sr-som-brcm.dtsi
|
||||
new file mode 100644
|
||||
index 000000000000..809d7896775c
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-sr-som-brcm.dtsi
|
||||
@@ -0,0 +1,144 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2013,2014 Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file 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 Foundation.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use,
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+/ {
|
||||
+ clk_sdio: sdio-clock {
|
||||
+ compatible = "gpio-gate-clock";
|
||||
+ #clock-cells = <0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_microsom_brcm_osc>;
|
||||
+ enable-gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ reg_brcm: brcm-reg {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio3 19 0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_microsom_brcm_reg>;
|
||||
+ regulator-name = "brcm_reg";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ startup-delay-us = <200000>;
|
||||
+ };
|
||||
+
|
||||
+ usdhc1_pwrseq: usdhc1_pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ reset-gpios = <&gpio5 26 GPIO_ACTIVE_LOW>,
|
||||
+ <&gpio6 0 GPIO_ACTIVE_LOW>;
|
||||
+ clocks = <&clk_sdio>;
|
||||
+ clock-names = "ext_clock";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&iomuxc {
|
||||
+ microsom {
|
||||
+ pinctrl_microsom_brcm_bt: microsom-brcm-bt {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_CSI0_DAT14__GPIO6_IO00 0x40013070
|
||||
+ MX6QDL_PAD_CSI0_DAT15__GPIO6_IO01 0x40013070
|
||||
+ MX6QDL_PAD_CSI0_DAT18__GPIO6_IO04 0x40013070
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_microsom_brcm_osc: microsom-brcm-osc {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_DISP0_DAT11__GPIO5_IO05 0x40013070
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_microsom_brcm_reg: microsom-brcm-reg {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x40013070
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_microsom_brcm_wifi: microsom-brcm-wifi {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_GPIO_8__XTALOSC_REF_CLK_32K 0x1b0b0
|
||||
+ MX6QDL_PAD_CSI0_DATA_EN__GPIO5_IO20 0x40013070
|
||||
+ MX6QDL_PAD_CSI0_DAT8__GPIO5_IO26 0x40013070
|
||||
+ MX6QDL_PAD_CSI0_DAT9__GPIO5_IO27 0x40013070
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_microsom_uart4: microsom-uart4 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA 0x1b0b1
|
||||
+ MX6QDL_PAD_CSI0_DAT13__UART4_RX_DATA 0x1b0b1
|
||||
+ MX6QDL_PAD_CSI0_DAT16__UART4_RTS_B 0x1b0b1
|
||||
+ MX6QDL_PAD_CSI0_DAT17__UART4_CTS_B 0x1b0b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_microsom_usdhc1: microsom-usdhc1 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17059
|
||||
+ MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10059
|
||||
+ MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17059
|
||||
+ MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17059
|
||||
+ MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17059
|
||||
+ MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17059
|
||||
+ >;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* UART4 - Connected to optional BRCM Wifi/BT/FM */
|
||||
+&uart4 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_microsom_brcm_bt &pinctrl_microsom_uart4>;
|
||||
+ uart-has-rtscts;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/* USDHC1 - Connected to optional BRCM Wifi/BT/FM */
|
||||
+&usdhc1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_microsom_brcm_wifi &pinctrl_microsom_usdhc1>;
|
||||
+ bus-width = <4>;
|
||||
+ mmc-pwrseq = <&usdhc1_pwrseq>;
|
||||
+ keep-power-in-suspend;
|
||||
+ no-1-8-v;
|
||||
+ non-removable;
|
||||
+ vmmc-supply = <®_brcm>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-sr-som.dtsi b/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
|
||||
index 2b332db6c20d..449e241badfe 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
|
||||
@@ -39,35 +39,6 @@
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
-/ {
|
||||
- clk_sdio: sdio-clock {
|
||||
- compatible = "gpio-gate-clock";
|
||||
- #clock-cells = <0>;
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pinctrl_microsom_brcm_osc>;
|
||||
- enable-gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>;
|
||||
- };
|
||||
-
|
||||
- reg_brcm: brcm-reg {
|
||||
- compatible = "regulator-fixed";
|
||||
- enable-active-high;
|
||||
- gpio = <&gpio3 19 0>;
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pinctrl_microsom_brcm_reg>;
|
||||
- regulator-name = "brcm_reg";
|
||||
- regulator-min-microvolt = <3300000>;
|
||||
- regulator-max-microvolt = <3300000>;
|
||||
- startup-delay-us = <200000>;
|
||||
- };
|
||||
-
|
||||
- usdhc1_pwrseq: usdhc1_pwrseq {
|
||||
- compatible = "mmc-pwrseq-simple";
|
||||
- reset-gpios = <&gpio5 26 GPIO_ACTIVE_LOW>,
|
||||
- <&gpio6 0 GPIO_ACTIVE_LOW>;
|
||||
- clocks = <&clk_sdio>;
|
||||
- clock-names = "ext_clock";
|
||||
- };
|
||||
-};
|
||||
|
||||
&fec {
|
||||
pinctrl-names = "default";
|
||||
@@ -80,35 +51,6 @@
|
||||
|
||||
&iomuxc {
|
||||
microsom {
|
||||
- pinctrl_microsom_brcm_bt: microsom-brcm-bt {
|
||||
- fsl,pins = <
|
||||
- MX6QDL_PAD_CSI0_DAT14__GPIO6_IO00 0x40013070
|
||||
- MX6QDL_PAD_CSI0_DAT15__GPIO6_IO01 0x40013070
|
||||
- MX6QDL_PAD_CSI0_DAT18__GPIO6_IO04 0x40013070
|
||||
- >;
|
||||
- };
|
||||
-
|
||||
- pinctrl_microsom_brcm_osc: microsom-brcm-osc {
|
||||
- fsl,pins = <
|
||||
- MX6QDL_PAD_DISP0_DAT11__GPIO5_IO05 0x40013070
|
||||
- >;
|
||||
- };
|
||||
-
|
||||
- pinctrl_microsom_brcm_reg: microsom-brcm-reg {
|
||||
- fsl,pins = <
|
||||
- MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x40013070
|
||||
- >;
|
||||
- };
|
||||
-
|
||||
- pinctrl_microsom_brcm_wifi: microsom-brcm-wifi {
|
||||
- fsl,pins = <
|
||||
- MX6QDL_PAD_GPIO_8__XTALOSC_REF_CLK_32K 0x1b0b0
|
||||
- MX6QDL_PAD_CSI0_DATA_EN__GPIO5_IO20 0x40013070
|
||||
- MX6QDL_PAD_CSI0_DAT8__GPIO5_IO26 0x40013070
|
||||
- MX6QDL_PAD_CSI0_DAT9__GPIO5_IO27 0x40013070
|
||||
- >;
|
||||
- };
|
||||
-
|
||||
pinctrl_microsom_enet_ar8035: microsom-enet-ar8035 {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b8b0
|
||||
@@ -159,26 +101,6 @@
|
||||
MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA 0x1b0b1
|
||||
>;
|
||||
};
|
||||
-
|
||||
- pinctrl_microsom_uart4: microsom-uart4 {
|
||||
- fsl,pins = <
|
||||
- MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA 0x1b0b1
|
||||
- MX6QDL_PAD_CSI0_DAT13__UART4_RX_DATA 0x1b0b1
|
||||
- MX6QDL_PAD_CSI0_DAT16__UART4_RTS_B 0x1b0b1
|
||||
- MX6QDL_PAD_CSI0_DAT17__UART4_CTS_B 0x1b0b1
|
||||
- >;
|
||||
- };
|
||||
-
|
||||
- pinctrl_microsom_usdhc1: microsom-usdhc1 {
|
||||
- fsl,pins = <
|
||||
- MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17059
|
||||
- MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10059
|
||||
- MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17059
|
||||
- MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17059
|
||||
- MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17059
|
||||
- MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17059
|
||||
- >;
|
||||
- };
|
||||
};
|
||||
};
|
||||
|
||||
@@ -187,24 +109,3 @@
|
||||
pinctrl-0 = <&pinctrl_microsom_uart1>;
|
||||
status = "okay";
|
||||
};
|
||||
-
|
||||
-/* UART4 - Connected to optional BRCM Wifi/BT/FM */
|
||||
-&uart4 {
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pinctrl_microsom_brcm_bt &pinctrl_microsom_uart4>;
|
||||
- uart-has-rtscts;
|
||||
- status = "okay";
|
||||
-};
|
||||
-
|
||||
-/* USDHC1 - Connected to optional BRCM Wifi/BT/FM */
|
||||
-&usdhc1 {
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pinctrl_microsom_brcm_wifi &pinctrl_microsom_usdhc1>;
|
||||
- bus-width = <4>;
|
||||
- mmc-pwrseq = <&usdhc1_pwrseq>;
|
||||
- keep-power-in-suspend;
|
||||
- no-1-8-v;
|
||||
- non-removable;
|
||||
- vmmc-supply = <®_brcm>;
|
||||
- status = "okay";
|
||||
-};
|
|
@ -1,21 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-sr-som.dtsi b/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
|
||||
index 449e241badfe..4ccb7afc4b35 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
|
||||
@@ -40,6 +40,16 @@
|
||||
*/
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
+/ {
|
||||
+ vcc_3v3: regulator-vcc-3v3 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-always-on;
|
||||
+ regulator-name = "vcc_3v3";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&fec {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_microsom_enet_ar8035>;
|
|
@ -1,176 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-sr-som-ti.dtsi b/arch/arm/boot/dts/imx6qdl-sr-som-ti.dtsi
|
||||
new file mode 100644
|
||||
index 000000000000..44a97ba93a95
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-sr-som-ti.dtsi
|
||||
@@ -0,0 +1,170 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2013,2014 Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file 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 Foundation.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use,
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+
|
||||
+/ {
|
||||
+ nvcc_sd1: regulator-nvcc-sd1 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-always-on;
|
||||
+ regulator-name = "nvcc_sd1";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ vin-supply = <&vcc_3v3>;
|
||||
+ };
|
||||
+
|
||||
+ clk_ti_wifi: ti-wifi-clock {
|
||||
+ /* This is a hack around the kernel - using "fixed clock"
|
||||
+ * results in the "pinctrl" properties being ignored, and
|
||||
+ * the clock not being output. Instead, use a gated clock
|
||||
+ * and the unrouted WL_XTAL_PU gpio.
|
||||
+ */
|
||||
+ compatible = "gpio-gate-clock";
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-frequency = <32768>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_microsom_ti_clk>;
|
||||
+ enable-gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ pwrseq_ti_wifi: ti-wifi-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_microsom_ti_wifi_en>;
|
||||
+ reset-gpios = <&gpio5 26 GPIO_ACTIVE_LOW>;
|
||||
+ post-power-on-delay-ms = <200>;
|
||||
+ clocks = <&clk_ti_wifi>;
|
||||
+ clock-names = "ext_clock";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&iomuxc {
|
||||
+ microsom {
|
||||
+ pinctrl_microsom_ti_bt: microsom-ti-bt {
|
||||
+ fsl,pins = <
|
||||
+ /* BT_EN_SOC */
|
||||
+ MX6QDL_PAD_CSI0_DAT14__GPIO6_IO00 0x40013070
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_microsom_ti_clk: microsom-ti-clk {
|
||||
+ fsl,pins = <
|
||||
+ /* EXT_32K */
|
||||
+ MX6QDL_PAD_GPIO_8__XTALOSC_REF_CLK_32K 0x1b0b0
|
||||
+ /* WL_XTAL_PU (unrouted) */
|
||||
+ MX6QDL_PAD_DISP0_DAT11__GPIO5_IO05 0x40013070
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_microsom_ti_wifi_en: microsom-ti-wifi-en {
|
||||
+ fsl,pins = <
|
||||
+ /* WLAN_EN_SOC */
|
||||
+ MX6QDL_PAD_CSI0_DAT8__GPIO5_IO26 0x40013070
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_microsom_ti_wifi_irq: microsom-ti-wifi-irq {
|
||||
+ fsl,pins = <
|
||||
+ /* WLAN_IRQ */
|
||||
+ MX6QDL_PAD_CSI0_DAT18__GPIO6_IO04 0x40013070
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_microsom_uart4: microsom-uart4 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA 0x1b0b1
|
||||
+ MX6QDL_PAD_CSI0_DAT13__UART4_RX_DATA 0x1b0b1
|
||||
+ MX6QDL_PAD_CSI0_DAT16__UART4_RTS_B 0x1b0b1
|
||||
+ MX6QDL_PAD_CSI0_DAT17__UART4_CTS_B 0x1b0b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_microsom_usdhc1: microsom-usdhc1 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17059
|
||||
+ MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10059
|
||||
+ MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17059
|
||||
+ MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17059
|
||||
+ MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17059
|
||||
+ MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17059
|
||||
+ >;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* UART4 - Connected to optional TI Wi-Fi/BT/FM */
|
||||
+&uart4 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_microsom_uart4>;
|
||||
+ uart-has-rtscts;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ bluetooth {
|
||||
+ compatible = "ti,wl1837-st";
|
||||
+ clocks = <&clk_ti_wifi>;
|
||||
+ clock-names = "ext_clock";
|
||||
+ enable-gpios = <&gpio6 0 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_microsom_ti_bt>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* USDHC1 - Connected to optional TI Wi-Fi/BT/FM */
|
||||
+&usdhc1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_microsom_usdhc1>;
|
||||
+ bus-width = <4>;
|
||||
+ keep-power-in-suspend;
|
||||
+ mmc-pwrseq = <&pwrseq_ti_wifi>;
|
||||
+ non-removable;
|
||||
+ vmmc-supply = <&vcc_3v3>;
|
||||
+ /* vqmmc-supply = <&nvcc_sd1>; - MMC layer doesn't like it! */
|
||||
+ status = "okay";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ wlcore@2 {
|
||||
+ compatible = "ti,wl1837";
|
||||
+ reg = <2>;
|
||||
+ interrupts-extended = <&gpio6 4 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_microsom_ti_wifi_irq>;
|
||||
+ };
|
||||
+};
|
|
@ -1,76 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-sr-som-emmc.dtsi b/arch/arm/boot/dts/imx6qdl-sr-som-emmc.dtsi
|
||||
new file mode 100644
|
||||
index 000000000000..5f3b8baab20f
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-sr-som-emmc.dtsi
|
||||
@@ -0,0 +1,70 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2013,2014 Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file 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 Foundation.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use,
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+&iomuxc {
|
||||
+ microsom {
|
||||
+ pinctrl_microsom_usdhc3: microsom-usdhc3 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059
|
||||
+ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059
|
||||
+ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT4__SD3_DATA4 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT5__SD3_DATA5 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT6__SD3_DATA6 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT7__SD3_DATA7 0x17059
|
||||
+ MX6QDL_PAD_SD3_RST__SD3_RESET 0x17059
|
||||
+ >;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* USDHC3 - eMMC */
|
||||
+&usdhc3 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_microsom_usdhc3>;
|
||||
+ bus-width = <8>;
|
||||
+ non-removable;
|
||||
+ vmmc-supply = <&vcc_3v3>;
|
||||
+ status = "okay";
|
||||
+};
|
|
@ -1,45 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
index 84e6392fee1f..1b33cd6752f4 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
@@ -59,6 +59,19 @@
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
+ v_sd: regulator-v-sd {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ gpio = <&gpio4 30 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard_vmmc>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-name = "v_sd";
|
||||
+ startup-delay-us = <1000>;
|
||||
+ vin-supply = <®_3p3v>;
|
||||
+ };
|
||||
+
|
||||
reg_usbh1_vbus: usb-h1-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
@@ -241,6 +254,11 @@
|
||||
MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x13059
|
||||
>;
|
||||
};
|
||||
+ pinctrl_hummingboard_vmmc: hummingboard-vmmc {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_DISP0_DAT9__GPIO4_IO30 0x1b0b0
|
||||
+ >;
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
@@ -292,7 +310,7 @@
|
||||
&pinctrl_hummingboard_usdhc2_aux
|
||||
&pinctrl_hummingboard_usdhc2
|
||||
>;
|
||||
- vmmc-supply = <®_3p3v>;
|
||||
+ vmmc-supply = <&v_sd>;
|
||||
cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
};
|
|
@ -1,185 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
index 98ec7ce1f2a3..7a3fba776661 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
@@ -62,34 +62,36 @@
|
||||
};
|
||||
};
|
||||
|
||||
- reg_3p3v: 3p3v {
|
||||
+ v_5v0: regulator-v-5v0 {
|
||||
compatible = "regulator-fixed";
|
||||
- regulator-name = "3P3V";
|
||||
- regulator-min-microvolt = <3300000>;
|
||||
- regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-name = "v_5v0";
|
||||
};
|
||||
|
||||
- reg_usbh1_vbus: usb-h1-vbus {
|
||||
+ v_usb2: regulator-v-usb2 {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio1 0 0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_cubox_i_usbh1_vbus>;
|
||||
- regulator-name = "usb_h1_vbus";
|
||||
- regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-name = "v_usb2";
|
||||
+ vin-supply = <&v_5v0>;
|
||||
};
|
||||
|
||||
- reg_usbotg_vbus: usb-otg-vbus {
|
||||
+ v_usb1: regulator-v-usb1 {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio3 22 0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_cubox_i_usbotg_vbus>;
|
||||
- regulator-name = "usb_otg_vbus";
|
||||
- regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-name = "v_usb1";
|
||||
+ vin-supply = <&v_5v0>;
|
||||
};
|
||||
|
||||
sound-spdif {
|
||||
@@ -237,21 +239,25 @@
|
||||
&usbh1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_cubox_i_usbh1>;
|
||||
- vbus-supply = <®_usbh1_vbus>;
|
||||
+ vbus-supply = <&v_usb2>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbotg {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_cubox_i_usbotg>;
|
||||
- vbus-supply = <®_usbotg_vbus>;
|
||||
+ vbus-supply = <&v_usb1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usdhc2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_cubox_i_usdhc2_aux &pinctrl_cubox_i_usdhc2>;
|
||||
- vmmc-supply = <®_3p3v>;
|
||||
+ vmmc-supply = <&vcc_3v3>;
|
||||
cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&vcc_3v3 {
|
||||
+ vin-supply = <&v_5v0>;
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
index 1b33cd6752f4..66bda5a04582 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
@@ -51,12 +51,21 @@
|
||||
pinctrl-0 = <&pinctrl_hummingboard_gpio3_5>;
|
||||
};
|
||||
|
||||
- reg_3p3v: 3p3v {
|
||||
+ v_3v2: regulator-v-3v2 {
|
||||
compatible = "regulator-fixed";
|
||||
- regulator-name = "3P3V";
|
||||
- regulator-min-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-name = "v_3v2";
|
||||
+ vin-supply = <&v_5v0>;
|
||||
+ };
|
||||
+
|
||||
+ v_5v0: regulator-v-5v0 {
|
||||
+ compatible = "regulator-fixed";
|
||||
regulator-always-on;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-name = "v_5v0";
|
||||
};
|
||||
|
||||
v_sd: regulator-v-sd {
|
||||
@@ -69,29 +78,31 @@
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-name = "v_sd";
|
||||
startup-delay-us = <1000>;
|
||||
- vin-supply = <®_3p3v>;
|
||||
+ vin-supply = <&v_3v2>;
|
||||
};
|
||||
|
||||
- reg_usbh1_vbus: usb-h1-vbus {
|
||||
+ v_usb2: regulator-v-usb2 {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard_usbh1_vbus>;
|
||||
- regulator-name = "usb_h1_vbus";
|
||||
- regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-name = "v_usb2";
|
||||
+ vin-supply = <&v_5v0>;
|
||||
};
|
||||
|
||||
- reg_usbotg_vbus: usb-otg-vbus {
|
||||
+ v_usb1: regulator-v-usb1 {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard_usbotg_vbus>;
|
||||
- regulator-name = "usb_otg_vbus";
|
||||
- regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-name = "v_usb1";
|
||||
+ vin-supply = <&v_5v0>;
|
||||
};
|
||||
|
||||
sound-sgtl5000 {
|
||||
@@ -151,8 +162,8 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard_sgtl5000>;
|
||||
reg = <0x0a>;
|
||||
- VDDA-supply = <®_3p3v>;
|
||||
- VDDIO-supply = <®_3p3v>;
|
||||
+ VDDA-supply = <&v_3v2>;
|
||||
+ VDDIO-supply = <&v_3v2>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -292,7 +303,7 @@
|
||||
|
||||
&usbh1 {
|
||||
disable-over-current;
|
||||
- vbus-supply = <®_usbh1_vbus>;
|
||||
+ vbus-supply = <&v_usb2>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -300,7 +311,7 @@
|
||||
disable-over-current;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard_usbotg_id>;
|
||||
- vbus-supply = <®_usbotg_vbus>;
|
||||
+ vbus-supply = <&v_usb1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -314,3 +325,7 @@
|
||||
cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&vcc_3v3 {
|
||||
+ vin-supply = <&v_3v2>;
|
||||
+};
|
|
@ -1,33 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
index 7a3fba776661..ca04ec56d2af 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
status = "okay";
|
||||
|
||||
- rtc: pcf8523@68 {
|
||||
+ rtc@68 {
|
||||
compatible = "nxp,pcf8523";
|
||||
reg = <0x68>;
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
index 66bda5a04582..92583238ca4a 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
|
||||
@@ -150,13 +150,13 @@
|
||||
status = "okay";
|
||||
|
||||
/* Pro baseboard model */
|
||||
- rtc: pcf8523@68 {
|
||||
+ rtc@68 {
|
||||
compatible = "nxp,pcf8523";
|
||||
reg = <0x68>;
|
||||
};
|
||||
|
||||
/* Pro baseboard model */
|
||||
- sgtl5000: sgtl5000@0a {
|
||||
+ sgtl5000: codec@a {
|
||||
clocks = <&clks IMX6QDL_CLK_CKO>;
|
||||
compatible = "fsl,sgtl5000";
|
||||
pinctrl-names = "default";
|
|
@ -1,282 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index d0381e9caf21..1f3d331c22c2 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -372,6 +372,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6dl-aristainetos2_7.dtb \
|
||||
imx6dl-colibri-eval-v3.dtb \
|
||||
imx6dl-cubox-i.dtb \
|
||||
+ imx6dl-cubox-i-som-v15.dtb \
|
||||
imx6dl-dfi-fs700-m60.dtb \
|
||||
imx6dl-gw51xx.dtb \
|
||||
imx6dl-gw52xx.dtb \
|
||||
@@ -384,6 +385,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6dl-gw5903.dtb \
|
||||
imx6dl-gw5904.dtb \
|
||||
imx6dl-hummingboard.dtb \
|
||||
+ imx6dl-hummingboard-som-v15.dtb \
|
||||
imx6dl-icore.dtb \
|
||||
imx6dl-icore-rqs.dtb \
|
||||
imx6dl-nit6xlite.dtb \
|
||||
@@ -421,6 +423,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6q-b850v3.dtb \
|
||||
imx6q-cm-fx6.dtb \
|
||||
imx6q-cubox-i.dtb \
|
||||
+ imx6q-cubox-i-som-v15.dtb \
|
||||
imx6q-dfi-fs700-m60.dtb \
|
||||
imx6q-display5-tianma-tm070-1280x768.dtb \
|
||||
imx6q-dmo-edmqmx6.dtb \
|
||||
@@ -439,6 +442,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6q-gw5904.dtb \
|
||||
imx6q-h100.dtb \
|
||||
imx6q-hummingboard.dtb \
|
||||
+ imx6q-hummingboard-som-v15.dtb \
|
||||
imx6q-icore.dtb \
|
||||
imx6q-icore-ofcap10.dtb \
|
||||
imx6q-icore-ofcap12.dtb \
|
||||
diff --git a/arch/arm/boot/dts/imx6dl-cubox-i-som-v15.dts b/arch/arm/boot/dts/imx6dl-cubox-i-som-v15.dts
|
||||
new file mode 100644
|
||||
index 000000000000..e09c565d1d1f
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6dl-cubox-i-som-v15.dts
|
||||
@@ -0,0 +1,51 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2014 Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file 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 Foundation.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use,
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "imx6dl.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-ti.dtsi"
|
||||
+#include "imx6qdl-cubox-i.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SolidRun Cubox-i Solo/DualLite (1.5som)";
|
||||
+ compatible = "solidrun,cubox-i/dl", "fsl,imx6dl";
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/imx6dl-hummingboard-som-v15.dts b/arch/arm/boot/dts/imx6dl-hummingboard-som-v15.dts
|
||||
new file mode 100644
|
||||
index 000000000000..66a06cf3cdf3
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6dl-hummingboard-som-v15.dts
|
||||
@@ -0,0 +1,52 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2014 Rabeeh Khoury (rabeeh@solid-run.com)
|
||||
+ * Based on dt work by Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file 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 Foundation.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use,
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "imx6dl.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-ti.dtsi"
|
||||
+#include "imx6qdl-hummingboard.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SolidRun HummingBoard Solo/DualLite (1.5som)";
|
||||
+ compatible = "solidrun,hummingboard/dl", "fsl,imx6dl";
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/imx6q-cubox-i-som-v15.dts b/arch/arm/boot/dts/imx6q-cubox-i-som-v15.dts
|
||||
new file mode 100644
|
||||
index 000000000000..dab70d1230a2
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6q-cubox-i-som-v15.dts
|
||||
@@ -0,0 +1,59 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2014 Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file 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 Foundation.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use,
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "imx6q.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-ti.dtsi"
|
||||
+#include "imx6qdl-cubox-i.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SolidRun Cubox-i Dual/Quad (1.5som)";
|
||||
+ compatible = "solidrun,cubox-i/q", "fsl,imx6q";
|
||||
+};
|
||||
+
|
||||
+&sata {
|
||||
+ status = "okay";
|
||||
+ fsl,transmit-level-mV = <1104>;
|
||||
+ fsl,transmit-boost-mdB = <0>;
|
||||
+ fsl,transmit-atten-16ths = <9>;
|
||||
+ fsl,no-spread-spectrum;
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/imx6q-hummingboard-som-v15.dts b/arch/arm/boot/dts/imx6q-hummingboard-som-v15.dts
|
||||
new file mode 100644
|
||||
index 000000000000..e4132d62ffa2
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6q-hummingboard-som-v15.dts
|
||||
@@ -0,0 +1,60 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2014 Rabeeh Khoury (rabeeh@solid-run.com)
|
||||
+ * Based on dt work by Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file 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 Foundation.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use,
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "imx6q.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-ti.dtsi"
|
||||
+#include "imx6qdl-hummingboard.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SolidRun HummingBoard Dual/Quad (1.5som)";
|
||||
+ compatible = "solidrun,hummingboard/q", "fsl,imx6q";
|
||||
+};
|
||||
+
|
||||
+&sata {
|
||||
+ status = "okay";
|
||||
+ fsl,transmit-level-mV = <1025>;
|
||||
+ fsl,transmit-boost-mdB = <3330>;
|
||||
+ fsl,transmit-atten-16ths = <9>;
|
||||
+ fsl,receive-eq-mdB = <3000>;
|
||||
+};
|
|
@ -1,286 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 1f3d331c22c2..b5ba7ad6ae30 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -372,6 +372,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6dl-aristainetos2_7.dtb \
|
||||
imx6dl-colibri-eval-v3.dtb \
|
||||
imx6dl-cubox-i.dtb \
|
||||
+ imx6dl-cubox-i-emmc-som-v15.dtb \
|
||||
imx6dl-cubox-i-som-v15.dtb \
|
||||
imx6dl-dfi-fs700-m60.dtb \
|
||||
imx6dl-gw51xx.dtb \
|
||||
@@ -385,6 +386,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6dl-gw5903.dtb \
|
||||
imx6dl-gw5904.dtb \
|
||||
imx6dl-hummingboard.dtb \
|
||||
+ imx6dl-hummingboard-emmc-som-v15.dtb \
|
||||
imx6dl-hummingboard-som-v15.dtb \
|
||||
imx6dl-icore.dtb \
|
||||
imx6dl-icore-rqs.dtb \
|
||||
@@ -423,6 +425,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6q-b850v3.dtb \
|
||||
imx6q-cm-fx6.dtb \
|
||||
imx6q-cubox-i.dtb \
|
||||
+ imx6q-cubox-i-emmc-som-v15.dtb \
|
||||
imx6q-cubox-i-som-v15.dtb \
|
||||
imx6q-dfi-fs700-m60.dtb \
|
||||
imx6q-display5-tianma-tm070-1280x768.dtb \
|
||||
@@ -442,6 +445,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6q-gw5904.dtb \
|
||||
imx6q-h100.dtb \
|
||||
imx6q-hummingboard.dtb \
|
||||
+ imx6q-hummingboard-emmc-som-v15.dtb \
|
||||
imx6q-hummingboard-som-v15.dtb \
|
||||
imx6q-icore.dtb \
|
||||
imx6q-icore-ofcap10.dtb \
|
||||
diff --git a/arch/arm/boot/dts/imx6dl-cubox-i-emmc-som-v15.dts b/arch/arm/boot/dts/imx6dl-cubox-i-emmc-som-v15.dts
|
||||
new file mode 100644
|
||||
index 000000000000..2b2fc360b865
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6dl-cubox-i-emmc-som-v15.dts
|
||||
@@ -0,0 +1,52 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2014 Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file 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 Foundation.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use,
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "imx6dl.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-ti.dtsi"
|
||||
+#include "imx6qdl-sr-som-emmc.dtsi"
|
||||
+#include "imx6qdl-cubox-i.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SolidRun Cubox-i Solo/DualLite (1.5som+emmc)";
|
||||
+ compatible = "solidrun,cubox-i/dl", "fsl,imx6dl";
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/imx6dl-hummingboard-emmc-som-v15.dts b/arch/arm/boot/dts/imx6dl-hummingboard-emmc-som-v15.dts
|
||||
new file mode 100644
|
||||
index 000000000000..a63f742f20d9
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6dl-hummingboard-emmc-som-v15.dts
|
||||
@@ -0,0 +1,53 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2014 Rabeeh Khoury (rabeeh@solid-run.com)
|
||||
+ * Based on dt work by Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file 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 Foundation.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use,
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "imx6dl.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-ti.dtsi"
|
||||
+#include "imx6qdl-sr-som-emmc.dtsi"
|
||||
+#include "imx6qdl-hummingboard.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SolidRun HummingBoard Solo/DualLite (1.5som+emmc)";
|
||||
+ compatible = "solidrun,hummingboard/dl", "fsl,imx6dl";
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/imx6q-cubox-i-emmc-som-v15.dts b/arch/arm/boot/dts/imx6q-cubox-i-emmc-som-v15.dts
|
||||
new file mode 100644
|
||||
index 000000000000..3e59ebbb3608
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6q-cubox-i-emmc-som-v15.dts
|
||||
@@ -0,0 +1,60 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2014 Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file 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 Foundation.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use,
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "imx6q.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-ti.dtsi"
|
||||
+#include "imx6qdl-sr-som-emmc.dtsi"
|
||||
+#include "imx6qdl-cubox-i.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SolidRun Cubox-i Dual/Quad (1.5som+emmc)";
|
||||
+ compatible = "solidrun,cubox-i/q", "fsl,imx6q";
|
||||
+};
|
||||
+
|
||||
+&sata {
|
||||
+ status = "okay";
|
||||
+ fsl,transmit-level-mV = <1104>;
|
||||
+ fsl,transmit-boost-mdB = <0>;
|
||||
+ fsl,transmit-atten-16ths = <9>;
|
||||
+ fsl,no-spread-spectrum;
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/imx6q-hummingboard-emmc-som-v15.dts b/arch/arm/boot/dts/imx6q-hummingboard-emmc-som-v15.dts
|
||||
new file mode 100644
|
||||
index 000000000000..c51b4e4fd71e
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6q-hummingboard-emmc-som-v15.dts
|
||||
@@ -0,0 +1,61 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2014 Rabeeh Khoury (rabeeh@solid-run.com)
|
||||
+ * Based on dt work by Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file 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 Foundation.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use,
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "imx6q.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-ti.dtsi"
|
||||
+#include "imx6qdl-sr-som-emmc.dtsi"
|
||||
+#include "imx6qdl-hummingboard.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SolidRun HummingBoard Dual/Quad (1.5som+emmc)";
|
||||
+ compatible = "solidrun,hummingboard/q", "fsl,imx6q";
|
||||
+};
|
||||
+
|
||||
+&sata {
|
||||
+ status = "okay";
|
||||
+ fsl,transmit-level-mV = <1025>;
|
||||
+ fsl,transmit-boost-mdB = <3330>;
|
||||
+ fsl,transmit-atten-16ths = <9>;
|
||||
+ fsl,receive-eq-mdB = <3000>;
|
||||
+};
|
|
@ -1,22 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
index ca04ec56d2af..d1cfdc264126 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
|
||||
@@ -73,7 +73,7 @@
|
||||
v_usb2: regulator-v-usb2 {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
- gpio = <&gpio1 0 0>;
|
||||
+ gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_cubox_i_usbh1_vbus>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
@@ -85,7 +85,7 @@
|
||||
v_usb1: regulator-v-usb1 {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
- gpio = <&gpio3 22 0>;
|
||||
+ gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_cubox_i_usbotg_vbus>;
|
||||
regulator-max-microvolt = <5000000>;
|
|
@ -1,687 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index b5ba7ad6ae30..a757e2dd60c4 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -388,6 +388,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6dl-hummingboard.dtb \
|
||||
imx6dl-hummingboard-emmc-som-v15.dtb \
|
||||
imx6dl-hummingboard-som-v15.dtb \
|
||||
+ imx6dl-hummingboard2.dtb \
|
||||
imx6dl-icore.dtb \
|
||||
imx6dl-icore-rqs.dtb \
|
||||
imx6dl-nit6xlite.dtb \
|
||||
@@ -447,6 +448,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6q-hummingboard.dtb \
|
||||
imx6q-hummingboard-emmc-som-v15.dtb \
|
||||
imx6q-hummingboard-som-v15.dtb \
|
||||
+ imx6q-hummingboard2.dtb \
|
||||
imx6q-icore.dtb \
|
||||
imx6q-icore-ofcap10.dtb \
|
||||
imx6q-icore-ofcap12.dtb \
|
||||
diff --git a/arch/arm/boot/dts/imx6dl-hummingboard2.dts b/arch/arm/boot/dts/imx6dl-hummingboard2.dts
|
||||
new file mode 100644
|
||||
index 000000000000..207ce329534a
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6dl-hummingboard2.dts
|
||||
@@ -0,0 +1,50 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2015 Rabeeh Khoury <rabeeh@solid-run.com>
|
||||
+ * Based on dt work by Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file 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 Foundation.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use,
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "imx6dl.dtsi"
|
||||
+#include "imx6qdl-hummingboard2.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SolidRun HummingBoard2 Solo/DualLite";
|
||||
+ compatible = "solidrun,hummingboard2/dl", "fsl,imx6dl";
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/imx6q-hummingboard2.dts b/arch/arm/boot/dts/imx6q-hummingboard2.dts
|
||||
new file mode 100644
|
||||
index 000000000000..b850111ddf34
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6q-hummingboard2.dts
|
||||
@@ -0,0 +1,58 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2015 Rabeeh Khoury <rabeeh@solid-run.com>
|
||||
+ * Based on dt work by Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file 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 Foundation.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use,
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "imx6q.dtsi"
|
||||
+#include "imx6qdl-hummingboard2.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SolidRun HummingBoard2 Dual/Quad";
|
||||
+ compatible = "solidrun,hummingboard2/q", "fsl,imx6q";
|
||||
+};
|
||||
+
|
||||
+&sata {
|
||||
+ status = "okay";
|
||||
+ fsl,transmit-level-mV = <1104>;
|
||||
+ fsl,transmit-boost-mdB = <0>;
|
||||
+ fsl,transmit-atten-16ths = <9>;
|
||||
+ fsl,no-spread-spectrum;
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
new file mode 100644
|
||||
index 000000000000..0e3c57b99904
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -0,0 +1,541 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2015 Rabeeh Khoury <rabeeh@solid-run.com>
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file 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 Foundation.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use,
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+#include "imx6qdl-microsom.dtsi"
|
||||
+#include "imx6qdl-microsom-ar8035.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ chosen {
|
||||
+ stdout-path = &uart1;
|
||||
+ };
|
||||
+
|
||||
+ ir_recv: ir-receiver {
|
||||
+ compatible = "gpio-ir-receiver";
|
||||
+ gpios = <&gpio7 9 1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_gpio7_9>;
|
||||
+ linux,rc-map-name = "rc-rc6-mce";
|
||||
+ };
|
||||
+
|
||||
+ usdhc2_pwrseq: usdhc2-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ reset-gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ reg_3p3v: regulator-3p3v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "3P3V";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ reg_1p8v: regulator-1p8v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "1P8V";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ reg_usbh1_vbus: regulator-usb-h1-vbus {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio1 0 0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_usbh1_vbus>;
|
||||
+ regulator-name = "usb_h1_vbus";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ };
|
||||
+
|
||||
+ reg_usbotg_vbus: regulator-usb-otg-vbus {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio3 22 0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_usbotg_vbus>;
|
||||
+ regulator-name = "usb_otg_vbus";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ };
|
||||
+
|
||||
+ reg_usbh2_vbus: regulator-usb-h2-vbus {
|
||||
+ compatible = "regulator-gpio";
|
||||
+ enable-active-high;
|
||||
+ enable-gpio = <&gpio2 13 0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_usbh2_vbus>;
|
||||
+ regulator-name = "usb_h2_vbus";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-boot-on;
|
||||
+ };
|
||||
+
|
||||
+ reg_usbh3_vbus: regulator-usb-h3-vbus {
|
||||
+ compatible = "regulator-gpio";
|
||||
+ enable-active-high;
|
||||
+ enable-gpio = <&gpio7 10 0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_usbh3_vbus>;
|
||||
+ regulator-name = "usb_h3_vbus";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-boot-on;
|
||||
+ };
|
||||
+
|
||||
+ sound-sgtl5000 {
|
||||
+ audio-codec = <&sgtl5000>;
|
||||
+ audio-routing =
|
||||
+ "MIC_IN", "Mic Jack",
|
||||
+ "Mic Jack", "Mic Bias",
|
||||
+ "Headphone Jack", "HP_OUT";
|
||||
+ compatible = "fsl,imx-audio-sgtl5000";
|
||||
+ model = "On-board Codec";
|
||||
+ mux-ext-port = <5>;
|
||||
+ mux-int-port = <1>;
|
||||
+ ssi-controller = <&ssi1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&audmux {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&ecspi2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_ecspi2>;
|
||||
+ cs-gpios = <&gpio2 26 0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_hdmi>;
|
||||
+ ddc-i2c-bus = <&i2c2>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ clock-frequency = <100000>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_i2c1>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ pcf8523: rtc@68 {
|
||||
+ compatible = "nxp,pcf8523";
|
||||
+ reg = <0x68>;
|
||||
+ nxp,12p5_pf;
|
||||
+ };
|
||||
+
|
||||
+ sgtl5000: codec@0a {
|
||||
+ clocks = <&clks IMX6QDL_CLK_CKO>;
|
||||
+ compatible = "fsl,sgtl5000";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_sgtl5000>;
|
||||
+ reg = <0x0a>;
|
||||
+ VDDA-supply = <®_3p3v>;
|
||||
+ VDDIO-supply = <®_3p3v>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c2 {
|
||||
+ clock-frequency = <100000>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_i2c2>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c3 {
|
||||
+ clock-frequency = <100000>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_i2c3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&iomuxc {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hog>;
|
||||
+
|
||||
+ hummingboard2 {
|
||||
+ pinctrl_hog: hoggrp {
|
||||
+ fsl,pins = <
|
||||
+ /*
|
||||
+ * 36 pin headers GPIO description. The pins
|
||||
+ * numbering as following -
|
||||
+ *
|
||||
+ * 3.2v 5v 74 75
|
||||
+ * 73 72 71 70
|
||||
+ * 69 68 67 66
|
||||
+ *
|
||||
+ * 77 78 79 76
|
||||
+ * 65 64 61 60
|
||||
+ * 53 52 51 50
|
||||
+ * 49 48 166 132
|
||||
+ * 95 94 90 91
|
||||
+ * GND 54 24 204
|
||||
+ *
|
||||
+ * The GPIO numbers can be extracted using
|
||||
+ * signal name from below.
|
||||
+ * Example -
|
||||
+ * MX6QDL_PAD_EIM_DA10__GPIO3_IO10 is
|
||||
+ * GPIO(3,10) which is (3-1)*32+10 = gpio 74
|
||||
+ *
|
||||
+ * i.e. The mapping of GPIO(X,Y) to Linux gpio
|
||||
+ * number is : gpio number = (X-1) * 32 + Y
|
||||
+ */
|
||||
+ /* DI1_PIN15 */
|
||||
+ MX6QDL_PAD_EIM_DA10__GPIO3_IO10 0x400130b1
|
||||
+ /* DI1_PIN02 */
|
||||
+ MX6QDL_PAD_EIM_DA11__GPIO3_IO11 0x400130b1
|
||||
+ /* DISP1_DATA00 */
|
||||
+ MX6QDL_PAD_EIM_DA9__GPIO3_IO09 0x400130b1
|
||||
+ /* DISP1_DATA01 */
|
||||
+ MX6QDL_PAD_EIM_DA8__GPIO3_IO08 0x400130b1
|
||||
+ /* DISP1_DATA02 */
|
||||
+ MX6QDL_PAD_EIM_DA7__GPIO3_IO07 0x400130b1
|
||||
+ /* DISP1_DATA03 */
|
||||
+ MX6QDL_PAD_EIM_DA6__GPIO3_IO06 0x400130b1
|
||||
+ /* DISP1_DATA04 */
|
||||
+ MX6QDL_PAD_EIM_DA5__GPIO3_IO05 0x400130b1
|
||||
+ /* DISP1_DATA05 */
|
||||
+ MX6QDL_PAD_EIM_DA4__GPIO3_IO04 0x400130b1
|
||||
+ /* DISP1_DATA06 */
|
||||
+ MX6QDL_PAD_EIM_DA3__GPIO3_IO03 0x400130b1
|
||||
+ /* DISP1_DATA07 */
|
||||
+ MX6QDL_PAD_EIM_DA2__GPIO3_IO02 0x400130b1
|
||||
+ /* DI1_D0_CS */
|
||||
+ MX6QDL_PAD_EIM_DA13__GPIO3_IO13 0x400130b1
|
||||
+ /* DI1_D1_CS */
|
||||
+ MX6QDL_PAD_EIM_DA14__GPIO3_IO14 0x400130b1
|
||||
+ /* DI1_PIN01 */
|
||||
+ MX6QDL_PAD_EIM_DA15__GPIO3_IO15 0x400130b1
|
||||
+ /* DI1_PIN03 */
|
||||
+ MX6QDL_PAD_EIM_DA12__GPIO3_IO12 0x400130b1
|
||||
+ /* DISP1_DATA08 */
|
||||
+ MX6QDL_PAD_EIM_DA1__GPIO3_IO01 0x400130b1
|
||||
+ /* DISP1_DATA09 */
|
||||
+ MX6QDL_PAD_EIM_DA0__GPIO3_IO00 0x400130b1
|
||||
+ /* DISP1_DATA10 */
|
||||
+ MX6QDL_PAD_EIM_EB1__GPIO2_IO29 0x400130b1
|
||||
+ /* DISP1_DATA11 */
|
||||
+ MX6QDL_PAD_EIM_EB0__GPIO2_IO28 0x400130b1
|
||||
+ /* DISP1_DATA12 */
|
||||
+ MX6QDL_PAD_EIM_A17__GPIO2_IO21 0x400130b1
|
||||
+ /* DISP1_DATA13 */
|
||||
+ MX6QDL_PAD_EIM_A18__GPIO2_IO20 0x400130b1
|
||||
+ /* DISP1_DATA14 */
|
||||
+ MX6QDL_PAD_EIM_A19__GPIO2_IO19 0x400130b1
|
||||
+ /* DISP1_DATA15 */
|
||||
+ MX6QDL_PAD_EIM_A20__GPIO2_IO18 0x400130b1
|
||||
+ /* DISP1_DATA16 */
|
||||
+ MX6QDL_PAD_EIM_A21__GPIO2_IO17 0x400130b1
|
||||
+ /* DISP1_DATA17 */
|
||||
+ MX6QDL_PAD_EIM_A22__GPIO2_IO16 0x400130b1
|
||||
+ /* DISP1_DATA18 */
|
||||
+ MX6QDL_PAD_EIM_A23__GPIO6_IO06 0x400130b1
|
||||
+ /* DISP1_DATA19 */
|
||||
+ MX6QDL_PAD_EIM_A24__GPIO5_IO04 0x400130b1
|
||||
+ /* DISP1_DATA20 */
|
||||
+ MX6QDL_PAD_EIM_D31__GPIO3_IO31 0x400130b1
|
||||
+ /* DISP1_DATA21 */
|
||||
+ MX6QDL_PAD_EIM_D30__GPIO3_IO30 0x400130b1
|
||||
+ /* DISP1_DATA22 */
|
||||
+ MX6QDL_PAD_EIM_D26__GPIO3_IO26 0x400130b1
|
||||
+ /* DISP1_DATA23 */
|
||||
+ MX6QDL_PAD_EIM_D27__GPIO3_IO27 0x400130b1
|
||||
+ /* DI1_DISP_CLK */
|
||||
+ MX6QDL_PAD_EIM_A16__GPIO2_IO22 0x400130b1
|
||||
+ /* SPDIF_IN */
|
||||
+ MX6QDL_PAD_ENET_RX_ER__GPIO1_IO24 0x400130b1
|
||||
+ /* SPDIF_OUT */
|
||||
+ MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x400130b1
|
||||
+
|
||||
+ /* MikroBUS GPIO pin number 10 */
|
||||
+ MX6QDL_PAD_EIM_LBA__GPIO2_IO27 0x400130b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_ecspi2: hummingboard2-ecspi2grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_EIM_OE__ECSPI2_MISO 0x100b1
|
||||
+ MX6QDL_PAD_EIM_CS1__ECSPI2_MOSI 0x100b1
|
||||
+ MX6QDL_PAD_EIM_CS0__ECSPI2_SCLK 0x100b1
|
||||
+ MX6QDL_PAD_EIM_RW__GPIO2_IO26 0x000b1 /* CS */
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_gpio7_9: hummingboard2-gpio7_9 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD4_CMD__GPIO7_IO09 0x80000000
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_hdmi: hummingboard2-hdmi {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_KEY_ROW2__HDMI_TX_CEC_LINE 0x1f8b0
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_i2c1: hummingboard2-i2c1 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
|
||||
+ MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_i2c2: hummingboard2-i2c2 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
|
||||
+ MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_i2c3: hummingboard2-i2c3 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_EIM_D17__I2C3_SCL 0x4001b8b1
|
||||
+ MX6QDL_PAD_EIM_D18__I2C3_SDA 0x4001b8b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_mipi: hummingboard2_mipi {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD4_DAT2__GPIO2_IO10 0x4001b8b1
|
||||
+ MX6QDL_PAD_KEY_COL4__GPIO4_IO14 0x4001b8b1
|
||||
+ MX6QDL_PAD_NANDF_CS2__CCM_CLKO2 0x130b0
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_pcie_reset: hummingboard2-pcie-reset {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD4_DAT3__GPIO2_IO11 0x1b0b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_pwm1: pwm1grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_DISP0_DAT8__PWM1_OUT 0x1b0b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_sgtl5000: hummingboard2-sgtl5000 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_DISP0_DAT19__AUD5_RXD 0x130b0
|
||||
+ MX6QDL_PAD_KEY_COL0__AUD5_TXC 0x130b0
|
||||
+ MX6QDL_PAD_KEY_ROW0__AUD5_TXD 0x110b0
|
||||
+ MX6QDL_PAD_KEY_COL1__AUD5_TXFS 0x130b0
|
||||
+ MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usbh1_vbus: hummingboard2-usbh1-vbus {
|
||||
+ fsl,pins = <MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x1b0b0>;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usbh2_vbus: hummingboard2-usbh2-vbus {
|
||||
+ fsl,pins = <MX6QDL_PAD_SD4_DAT5__GPIO2_IO13 0x1b0b0>;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usbh3_vbus: hummingboard2-usbh3-vbus {
|
||||
+ fsl,pins = <MX6QDL_PAD_SD4_CLK__GPIO7_IO10 0x1b0b0>;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usbotg_id: hummingboard2-usbotg-id {
|
||||
+ /*
|
||||
+ * Similar to pinctrl_usbotg_2, but we want it
|
||||
+ * pulled down for a fixed host connection.
|
||||
+ */
|
||||
+ fsl,pins = <MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x13059>;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usbotg_vbus: hummingboard2-usbotg-vbus {
|
||||
+ fsl,pins = <MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x1b0b0>;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usdhc2_aux: hummingboard2-usdhc2-aux {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x13071
|
||||
+ MX6QDL_PAD_KEY_ROW1__SD2_VSELECT 0x1b071
|
||||
+ MX6QDL_PAD_DISP0_DAT9__GPIO4_IO30 0x1b0b0
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usdhc2: hummingboard2-usdhc2 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17059
|
||||
+ MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10059
|
||||
+ MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059
|
||||
+ MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
|
||||
+ MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
|
||||
+ MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x13059
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usdhc2_100mhz: hummingboard2-usdhc2-100mhz {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD2_CMD__SD2_CMD 0x170b9
|
||||
+ MX6QDL_PAD_SD2_CLK__SD2_CLK 0x100b9
|
||||
+ MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x170b9
|
||||
+ MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x170b9
|
||||
+ MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x170b9
|
||||
+ MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x130b9
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usdhc2_200mhz: hummingboard2-usdhc2-200mhz {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD2_CMD__SD2_CMD 0x170f9
|
||||
+ MX6QDL_PAD_SD2_CLK__SD2_CLK 0x100f9
|
||||
+ MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x170f9
|
||||
+ MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x170f9
|
||||
+ MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x170f9
|
||||
+ MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x130f9
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usdhc3: hummingboard2-usdhc3 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059
|
||||
+ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059
|
||||
+ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT4__SD3_DATA4 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT5__SD3_DATA5 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT6__SD3_DATA6 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT7__SD3_DATA7 0x17059
|
||||
+ MX6QDL_PAD_SD3_RST__SD3_RESET 0x17059
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_uart3: hummingboard2-uart3 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_EIM_D25__UART3_TX_DATA 0x1b0b1
|
||||
+ MX6QDL_PAD_EIM_D24__UART3_RX_DATA 0x40013000
|
||||
+ >;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ldb {
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ lvds-channel@0 {
|
||||
+ fsl,data-mapping = "spwg";
|
||||
+ fsl,data-width = <18>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pcie {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_pcie_reset>;
|
||||
+ reset-gpio = <&gpio2 11 0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_pwm1>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm3 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&pwm4 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&ssi1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbh1 {
|
||||
+ disable-over-current;
|
||||
+ vbus-supply = <®_usbh1_vbus>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbotg {
|
||||
+ disable-over-current;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_usbotg_id>;
|
||||
+ vbus-supply = <®_usbotg_vbus>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usdhc2 {
|
||||
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
|
||||
+ pinctrl-0 = <
|
||||
+ &pinctrl_hummingboard2_usdhc2_aux
|
||||
+ &pinctrl_hummingboard2_usdhc2
|
||||
+ >;
|
||||
+ pinctrl-1 = <
|
||||
+ &pinctrl_hummingboard2_usdhc2_aux
|
||||
+ &pinctrl_hummingboard2_usdhc2_100mhz
|
||||
+ >;
|
||||
+ pinctrl-2 = <
|
||||
+ &pinctrl_hummingboard2_usdhc2_aux
|
||||
+ &pinctrl_hummingboard2_usdhc2_200mhz
|
||||
+ >;
|
||||
+ mmc-pwrseq = <&usdhc2_pwrseq>;
|
||||
+ cd-gpios = <&gpio1 4 0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usdhc3 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <
|
||||
+ &pinctrl_hummingboard2_usdhc3
|
||||
+ >;
|
||||
+ vmmc-supply = <®_3p3v>;
|
||||
+ vqmmc-supply = <®_3p3v>;
|
||||
+ bus-width = <8>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart3 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_uart3>;
|
||||
+ status = "okay";
|
||||
+};
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index 0e3c57b99904..72226ccf3e34 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -39,7 +39,6 @@
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include "imx6qdl-microsom.dtsi"
|
||||
-#include "imx6qdl-microsom-ar8035.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index 72226ccf3e34..2dfd8f5887fc 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -38,7 +38,7 @@
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
-#include "imx6qdl-microsom.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
|
@ -1,36 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6dl-hummingboard2.dts b/arch/arm/boot/dts/imx6dl-hummingboard2.dts
|
||||
index 207ce329534a..30e042822ec6 100644
|
||||
--- a/arch/arm/boot/dts/imx6dl-hummingboard2.dts
|
||||
+++ b/arch/arm/boot/dts/imx6dl-hummingboard2.dts
|
||||
@@ -42,6 +42,7 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "imx6dl.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
#include "imx6qdl-hummingboard2.dtsi"
|
||||
|
||||
/ {
|
||||
diff --git a/arch/arm/boot/dts/imx6q-hummingboard2.dts b/arch/arm/boot/dts/imx6q-hummingboard2.dts
|
||||
index b850111ddf34..8dcad5668c17 100644
|
||||
--- a/arch/arm/boot/dts/imx6q-hummingboard2.dts
|
||||
+++ b/arch/arm/boot/dts/imx6q-hummingboard2.dts
|
||||
@@ -42,6 +42,7 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "imx6q.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
#include "imx6qdl-hummingboard2.dtsi"
|
||||
|
||||
/ {
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index 2dfd8f5887fc..676160ef2718 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -38,7 +38,6 @@
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
-#include "imx6qdl-sr-som.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
|
@ -1,24 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6dl-hummingboard2.dts b/arch/arm/boot/dts/imx6dl-hummingboard2.dts
|
||||
index 30e042822ec6..99b6cce13175 100644
|
||||
--- a/arch/arm/boot/dts/imx6dl-hummingboard2.dts
|
||||
+++ b/arch/arm/boot/dts/imx6dl-hummingboard2.dts
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#include "imx6dl.dtsi"
|
||||
#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-brcm.dtsi"
|
||||
#include "imx6qdl-hummingboard2.dtsi"
|
||||
|
||||
/ {
|
||||
diff --git a/arch/arm/boot/dts/imx6q-hummingboard2.dts b/arch/arm/boot/dts/imx6q-hummingboard2.dts
|
||||
index 8dcad5668c17..fab388a0f673 100644
|
||||
--- a/arch/arm/boot/dts/imx6q-hummingboard2.dts
|
||||
+++ b/arch/arm/boot/dts/imx6q-hummingboard2.dts
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#include "imx6q.dtsi"
|
||||
#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-brcm.dtsi"
|
||||
#include "imx6qdl-hummingboard2.dtsi"
|
||||
|
||||
/ {
|
|
@ -1,22 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index 676160ef2718..b632eb73e85c 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -389,7 +389,7 @@
|
||||
|
||||
pinctrl_hummingboard2_usdhc2_aux: hummingboard2-usdhc2-aux {
|
||||
fsl,pins = <
|
||||
- MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x13071
|
||||
+ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x1f071
|
||||
MX6QDL_PAD_KEY_ROW1__SD2_VSELECT 0x1b071
|
||||
MX6QDL_PAD_DISP0_DAT9__GPIO4_IO30 0x1b0b0
|
||||
>;
|
||||
@@ -516,7 +516,7 @@
|
||||
&pinctrl_hummingboard2_usdhc2_200mhz
|
||||
>;
|
||||
mmc-pwrseq = <&usdhc2_pwrseq>;
|
||||
- cd-gpios = <&gpio1 4 0>;
|
||||
+ cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
};
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index b632eb73e85c..4723bb279e57 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
ir_recv: ir-receiver {
|
||||
compatible = "gpio-ir-receiver";
|
||||
- gpios = <&gpio7 9 1>;
|
||||
+ gpios = <&gpio7 9 GPIO_ACTIVE_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_gpio7_9>;
|
||||
linux,rc-map-name = "rc-rc6-mce";
|
||||
@@ -76,7 +76,7 @@
|
||||
reg_usbh1_vbus: regulator-usb-h1-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
- gpio = <&gpio1 0 0>;
|
||||
+ gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_usbh1_vbus>;
|
||||
regulator-name = "usb_h1_vbus";
|
||||
@@ -87,7 +87,7 @@
|
||||
reg_usbotg_vbus: regulator-usb-otg-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
- gpio = <&gpio3 22 0>;
|
||||
+ gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_usbotg_vbus>;
|
||||
regulator-name = "usb_otg_vbus";
|
||||
@@ -98,7 +98,7 @@
|
||||
reg_usbh2_vbus: regulator-usb-h2-vbus {
|
||||
compatible = "regulator-gpio";
|
||||
enable-active-high;
|
||||
- enable-gpio = <&gpio2 13 0>;
|
||||
+ enable-gpio = <&gpio2 13 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_usbh2_vbus>;
|
||||
regulator-name = "usb_h2_vbus";
|
||||
@@ -110,7 +110,7 @@
|
||||
reg_usbh3_vbus: regulator-usb-h3-vbus {
|
||||
compatible = "regulator-gpio";
|
||||
enable-active-high;
|
||||
- enable-gpio = <&gpio7 10 0>;
|
||||
+ enable-gpio = <&gpio7 10 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_usbh3_vbus>;
|
||||
regulator-name = "usb_h3_vbus";
|
|
@ -1,65 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index 4723bb279e57..7e94548c0de7 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -52,11 +52,6 @@
|
||||
linux,rc-map-name = "rc-rc6-mce";
|
||||
};
|
||||
|
||||
- usdhc2_pwrseq: usdhc2-pwrseq {
|
||||
- compatible = "mmc-pwrseq-simple";
|
||||
- reset-gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>;
|
||||
- };
|
||||
-
|
||||
reg_3p3v: regulator-3p3v {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "3P3V";
|
||||
@@ -73,6 +68,18 @@
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
+ v_sd: regulator-v-sd {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ gpio = <&gpio4 30 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_vmmc>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-name = "v_sd";
|
||||
+ startup-delay-us = <1000>;
|
||||
+ };
|
||||
+
|
||||
reg_usbh1_vbus: regulator-usb-h1-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
@@ -391,7 +398,6 @@
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x1f071
|
||||
MX6QDL_PAD_KEY_ROW1__SD2_VSELECT 0x1b071
|
||||
- MX6QDL_PAD_DISP0_DAT9__GPIO4_IO30 0x1b0b0
|
||||
>;
|
||||
};
|
||||
|
||||
@@ -428,6 +434,12 @@
|
||||
>;
|
||||
};
|
||||
|
||||
+ pinctrl_hummingboard2_vmmc: hummingboard2-vmmc {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_DISP0_DAT9__GPIO4_IO30 0x1b0b0
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
pinctrl_hummingboard2_usdhc3: hummingboard2-usdhc3 {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059
|
||||
@@ -515,7 +527,7 @@
|
||||
&pinctrl_hummingboard2_usdhc2_aux
|
||||
&pinctrl_hummingboard2_usdhc2_200mhz
|
||||
>;
|
||||
- mmc-pwrseq = <&usdhc2_pwrseq>;
|
||||
+ vmmc-supply = <&v_sd>;
|
||||
cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
};
|
|
@ -1,28 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index 7e94548c0de7..ab809ee0c58c 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -482,9 +482,9 @@
|
||||
};
|
||||
|
||||
&pwm1 {
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pinctrl_hummingboard2_pwm1>;
|
||||
- status = "okay";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_pwm1>;
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&pwm3 {
|
||||
@@ -534,9 +534,7 @@
|
||||
|
||||
&usdhc3 {
|
||||
pinctrl-names = "default";
|
||||
- pinctrl-0 = <
|
||||
- &pinctrl_hummingboard2_usdhc3
|
||||
- >;
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_usdhc3>;
|
||||
vmmc-supply = <®_3p3v>;
|
||||
vqmmc-supply = <®_3p3v>;
|
||||
bus-width = <8>;
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index ab809ee0c58c..dfbcdf33b84c 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -178,6 +178,7 @@
|
||||
reg = <0x0a>;
|
||||
VDDA-supply = <®_3p3v>;
|
||||
VDDIO-supply = <®_3p3v>;
|
||||
+ VDDD-supply = <®_1p8v>;
|
||||
};
|
||||
};
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index dfbcdf33b84c..4ddc4b73b9ae 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -466,15 +466,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
-&ldb {
|
||||
- status = "disabled";
|
||||
-
|
||||
- lvds-channel@0 {
|
||||
- fsl,data-mapping = "spwg";
|
||||
- fsl,data-width = <18>;
|
||||
- };
|
||||
-};
|
||||
-
|
||||
&pcie {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_pcie_reset>;
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index 4ddc4b73b9ae..9d5c3b2d3494 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -469,7 +469,7 @@
|
||||
&pcie {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_pcie_reset>;
|
||||
- reset-gpio = <&gpio2 11 0>;
|
||||
+ reset-gpio = <&gpio2 11 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
};
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index 9d5c3b2d3494..2a63c992b62c 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -167,7 +167,6 @@
|
||||
pcf8523: rtc@68 {
|
||||
compatible = "nxp,pcf8523";
|
||||
reg = <0x68>;
|
||||
- nxp,12p5_pf;
|
||||
};
|
||||
|
||||
sgtl5000: codec@0a {
|
|
@ -1,19 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index 2a63c992b62c..6fbfa970a0a7 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -478,14 +478,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
-&pwm3 {
|
||||
- status = "disabled";
|
||||
-};
|
||||
-
|
||||
-&pwm4 {
|
||||
- status = "disabled";
|
||||
-};
|
||||
-
|
||||
&ssi1 {
|
||||
status = "okay";
|
||||
};
|
|
@ -1,92 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index 6fbfa970a0a7..52ed580cf64a 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
reg_3p3v: regulator-3p3v {
|
||||
compatible = "regulator-fixed";
|
||||
- regulator-name = "3P3V";
|
||||
+ regulator-name = "VCC_3V2";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
reg_1p8v: regulator-1p8v {
|
||||
compatible = "regulator-fixed";
|
||||
- regulator-name = "1P8V";
|
||||
+ regulator-name = "VCC_1V8";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
@@ -80,15 +80,16 @@
|
||||
startup-delay-us = <1000>;
|
||||
};
|
||||
|
||||
- reg_usbh1_vbus: regulator-usb-h1-vbus {
|
||||
+ reg_usbh2_vbus: regulator-usb-h1-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_usbh1_vbus>;
|
||||
- regulator-name = "usb_h1_vbus";
|
||||
+ regulator-name = "V_USB2";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
+ regulator-always-on;
|
||||
};
|
||||
|
||||
reg_usbotg_vbus: regulator-usb-otg-vbus {
|
||||
@@ -97,33 +98,33 @@
|
||||
gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_usbotg_vbus>;
|
||||
- regulator-name = "usb_otg_vbus";
|
||||
+ regulator-name = "V_USB1";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
};
|
||||
|
||||
- reg_usbh2_vbus: regulator-usb-h2-vbus {
|
||||
- compatible = "regulator-gpio";
|
||||
+ reg_usbh3_vbus: regulator-usb-h2-vbus {
|
||||
+ compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
enable-gpio = <&gpio2 13 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_usbh2_vbus>;
|
||||
- regulator-name = "usb_h2_vbus";
|
||||
+ regulator-name = "V_USB3";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
- regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
};
|
||||
|
||||
- reg_usbh3_vbus: regulator-usb-h3-vbus {
|
||||
- compatible = "regulator-gpio";
|
||||
+ reg_usbh4_vbus: regulator-usb-h3-vbus {
|
||||
+ compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
enable-gpio = <&gpio7 10 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_usbh3_vbus>;
|
||||
- regulator-name = "usb_h3_vbus";
|
||||
+ regulator-name = "V_USB4";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
- regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
};
|
||||
|
||||
sound-sgtl5000 {
|
||||
@@ -484,7 +485,6 @@
|
||||
|
||||
&usbh1 {
|
||||
disable-over-current;
|
||||
- vbus-supply = <®_usbh1_vbus>;
|
||||
status = "okay";
|
||||
};
|
||||
|
|
@ -1,146 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6dl-hummingboard2.dts b/arch/arm/boot/dts/imx6dl-hummingboard2.dts
|
||||
index 99b6cce13175..b12cd87f3f94 100644
|
||||
--- a/arch/arm/boot/dts/imx6dl-hummingboard2.dts
|
||||
+++ b/arch/arm/boot/dts/imx6dl-hummingboard2.dts
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "imx6qdl-sr-som.dtsi"
|
||||
#include "imx6qdl-sr-som-brcm.dtsi"
|
||||
#include "imx6qdl-hummingboard2.dtsi"
|
||||
+#include "imx6qdl-hummingboard2-emmc.dtsi"
|
||||
|
||||
/ {
|
||||
model = "SolidRun HummingBoard2 Solo/DualLite";
|
||||
diff --git a/arch/arm/boot/dts/imx6q-hummingboard2.dts b/arch/arm/boot/dts/imx6q-hummingboard2.dts
|
||||
index fab388a0f673..5249f53dcdbc 100644
|
||||
--- a/arch/arm/boot/dts/imx6q-hummingboard2.dts
|
||||
+++ b/arch/arm/boot/dts/imx6q-hummingboard2.dts
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "imx6qdl-sr-som.dtsi"
|
||||
#include "imx6qdl-sr-som-brcm.dtsi"
|
||||
#include "imx6qdl-hummingboard2.dtsi"
|
||||
+#include "imx6qdl-hummingboard2-emmc.dtsi"
|
||||
|
||||
/ {
|
||||
model = "SolidRun HummingBoard2 Dual/Quad";
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2-emmc.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2-emmc.dtsi
|
||||
new file mode 100644
|
||||
index 000000000000..1aa97817e751
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2-emmc.dtsi
|
||||
@@ -0,0 +1,72 @@
|
||||
+/*
|
||||
+ * Device Tree file for SolidRun HummingBoard2
|
||||
+ * Copyright (C) 2015 Rabeeh Khoury <rabeeh@solid-run.com>
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+&iomuxc {
|
||||
+ hummingboard2 {
|
||||
+ pinctrl_hummingboard2_usdhc3: hummingboard2-usdhc3 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059
|
||||
+ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059
|
||||
+ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT4__SD3_DATA4 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT5__SD3_DATA5 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT6__SD3_DATA6 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT7__SD3_DATA7 0x17059
|
||||
+ MX6QDL_PAD_SD3_RST__SD3_RESET 0x17059
|
||||
+ >;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usdhc3 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_usdhc3>;
|
||||
+ vmmc-supply = <®_3p3v>;
|
||||
+ vqmmc-supply = <®_3p3v>;
|
||||
+ bus-width = <8>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index 52ed580cf64a..6954d4875cd8 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -441,22 +441,6 @@
|
||||
>;
|
||||
};
|
||||
|
||||
- pinctrl_hummingboard2_usdhc3: hummingboard2-usdhc3 {
|
||||
- fsl,pins = <
|
||||
- MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059
|
||||
- MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059
|
||||
- MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059
|
||||
- MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
|
||||
- MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
|
||||
- MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
|
||||
- MX6QDL_PAD_SD3_DAT4__SD3_DATA4 0x17059
|
||||
- MX6QDL_PAD_SD3_DAT5__SD3_DATA5 0x17059
|
||||
- MX6QDL_PAD_SD3_DAT6__SD3_DATA6 0x17059
|
||||
- MX6QDL_PAD_SD3_DAT7__SD3_DATA7 0x17059
|
||||
- MX6QDL_PAD_SD3_RST__SD3_RESET 0x17059
|
||||
- >;
|
||||
- };
|
||||
-
|
||||
pinctrl_hummingboard2_uart3: hummingboard2-uart3 {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_EIM_D25__UART3_TX_DATA 0x1b0b1
|
||||
@@ -515,16 +499,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
-&usdhc3 {
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pinctrl_hummingboard2_usdhc3>;
|
||||
- vmmc-supply = <®_3p3v>;
|
||||
- vqmmc-supply = <®_3p3v>;
|
||||
- bus-width = <8>;
|
||||
- non-removable;
|
||||
- status = "okay";
|
||||
-};
|
||||
-
|
||||
&uart3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_uart3>;
|
|
@ -1,30 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index 6954d4875cd8..1089f693ebde 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -361,6 +361,12 @@
|
||||
>;
|
||||
};
|
||||
|
||||
+ pinctrl_hummingboard2_pwm3: pwm3grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD4_DAT1__PWM3_OUT 0x1b0b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
pinctrl_hummingboard2_sgtl5000: hummingboard2-sgtl5000 {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_DISP0_DAT19__AUD5_RXD 0x130b0
|
||||
@@ -463,6 +469,12 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&pwm3 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_pwm3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&ssi1 {
|
||||
status = "okay";
|
||||
};
|
|
@ -1,148 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index a757e2dd60c4..b72799b464b5 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -389,6 +389,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6dl-hummingboard-emmc-som-v15.dtb \
|
||||
imx6dl-hummingboard-som-v15.dtb \
|
||||
imx6dl-hummingboard2.dtb \
|
||||
+ imx6dl-hummingboard2-som-v15.dtb \
|
||||
imx6dl-icore.dtb \
|
||||
imx6dl-icore-rqs.dtb \
|
||||
imx6dl-nit6xlite.dtb \
|
||||
@@ -449,6 +450,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6q-hummingboard-emmc-som-v15.dtb \
|
||||
imx6q-hummingboard-som-v15.dtb \
|
||||
imx6q-hummingboard2.dtb \
|
||||
+ imx6q-hummingboard2-som-v15.dtb \
|
||||
imx6q-icore.dtb \
|
||||
imx6q-icore-ofcap10.dtb \
|
||||
imx6q-icore-ofcap12.dtb \
|
||||
diff --git a/arch/arm/boot/dts/imx6dl-hummingboard2-som-v15.dts b/arch/arm/boot/dts/imx6dl-hummingboard2-som-v15.dts
|
||||
new file mode 100644
|
||||
index 000000000000..e61ef1156f8b
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6dl-hummingboard2-som-v15.dts
|
||||
@@ -0,0 +1,54 @@
|
||||
+/*
|
||||
+ * Device Tree file for SolidRun HummingBoard2
|
||||
+ * Copyright (C) 2015 Rabeeh Khoury <rabeeh@solid-run.com>
|
||||
+ * Based on work by Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "imx6dl.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-ti.dtsi"
|
||||
+#include "imx6qdl-hummingboard2.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SolidRun HummingBoard2 Solo/DualLite (1.5som)";
|
||||
+ compatible = "solidrun,hummingboard2/dl", "fsl,imx6dl";
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/imx6q-hummingboard2-som-v15.dts b/arch/arm/boot/dts/imx6q-hummingboard2-som-v15.dts
|
||||
new file mode 100644
|
||||
index 000000000000..d3ad7329cd6d
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6q-hummingboard2-som-v15.dts
|
||||
@@ -0,0 +1,62 @@
|
||||
+/*
|
||||
+ * Device Tree file for SolidRun HummingBoard2
|
||||
+ * Copyright (C) 2015 Rabeeh Khoury <rabeeh@solid-run.com>
|
||||
+ * Based on work by Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "imx6q.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-ti.dtsi"
|
||||
+#include "imx6qdl-hummingboard2.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SolidRun HummingBoard2 Dual/Quad (1.5som)";
|
||||
+ compatible = "solidrun,hummingboard2/q", "fsl,imx6q";
|
||||
+};
|
||||
+
|
||||
+&sata {
|
||||
+ status = "okay";
|
||||
+ fsl,transmit-level-mV = <1104>;
|
||||
+ fsl,transmit-boost-mdB = <0>;
|
||||
+ fsl,transmit-atten-16ths = <9>;
|
||||
+ fsl,no-spread-spectrum;
|
||||
+};
|
|
@ -1,150 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index b72799b464b5..458e2c886c0e 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -389,6 +389,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6dl-hummingboard-emmc-som-v15.dtb \
|
||||
imx6dl-hummingboard-som-v15.dtb \
|
||||
imx6dl-hummingboard2.dtb \
|
||||
+ imx6dl-hummingboard2-emmc-som-v15.dtb \
|
||||
imx6dl-hummingboard2-som-v15.dtb \
|
||||
imx6dl-icore.dtb \
|
||||
imx6dl-icore-rqs.dtb \
|
||||
@@ -450,6 +451,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6q-hummingboard-emmc-som-v15.dtb \
|
||||
imx6q-hummingboard-som-v15.dtb \
|
||||
imx6q-hummingboard2.dtb \
|
||||
+ imx6q-hummingboard2-emmc-som-v15.dtb \
|
||||
imx6q-hummingboard2-som-v15.dtb \
|
||||
imx6q-icore.dtb \
|
||||
imx6q-icore-ofcap10.dtb \
|
||||
diff --git a/arch/arm/boot/dts/imx6dl-hummingboard2-emmc-som-v15.dts b/arch/arm/boot/dts/imx6dl-hummingboard2-emmc-som-v15.dts
|
||||
new file mode 100644
|
||||
index 000000000000..80313c13bcdb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6dl-hummingboard2-emmc-som-v15.dts
|
||||
@@ -0,0 +1,55 @@
|
||||
+/*
|
||||
+ * Device Tree file for SolidRun HummingBoard2
|
||||
+ * Copyright (C) 2015 Rabeeh Khoury <rabeeh@solid-run.com>
|
||||
+ * Based on work by Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "imx6dl.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-emmc.dtsi"
|
||||
+#include "imx6qdl-sr-som-ti.dtsi"
|
||||
+#include "imx6qdl-hummingboard2.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SolidRun HummingBoard2 Solo/DualLite (1.5som+emmc)";
|
||||
+ compatible = "solidrun,hummingboard2/dl", "fsl,imx6dl";
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/imx6q-hummingboard2-emmc-som-v15.dts b/arch/arm/boot/dts/imx6q-hummingboard2-emmc-som-v15.dts
|
||||
new file mode 100644
|
||||
index 000000000000..1998ebfa0fe0
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6q-hummingboard2-emmc-som-v15.dts
|
||||
@@ -0,0 +1,63 @@
|
||||
+/*
|
||||
+ * Device Tree file for SolidRun HummingBoard2
|
||||
+ * Copyright (C) 2015 Rabeeh Khoury <rabeeh@solid-run.com>
|
||||
+ * Based on work by Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "imx6q.dtsi"
|
||||
+#include "imx6qdl-sr-som.dtsi"
|
||||
+#include "imx6qdl-sr-som-emmc.dtsi"
|
||||
+#include "imx6qdl-sr-som-ti.dtsi"
|
||||
+#include "imx6qdl-hummingboard2.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SolidRun HummingBoard2 Dual/Quad (1.5som+emmc)";
|
||||
+ compatible = "solidrun,hummingboard2/q", "fsl,imx6q";
|
||||
+};
|
||||
+
|
||||
+&sata {
|
||||
+ status = "okay";
|
||||
+ fsl,transmit-level-mV = <1104>;
|
||||
+ fsl,transmit-boost-mdB = <0>;
|
||||
+ fsl,transmit-atten-16ths = <9>;
|
||||
+ fsl,no-spread-spectrum;
|
||||
+};
|
|
@ -1,170 +0,0 @@
|
|||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2-emmc.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2-emmc.dtsi
|
||||
index 1aa97817e751..f400405381a7 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2-emmc.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2-emmc.dtsi
|
||||
@@ -64,8 +64,8 @@
|
||||
&usdhc3 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_usdhc3>;
|
||||
- vmmc-supply = <®_3p3v>;
|
||||
- vqmmc-supply = <®_3p3v>;
|
||||
+ vmmc-supply = <&v_3v2>;
|
||||
+ vqmmc-supply = <&v_3v2>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index 1089f693ebde..117c4daf31e9 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -52,20 +52,29 @@
|
||||
linux,rc-map-name = "rc-rc6-mce";
|
||||
};
|
||||
|
||||
- reg_3p3v: regulator-3p3v {
|
||||
+ v_3v2: regulator-v-3v2 {
|
||||
compatible = "regulator-fixed";
|
||||
- regulator-name = "VCC_3V2";
|
||||
- regulator-min-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-name = "v_3v2";
|
||||
+ };
|
||||
+
|
||||
+ v_5v0: regulator-v-5v0 {
|
||||
+ compatible = "regulator-fixed";
|
||||
regulator-always-on;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-name = "v_5v0";
|
||||
};
|
||||
|
||||
- reg_1p8v: regulator-1p8v {
|
||||
+ vcc_1p8: regulator-vcc-1p8 {
|
||||
compatible = "regulator-fixed";
|
||||
- regulator-name = "VCC_1V8";
|
||||
- regulator-min-microvolt = <1800000>;
|
||||
- regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc_1p8";
|
||||
+ vin-supply = <&v_3v2>;
|
||||
};
|
||||
|
||||
v_sd: regulator-v-sd {
|
||||
@@ -78,53 +87,62 @@
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-name = "v_sd";
|
||||
startup-delay-us = <1000>;
|
||||
+ vin-supply = <&v_3v2>;
|
||||
};
|
||||
|
||||
- reg_usbh2_vbus: regulator-usb-h1-vbus {
|
||||
+ v_usb1: regulator-v-usb1 {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
- gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
|
||||
+ gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pinctrl_hummingboard2_usbh1_vbus>;
|
||||
- regulator-name = "V_USB2";
|
||||
- regulator-min-microvolt = <5000000>;
|
||||
- regulator-max-microvolt = <5000000>;
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_usbotg_vbus>;
|
||||
regulator-always-on;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-name = "v_usb1";
|
||||
+ vin-supply = <&v_5v0>;
|
||||
};
|
||||
|
||||
- reg_usbotg_vbus: regulator-usb-otg-vbus {
|
||||
+ v_usb2: regulator-v-usb2 {
|
||||
+ /* USB hub port 1 */
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
- gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
|
||||
+ gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pinctrl_hummingboard2_usbotg_vbus>;
|
||||
- regulator-name = "V_USB1";
|
||||
- regulator-min-microvolt = <5000000>;
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_usbh1_vbus>;
|
||||
+ regulator-always-on;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-name = "v_usb2";
|
||||
+ vin-supply = <&v_5v0>;
|
||||
};
|
||||
|
||||
- reg_usbh3_vbus: regulator-usb-h2-vbus {
|
||||
+ v_usb3: regulator-v-usb3 {
|
||||
+ /* USB hub port 3 */
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
- enable-gpio = <&gpio2 13 GPIO_ACTIVE_HIGH>;
|
||||
+ gpio = <&gpio2 13 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_usbh2_vbus>;
|
||||
- regulator-name = "V_USB3";
|
||||
- regulator-min-microvolt = <5000000>;
|
||||
- regulator-max-microvolt = <5000000>;
|
||||
regulator-always-on;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-name = "v_usb3";
|
||||
+ vin-supply = <&v_5v0>;
|
||||
};
|
||||
|
||||
- reg_usbh4_vbus: regulator-usb-h3-vbus {
|
||||
+ v_usb4: regulator-v-usb4 {
|
||||
+ /* USB hub port 4 */
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
- enable-gpio = <&gpio7 10 GPIO_ACTIVE_HIGH>;
|
||||
+ gpio = <&gpio7 10 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_usbh3_vbus>;
|
||||
- regulator-name = "V_USB4";
|
||||
- regulator-min-microvolt = <5000000>;
|
||||
- regulator-max-microvolt = <5000000>;
|
||||
regulator-always-on;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-name = "v_usb4";
|
||||
+ vin-supply = <&v_5v0>;
|
||||
};
|
||||
|
||||
sound-sgtl5000 {
|
||||
@@ -176,9 +194,9 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_sgtl5000>;
|
||||
reg = <0x0a>;
|
||||
- VDDA-supply = <®_3p3v>;
|
||||
- VDDIO-supply = <®_3p3v>;
|
||||
- VDDD-supply = <®_1p8v>;
|
||||
+ VDDA-supply = <&v_3v2>;
|
||||
+ VDDD-supply = <&vcc_1p8>;
|
||||
+ VDDIO-supply = <&v_3v2>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -488,7 +506,7 @@
|
||||
disable-over-current;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_usbotg_id>;
|
||||
- vbus-supply = <®_usbotg_vbus>;
|
||||
+ vbus-supply = <&v_usb1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -516,3 +534,7 @@
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_uart3>;
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&vcc_3v3 {
|
||||
+ vin-supply = <&v_3v2>;
|
||||
+};
|
|
@ -1,23 +0,0 @@
|
|||
Based on following upstream patch by Tim Harvey (Gateworks):
|
||||
|
||||
https://github.com/Gateworks/openwrt/commit/80a01b6582f94c4547f39d3a25e0a1e9b6eb9877
|
||||
|
||||
TX complete DMA messages are getting missed.
|
||||
This is also currently an issue in mainline.
|
||||
For now we will disable DMA in serial/imx.c.
|
||||
|
||||
This resolves an issue encountered with RS485 transmit.
|
||||
|
||||
--- a/drivers/tty/serial/imx.c
|
||||
+++ b/drivers/tty/serial/imx.c
|
||||
@@ -1268,10 +1268,6 @@ static int imx_startup(struct uart_port
|
||||
|
||||
writel(temp & ~UCR4_DREN, sport->port.membase + UCR4);
|
||||
|
||||
- /* Can we enable the DMA support? */
|
||||
- if (!uart_console(port) && !sport->dma_is_inited)
|
||||
- imx_uart_dma_init(sport);
|
||||
-
|
||||
spin_lock_irqsave(&sport->port.lock, flags);
|
||||
/* Reset fifo's and state machines */
|
||||
i = 100;
|
|
@ -1,14 +0,0 @@
|
|||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
|
||||
index 62985f2..9413c1c
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
|
||||
@@ -157,8 +157,7 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)
|
||||
}
|
||||
}
|
||||
/* MBSS does not work for 43362 */
|
||||
- if (drvr->bus_if->chip == BRCM_CC_43362_CHIP_ID)
|
||||
- ifp->drvr->feat_flags &= ~BIT(BRCMF_FEAT_MBSS);
|
||||
+ ifp->drvr->feat_flags &= ~BIT(BRCMF_FEAT_MBSS);
|
||||
brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_RSDB, "rsdb_mode");
|
||||
brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_TDLS, "tdls_enable");
|
||||
brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_MFP, "mfp");
|
|
@ -1,11 +0,0 @@
|
|||
--- ./arch/arm/mm/cache-feroceon-l2.c.orig 2013-04-26 13:18:32.000000000 -0600
|
||||
+++ ./arch/arm/mm/cache-feroceon-l2.c 2013-04-28 04:01:09.815592333 -0600
|
||||
@@ -117,7 +117,7 @@ static inline void l2_inv_pa_range(unsig
|
||||
l2_put_va(va_start);
|
||||
}
|
||||
|
||||
-static inline void l2_inv_all(void)
|
||||
+static void l2_inv_all(void)
|
||||
{
|
||||
__asm__("mcr p15, 1, %0, c15, c11, 0" : : "r" (0));
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
--- ./init/main.c.orig 2014-01-18 19:45:47.563141094 -0700
|
||||
+++ ./init/main.c 2014-01-18 19:54:46.596698283 -0700
|
||||
@@ -871,7 +871,8 @@ static int __ref kernel_init(void *unuse
|
||||
pr_err("Failed to execute %s (error %d). Attempting defaults...\n",
|
||||
execute_command, ret);
|
||||
}
|
||||
- if (!try_to_run_init_process("/sbin/init") ||
|
||||
+ if (!try_to_run_init_process("/usr/lib/systemd/systemd") ||
|
||||
+ !try_to_run_init_process("/sbin/init") ||
|
||||
!try_to_run_init_process("/etc/init") ||
|
||||
!try_to_run_init_process("/bin/init") ||
|
||||
!try_to_run_init_process("/bin/sh"))
|
|
@ -1,66 +0,0 @@
|
|||
--- ./arch/arm/boot/dts/imx6qdl-hummingboard.dtsi.orig 2015-01-08 11:30:41.000000000 -0700
|
||||
+++ ./arch/arm/boot/dts/imx6qdl-hummingboard.dtsi 2015-01-13 14:19:29.696485445 -0700
|
||||
@@ -94,6 +94,31 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&i2c3 {
|
||||
+ clock-frequency = <100000>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard_i2c3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&ecspi2 {
|
||||
+ fsl,spi-num-chipselects = <2>;
|
||||
+ cs-gpios = <&gpio2 26 1>, <&gpio2 27 1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard_spi>;
|
||||
+ status = "okay";
|
||||
+ spidev@0x00 {
|
||||
+ compatible = "spidev";
|
||||
+ spi-max-frequency = <5000000>;
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+ spidev@0x01 {
|
||||
+ compatible = "spidev";
|
||||
+ spi-max-frequency = <5000000>;
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&iomuxc {
|
||||
hummingboard {
|
||||
pinctrl_hummingboard_flexcan1: hummingboard-flexcan1 {
|
||||
@@ -103,6 +128,17 @@
|
||||
>;
|
||||
};
|
||||
|
||||
+ pinctrl_hummingboard_spi: hummingboard_spi {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_EIM_OE__ECSPI2_MISO 0x100b1
|
||||
+ MX6QDL_PAD_EIM_CS1__ECSPI2_MOSI 0x100b1
|
||||
+ MX6QDL_PAD_EIM_CS0__ECSPI2_SCLK 0x100b1
|
||||
+ /* MX6QDL_PAD_EIM_RW__ECSPI2_SS0 0x100b1 */
|
||||
+ MX6QDL_PAD_EIM_RW__GPIO2_IO26 0x100b1
|
||||
+ MX6QDL_PAD_EIM_LBA__ECSPI2_SS1 0x100b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
pinctrl_hummingboard_gpio3_5: hummingboard-gpio3_5 {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_EIM_DA5__GPIO3_IO05 0x1b0b1
|
||||
@@ -129,6 +165,13 @@
|
||||
>;
|
||||
};
|
||||
|
||||
+ pinctrl_hummingboard_i2c3: hummingboard-i2c3 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_EIM_D17__I2C3_SCL 0x4001b8b1
|
||||
+ MX6QDL_PAD_EIM_D18__I2C3_SDA 0x4001b8b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
pinctrl_hummingboard_spdif: hummingboard-spdif {
|
||||
fsl,pins = <MX6QDL_PAD_GPIO_17__SPDIF_OUT 0x13091>;
|
||||
};
|
|
@ -1,11 +0,0 @@
|
|||
--- ./fs/timerfd.c.orig 2015-11-09 15:37:56.000000000 -0700
|
||||
+++ ./fs/timerfd.c 2015-11-14 08:20:51.720068530 -0700
|
||||
@@ -134,7 +134,7 @@ static void timerfd_setup_cancel(struct
|
||||
{
|
||||
if ((ctx->clockid == CLOCK_REALTIME ||
|
||||
ctx->clockid == CLOCK_REALTIME_ALARM) &&
|
||||
- (flags & TFD_TIMER_ABSTIME) && (flags & TFD_TIMER_CANCEL_ON_SET)) {
|
||||
+ (flags & TFD_TIMER_CANCEL_ON_SET)) {
|
||||
if (!ctx->might_cancel) {
|
||||
ctx->might_cancel = true;
|
||||
spin_lock(&cancel_lock);
|
|
@ -1,72 +0,0 @@
|
|||
From 165a0d29ca8bae890e2f2767af83b09d61f33553 Mon Sep 17 00:00:00 2001
|
||||
From: Jussi Laako <jussi@sonarnerd.net>
|
||||
Date: Wed, 13 Jun 2018 01:43:01 +0300
|
||||
Subject: [PATCH] ALSA: usb-audio: Add native DSD support for Mytek DACs
|
||||
|
||||
commit 3a572d94bcff98a14c94fe686881a169a26f3fca upstream.
|
||||
|
||||
Add new mostly generic code with Mytek VID to support native DSD mode.
|
||||
|
||||
This implementation should be easier to maintain when manufacturers
|
||||
release new products.
|
||||
|
||||
Signed-off-by: Jussi Laako <jussi@sonarnerd.net>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/usb/card.h | 1 +
|
||||
sound/usb/format.c | 5 ++++-
|
||||
sound/usb/quirks.c | 13 +++++++++++++
|
||||
3 files changed, 18 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sound/usb/card.h b/sound/usb/card.h
|
||||
index ed87cc83eb47d..2f4801cdc01d4 100644
|
||||
--- a/sound/usb/card.h
|
||||
+++ b/sound/usb/card.h
|
||||
@@ -32,6 +32,7 @@ struct audioformat {
|
||||
struct snd_pcm_chmap_elem *chmap; /* (optional) channel map */
|
||||
bool dsd_dop; /* add DOP headers in case of DSD samples */
|
||||
bool dsd_bitrev; /* reverse the bits of each DSD sample */
|
||||
+ bool dsd_raw; /* altsetting is raw DSD */
|
||||
};
|
||||
|
||||
struct snd_usb_substream;
|
||||
diff --git a/sound/usb/format.c b/sound/usb/format.c
|
||||
index 2c44386e5569f..916ff842c4375 100644
|
||||
--- a/sound/usb/format.c
|
||||
+++ b/sound/usb/format.c
|
||||
@@ -63,8 +63,11 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,
|
||||
sample_width = fmt->bBitResolution;
|
||||
sample_bytes = fmt->bSubslotSize;
|
||||
|
||||
- if (format & UAC2_FORMAT_TYPE_I_RAW_DATA)
|
||||
+ if (format & UAC2_FORMAT_TYPE_I_RAW_DATA) {
|
||||
pcm_formats |= SNDRV_PCM_FMTBIT_SPECIAL;
|
||||
+ /* flag potentially raw DSD capable altsettings */
|
||||
+ fp->dsd_raw = true;
|
||||
+ }
|
||||
|
||||
format <<= 1;
|
||||
break;
|
||||
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
|
||||
index ad14d6b78bdcf..da6fd90360a8a 100644
|
||||
--- a/sound/usb/quirks.c
|
||||
+++ b/sound/usb/quirks.c
|
||||
@@ -1411,5 +1411,18 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
|
||||
return SNDRV_PCM_FMTBIT_DSD_U32_BE;
|
||||
}
|
||||
|
||||
+ /* Mostly generic method to detect many DSD-capable implementations -
|
||||
+ * from XMOS/Thesycon
|
||||
+ */
|
||||
+ switch (USB_ID_VENDOR(chip->usb_id)) {
|
||||
+ case 0x25ce: /* Mytek devices */
|
||||
+ if (fp->dsd_raw)
|
||||
+ return SNDRV_PCM_FMTBIT_DSD_U32_BE;
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
From: Gé Koerkamp <ge.koerkamp@gmail.com>
|
||||
Date: Thu, 27 Dec 2018 20:30:08 +0000
|
||||
Subject: [PATCH] ALSA: usb-audio: generic DSD detection for XMOS-based implementations
|
||||
|
||||
This is the second half of the USB Audio patch for 4.14.90
|
||||
See the preceding back-port "ALSA:_usb-audio:_Add_native_DSD_support_for_Mytek_DACs"
|
||||
|
||||
This patch adds support for a range of popular USB DAc's with DSD-direct (native DSD) capabilities.
|
||||
|
||||
Signed-off-by: Gé Koerkamp <ge.koerkamp@gmail.com>
|
||||
---
|
||||
sound/usb/quirks.c | 27 +++++++++++++++++++++++++++
|
||||
1 file changed, 27 insertions(+)
|
||||
|
||||
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
|
||||
index da6fd90360a8a..1c990a3e8fa9c 100644
|
||||
--- a/sound/usb/quirks.c
|
||||
+++ b/sound/usb/quirks.c
|
||||
@@ -1356,19 +1356,44 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
|
||||
/* XMOS based USB DACs */
|
||||
switch (chip->usb_id) {
|
||||
case USB_ID(0x20b1, 0x3008): /* iFi Audio micro/nano iDSD */
|
||||
+ case USB_ID(0x1511, 0x0037): /* AURALiC VEGA */
|
||||
+ case USB_ID(0x20b1, 0x0002): /* Wyred 4 Sound DAC-2 DSD */
|
||||
+ case USB_ID(0x20b1, 0x2004): /* Matrix Audio X-SPDIF 2 */
|
||||
case USB_ID(0x20b1, 0x2008): /* Matrix Audio X-Sabre */
|
||||
case USB_ID(0x20b1, 0x300a): /* Matrix Audio Mini-i Pro */
|
||||
case USB_ID(0x22d9, 0x0416): /* OPPO HA-1 */
|
||||
+ case USB_ID(0x22d9, 0x0436): /* OPPO Sonica */
|
||||
+ case USB_ID(0x22d9, 0x0461): /* OPPO UDP-205 */
|
||||
+ case USB_ID(0x2522, 0x0012): /* LH Labs VI DAC Infinity */
|
||||
case USB_ID(0x2772, 0x0230): /* Pro-Ject Pre Box S2 Digital */
|
||||
if (fp->altsetting == 2)
|
||||
return SNDRV_PCM_FMTBIT_DSD_U32_BE;
|
||||
break;
|
||||
|
||||
+ case USB_ID(0x152a, 0x85de): /* SMSL D1 DAC */
|
||||
+ case USB_ID(0x16d0, 0x09dd): /* Encore mDSD */
|
||||
+ case USB_ID(0x0d8c, 0x0316): /* Hegel HD12 DSD */
|
||||
+ case USB_ID(0x16b0, 0x06b2): /* NuPrime DAC-10 */
|
||||
+ case USB_ID(0x16d0, 0x0733): /* Furutech ADL Stratos */
|
||||
+ case USB_ID(0x16d0, 0x09db): /* NuPrime Audio DAC-9 */
|
||||
+ case USB_ID(0x1db5, 0x0003): /* Bryston BDA3 */
|
||||
case USB_ID(0x20b1, 0x000a): /* Gustard DAC-X20U */
|
||||
+ case USB_ID(0x20b1, 0x2005): /* Denafrips Ares DAC */
|
||||
case USB_ID(0x20b1, 0x2009): /* DIYINHK DSD DXD 384kHz USB to I2S/DSD */
|
||||
case USB_ID(0x20b1, 0x2023): /* JLsounds I2SoverUSB */
|
||||
+ case USB_ID(0x20b1, 0x3021): /* Eastern El. MiniMax Tube DAC Supreme */
|
||||
case USB_ID(0x20b1, 0x3023): /* Aune X1S 32BIT/384 DSD DAC */
|
||||
+ case USB_ID(0x20b1, 0x302d): /* Unison Research Unico CD Due */
|
||||
+ case USB_ID(0x20b1, 0x307b): /* CH Precision C1 DAC */
|
||||
+ case USB_ID(0x20b1, 0x3086): /* Singxer F-1 converter board */
|
||||
+ case USB_ID(0x22d9, 0x0426): /* OPPO HA-2 */
|
||||
+ case USB_ID(0x22e1, 0xca01): /* HDTA Serenade DSD */
|
||||
+ case USB_ID(0x249c, 0x9326): /* M2Tech Young MkIII */
|
||||
case USB_ID(0x2616, 0x0106): /* PS Audio NuWave DAC */
|
||||
+ case USB_ID(0x2622, 0x0041): /* Audiolab M-DAC+ */
|
||||
+ case USB_ID(0x27f7, 0x3002): /* W4S DAC-2v2SE */
|
||||
+ case USB_ID(0x29a2, 0x0086): /* Mutec MC3+ USB */
|
||||
+ case USB_ID(0x6b42, 0x0042): /* MSB Technology */
|
||||
if (fp->altsetting == 3)
|
||||
return SNDRV_PCM_FMTBIT_DSD_U32_BE;
|
||||
break;
|
||||
@@ -1415,6 +1440,8 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
|
||||
* from XMOS/Thesycon
|
||||
*/
|
||||
switch (USB_ID_VENDOR(chip->usb_id)) {
|
||||
+ case 0x20b1: /* XMOS based devices */
|
||||
+ case 0x152a: /* Thesycon devices */
|
||||
case 0x25ce: /* Mytek devices */
|
||||
if (fp->dsd_raw)
|
||||
return SNDRV_PCM_FMTBIT_DSD_U32_BE;
|
171
patch/kernel/cubox-default/dvbskys960-fix.patch
Normal file
171
patch/kernel/cubox-default/dvbskys960-fix.patch
Normal file
|
@ -0,0 +1,171 @@
|
|||
From d04dea80f1c9c2a1e036cc18a791041ce9da0925 Mon Sep 17 00:00:00 2001
|
||||
From: jahutchi <jahutchinson99@googlemail.com>
|
||||
Date: Fri, 11 Jan 2019 13:35:00 +0000
|
||||
Subject: [PATCH] media: m88ds3103: serialize reset messages in m88ds3103_set_frontend
|
||||
|
||||
Ref: https://bugzilla.kernel.org/show_bug.cgi?id=199323
|
||||
|
||||
Users are experiencing problems with the DVBSky S960/S960C USB devices
|
||||
since the following commit:
|
||||
|
||||
9d659ae: ("locking/mutex: Add lock handoff to avoid starvation")
|
||||
|
||||
The device malfunctions after running for an indeterminable period of
|
||||
time, and the problem can only be cleared by rebooting the machine.
|
||||
|
||||
It is possible to encourage the problem to surface by blocking the
|
||||
signal to the LNB.
|
||||
|
||||
Further debugging reveals the cause of the problem.
|
||||
|
||||
In the following capture:
|
||||
- thread #1325 is running m88ds3103_set_frontend
|
||||
- thread #42 is running ts2020_stat_work
|
||||
|
||||
a> [1325] usb 1-1: dvb_usb_v2_generic_io: >>> 08 68 02 07 80
|
||||
[1325] usb 1-1: dvb_usb_v2_generic_io: <<< 08
|
||||
[42] usb 1-1: dvb_usb_v2_generic_io: >>> 09 01 01 68 3f
|
||||
[42] usb 1-1: dvb_usb_v2_generic_io: <<< 08 ff
|
||||
[42] usb 1-1: dvb_usb_v2_generic_io: >>> 08 68 02 03 11
|
||||
[42] usb 1-1: dvb_usb_v2_generic_io: <<< 07
|
||||
[42] usb 1-1: dvb_usb_v2_generic_io: >>> 09 01 01 60 3d
|
||||
[42] usb 1-1: dvb_usb_v2_generic_io: <<< 07 ff
|
||||
b> [1325] usb 1-1: dvb_usb_v2_generic_io: >>> 08 68 02 07 00
|
||||
[1325] usb 1-1: dvb_usb_v2_generic_io: <<< 07
|
||||
[42] usb 1-1: dvb_usb_v2_generic_io: >>> 08 68 02 03 11
|
||||
[42] usb 1-1: dvb_usb_v2_generic_io: <<< 07
|
||||
[42] usb 1-1: dvb_usb_v2_generic_io: >>> 09 01 01 60 21
|
||||
[42] usb 1-1: dvb_usb_v2_generic_io: <<< 07 ff
|
||||
[42] usb 1-1: dvb_usb_v2_generic_io: >>> 08 68 02 03 11
|
||||
[42] usb 1-1: dvb_usb_v2_generic_io: <<< 07
|
||||
[42] usb 1-1: dvb_usb_v2_generic_io: >>> 09 01 01 60 66
|
||||
[42] usb 1-1: dvb_usb_v2_generic_io: <<< 07 ff
|
||||
[1325] usb 1-1: dvb_usb_v2_generic_io: >>> 08 68 02 03 11
|
||||
[1325] usb 1-1: dvb_usb_v2_generic_io: <<< 07
|
||||
[1325] usb 1-1: dvb_usb_v2_generic_io: >>> 08 60 02 10 0b
|
||||
[1325] usb 1-1: dvb_usb_v2_generic_io: <<< 07
|
||||
|
||||
Two i2c messages are sent to perform a reset in m88ds3103_set_frontend:
|
||||
|
||||
a. 0x07, 0x80
|
||||
b. 0x07, 0x00
|
||||
|
||||
However, as shown in the capture, the regmap mutex is being handed over
|
||||
to another thread (ts2020_stat_work) in between these two messages.
|
||||
|
||||
From here, the device responds to every i2c message with an 07 message,
|
||||
and will only return to normal operation following a power cycle.
|
||||
|
||||
Use regmap_multi_reg_write to group the two reset messages, ensuring
|
||||
both are processed before the regmap mutex is unlocked.
|
||||
---
|
||||
drivers/media/dvb-frontends/m88ds3103.c | 7 ++-----
|
||||
1 file changed, 2 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/dvb-frontends/m88ds3103.c b/drivers/media/dvb-frontends/m88ds3103.c
|
||||
index dffd2d4bf..e495a26e6 100644
|
||||
--- a/drivers/media/dvb-frontends/m88ds3103.c
|
||||
+++ b/drivers/media/dvb-frontends/m88ds3103.c
|
||||
@@ -309,6 +309,7 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe)
|
||||
u16 u16tmp;
|
||||
u32 tuner_frequency_khz, target_mclk;
|
||||
s32 s32tmp;
|
||||
+ static const struct reg_sequence reset_buf[] = {{0x07, 0x80}, {0x07, 0x00}};
|
||||
|
||||
dev_dbg(&client->dev,
|
||||
"delivery_system=%d modulation=%d frequency=%u symbol_rate=%d inversion=%d pilot=%d rolloff=%d\n",
|
||||
@@ -321,11 +322,7 @@ static int m88ds3103_set_frontend(struct dvb_frontend *fe)
|
||||
}
|
||||
|
||||
/* reset */
|
||||
- ret = regmap_write(dev->regmap, 0x07, 0x80);
|
||||
- if (ret)
|
||||
- goto err;
|
||||
-
|
||||
- ret = regmap_write(dev->regmap, 0x07, 0x00);
|
||||
+ ret = regmap_multi_reg_write(dev->regmap, reset_buf, 2);
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
From 398be6861aeb95001252a2371ff4c06047dfa276 Mon Sep 17 00:00:00 2001
|
||||
From: James Hutchinson <jahutchinson99@googlemail.com>
|
||||
Date: Fri, 12 Oct 2018 10:57:34 +0100
|
||||
Subject: [PATCH] media: dvbsky: use a single mutex and state buffers for all R/W ops
|
||||
|
||||
See: https://bugzilla.kernel.org/show_bug.cgi?id=199323
|
||||
|
||||
This builds on the previous attempt to serialize all R/W ops, which caused bad effects for several users:
|
||||
media: dvbsky: use just one mutex for serializing device R/W ops
|
||||
|
||||
Mutex locking and timeout issues have been reported by several users, on various kernel versions. With the issue seemingly more prevalent on kernel 4.10 and above following changes to the mutex/locking code.
|
||||
|
||||
Debug tracing shows the device malfunctioning shortly after receiving an extra {10} message in-between the {37 00 00}, {36 03 00} message pair.
|
||||
|
||||
dvb_usb_v2:dvb_usb_v2_generic_io: usb 1-1: dvb_usb_v2_generic_io: >>> 37 00 00
|
||||
dvb_usb_v2:dvb_usb_v2_generic_io: usb 1-1: dvb_usb_v2_generic_io: >>> 10
|
||||
dvb_usb_v2:dvb_usb_v2_generic_io: usb 1-1: dvb_usb_v2_generic_io: <<< ff ff
|
||||
dvb_usb_v2:dvb_usb_v2_generic_io: usb 1-1: dvb_usb_v2_generic_io: >>> 36 03 00
|
||||
...
|
||||
m88ds3103:m88ds3103_diseqc_send_master_cmd: m88ds3103 4-0068: diseqc tx timeout
|
||||
m88ds3103:m88ds3103_diseqc_send_master_cmd: m88ds3103 4-0068: failed=-110
|
||||
|
||||
Resolve this by using the single usb_mutex as attempted previously, this time using the obuf state buffer.
|
||||
|
||||
Also simplify things a little by using dvb_usbv2_generic_write_locked rather than dvb_usbv2_generic_rw_locked.
|
||||
---
|
||||
drivers/media/usb/dvb-usb-v2/dvbsky.c | 17 ++++++++---------
|
||||
1 file changed, 8 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/usb/dvb-usb-v2/dvbsky.c b/drivers/media/usb/dvb-usb-v2/dvbsky.c
|
||||
index 02dbc6c..8de4a86 100644
|
||||
--- a/drivers/media/usb/dvb-usb-v2/dvbsky.c
|
||||
+++ b/drivers/media/usb/dvb-usb-v2/dvbsky.c
|
||||
@@ -35,7 +35,6 @@ MODULE_PARM_DESC(disable_rc, "Disable inbuilt IR receiver.");
|
||||
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
|
||||
|
||||
struct dvbsky_state {
|
||||
- struct mutex stream_mutex;
|
||||
u8 ibuf[DVBSKY_BUF_LEN];
|
||||
u8 obuf[DVBSKY_BUF_LEN];
|
||||
u8 last_lock;
|
||||
@@ -74,16 +73,18 @@ static int dvbsky_stream_ctrl(struct dvb_usb_device *d, u8 onoff)
|
||||
{
|
||||
struct dvbsky_state *state = d_to_priv(d);
|
||||
int ret;
|
||||
- u8 obuf_pre[3] = { 0x37, 0, 0 };
|
||||
- u8 obuf_post[3] = { 0x36, 3, 0 };
|
||||
+ static u8 obuf_pre[3] = { 0x37, 0, 0 };
|
||||
+ static u8 obuf_post[3] = { 0x36, 3, 0 };
|
||||
|
||||
- mutex_lock(&state->stream_mutex);
|
||||
- ret = dvbsky_usb_generic_rw(d, obuf_pre, 3, NULL, 0);
|
||||
+ mutex_lock(&d->usb_mutex);
|
||||
+ memcpy(state->obuf, obuf_pre, 3);
|
||||
+ ret = dvb_usbv2_generic_write_locked(d, state->obuf, 3);
|
||||
if (!ret && onoff) {
|
||||
msleep(20);
|
||||
- ret = dvbsky_usb_generic_rw(d, obuf_post, 3, NULL, 0);
|
||||
+ memcpy(state->obuf, obuf_post, 3);
|
||||
+ ret = dvb_usbv2_generic_write_locked(d, state->obuf, 3);
|
||||
}
|
||||
- mutex_unlock(&state->stream_mutex);
|
||||
+ mutex_unlock(&d->usb_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -689,8 +690,6 @@ static int dvbsky_init(struct dvb_usb_device *d)
|
||||
if (ret)
|
||||
return ret;
|
||||
*/
|
||||
- mutex_init(&state->stream_mutex);
|
||||
-
|
||||
state->last_lock = 0;
|
||||
|
||||
return 0;
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
|
||||
index fcf1473d..4ac9d3fc
|
||||
--- a/arch/arm/mm/dma-mapping.c
|
||||
+++ b/arch/arm/mm/dma-mapping.c
|
||||
@@ -381,7 +381,7 @@ static void __dma_free_remap(void *cpu_addr, size_t size)
|
||||
VM_ARM_DMA_CONSISTENT | VM_USERMAP);
|
||||
}
|
||||
|
||||
-#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_256K
|
||||
+#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_2M
|
||||
static struct gen_pool *atomic_pool;
|
||||
|
||||
static size_t atomic_pool_size = DEFAULT_DMA_COHERENT_POOL_SIZE;
|
|
@ -1,10 +1,10 @@
|
|||
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
|
||||
index aad67000..006d8ec7 100755
|
||||
index 6c3b038..cc9b3c0 100755
|
||||
--- a/scripts/package/builddeb
|
||||
+++ b/scripts/package/builddeb
|
||||
@@ -29,6 +29,28 @@ create_package() {
|
||||
# in case we are in a restrictive umask environment like 0077
|
||||
chmod -R a+rX "$pdir"
|
||||
@@ -27,6 +27,28 @@ create_package() {
|
||||
chown -R root:root "$pdir"
|
||||
chmod -R go-w "$pdir"
|
||||
|
||||
+ # Create preinstall and post install script to remove dtb
|
||||
+ if [[ "$1" == *dtb* ]]; then
|
||||
|
@ -23,7 +23,7 @@ index aad67000..006d8ec7 100755
|
|||
+
|
||||
+ # Create postinstall script for headers
|
||||
+ if [[ "$1" == *headers* ]]; then
|
||||
+ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; find -type f -exec touch {} +;make -s scripts >/dev/null 2>&1" >> $pdir/DEBIAN/postinst
|
||||
+ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; make -s scripts >/dev/null 2>&1" >> $pdir/DEBIAN/postinst
|
||||
+ echo "exit 0" >> $pdir/DEBIAN/postinst
|
||||
+ chmod 775 $pdir/DEBIAN/postinst
|
||||
+ fi
|
||||
|
@ -31,13 +31,14 @@ index aad67000..006d8ec7 100755
|
|||
# Create the package
|
||||
dpkg-gencontrol $forcearch -Vkernel:debarch="${debarch}" -p$pname -P"$pdir"
|
||||
dpkg --build "$pdir" ..
|
||||
@@ -116,10 +116,13 @@ sourcename=$KDEB_SOURCENAME
|
||||
tmpdir="$objtree/debian/tmp"
|
||||
@@ -93,11 +115,13 @@ tmpdir="$objtree/debian/tmp"
|
||||
fwdir="$objtree/debian/fwtmp"
|
||||
kernel_headers_dir="$objtree/debian/hdrtmp"
|
||||
libc_headers_dir="$objtree/debian/headertmp"
|
||||
+dtb_dir="$objtree/debian/dtbtmp"
|
||||
dbg_dir="$objtree/debian/dbgtmp"
|
||||
-packagename=linux-image-$version
|
||||
-fwpackagename=linux-firmware-image-$version
|
||||
-kernel_headers_packagename=linux-headers-$version
|
||||
-libc_headers_packagename=linux-libc-dev
|
||||
+packagename=linux-image"$LOCALVERSION"
|
||||
|
@ -48,18 +49,18 @@ index aad67000..006d8ec7 100755
|
|||
dbg_packagename=$packagename-dbg
|
||||
debarch=
|
||||
forcearch=
|
||||
@@ -146,7 +149,9 @@ esac
|
||||
@@ -124,7 +148,9 @@ esac
|
||||
BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)"
|
||||
|
||||
# Setup the directory structure
|
||||
-rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files
|
||||
-rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files
|
||||
+rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" "$dtb_dir" $objtree/debian/files
|
||||
+mkdir -m 755 -p "$dtb_dir/DEBIAN"
|
||||
+mkdir -p "$dtb_dir/boot/dtb-$version" "$dtb_dir/usr/share/doc/$dtb_packagename"
|
||||
mkdir -m 755 -p "$tmpdir/DEBIAN"
|
||||
mkdir -p "$tmpdir/lib" "$tmpdir/boot"
|
||||
mkdir -p "$kernel_headers_dir/lib/modules/$version/"
|
||||
@@ -180,6 +206,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
|
||||
mkdir -p "$fwdir/lib/firmware/$version/"
|
||||
@@ -183,6 +209,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -71,7 +72,28 @@ index aad67000..006d8ec7 100755
|
|||
if [ "$ARCH" != "um" ]; then
|
||||
$MAKE headers_check KBUILD_SRC=
|
||||
$MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr"
|
||||
@@ -215,6 +246,55 @@ EOF
|
||||
@@ -195,7 +226,7 @@ fi
|
||||
# so do we; recent versions of dracut and initramfs-tools will obey this.
|
||||
debhookdir=${KDEB_HOOKDIR:-/etc/kernel}
|
||||
if grep -q '^CONFIG_BLK_DEV_INITRD=y' $KCONFIG_CONFIG; then
|
||||
- want_initrd=Yes
|
||||
+ want_initrd=Yes
|
||||
else
|
||||
want_initrd=No
|
||||
fi
|
||||
@@ -207,9 +238,11 @@ for script in postinst postrm preinst prerm ; do
|
||||
set -e
|
||||
|
||||
# Pass maintainer script parameters to hook scripts
|
||||
+
|
||||
export DEB_MAINT_PARAMS="\$*"
|
||||
|
||||
# Tell initramfs builder whether it's wanted
|
||||
+
|
||||
export INITRD=$want_initrd
|
||||
|
||||
test -d $debhookdir/$script.d && run-parts --arg="$version" --arg="/$installed_image_path" $debhookdir/$script.d
|
||||
@@ -218,6 +251,55 @@ EOF
|
||||
chmod 755 "$tmpdir/DEBIAN/$script"
|
||||
done
|
||||
|
||||
|
@ -127,23 +149,33 @@ index aad67000..006d8ec7 100755
|
|||
# Try to determine maintainer and email values
|
||||
if [ -n "$DEBEMAIL" ]; then
|
||||
email=$DEBEMAIL
|
||||
@@ -329,12 +409,15 @@ if grep -q '^CONFIG_GCC_PLUGINS=y' $KCONFIG_CONFIG ; then
|
||||
fi
|
||||
@@ -328,16 +414,24 @@ fi
|
||||
(cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f) >> "$objtree/debian/hdrobjfiles"
|
||||
destdir=$kernel_headers_dir/usr/src/linux-headers-$version
|
||||
mkdir -p "$destdir"
|
||||
+(cd $destdir; patch -p1 < /tmp/headers-debian-byteshift.patch)
|
||||
+######################## headers patch
|
||||
+ZACNI=$(pwd)
|
||||
+cd $destdir
|
||||
+patch -p1 < /tmp/headers-debian-byteshift.patch
|
||||
+cd $ZACNI
|
||||
+######################## headers patch
|
||||
(cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd $destdir; tar -xf -)
|
||||
(cd $objtree; tar -c -f - -T -) < "$objtree/debian/hdrobjfiles" | (cd $destdir; tar -xf -)
|
||||
(cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be
|
||||
ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build"
|
||||
rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
|
||||
|
||||
+(cd $destdir; make M=scripts clean)
|
||||
+(cd "$destdir"; make M=scripts clean)
|
||||
+
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
Package: $kernel_headers_packagename
|
||||
@@ -363,6 +446,16 @@ fi
|
||||
-Provides: linux-headers, linux-headers-2.6
|
||||
+Provides: linux-headers
|
||||
Architecture: any
|
||||
Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch}
|
||||
This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch}
|
||||
@@ -363,6 +457,16 @@ fi
|
||||
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
|
@ -160,7 +192,7 @@ index aad67000..006d8ec7 100755
|
|||
Package: $libc_headers_packagename
|
||||
Section: devel
|
||||
Provides: linux-kernel-headers
|
||||
@@ -374,7 +467,7 @@ EOF
|
||||
@@ -374,7 +478,7 @@ EOF
|
||||
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
create_package "$kernel_headers_packagename" "$kernel_headers_dir"
|
454
patch/kernel/cubox-default/patch-4.9.150-151.patch
Normal file
454
patch/kernel/cubox-default/patch-4.9.150-151.patch
Normal file
|
@ -0,0 +1,454 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 0e7874951ac5..f1aeb98f9ace 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
-SUBLEVEL = 150
|
||||
+SUBLEVEL = 151
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
|
||||
index 3a6c9b741b23..4f4c34892086 100644
|
||||
--- a/drivers/acpi/power.c
|
||||
+++ b/drivers/acpi/power.c
|
||||
@@ -131,6 +131,23 @@ void acpi_power_resources_list_free(struct list_head *list)
|
||||
}
|
||||
}
|
||||
|
||||
+static bool acpi_power_resource_is_dup(union acpi_object *package,
|
||||
+ unsigned int start, unsigned int i)
|
||||
+{
|
||||
+ acpi_handle rhandle, dup;
|
||||
+ unsigned int j;
|
||||
+
|
||||
+ /* The caller is expected to check the package element types */
|
||||
+ rhandle = package->package.elements[i].reference.handle;
|
||||
+ for (j = start; j < i; j++) {
|
||||
+ dup = package->package.elements[j].reference.handle;
|
||||
+ if (dup == rhandle)
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
int acpi_extract_power_resources(union acpi_object *package, unsigned int start,
|
||||
struct list_head *list)
|
||||
{
|
||||
@@ -150,6 +167,11 @@ int acpi_extract_power_resources(union acpi_object *package, unsigned int start,
|
||||
err = -ENODEV;
|
||||
break;
|
||||
}
|
||||
+
|
||||
+ /* Some ACPI tables contain duplicate power resource references */
|
||||
+ if (acpi_power_resource_is_dup(package, start, i))
|
||||
+ continue;
|
||||
+
|
||||
err = acpi_add_power_resource(rhandle);
|
||||
if (err)
|
||||
break;
|
||||
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
|
||||
index ef3016a467a0..8a93ca4d6840 100644
|
||||
--- a/drivers/block/rbd.c
|
||||
+++ b/drivers/block/rbd.c
|
||||
@@ -6346,7 +6346,6 @@ static ssize_t do_rbd_remove(struct bus_type *bus,
|
||||
struct list_head *tmp;
|
||||
int dev_id;
|
||||
char opt_buf[6];
|
||||
- bool already = false;
|
||||
bool force = false;
|
||||
int ret;
|
||||
|
||||
@@ -6379,13 +6378,13 @@ static ssize_t do_rbd_remove(struct bus_type *bus,
|
||||
spin_lock_irq(&rbd_dev->lock);
|
||||
if (rbd_dev->open_count && !force)
|
||||
ret = -EBUSY;
|
||||
- else
|
||||
- already = test_and_set_bit(RBD_DEV_FLAG_REMOVING,
|
||||
- &rbd_dev->flags);
|
||||
+ else if (test_and_set_bit(RBD_DEV_FLAG_REMOVING,
|
||||
+ &rbd_dev->flags))
|
||||
+ ret = -EINPROGRESS;
|
||||
spin_unlock_irq(&rbd_dev->lock);
|
||||
}
|
||||
spin_unlock(&rbd_dev_list_lock);
|
||||
- if (ret < 0 || already)
|
||||
+ if (ret)
|
||||
return ret;
|
||||
|
||||
if (force) {
|
||||
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
|
||||
index 6f638bbc922d..00e8e675cbeb 100644
|
||||
--- a/drivers/i2c/i2c-dev.c
|
||||
+++ b/drivers/i2c/i2c-dev.c
|
||||
@@ -461,9 +461,15 @@ static long i2cdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
return i2cdev_ioctl_smbus(client, arg);
|
||||
|
||||
case I2C_RETRIES:
|
||||
+ if (arg > INT_MAX)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
client->adapter->retries = arg;
|
||||
break;
|
||||
case I2C_TIMEOUT:
|
||||
+ if (arg > INT_MAX)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
/* For historical reasons, user-space sets the timeout
|
||||
* value in units of 10 ms.
|
||||
*/
|
||||
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
|
||||
index 6c0bb38c4089..8d4d46f3fd16 100644
|
||||
--- a/drivers/usb/class/cdc-acm.c
|
||||
+++ b/drivers/usb/class/cdc-acm.c
|
||||
@@ -1828,6 +1828,13 @@ static const struct usb_device_id acm_ids[] = {
|
||||
.driver_info = IGNORE_DEVICE,
|
||||
},
|
||||
|
||||
+ { USB_DEVICE(0x1bc7, 0x0021), /* Telit 3G ACM only composition */
|
||||
+ .driver_info = SEND_ZERO_PACKET,
|
||||
+ },
|
||||
+ { USB_DEVICE(0x1bc7, 0x0023), /* Telit 3G ACM + ECM composition */
|
||||
+ .driver_info = SEND_ZERO_PACKET,
|
||||
+ },
|
||||
+
|
||||
/* control interfaces without any protocol set */
|
||||
{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
|
||||
USB_CDC_PROTO_NONE) },
|
||||
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
|
||||
index cf378b1ed373..733479ddf8a7 100644
|
||||
--- a/drivers/usb/core/quirks.c
|
||||
+++ b/drivers/usb/core/quirks.c
|
||||
@@ -240,7 +240,8 @@ static const struct usb_device_id usb_quirk_list[] = {
|
||||
USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL },
|
||||
|
||||
/* Corsair K70 RGB */
|
||||
- { USB_DEVICE(0x1b1c, 0x1b13), .driver_info = USB_QUIRK_DELAY_INIT },
|
||||
+ { USB_DEVICE(0x1b1c, 0x1b13), .driver_info = USB_QUIRK_DELAY_INIT |
|
||||
+ USB_QUIRK_DELAY_CTRL_MSG },
|
||||
|
||||
/* Corsair Strafe */
|
||||
{ USB_DEVICE(0x1b1c, 0x1b15), .driver_info = USB_QUIRK_DELAY_INIT |
|
||||
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
|
||||
index 344ec8631481..13f2c051dbf2 100644
|
||||
--- a/drivers/usb/storage/scsiglue.c
|
||||
+++ b/drivers/usb/storage/scsiglue.c
|
||||
@@ -251,8 +251,12 @@ static int slave_configure(struct scsi_device *sdev)
|
||||
if (!(us->fflags & US_FL_NEEDS_CAP16))
|
||||
sdev->try_rc_10_first = 1;
|
||||
|
||||
- /* assume SPC3 or latter devices support sense size > 18 */
|
||||
- if (sdev->scsi_level > SCSI_SPC_2)
|
||||
+ /*
|
||||
+ * assume SPC3 or latter devices support sense size > 18
|
||||
+ * unless US_FL_BAD_SENSE quirk is specified.
|
||||
+ */
|
||||
+ if (sdev->scsi_level > SCSI_SPC_2 &&
|
||||
+ !(us->fflags & US_FL_BAD_SENSE))
|
||||
us->fflags |= US_FL_SANE_SENSE;
|
||||
|
||||
/*
|
||||
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
|
||||
index 0a86b3f3638e..c802aabcc58c 100644
|
||||
--- a/drivers/usb/storage/unusual_devs.h
|
||||
+++ b/drivers/usb/storage/unusual_devs.h
|
||||
@@ -1284,6 +1284,18 @@ UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xffff,
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_FIX_CAPACITY ),
|
||||
|
||||
+/*
|
||||
+ * Reported by Icenowy Zheng <icenowy@aosc.io>
|
||||
+ * The SMI SM3350 USB-UFS bridge controller will enter a wrong state
|
||||
+ * that do not process read/write command if a long sense is requested,
|
||||
+ * so force to use 18-byte sense.
|
||||
+ */
|
||||
+UNUSUAL_DEV( 0x090c, 0x3350, 0x0000, 0xffff,
|
||||
+ "SMI",
|
||||
+ "SM3350 UFS-to-USB-Mass-Storage bridge",
|
||||
+ USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
+ US_FL_BAD_SENSE ),
|
||||
+
|
||||
/*
|
||||
* Reported by Paul Hartman <paul.hartman+linux@gmail.com>
|
||||
* This card reader returns "Illegal Request, Logical Block Address
|
||||
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
|
||||
index 49eeed25f200..a3046b6523c8 100644
|
||||
--- a/fs/cifs/file.c
|
||||
+++ b/fs/cifs/file.c
|
||||
@@ -1118,10 +1118,10 @@ cifs_push_mandatory_locks(struct cifsFileInfo *cfile)
|
||||
|
||||
/*
|
||||
* Accessing maxBuf is racy with cifs_reconnect - need to store value
|
||||
- * and check it for zero before using.
|
||||
+ * and check it before using.
|
||||
*/
|
||||
max_buf = tcon->ses->server->maxBuf;
|
||||
- if (!max_buf) {
|
||||
+ if (max_buf < (sizeof(struct smb_hdr) + sizeof(LOCKING_ANDX_RANGE))) {
|
||||
free_xid(xid);
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -1456,10 +1456,10 @@ cifs_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock,
|
||||
|
||||
/*
|
||||
* Accessing maxBuf is racy with cifs_reconnect - need to store value
|
||||
- * and check it for zero before using.
|
||||
+ * and check it before using.
|
||||
*/
|
||||
max_buf = tcon->ses->server->maxBuf;
|
||||
- if (!max_buf)
|
||||
+ if (max_buf < (sizeof(struct smb_hdr) + sizeof(LOCKING_ANDX_RANGE)))
|
||||
return -EINVAL;
|
||||
|
||||
max_num = (max_buf - sizeof(struct smb_hdr)) /
|
||||
diff --git a/fs/cifs/smb2file.c b/fs/cifs/smb2file.c
|
||||
index b2aff0c6f22c..b7885dc0d9bb 100644
|
||||
--- a/fs/cifs/smb2file.c
|
||||
+++ b/fs/cifs/smb2file.c
|
||||
@@ -123,10 +123,10 @@ smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock,
|
||||
|
||||
/*
|
||||
* Accessing maxBuf is racy with cifs_reconnect - need to store value
|
||||
- * and check it for zero before using.
|
||||
+ * and check it before using.
|
||||
*/
|
||||
max_buf = tcon->ses->server->maxBuf;
|
||||
- if (!max_buf)
|
||||
+ if (max_buf < sizeof(struct smb2_lock_element))
|
||||
return -EINVAL;
|
||||
|
||||
max_num = max_buf / sizeof(struct smb2_lock_element);
|
||||
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
|
||||
index cc26d4138d70..de133eeebc8a 100644
|
||||
--- a/fs/cifs/transport.c
|
||||
+++ b/fs/cifs/transport.c
|
||||
@@ -301,7 +301,7 @@ uncork:
|
||||
if (rc < 0 && rc != -EINTR)
|
||||
cifs_dbg(VFS, "Error %d sending data on socket to server\n",
|
||||
rc);
|
||||
- else
|
||||
+ else if (rc > 0)
|
||||
rc = 0;
|
||||
|
||||
return rc;
|
||||
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
|
||||
index 1008384d5ed5..9a13f86fed62 100644
|
||||
--- a/fs/ext4/inline.c
|
||||
+++ b/fs/ext4/inline.c
|
||||
@@ -1859,12 +1859,12 @@ int ext4_inline_data_fiemap(struct inode *inode,
|
||||
physical += (char *)ext4_raw_inode(&iloc) - iloc.bh->b_data;
|
||||
physical += offsetof(struct ext4_inode, i_block);
|
||||
|
||||
- if (physical)
|
||||
- error = fiemap_fill_next_extent(fieinfo, start, physical,
|
||||
- inline_len, flags);
|
||||
brelse(iloc.bh);
|
||||
out:
|
||||
up_read(&EXT4_I(inode)->xattr_sem);
|
||||
+ if (physical)
|
||||
+ error = fiemap_fill_next_extent(fieinfo, start, physical,
|
||||
+ inline_len, flags);
|
||||
return (error < 0 ? error : 0);
|
||||
}
|
||||
|
||||
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
|
||||
index f62eca8cbde0..4815be26b15f 100644
|
||||
--- a/fs/ext4/inode.c
|
||||
+++ b/fs/ext4/inode.c
|
||||
@@ -2698,7 +2698,8 @@ static int ext4_writepages(struct address_space *mapping,
|
||||
* We may need to convert up to one extent per block in
|
||||
* the page and we may dirty the inode.
|
||||
*/
|
||||
- rsv_blocks = 1 + (PAGE_SIZE >> inode->i_blkbits);
|
||||
+ rsv_blocks = 1 + ext4_chunk_trans_blocks(inode,
|
||||
+ PAGE_SIZE >> inode->i_blkbits);
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
|
||||
index 6810234b0b27..a6c7ace9cfd1 100644
|
||||
--- a/fs/ext4/super.c
|
||||
+++ b/fs/ext4/super.c
|
||||
@@ -4679,7 +4679,7 @@ static int ext4_commit_super(struct super_block *sb, int sync)
|
||||
ext4_superblock_csum_set(sb);
|
||||
if (sync)
|
||||
lock_buffer(sbh);
|
||||
- if (buffer_write_io_error(sbh)) {
|
||||
+ if (buffer_write_io_error(sbh) || !buffer_uptodate(sbh)) {
|
||||
/*
|
||||
* Oh, dear. A previous attempt to write the
|
||||
* superblock failed. This could happen because the
|
||||
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
|
||||
index 102c84dcc11a..63eed9ac8fd7 100644
|
||||
--- a/include/linux/sunrpc/svc.h
|
||||
+++ b/include/linux/sunrpc/svc.h
|
||||
@@ -291,9 +291,12 @@ struct svc_rqst {
|
||||
struct svc_cacherep * rq_cacherep; /* cache info */
|
||||
struct task_struct *rq_task; /* service thread */
|
||||
spinlock_t rq_lock; /* per-request lock */
|
||||
+ struct net *rq_bc_net; /* pointer to backchannel's
|
||||
+ * net namespace
|
||||
+ */
|
||||
};
|
||||
|
||||
-#define SVC_NET(svc_rqst) (svc_rqst->rq_xprt->xpt_net)
|
||||
+#define SVC_NET(rqst) (rqst->rq_xprt ? rqst->rq_xprt->xpt_net : rqst->rq_bc_net)
|
||||
|
||||
/*
|
||||
* Rigorous type checking on sockaddr type conversions
|
||||
diff --git a/mm/slab.c b/mm/slab.c
|
||||
index 263dcda6897b..354a09deecff 100644
|
||||
--- a/mm/slab.c
|
||||
+++ b/mm/slab.c
|
||||
@@ -682,8 +682,10 @@ static struct alien_cache *__alloc_alien_cache(int node, int entries,
|
||||
struct alien_cache *alc = NULL;
|
||||
|
||||
alc = kmalloc_node(memsize, gfp, node);
|
||||
- init_arraycache(&alc->ac, entries, batch);
|
||||
- spin_lock_init(&alc->lock);
|
||||
+ if (alc) {
|
||||
+ init_arraycache(&alc->ac, entries, batch);
|
||||
+ spin_lock_init(&alc->lock);
|
||||
+ }
|
||||
return alc;
|
||||
}
|
||||
|
||||
diff --git a/mm/util.c b/mm/util.c
|
||||
index 8c755d05d4e6..07f467206186 100644
|
||||
--- a/mm/util.c
|
||||
+++ b/mm/util.c
|
||||
@@ -389,7 +389,7 @@ bool page_mapped(struct page *page)
|
||||
return true;
|
||||
if (PageHuge(page))
|
||||
return false;
|
||||
- for (i = 0; i < hpage_nr_pages(page); i++) {
|
||||
+ for (i = 0; i < (1 << compound_order(page)); i++) {
|
||||
if (atomic_read(&page[i]._mapcount) >= 0)
|
||||
return true;
|
||||
}
|
||||
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
|
||||
index 272c34551979..eea18a124e4f 100644
|
||||
--- a/net/sunrpc/svc.c
|
||||
+++ b/net/sunrpc/svc.c
|
||||
@@ -1137,6 +1137,8 @@ void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...)
|
||||
static __printf(2,3) void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) {}
|
||||
#endif
|
||||
|
||||
+extern void svc_tcp_prep_reply_hdr(struct svc_rqst *);
|
||||
+
|
||||
/*
|
||||
* Common routine for processing the RPC request.
|
||||
*/
|
||||
@@ -1166,7 +1168,8 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
|
||||
clear_bit(RQ_DROPME, &rqstp->rq_flags);
|
||||
|
||||
/* Setup reply header */
|
||||
- rqstp->rq_xprt->xpt_ops->xpo_prep_reply_hdr(rqstp);
|
||||
+ if (rqstp->rq_prot == IPPROTO_TCP)
|
||||
+ svc_tcp_prep_reply_hdr(rqstp);
|
||||
|
||||
svc_putu32(resv, rqstp->rq_xid);
|
||||
|
||||
@@ -1312,7 +1315,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
|
||||
return 0;
|
||||
|
||||
close:
|
||||
- if (test_bit(XPT_TEMP, &rqstp->rq_xprt->xpt_flags))
|
||||
+ if (rqstp->rq_xprt && test_bit(XPT_TEMP, &rqstp->rq_xprt->xpt_flags))
|
||||
svc_close_xprt(rqstp->rq_xprt);
|
||||
dprintk("svc: svc_process close\n");
|
||||
return 0;
|
||||
@@ -1439,10 +1442,10 @@ bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req,
|
||||
dprintk("svc: %s(%p)\n", __func__, req);
|
||||
|
||||
/* Build the svc_rqst used by the common processing routine */
|
||||
- rqstp->rq_xprt = serv->sv_bc_xprt;
|
||||
rqstp->rq_xid = req->rq_xid;
|
||||
rqstp->rq_prot = req->rq_xprt->prot;
|
||||
rqstp->rq_server = serv;
|
||||
+ rqstp->rq_bc_net = req->rq_xprt->xprt_net;
|
||||
|
||||
rqstp->rq_addrlen = sizeof(req->rq_xprt->addr);
|
||||
memcpy(&rqstp->rq_addr, &req->rq_xprt->addr, rqstp->rq_addrlen);
|
||||
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
|
||||
index 064f20bb845a..42ce3ed21637 100644
|
||||
--- a/net/sunrpc/svc_xprt.c
|
||||
+++ b/net/sunrpc/svc_xprt.c
|
||||
@@ -510,10 +510,11 @@ out:
|
||||
*/
|
||||
void svc_reserve(struct svc_rqst *rqstp, int space)
|
||||
{
|
||||
+ struct svc_xprt *xprt = rqstp->rq_xprt;
|
||||
+
|
||||
space += rqstp->rq_res.head[0].iov_len;
|
||||
|
||||
- if (space < rqstp->rq_reserved) {
|
||||
- struct svc_xprt *xprt = rqstp->rq_xprt;
|
||||
+ if (xprt && space < rqstp->rq_reserved) {
|
||||
atomic_sub((rqstp->rq_reserved - space), &xprt->xpt_reserved);
|
||||
rqstp->rq_reserved = space;
|
||||
|
||||
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
|
||||
index 33f599cb0936..fd7fbe91955e 100644
|
||||
--- a/net/sunrpc/svcsock.c
|
||||
+++ b/net/sunrpc/svcsock.c
|
||||
@@ -1195,7 +1195,7 @@ static int svc_tcp_sendto(struct svc_rqst *rqstp)
|
||||
/*
|
||||
* Setup response header. TCP has a 4B record length field.
|
||||
*/
|
||||
-static void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp)
|
||||
+void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp)
|
||||
{
|
||||
struct kvec *resv = &rqstp->rq_res.head[0];
|
||||
|
||||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
||||
index 0fd31cff483e..0fc05ebdf81a 100644
|
||||
--- a/sound/pci/hda/patch_realtek.c
|
||||
+++ b/sound/pci/hda/patch_realtek.c
|
||||
@@ -4841,6 +4841,13 @@ static void alc280_fixup_hp_9480m(struct hda_codec *codec,
|
||||
}
|
||||
}
|
||||
|
||||
+static void alc_fixup_disable_mic_vref(struct hda_codec *codec,
|
||||
+ const struct hda_fixup *fix, int action)
|
||||
+{
|
||||
+ if (action == HDA_FIXUP_ACT_PRE_PROBE)
|
||||
+ snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
|
||||
+}
|
||||
+
|
||||
/* for hda_fixup_thinkpad_acpi() */
|
||||
#include "thinkpad_helper.c"
|
||||
|
||||
@@ -4947,6 +4954,7 @@ enum {
|
||||
ALC293_FIXUP_LENOVO_SPK_NOISE,
|
||||
ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
|
||||
ALC255_FIXUP_DELL_SPK_NOISE,
|
||||
+ ALC225_FIXUP_DISABLE_MIC_VREF,
|
||||
ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
|
||||
ALC295_FIXUP_DISABLE_DAC3,
|
||||
ALC280_FIXUP_HP_HEADSET_MIC,
|
||||
@@ -5605,6 +5613,12 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||
.chained = true,
|
||||
.chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
|
||||
},
|
||||
+ [ALC225_FIXUP_DISABLE_MIC_VREF] = {
|
||||
+ .type = HDA_FIXUP_FUNC,
|
||||
+ .v.func = alc_fixup_disable_mic_vref,
|
||||
+ .chained = true,
|
||||
+ .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
|
||||
+ },
|
||||
[ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = {
|
||||
.type = HDA_FIXUP_VERBS,
|
||||
.v.verbs = (const struct hda_verb[]) {
|
||||
@@ -5614,7 +5628,7 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||
{}
|
||||
},
|
||||
.chained = true,
|
||||
- .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
|
||||
+ .chain_id = ALC225_FIXUP_DISABLE_MIC_VREF
|
||||
},
|
||||
[ALC280_FIXUP_HP_HEADSET_MIC] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
1581
patch/kernel/cubox-default/patch-4.9.151-152.patch
Normal file
1581
patch/kernel/cubox-default/patch-4.9.151-152.patch
Normal file
File diff suppressed because it is too large
Load diff
1094
patch/kernel/cubox-default/patch-4.9.152-153.patch
Normal file
1094
patch/kernel/cubox-default/patch-4.9.152-153.patch
Normal file
File diff suppressed because it is too large
Load diff
1657
patch/kernel/cubox-default/patch-4.9.153-154.patch
Normal file
1657
patch/kernel/cubox-default/patch-4.9.153-154.patch
Normal file
File diff suppressed because it is too large
Load diff
1021
patch/kernel/cubox-default/patch-4.9.154-155.patch
Normal file
1021
patch/kernel/cubox-default/patch-4.9.154-155.patch
Normal file
File diff suppressed because it is too large
Load diff
3695
patch/kernel/cubox-default/patch-4.9.155-156.patch
Normal file
3695
patch/kernel/cubox-default/patch-4.9.155-156.patch
Normal file
File diff suppressed because it is too large
Load diff
889
patch/kernel/cubox-default/patch-4.9.156-157.patch
Normal file
889
patch/kernel/cubox-default/patch-4.9.156-157.patch
Normal file
|
@ -0,0 +1,889 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 956923115f7e..4eb7a17e18f1 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
-SUBLEVEL = 156
|
||||
+SUBLEVEL = 157
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
|
||||
index c1cd80ecc219..a904244264ce 100644
|
||||
--- a/arch/arm/mach-iop32x/n2100.c
|
||||
+++ b/arch/arm/mach-iop32x/n2100.c
|
||||
@@ -75,8 +75,7 @@ void __init n2100_map_io(void)
|
||||
/*
|
||||
* N2100 PCI.
|
||||
*/
|
||||
-static int __init
|
||||
-n2100_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
||||
+static int n2100_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
||||
{
|
||||
int irq;
|
||||
|
||||
diff --git a/arch/arm/mach-tango/pm.c b/arch/arm/mach-tango/pm.c
|
||||
index b05c6d6f99d0..08d813234b2d 100644
|
||||
--- a/arch/arm/mach-tango/pm.c
|
||||
+++ b/arch/arm/mach-tango/pm.c
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <linux/suspend.h>
|
||||
#include <asm/suspend.h>
|
||||
#include "smc.h"
|
||||
+#include "pm.h"
|
||||
|
||||
static int tango_pm_powerdown(unsigned long arg)
|
||||
{
|
||||
@@ -23,10 +24,7 @@ static const struct platform_suspend_ops tango_pm_ops = {
|
||||
.valid = suspend_valid_only_mem,
|
||||
};
|
||||
|
||||
-static int __init tango_pm_init(void)
|
||||
+void __init tango_pm_init(void)
|
||||
{
|
||||
suspend_set_ops(&tango_pm_ops);
|
||||
- return 0;
|
||||
}
|
||||
-
|
||||
-late_initcall(tango_pm_init);
|
||||
diff --git a/arch/arm/mach-tango/pm.h b/arch/arm/mach-tango/pm.h
|
||||
new file mode 100644
|
||||
index 000000000000..35ea705a0ee2
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/mach-tango/pm.h
|
||||
@@ -0,0 +1,7 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0 */
|
||||
+
|
||||
+#ifdef CONFIG_SUSPEND
|
||||
+void __init tango_pm_init(void);
|
||||
+#else
|
||||
+#define tango_pm_init NULL
|
||||
+#endif
|
||||
diff --git a/arch/arm/mach-tango/setup.c b/arch/arm/mach-tango/setup.c
|
||||
index f14b6c7d255b..2b48e1098ea3 100644
|
||||
--- a/arch/arm/mach-tango/setup.c
|
||||
+++ b/arch/arm/mach-tango/setup.c
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/hardware/cache-l2x0.h>
|
||||
#include "smc.h"
|
||||
+#include "pm.h"
|
||||
|
||||
static void tango_l2c_write(unsigned long val, unsigned int reg)
|
||||
{
|
||||
@@ -14,4 +15,5 @@ DT_MACHINE_START(TANGO_DT, "Sigma Tango DT")
|
||||
.dt_compat = tango_dt_compat,
|
||||
.l2c_aux_mask = ~0,
|
||||
.l2c_write_sec = tango_l2c_write,
|
||||
+ .init_late = tango_pm_init,
|
||||
MACHINE_END
|
||||
diff --git a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c
|
||||
index 659e6d3ae335..60177a612cb1 100644
|
||||
--- a/arch/mips/kernel/mips-cm.c
|
||||
+++ b/arch/mips/kernel/mips-cm.c
|
||||
@@ -424,5 +424,5 @@ void mips_cm_error_report(void)
|
||||
}
|
||||
|
||||
/* reprime cause register */
|
||||
- write_gcr_error_cause(0);
|
||||
+ write_gcr_error_cause(cm_error);
|
||||
}
|
||||
diff --git a/arch/mips/pci/pci-octeon.c b/arch/mips/pci/pci-octeon.c
|
||||
index 308d051fc45c..7c512834a8f1 100644
|
||||
--- a/arch/mips/pci/pci-octeon.c
|
||||
+++ b/arch/mips/pci/pci-octeon.c
|
||||
@@ -573,6 +573,11 @@ static int __init octeon_pci_setup(void)
|
||||
if (octeon_has_feature(OCTEON_FEATURE_PCIE))
|
||||
return 0;
|
||||
|
||||
+ if (!octeon_is_pci_host()) {
|
||||
+ pr_notice("Not in host mode, PCI Controller not initialized\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
/* Point pcibios_map_irq() to the PCI version of it */
|
||||
octeon_pcibios_map_irq = octeon_pci_pcibios_map_irq;
|
||||
|
||||
@@ -584,11 +589,6 @@ static int __init octeon_pci_setup(void)
|
||||
else
|
||||
octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_BIG;
|
||||
|
||||
- if (!octeon_is_pci_host()) {
|
||||
- pr_notice("Not in host mode, PCI Controller not initialized\n");
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
/* PCI I/O and PCI MEM values */
|
||||
set_io_port_base(OCTEON_PCI_IOSPACE_BASE);
|
||||
ioport_resource.start = 0;
|
||||
diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
|
||||
index c3dc12a8b7d9..0b845cc7fbdc 100644
|
||||
--- a/arch/mips/vdso/Makefile
|
||||
+++ b/arch/mips/vdso/Makefile
|
||||
@@ -116,7 +116,7 @@ $(obj)/%-o32.o: $(src)/%.c FORCE
|
||||
$(call cmd,force_checksrc)
|
||||
$(call if_changed_rule,cc_o_c)
|
||||
|
||||
-$(obj)/vdso-o32.lds: KBUILD_CPPFLAGS := -mabi=32
|
||||
+$(obj)/vdso-o32.lds: KBUILD_CPPFLAGS := $(ccflags-vdso) -mabi=32
|
||||
$(obj)/vdso-o32.lds: $(src)/vdso.lds.S FORCE
|
||||
$(call if_changed_dep,cpp_lds_S)
|
||||
|
||||
@@ -156,7 +156,7 @@ $(obj)/%-n32.o: $(src)/%.c FORCE
|
||||
$(call cmd,force_checksrc)
|
||||
$(call if_changed_rule,cc_o_c)
|
||||
|
||||
-$(obj)/vdso-n32.lds: KBUILD_CPPFLAGS := -mabi=n32
|
||||
+$(obj)/vdso-n32.lds: KBUILD_CPPFLAGS := $(ccflags-vdso) -mabi=n32
|
||||
$(obj)/vdso-n32.lds: $(src)/vdso.lds.S FORCE
|
||||
$(call if_changed_dep,cpp_lds_S)
|
||||
|
||||
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
|
||||
index e14366de0e6e..97387cfbbeb5 100644
|
||||
--- a/drivers/gpu/drm/drm_modes.c
|
||||
+++ b/drivers/gpu/drm/drm_modes.c
|
||||
@@ -753,7 +753,7 @@ int drm_mode_hsync(const struct drm_display_mode *mode)
|
||||
if (mode->hsync)
|
||||
return mode->hsync;
|
||||
|
||||
- if (mode->htotal < 0)
|
||||
+ if (mode->htotal <= 0)
|
||||
return 0;
|
||||
|
||||
calc_val = (mode->clock * 1000) / mode->htotal; /* hsync in Hz */
|
||||
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
|
||||
index 29abd28c19b3..4b556e698f13 100644
|
||||
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
|
||||
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
|
||||
@@ -605,13 +605,16 @@ out_fixup:
|
||||
static int vmw_dma_masks(struct vmw_private *dev_priv)
|
||||
{
|
||||
struct drm_device *dev = dev_priv->dev;
|
||||
+ int ret = 0;
|
||||
|
||||
- if (intel_iommu_enabled &&
|
||||
+ ret = dma_set_mask_and_coherent(dev->dev, DMA_BIT_MASK(64));
|
||||
+ if (dev_priv->map_mode != vmw_dma_phys &&
|
||||
(sizeof(unsigned long) == 4 || vmw_restrict_dma_mask)) {
|
||||
DRM_INFO("Restricting DMA addresses to 44 bits.\n");
|
||||
- return dma_set_mask(dev->dev, DMA_BIT_MASK(44));
|
||||
+ return dma_set_mask_and_coherent(dev->dev, DMA_BIT_MASK(44));
|
||||
}
|
||||
- return 0;
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
#else
|
||||
static int vmw_dma_masks(struct vmw_private *dev_priv)
|
||||
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
|
||||
index 81f5a552e32f..9fe8eda7c859 100644
|
||||
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
|
||||
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
|
||||
@@ -3769,7 +3769,7 @@ int vmw_execbuf_fence_commands(struct drm_file *file_priv,
|
||||
*p_fence = NULL;
|
||||
}
|
||||
|
||||
- return 0;
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
|
||||
index 29423691c105..d7179dd3c9ef 100644
|
||||
--- a/drivers/hid/hid-debug.c
|
||||
+++ b/drivers/hid/hid-debug.c
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/seq_file.h>
|
||||
+#include <linux/kfifo.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/slab.h>
|
||||
@@ -455,7 +456,7 @@ static char *resolv_usage_page(unsigned page, struct seq_file *f) {
|
||||
char *buf = NULL;
|
||||
|
||||
if (!f) {
|
||||
- buf = kzalloc(sizeof(char) * HID_DEBUG_BUFSIZE, GFP_ATOMIC);
|
||||
+ buf = kzalloc(HID_DEBUG_BUFSIZE, GFP_ATOMIC);
|
||||
if (!buf)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
@@ -659,17 +660,12 @@ EXPORT_SYMBOL_GPL(hid_dump_device);
|
||||
/* enqueue string to 'events' ring buffer */
|
||||
void hid_debug_event(struct hid_device *hdev, char *buf)
|
||||
{
|
||||
- unsigned i;
|
||||
struct hid_debug_list *list;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&hdev->debug_list_lock, flags);
|
||||
- list_for_each_entry(list, &hdev->debug_list, node) {
|
||||
- for (i = 0; buf[i]; i++)
|
||||
- list->hid_debug_buf[(list->tail + i) % HID_DEBUG_BUFSIZE] =
|
||||
- buf[i];
|
||||
- list->tail = (list->tail + i) % HID_DEBUG_BUFSIZE;
|
||||
- }
|
||||
+ list_for_each_entry(list, &hdev->debug_list, node)
|
||||
+ kfifo_in(&list->hid_debug_fifo, buf, strlen(buf));
|
||||
spin_unlock_irqrestore(&hdev->debug_list_lock, flags);
|
||||
|
||||
wake_up_interruptible(&hdev->debug_wait);
|
||||
@@ -720,8 +716,7 @@ void hid_dump_input(struct hid_device *hdev, struct hid_usage *usage, __s32 valu
|
||||
hid_debug_event(hdev, buf);
|
||||
|
||||
kfree(buf);
|
||||
- wake_up_interruptible(&hdev->debug_wait);
|
||||
-
|
||||
+ wake_up_interruptible(&hdev->debug_wait);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(hid_dump_input);
|
||||
|
||||
@@ -1086,8 +1081,8 @@ static int hid_debug_events_open(struct inode *inode, struct file *file)
|
||||
goto out;
|
||||
}
|
||||
|
||||
- if (!(list->hid_debug_buf = kzalloc(sizeof(char) * HID_DEBUG_BUFSIZE, GFP_KERNEL))) {
|
||||
- err = -ENOMEM;
|
||||
+ err = kfifo_alloc(&list->hid_debug_fifo, HID_DEBUG_FIFOSIZE, GFP_KERNEL);
|
||||
+ if (err) {
|
||||
kfree(list);
|
||||
goto out;
|
||||
}
|
||||
@@ -1107,77 +1102,57 @@ static ssize_t hid_debug_events_read(struct file *file, char __user *buffer,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct hid_debug_list *list = file->private_data;
|
||||
- int ret = 0, len;
|
||||
+ int ret = 0, copied;
|
||||
DECLARE_WAITQUEUE(wait, current);
|
||||
|
||||
mutex_lock(&list->read_mutex);
|
||||
- while (ret == 0) {
|
||||
- if (list->head == list->tail) {
|
||||
- add_wait_queue(&list->hdev->debug_wait, &wait);
|
||||
- set_current_state(TASK_INTERRUPTIBLE);
|
||||
-
|
||||
- while (list->head == list->tail) {
|
||||
- if (file->f_flags & O_NONBLOCK) {
|
||||
- ret = -EAGAIN;
|
||||
- break;
|
||||
- }
|
||||
- if (signal_pending(current)) {
|
||||
- ret = -ERESTARTSYS;
|
||||
- break;
|
||||
- }
|
||||
+ if (kfifo_is_empty(&list->hid_debug_fifo)) {
|
||||
+ add_wait_queue(&list->hdev->debug_wait, &wait);
|
||||
+ set_current_state(TASK_INTERRUPTIBLE);
|
||||
+
|
||||
+ while (kfifo_is_empty(&list->hid_debug_fifo)) {
|
||||
+ if (file->f_flags & O_NONBLOCK) {
|
||||
+ ret = -EAGAIN;
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
- if (!list->hdev || !list->hdev->debug) {
|
||||
- ret = -EIO;
|
||||
- set_current_state(TASK_RUNNING);
|
||||
- goto out;
|
||||
- }
|
||||
+ if (signal_pending(current)) {
|
||||
+ ret = -ERESTARTSYS;
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
- /* allow O_NONBLOCK from other threads */
|
||||
- mutex_unlock(&list->read_mutex);
|
||||
- schedule();
|
||||
- mutex_lock(&list->read_mutex);
|
||||
- set_current_state(TASK_INTERRUPTIBLE);
|
||||
+ /* if list->hdev is NULL we cannot remove_wait_queue().
|
||||
+ * if list->hdev->debug is 0 then hid_debug_unregister()
|
||||
+ * was already called and list->hdev is being destroyed.
|
||||
+ * if we add remove_wait_queue() here we can hit a race.
|
||||
+ */
|
||||
+ if (!list->hdev || !list->hdev->debug) {
|
||||
+ ret = -EIO;
|
||||
+ set_current_state(TASK_RUNNING);
|
||||
+ goto out;
|
||||
}
|
||||
|
||||
- set_current_state(TASK_RUNNING);
|
||||
- remove_wait_queue(&list->hdev->debug_wait, &wait);
|
||||
+ /* allow O_NONBLOCK from other threads */
|
||||
+ mutex_unlock(&list->read_mutex);
|
||||
+ schedule();
|
||||
+ mutex_lock(&list->read_mutex);
|
||||
+ set_current_state(TASK_INTERRUPTIBLE);
|
||||
}
|
||||
|
||||
- if (ret)
|
||||
- goto out;
|
||||
+ __set_current_state(TASK_RUNNING);
|
||||
+ remove_wait_queue(&list->hdev->debug_wait, &wait);
|
||||
|
||||
- /* pass the ringbuffer contents to userspace */
|
||||
-copy_rest:
|
||||
- if (list->tail == list->head)
|
||||
+ if (ret)
|
||||
goto out;
|
||||
- if (list->tail > list->head) {
|
||||
- len = list->tail - list->head;
|
||||
- if (len > count)
|
||||
- len = count;
|
||||
-
|
||||
- if (copy_to_user(buffer + ret, &list->hid_debug_buf[list->head], len)) {
|
||||
- ret = -EFAULT;
|
||||
- goto out;
|
||||
- }
|
||||
- ret += len;
|
||||
- list->head += len;
|
||||
- } else {
|
||||
- len = HID_DEBUG_BUFSIZE - list->head;
|
||||
- if (len > count)
|
||||
- len = count;
|
||||
-
|
||||
- if (copy_to_user(buffer, &list->hid_debug_buf[list->head], len)) {
|
||||
- ret = -EFAULT;
|
||||
- goto out;
|
||||
- }
|
||||
- list->head = 0;
|
||||
- ret += len;
|
||||
- count -= len;
|
||||
- if (count > 0)
|
||||
- goto copy_rest;
|
||||
- }
|
||||
-
|
||||
}
|
||||
+
|
||||
+ /* pass the fifo content to userspace, locking is not needed with only
|
||||
+ * one concurrent reader and one concurrent writer
|
||||
+ */
|
||||
+ ret = kfifo_to_user(&list->hid_debug_fifo, buffer, count, &copied);
|
||||
+ if (ret)
|
||||
+ goto out;
|
||||
+ ret = copied;
|
||||
out:
|
||||
mutex_unlock(&list->read_mutex);
|
||||
return ret;
|
||||
@@ -1188,7 +1163,7 @@ static unsigned int hid_debug_events_poll(struct file *file, poll_table *wait)
|
||||
struct hid_debug_list *list = file->private_data;
|
||||
|
||||
poll_wait(file, &list->hdev->debug_wait, wait);
|
||||
- if (list->head != list->tail)
|
||||
+ if (!kfifo_is_empty(&list->hid_debug_fifo))
|
||||
return POLLIN | POLLRDNORM;
|
||||
if (!list->hdev->debug)
|
||||
return POLLERR | POLLHUP;
|
||||
@@ -1203,7 +1178,7 @@ static int hid_debug_events_release(struct inode *inode, struct file *file)
|
||||
spin_lock_irqsave(&list->hdev->debug_list_lock, flags);
|
||||
list_del(&list->node);
|
||||
spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags);
|
||||
- kfree(list->hid_debug_buf);
|
||||
+ kfifo_free(&list->hid_debug_fifo);
|
||||
kfree(list);
|
||||
|
||||
return 0;
|
||||
@@ -1254,4 +1229,3 @@ void hid_debug_exit(void)
|
||||
{
|
||||
debugfs_remove_recursive(hid_debug_root);
|
||||
}
|
||||
-
|
||||
diff --git a/drivers/iio/chemical/atlas-ph-sensor.c b/drivers/iio/chemical/atlas-ph-sensor.c
|
||||
index ef761a508630..dad2a8be6830 100644
|
||||
--- a/drivers/iio/chemical/atlas-ph-sensor.c
|
||||
+++ b/drivers/iio/chemical/atlas-ph-sensor.c
|
||||
@@ -453,9 +453,8 @@ static int atlas_read_raw(struct iio_dev *indio_dev,
|
||||
case IIO_CHAN_INFO_SCALE:
|
||||
switch (chan->type) {
|
||||
case IIO_TEMP:
|
||||
- *val = 1; /* 0.01 */
|
||||
- *val2 = 100;
|
||||
- break;
|
||||
+ *val = 10;
|
||||
+ return IIO_VAL_INT;
|
||||
case IIO_PH:
|
||||
*val = 1; /* 0.001 */
|
||||
*val2 = 1000;
|
||||
@@ -486,7 +485,7 @@ static int atlas_write_raw(struct iio_dev *indio_dev,
|
||||
int val, int val2, long mask)
|
||||
{
|
||||
struct atlas_data *data = iio_priv(indio_dev);
|
||||
- __be32 reg = cpu_to_be32(val);
|
||||
+ __be32 reg = cpu_to_be32(val / 10);
|
||||
|
||||
if (val2 != 0 || val < 0 || val > 20000)
|
||||
return -EINVAL;
|
||||
diff --git a/drivers/misc/vexpress-syscfg.c b/drivers/misc/vexpress-syscfg.c
|
||||
index c344483fa7d6..9f257c53e6d4 100644
|
||||
--- a/drivers/misc/vexpress-syscfg.c
|
||||
+++ b/drivers/misc/vexpress-syscfg.c
|
||||
@@ -61,7 +61,7 @@ static int vexpress_syscfg_exec(struct vexpress_syscfg_func *func,
|
||||
int tries;
|
||||
long timeout;
|
||||
|
||||
- if (WARN_ON(index > func->num_templates))
|
||||
+ if (WARN_ON(index >= func->num_templates))
|
||||
return -EINVAL;
|
||||
|
||||
command = readl(syscfg->base + SYS_CFGCTRL);
|
||||
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
|
||||
index 141bd70a49c2..b9509230ce4d 100644
|
||||
--- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
|
||||
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
|
||||
@@ -168,9 +168,10 @@ int gpmi_init(struct gpmi_nand_data *this)
|
||||
|
||||
/*
|
||||
* Reset BCH here, too. We got failures otherwise :(
|
||||
- * See later BCH reset for explanation of MX23 handling
|
||||
+ * See later BCH reset for explanation of MX23 and MX28 handling
|
||||
*/
|
||||
- ret = gpmi_reset_block(r->bch_regs, GPMI_IS_MX23(this));
|
||||
+ ret = gpmi_reset_block(r->bch_regs,
|
||||
+ GPMI_IS_MX23(this) || GPMI_IS_MX28(this));
|
||||
if (ret)
|
||||
goto err_out;
|
||||
|
||||
@@ -275,13 +276,11 @@ int bch_set_geometry(struct gpmi_nand_data *this)
|
||||
|
||||
/*
|
||||
* Due to erratum #2847 of the MX23, the BCH cannot be soft reset on this
|
||||
- * chip, otherwise it will lock up. So we skip resetting BCH on the MX23.
|
||||
- * On the other hand, the MX28 needs the reset, because one case has been
|
||||
- * seen where the BCH produced ECC errors constantly after 10000
|
||||
- * consecutive reboots. The latter case has not been seen on the MX23
|
||||
- * yet, still we don't know if it could happen there as well.
|
||||
+ * chip, otherwise it will lock up. So we skip resetting BCH on the MX23
|
||||
+ * and MX28.
|
||||
*/
|
||||
- ret = gpmi_reset_block(r->bch_regs, GPMI_IS_MX23(this));
|
||||
+ ret = gpmi_reset_block(r->bch_regs,
|
||||
+ GPMI_IS_MX23(this) || GPMI_IS_MX28(this));
|
||||
if (ret)
|
||||
goto err_out;
|
||||
|
||||
diff --git a/fs/cifs/Kconfig b/fs/cifs/Kconfig
|
||||
index 8bef27b8f85d..e7b478b49985 100644
|
||||
--- a/fs/cifs/Kconfig
|
||||
+++ b/fs/cifs/Kconfig
|
||||
@@ -111,7 +111,7 @@ config CIFS_XATTR
|
||||
|
||||
config CIFS_POSIX
|
||||
bool "CIFS POSIX Extensions"
|
||||
- depends on CIFS && CIFS_ALLOW_INSECURE_LEGACY && CIFS_XATTR
|
||||
+ depends on CIFS_XATTR
|
||||
help
|
||||
Enabling this option will cause the cifs client to attempt to
|
||||
negotiate a newer dialect with servers, such as Samba 3.0.5
|
||||
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
|
||||
index 3d7de9f4f545..77e9cd7a0137 100644
|
||||
--- a/fs/debugfs/inode.c
|
||||
+++ b/fs/debugfs/inode.c
|
||||
@@ -732,6 +732,13 @@ struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry,
|
||||
struct dentry *dentry = NULL, *trap;
|
||||
struct name_snapshot old_name;
|
||||
|
||||
+ if (IS_ERR(old_dir))
|
||||
+ return old_dir;
|
||||
+ if (IS_ERR(new_dir))
|
||||
+ return new_dir;
|
||||
+ if (IS_ERR_OR_NULL(old_dentry))
|
||||
+ return old_dentry;
|
||||
+
|
||||
trap = lock_rename(new_dir, old_dir);
|
||||
/* Source or destination directories don't exist? */
|
||||
if (d_really_is_negative(old_dir) || d_really_is_negative(new_dir))
|
||||
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
|
||||
index 12d780718b48..3656f87d11e3 100644
|
||||
--- a/fs/nfsd/nfs4state.c
|
||||
+++ b/fs/nfsd/nfs4state.c
|
||||
@@ -1472,8 +1472,10 @@ free_session_slots(struct nfsd4_session *ses)
|
||||
{
|
||||
int i;
|
||||
|
||||
- for (i = 0; i < ses->se_fchannel.maxreqs; i++)
|
||||
+ for (i = 0; i < ses->se_fchannel.maxreqs; i++) {
|
||||
+ free_svc_cred(&ses->se_slots[i]->sl_cred);
|
||||
kfree(ses->se_slots[i]);
|
||||
+ }
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2344,14 +2346,18 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp)
|
||||
|
||||
dprintk("--> %s slot %p\n", __func__, slot);
|
||||
|
||||
+ slot->sl_flags |= NFSD4_SLOT_INITIALIZED;
|
||||
slot->sl_opcnt = resp->opcnt;
|
||||
slot->sl_status = resp->cstate.status;
|
||||
+ free_svc_cred(&slot->sl_cred);
|
||||
+ copy_cred(&slot->sl_cred, &resp->rqstp->rq_cred);
|
||||
|
||||
- slot->sl_flags |= NFSD4_SLOT_INITIALIZED;
|
||||
- if (nfsd4_not_cached(resp)) {
|
||||
- slot->sl_datalen = 0;
|
||||
+ if (!nfsd4_cache_this(resp)) {
|
||||
+ slot->sl_flags &= ~NFSD4_SLOT_CACHED;
|
||||
return;
|
||||
}
|
||||
+ slot->sl_flags |= NFSD4_SLOT_CACHED;
|
||||
+
|
||||
base = resp->cstate.data_offset;
|
||||
slot->sl_datalen = buf->len - base;
|
||||
if (read_bytes_from_xdr_buf(buf, base, slot->sl_data, slot->sl_datalen))
|
||||
@@ -2378,8 +2384,16 @@ nfsd4_enc_sequence_replay(struct nfsd4_compoundargs *args,
|
||||
op = &args->ops[resp->opcnt - 1];
|
||||
nfsd4_encode_operation(resp, op);
|
||||
|
||||
- /* Return nfserr_retry_uncached_rep in next operation. */
|
||||
- if (args->opcnt > 1 && !(slot->sl_flags & NFSD4_SLOT_CACHETHIS)) {
|
||||
+ if (slot->sl_flags & NFSD4_SLOT_CACHED)
|
||||
+ return op->status;
|
||||
+ if (args->opcnt == 1) {
|
||||
+ /*
|
||||
+ * The original operation wasn't a solo sequence--we
|
||||
+ * always cache those--so this retry must not match the
|
||||
+ * original:
|
||||
+ */
|
||||
+ op->status = nfserr_seq_false_retry;
|
||||
+ } else {
|
||||
op = &args->ops[resp->opcnt++];
|
||||
op->status = nfserr_retry_uncached_rep;
|
||||
nfsd4_encode_operation(resp, op);
|
||||
@@ -3039,6 +3053,34 @@ static bool nfsd4_request_too_big(struct svc_rqst *rqstp,
|
||||
return xb->len > session->se_fchannel.maxreq_sz;
|
||||
}
|
||||
|
||||
+static bool replay_matches_cache(struct svc_rqst *rqstp,
|
||||
+ struct nfsd4_sequence *seq, struct nfsd4_slot *slot)
|
||||
+{
|
||||
+ struct nfsd4_compoundargs *argp = rqstp->rq_argp;
|
||||
+
|
||||
+ if ((bool)(slot->sl_flags & NFSD4_SLOT_CACHETHIS) !=
|
||||
+ (bool)seq->cachethis)
|
||||
+ return false;
|
||||
+ /*
|
||||
+ * If there's an error than the reply can have fewer ops than
|
||||
+ * the call. But if we cached a reply with *more* ops than the
|
||||
+ * call you're sending us now, then this new call is clearly not
|
||||
+ * really a replay of the old one:
|
||||
+ */
|
||||
+ if (slot->sl_opcnt < argp->opcnt)
|
||||
+ return false;
|
||||
+ /* This is the only check explicitly called by spec: */
|
||||
+ if (!same_creds(&rqstp->rq_cred, &slot->sl_cred))
|
||||
+ return false;
|
||||
+ /*
|
||||
+ * There may be more comparisons we could actually do, but the
|
||||
+ * spec doesn't require us to catch every case where the calls
|
||||
+ * don't match (that would require caching the call as well as
|
||||
+ * the reply), so we don't bother.
|
||||
+ */
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
__be32
|
||||
nfsd4_sequence(struct svc_rqst *rqstp,
|
||||
struct nfsd4_compound_state *cstate,
|
||||
@@ -3098,6 +3140,9 @@ nfsd4_sequence(struct svc_rqst *rqstp,
|
||||
status = nfserr_seq_misordered;
|
||||
if (!(slot->sl_flags & NFSD4_SLOT_INITIALIZED))
|
||||
goto out_put_session;
|
||||
+ status = nfserr_seq_false_retry;
|
||||
+ if (!replay_matches_cache(rqstp, seq, slot))
|
||||
+ goto out_put_session;
|
||||
cstate->slot = slot;
|
||||
cstate->session = session;
|
||||
cstate->clp = clp;
|
||||
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
|
||||
index 005c911b34ac..86aa92d200e1 100644
|
||||
--- a/fs/nfsd/state.h
|
||||
+++ b/fs/nfsd/state.h
|
||||
@@ -169,11 +169,13 @@ static inline struct nfs4_delegation *delegstateid(struct nfs4_stid *s)
|
||||
struct nfsd4_slot {
|
||||
u32 sl_seqid;
|
||||
__be32 sl_status;
|
||||
+ struct svc_cred sl_cred;
|
||||
u32 sl_datalen;
|
||||
u16 sl_opcnt;
|
||||
#define NFSD4_SLOT_INUSE (1 << 0)
|
||||
#define NFSD4_SLOT_CACHETHIS (1 << 1)
|
||||
#define NFSD4_SLOT_INITIALIZED (1 << 2)
|
||||
+#define NFSD4_SLOT_CACHED (1 << 3)
|
||||
u8 sl_flags;
|
||||
char sl_data[];
|
||||
};
|
||||
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
|
||||
index 8fda4abdf3b1..448e74e32344 100644
|
||||
--- a/fs/nfsd/xdr4.h
|
||||
+++ b/fs/nfsd/xdr4.h
|
||||
@@ -645,9 +645,18 @@ static inline bool nfsd4_is_solo_sequence(struct nfsd4_compoundres *resp)
|
||||
return resp->opcnt == 1 && args->ops[0].opnum == OP_SEQUENCE;
|
||||
}
|
||||
|
||||
-static inline bool nfsd4_not_cached(struct nfsd4_compoundres *resp)
|
||||
+/*
|
||||
+ * The session reply cache only needs to cache replies that the client
|
||||
+ * actually asked us to. But it's almost free for us to cache compounds
|
||||
+ * consisting of only a SEQUENCE op, so we may as well cache those too.
|
||||
+ * Also, the protocol doesn't give us a convenient response in the case
|
||||
+ * of a replay of a solo SEQUENCE op that wasn't cached
|
||||
+ * (RETRY_UNCACHED_REP can only be returned in the second op of a
|
||||
+ * compound).
|
||||
+ */
|
||||
+static inline bool nfsd4_cache_this(struct nfsd4_compoundres *resp)
|
||||
{
|
||||
- return !(resp->cstate.slot->sl_flags & NFSD4_SLOT_CACHETHIS)
|
||||
+ return (resp->cstate.slot->sl_flags & NFSD4_SLOT_CACHETHIS)
|
||||
|| nfsd4_is_solo_sequence(resp);
|
||||
}
|
||||
|
||||
diff --git a/include/linux/hid-debug.h b/include/linux/hid-debug.h
|
||||
index 8663f216c563..2d6100edf204 100644
|
||||
--- a/include/linux/hid-debug.h
|
||||
+++ b/include/linux/hid-debug.h
|
||||
@@ -24,7 +24,10 @@
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
|
||||
+#include <linux/kfifo.h>
|
||||
+
|
||||
#define HID_DEBUG_BUFSIZE 512
|
||||
+#define HID_DEBUG_FIFOSIZE 512
|
||||
|
||||
void hid_dump_input(struct hid_device *, struct hid_usage *, __s32);
|
||||
void hid_dump_report(struct hid_device *, int , u8 *, int);
|
||||
@@ -37,11 +40,8 @@ void hid_debug_init(void);
|
||||
void hid_debug_exit(void);
|
||||
void hid_debug_event(struct hid_device *, char *);
|
||||
|
||||
-
|
||||
struct hid_debug_list {
|
||||
- char *hid_debug_buf;
|
||||
- int head;
|
||||
- int tail;
|
||||
+ DECLARE_KFIFO_PTR(hid_debug_fifo, char);
|
||||
struct fasync_struct *fasync;
|
||||
struct hid_device *hdev;
|
||||
struct list_head node;
|
||||
@@ -64,4 +64,3 @@ struct hid_debug_list {
|
||||
#endif
|
||||
|
||||
#endif
|
||||
-
|
||||
diff --git a/kernel/signal.c b/kernel/signal.c
|
||||
index 049929a5f4ce..798b8f495ae2 100644
|
||||
--- a/kernel/signal.c
|
||||
+++ b/kernel/signal.c
|
||||
@@ -696,6 +696,48 @@ static inline bool si_fromuser(const struct siginfo *info)
|
||||
(!is_si_special(info) && SI_FROMUSER(info));
|
||||
}
|
||||
|
||||
+static int dequeue_synchronous_signal(siginfo_t *info)
|
||||
+{
|
||||
+ struct task_struct *tsk = current;
|
||||
+ struct sigpending *pending = &tsk->pending;
|
||||
+ struct sigqueue *q, *sync = NULL;
|
||||
+
|
||||
+ /*
|
||||
+ * Might a synchronous signal be in the queue?
|
||||
+ */
|
||||
+ if (!((pending->signal.sig[0] & ~tsk->blocked.sig[0]) & SYNCHRONOUS_MASK))
|
||||
+ return 0;
|
||||
+
|
||||
+ /*
|
||||
+ * Return the first synchronous signal in the queue.
|
||||
+ */
|
||||
+ list_for_each_entry(q, &pending->list, list) {
|
||||
+ /* Synchronous signals have a postive si_code */
|
||||
+ if ((q->info.si_code > SI_USER) &&
|
||||
+ (sigmask(q->info.si_signo) & SYNCHRONOUS_MASK)) {
|
||||
+ sync = q;
|
||||
+ goto next;
|
||||
+ }
|
||||
+ }
|
||||
+ return 0;
|
||||
+next:
|
||||
+ /*
|
||||
+ * Check if there is another siginfo for the same signal.
|
||||
+ */
|
||||
+ list_for_each_entry_continue(q, &pending->list, list) {
|
||||
+ if (q->info.si_signo == sync->info.si_signo)
|
||||
+ goto still_pending;
|
||||
+ }
|
||||
+
|
||||
+ sigdelset(&pending->signal, sync->info.si_signo);
|
||||
+ recalc_sigpending();
|
||||
+still_pending:
|
||||
+ list_del_init(&sync->list);
|
||||
+ copy_siginfo(info, &sync->info);
|
||||
+ __sigqueue_free(sync);
|
||||
+ return info->si_signo;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* called with RCU read lock from check_kill_permission()
|
||||
*/
|
||||
@@ -2198,6 +2240,11 @@ relock:
|
||||
goto relock;
|
||||
}
|
||||
|
||||
+ /* Has this task already been marked for death? */
|
||||
+ ksig->info.si_signo = signr = SIGKILL;
|
||||
+ if (signal_group_exit(signal))
|
||||
+ goto fatal;
|
||||
+
|
||||
for (;;) {
|
||||
struct k_sigaction *ka;
|
||||
|
||||
@@ -2211,7 +2258,15 @@ relock:
|
||||
goto relock;
|
||||
}
|
||||
|
||||
- signr = dequeue_signal(current, ¤t->blocked, &ksig->info);
|
||||
+ /*
|
||||
+ * Signals generated by the execution of an instruction
|
||||
+ * need to be delivered before any other pending signals
|
||||
+ * so that the instruction pointer in the signal stack
|
||||
+ * frame points to the faulting instruction.
|
||||
+ */
|
||||
+ signr = dequeue_synchronous_signal(&ksig->info);
|
||||
+ if (!signr)
|
||||
+ signr = dequeue_signal(current, ¤t->blocked, &ksig->info);
|
||||
|
||||
if (!signr)
|
||||
break; /* will return 0 */
|
||||
@@ -2293,6 +2348,7 @@ relock:
|
||||
continue;
|
||||
}
|
||||
|
||||
+ fatal:
|
||||
spin_unlock_irq(&sighand->siglock);
|
||||
|
||||
/*
|
||||
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
|
||||
index 08ce36147c4c..8f7883b7d717 100644
|
||||
--- a/net/batman-adv/hard-interface.c
|
||||
+++ b/net/batman-adv/hard-interface.c
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "main.h"
|
||||
|
||||
#include <linux/atomic.h>
|
||||
-#include <linux/bug.h>
|
||||
#include <linux/byteorder/generic.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/fs.h>
|
||||
@@ -172,8 +171,10 @@ static bool batadv_is_on_batman_iface(const struct net_device *net_dev)
|
||||
parent_dev = __dev_get_by_index((struct net *)parent_net,
|
||||
dev_get_iflink(net_dev));
|
||||
/* if we got a NULL parent_dev there is something broken.. */
|
||||
- if (WARN(!parent_dev, "Cannot find parent device"))
|
||||
+ if (!parent_dev) {
|
||||
+ pr_err("Cannot find parent device\n");
|
||||
return false;
|
||||
+ }
|
||||
|
||||
if (batadv_mutual_parents(net_dev, net, parent_dev, parent_net))
|
||||
return false;
|
||||
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
|
||||
index 05bc176decf0..835af771a9fd 100644
|
||||
--- a/net/batman-adv/soft-interface.c
|
||||
+++ b/net/batman-adv/soft-interface.c
|
||||
@@ -211,6 +211,8 @@ static int batadv_interface_tx(struct sk_buff *skb,
|
||||
|
||||
netif_trans_update(soft_iface);
|
||||
vid = batadv_get_vid(skb, 0);
|
||||
+
|
||||
+ skb_reset_mac_header(skb);
|
||||
ethhdr = eth_hdr(skb);
|
||||
|
||||
switch (ntohs(ethhdr->h_proto)) {
|
||||
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
|
||||
index 5a8075d9f2e7..93eb606f7628 100644
|
||||
--- a/net/ceph/messenger.c
|
||||
+++ b/net/ceph/messenger.c
|
||||
@@ -3186,9 +3186,10 @@ void ceph_con_keepalive(struct ceph_connection *con)
|
||||
dout("con_keepalive %p\n", con);
|
||||
mutex_lock(&con->mutex);
|
||||
clear_standby(con);
|
||||
+ con_flag_set(con, CON_FLAG_KEEPALIVE_PENDING);
|
||||
mutex_unlock(&con->mutex);
|
||||
- if (con_flag_test_and_set(con, CON_FLAG_KEEPALIVE_PENDING) == 0 &&
|
||||
- con_flag_test_and_set(con, CON_FLAG_WRITE_PENDING) == 0)
|
||||
+
|
||||
+ if (con_flag_test_and_set(con, CON_FLAG_WRITE_PENDING) == 0)
|
||||
queue_con(con);
|
||||
}
|
||||
EXPORT_SYMBOL(ceph_con_keepalive);
|
||||
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
|
||||
index 6a0fb9dbc1ba..f8de166b788a 100644
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -1852,9 +1852,16 @@ static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata,
|
||||
int head_need, bool may_encrypt)
|
||||
{
|
||||
struct ieee80211_local *local = sdata->local;
|
||||
+ struct ieee80211_hdr *hdr;
|
||||
+ bool enc_tailroom;
|
||||
int tail_need = 0;
|
||||
|
||||
- if (may_encrypt && sdata->crypto_tx_tailroom_needed_cnt) {
|
||||
+ hdr = (struct ieee80211_hdr *) skb->data;
|
||||
+ enc_tailroom = may_encrypt &&
|
||||
+ (sdata->crypto_tx_tailroom_needed_cnt ||
|
||||
+ ieee80211_is_mgmt(hdr->frame_control));
|
||||
+
|
||||
+ if (enc_tailroom) {
|
||||
tail_need = IEEE80211_ENCRYPT_TAILROOM;
|
||||
tail_need -= skb_tailroom(skb);
|
||||
tail_need = max_t(int, tail_need, 0);
|
||||
@@ -1862,8 +1869,7 @@ static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata,
|
||||
|
||||
if (skb_cloned(skb) &&
|
||||
(!ieee80211_hw_check(&local->hw, SUPPORTS_CLONED_SKBS) ||
|
||||
- !skb_clone_writable(skb, ETH_HLEN) ||
|
||||
- (may_encrypt && sdata->crypto_tx_tailroom_needed_cnt)))
|
||||
+ !skb_clone_writable(skb, ETH_HLEN) || enc_tailroom))
|
||||
I802_DEBUG_INC(local->tx_expand_skb_head_cloned);
|
||||
else if (head_need || tail_need)
|
||||
I802_DEBUG_INC(local->tx_expand_skb_head);
|
||||
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
|
||||
index 026770884d46..f6f91c3b2de0 100644
|
||||
--- a/net/xfrm/xfrm_user.c
|
||||
+++ b/net/xfrm/xfrm_user.c
|
||||
@@ -1408,10 +1408,15 @@ static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family)
|
||||
if (!ut[i].family)
|
||||
ut[i].family = family;
|
||||
|
||||
- if ((ut[i].mode == XFRM_MODE_TRANSPORT) &&
|
||||
- (ut[i].family != prev_family))
|
||||
- return -EINVAL;
|
||||
-
|
||||
+ switch (ut[i].mode) {
|
||||
+ case XFRM_MODE_TUNNEL:
|
||||
+ case XFRM_MODE_BEET:
|
||||
+ break;
|
||||
+ default:
|
||||
+ if (ut[i].family != prev_family)
|
||||
+ return -EINVAL;
|
||||
+ break;
|
||||
+ }
|
||||
if (ut[i].mode >= XFRM_MODE_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
diff --git a/samples/mei/mei-amt-version.c b/samples/mei/mei-amt-version.c
|
||||
index 57d0d871dcf7..bb9988914a56 100644
|
||||
--- a/samples/mei/mei-amt-version.c
|
||||
+++ b/samples/mei/mei-amt-version.c
|
||||
@@ -117,7 +117,7 @@ static bool mei_init(struct mei *me, const uuid_le *guid,
|
||||
|
||||
me->verbose = verbose;
|
||||
|
||||
- me->fd = open("/dev/mei", O_RDWR);
|
||||
+ me->fd = open("/dev/mei0", O_RDWR);
|
||||
if (me->fd == -1) {
|
||||
mei_err(me, "Cannot establish a handle to the Intel MEI driver\n");
|
||||
goto err;
|
34
patch/kernel/cubox-default/patch-4.9.157-158.patch
Normal file
34
patch/kernel/cubox-default/patch-4.9.157-158.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 4eb7a17e18f1..2b8434aaeece 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
-SUBLEVEL = 157
|
||||
+SUBLEVEL = 158
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c
|
||||
index 634bdbb23851..afdf4e3cafc2 100644
|
||||
--- a/fs/binfmt_script.c
|
||||
+++ b/fs/binfmt_script.c
|
||||
@@ -43,14 +43,10 @@ static int load_script(struct linux_binprm *bprm)
|
||||
fput(bprm->file);
|
||||
bprm->file = NULL;
|
||||
|
||||
- for (cp = bprm->buf+2;; cp++) {
|
||||
- if (cp >= bprm->buf + BINPRM_BUF_SIZE)
|
||||
- return -ENOEXEC;
|
||||
- if (!*cp || (*cp == '\n'))
|
||||
- break;
|
||||
- }
|
||||
+ bprm->buf[BINPRM_BUF_SIZE - 1] = '\0';
|
||||
+ if ((cp = strchr(bprm->buf, '\n')) == NULL)
|
||||
+ cp = bprm->buf+BINPRM_BUF_SIZE-1;
|
||||
*cp = '\0';
|
||||
-
|
||||
while (cp > bprm->buf) {
|
||||
cp--;
|
||||
if ((*cp == ' ') || (*cp == '\t'))
|
2426
patch/kernel/cubox-default/patch-4.9.158-159.patch
Normal file
2426
patch/kernel/cubox-default/patch-4.9.158-159.patch
Normal file
File diff suppressed because it is too large
Load diff
599
patch/kernel/cubox-default/patch-4.9.159-160.patch
Normal file
599
patch/kernel/cubox-default/patch-4.9.159-160.patch
Normal file
|
@ -0,0 +1,599 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index a452ead13b1e..af70503df3f4 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
-SUBLEVEL = 159
|
||||
+SUBLEVEL = 160
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
diff --git a/drivers/hwmon/lm80.c b/drivers/hwmon/lm80.c
|
||||
index cb6606a0470d..be60bd5bab78 100644
|
||||
--- a/drivers/hwmon/lm80.c
|
||||
+++ b/drivers/hwmon/lm80.c
|
||||
@@ -393,8 +393,10 @@ static ssize_t set_fan_div(struct device *dev, struct device_attribute *attr,
|
||||
}
|
||||
|
||||
rv = lm80_read_value(client, LM80_REG_FANDIV);
|
||||
- if (rv < 0)
|
||||
+ if (rv < 0) {
|
||||
+ mutex_unlock(&data->update_lock);
|
||||
return rv;
|
||||
+ }
|
||||
reg = (rv & ~(3 << (2 * (nr + 1))))
|
||||
| (data->fan_div[nr] << (2 * (nr + 1)));
|
||||
lm80_write_value(client, LM80_REG_FANDIV, reg);
|
||||
diff --git a/drivers/isdn/mISDN/timerdev.c b/drivers/isdn/mISDN/timerdev.c
|
||||
index 9438d7ec3308..8b29e97cf668 100644
|
||||
--- a/drivers/isdn/mISDN/timerdev.c
|
||||
+++ b/drivers/isdn/mISDN/timerdev.c
|
||||
@@ -168,8 +168,8 @@ dev_expire_timer(unsigned long data)
|
||||
spin_lock_irqsave(&timer->dev->lock, flags);
|
||||
if (timer->id >= 0)
|
||||
list_move_tail(&timer->list, &timer->dev->expired);
|
||||
- spin_unlock_irqrestore(&timer->dev->lock, flags);
|
||||
wake_up_interruptible(&timer->dev->wait);
|
||||
+ spin_unlock_irqrestore(&timer->dev->lock, flags);
|
||||
}
|
||||
|
||||
static int
|
||||
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
|
||||
index 93ab0b3ad393..af11781fe5f9 100644
|
||||
--- a/drivers/net/ethernet/marvell/sky2.c
|
||||
+++ b/drivers/net/ethernet/marvell/sky2.c
|
||||
@@ -5079,7 +5079,7 @@ static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
INIT_WORK(&hw->restart_work, sky2_restart);
|
||||
|
||||
pci_set_drvdata(pdev, hw);
|
||||
- pdev->d3_delay = 200;
|
||||
+ pdev->d3_delay = 300;
|
||||
|
||||
return 0;
|
||||
|
||||
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
|
||||
index a601f8d43b75..f988c7573ba5 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
|
||||
@@ -237,15 +237,18 @@ static inline u64 dwmac4_get_timestamp(void *desc, u32 ats)
|
||||
static int dwmac4_rx_check_timestamp(void *desc)
|
||||
{
|
||||
struct dma_desc *p = (struct dma_desc *)desc;
|
||||
+ unsigned int rdes0 = le32_to_cpu(p->des0);
|
||||
+ unsigned int rdes1 = le32_to_cpu(p->des1);
|
||||
+ unsigned int rdes3 = le32_to_cpu(p->des3);
|
||||
u32 own, ctxt;
|
||||
int ret = 1;
|
||||
|
||||
- own = p->des3 & RDES3_OWN;
|
||||
- ctxt = ((p->des3 & RDES3_CONTEXT_DESCRIPTOR)
|
||||
+ own = rdes3 & RDES3_OWN;
|
||||
+ ctxt = ((rdes3 & RDES3_CONTEXT_DESCRIPTOR)
|
||||
>> RDES3_CONTEXT_DESCRIPTOR_SHIFT);
|
||||
|
||||
if (likely(!own && ctxt)) {
|
||||
- if ((p->des0 == 0xffffffff) && (p->des1 == 0xffffffff))
|
||||
+ if ((rdes0 == 0xffffffff) && (rdes1 == 0xffffffff))
|
||||
/* Corrupted value */
|
||||
ret = -EINVAL;
|
||||
else
|
||||
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
|
||||
index c5d0142adda2..3519a8a589dd 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
|
||||
@@ -676,25 +676,27 @@ static int stmmac_ethtool_op_set_eee(struct net_device *dev,
|
||||
struct ethtool_eee *edata)
|
||||
{
|
||||
struct stmmac_priv *priv = netdev_priv(dev);
|
||||
+ int ret;
|
||||
|
||||
- priv->eee_enabled = edata->eee_enabled;
|
||||
-
|
||||
- if (!priv->eee_enabled)
|
||||
+ if (!edata->eee_enabled) {
|
||||
stmmac_disable_eee_mode(priv);
|
||||
- else {
|
||||
+ } else {
|
||||
/* We are asking for enabling the EEE but it is safe
|
||||
* to verify all by invoking the eee_init function.
|
||||
* In case of failure it will return an error.
|
||||
*/
|
||||
- priv->eee_enabled = stmmac_eee_init(priv);
|
||||
- if (!priv->eee_enabled)
|
||||
+ edata->eee_enabled = stmmac_eee_init(priv);
|
||||
+ if (!edata->eee_enabled)
|
||||
return -EOPNOTSUPP;
|
||||
-
|
||||
- /* Do not change tx_lpi_timer in case of failure */
|
||||
- priv->tx_lpi_timer = edata->tx_lpi_timer;
|
||||
}
|
||||
|
||||
- return phy_ethtool_set_eee(priv->phydev, edata);
|
||||
+ ret = phy_ethtool_set_eee(dev->phydev, edata);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ priv->eee_enabled = edata->eee_enabled;
|
||||
+ priv->tx_lpi_timer = edata->tx_lpi_timer;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static u32 stmmac_usec2riwt(u32 usec, struct stmmac_priv *priv)
|
||||
diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c
|
||||
index 7a14e8170e82..aef525467af0 100644
|
||||
--- a/drivers/net/phy/xilinx_gmii2rgmii.c
|
||||
+++ b/drivers/net/phy/xilinx_gmii2rgmii.c
|
||||
@@ -42,7 +42,10 @@ static int xgmiitorgmii_read_status(struct phy_device *phydev)
|
||||
u16 val = 0;
|
||||
int err;
|
||||
|
||||
- err = priv->phy_drv->read_status(phydev);
|
||||
+ if (priv->phy_drv->read_status)
|
||||
+ err = priv->phy_drv->read_status(phydev);
|
||||
+ else
|
||||
+ err = genphy_read_status(phydev);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
|
||||
index 28afdf22b88f..373713faa1f5 100644
|
||||
--- a/drivers/net/vxlan.c
|
||||
+++ b/drivers/net/vxlan.c
|
||||
@@ -1911,7 +1911,7 @@ static void vxlan_encap_bypass(struct sk_buff *skb, struct vxlan_dev *src_vxlan,
|
||||
struct pcpu_sw_netstats *tx_stats, *rx_stats;
|
||||
union vxlan_addr loopback;
|
||||
union vxlan_addr *remote_ip = &dst_vxlan->default_dst.remote_ip;
|
||||
- struct net_device *dev = skb->dev;
|
||||
+ struct net_device *dev;
|
||||
int len = skb->len;
|
||||
|
||||
tx_stats = this_cpu_ptr(src_vxlan->dev->tstats);
|
||||
@@ -1931,8 +1931,15 @@ static void vxlan_encap_bypass(struct sk_buff *skb, struct vxlan_dev *src_vxlan,
|
||||
#endif
|
||||
}
|
||||
|
||||
+ rcu_read_lock();
|
||||
+ dev = skb->dev;
|
||||
+ if (unlikely(!(dev->flags & IFF_UP))) {
|
||||
+ kfree_skb(skb);
|
||||
+ goto drop;
|
||||
+ }
|
||||
+
|
||||
if (dst_vxlan->flags & VXLAN_F_LEARN)
|
||||
- vxlan_snoop(skb->dev, &loopback, eth_hdr(skb)->h_source);
|
||||
+ vxlan_snoop(dev, &loopback, eth_hdr(skb)->h_source);
|
||||
|
||||
u64_stats_update_begin(&tx_stats->syncp);
|
||||
tx_stats->tx_packets++;
|
||||
@@ -1945,8 +1952,10 @@ static void vxlan_encap_bypass(struct sk_buff *skb, struct vxlan_dev *src_vxlan,
|
||||
rx_stats->rx_bytes += len;
|
||||
u64_stats_update_end(&rx_stats->syncp);
|
||||
} else {
|
||||
+drop:
|
||||
dev->stats.rx_dropped++;
|
||||
}
|
||||
+ rcu_read_unlock();
|
||||
}
|
||||
|
||||
static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
|
||||
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
|
||||
index dc387a974325..2383caf88b67 100644
|
||||
--- a/drivers/vhost/vhost.c
|
||||
+++ b/drivers/vhost/vhost.c
|
||||
@@ -1696,7 +1696,7 @@ static int log_used(struct vhost_virtqueue *vq, u64 used_offset, u64 len)
|
||||
|
||||
ret = translate_desc(vq, (uintptr_t)vq->used + used_offset,
|
||||
len, iov, 64, VHOST_ACCESS_WO);
|
||||
- if (ret)
|
||||
+ if (ret < 0)
|
||||
return ret;
|
||||
|
||||
for (i = 0; i < ret; i++) {
|
||||
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
|
||||
index 793d4d571d8d..5c5c389d8fed 100644
|
||||
--- a/fs/btrfs/extent_io.c
|
||||
+++ b/fs/btrfs/extent_io.c
|
||||
@@ -4463,29 +4463,25 @@ try_submit_last:
|
||||
}
|
||||
|
||||
/*
|
||||
- * Sanity check for fiemap cache
|
||||
+ * Emit last fiemap cache
|
||||
*
|
||||
- * All fiemap cache should be submitted by emit_fiemap_extent()
|
||||
- * Iteration should be terminated either by last fiemap extent or
|
||||
- * fieinfo->fi_extents_max.
|
||||
- * So no cached fiemap should exist.
|
||||
+ * The last fiemap cache may still be cached in the following case:
|
||||
+ * 0 4k 8k
|
||||
+ * |<- Fiemap range ->|
|
||||
+ * |<------------ First extent ----------->|
|
||||
+ *
|
||||
+ * In this case, the first extent range will be cached but not emitted.
|
||||
+ * So we must emit it before ending extent_fiemap().
|
||||
*/
|
||||
-static int check_fiemap_cache(struct btrfs_fs_info *fs_info,
|
||||
- struct fiemap_extent_info *fieinfo,
|
||||
- struct fiemap_cache *cache)
|
||||
+static int emit_last_fiemap_cache(struct btrfs_fs_info *fs_info,
|
||||
+ struct fiemap_extent_info *fieinfo,
|
||||
+ struct fiemap_cache *cache)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!cache->cached)
|
||||
return 0;
|
||||
|
||||
- /* Small and recoverbale problem, only to info developer */
|
||||
-#ifdef CONFIG_BTRFS_DEBUG
|
||||
- WARN_ON(1);
|
||||
-#endif
|
||||
- btrfs_warn(fs_info,
|
||||
- "unhandled fiemap cache detected: offset=%llu phys=%llu len=%llu flags=0x%x",
|
||||
- cache->offset, cache->phys, cache->len, cache->flags);
|
||||
ret = fiemap_fill_next_extent(fieinfo, cache->offset, cache->phys,
|
||||
cache->len, cache->flags);
|
||||
cache->cached = false;
|
||||
@@ -4701,7 +4697,7 @@ int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
|
||||
}
|
||||
out_free:
|
||||
if (!ret)
|
||||
- ret = check_fiemap_cache(root->fs_info, fieinfo, &cache);
|
||||
+ ret = emit_last_fiemap_cache(root->fs_info, fieinfo, &cache);
|
||||
free_extent_map(em);
|
||||
out:
|
||||
btrfs_free_path(path);
|
||||
diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
|
||||
index 9c6c8ef2e9e7..b692edeb0b90 100644
|
||||
--- a/include/linux/netdev_features.h
|
||||
+++ b/include/linux/netdev_features.h
|
||||
@@ -11,6 +11,8 @@
|
||||
#define _LINUX_NETDEV_FEATURES_H
|
||||
|
||||
#include <linux/types.h>
|
||||
+#include <linux/bitops.h>
|
||||
+#include <asm/byteorder.h>
|
||||
|
||||
typedef u64 netdev_features_t;
|
||||
|
||||
@@ -137,8 +139,26 @@ enum {
|
||||
#define NETIF_F_BUSY_POLL __NETIF_F(BUSY_POLL)
|
||||
#define NETIF_F_HW_TC __NETIF_F(HW_TC)
|
||||
|
||||
-#define for_each_netdev_feature(mask_addr, bit) \
|
||||
- for_each_set_bit(bit, (unsigned long *)mask_addr, NETDEV_FEATURE_COUNT)
|
||||
+/* Finds the next feature with the highest number of the range of start till 0.
|
||||
+ */
|
||||
+static inline int find_next_netdev_feature(u64 feature, unsigned long start)
|
||||
+{
|
||||
+ /* like BITMAP_LAST_WORD_MASK() for u64
|
||||
+ * this sets the most significant 64 - start to 0.
|
||||
+ */
|
||||
+ feature &= ~0ULL >> (-start & ((sizeof(feature) * 8) - 1));
|
||||
+
|
||||
+ return fls64(feature) - 1;
|
||||
+}
|
||||
+
|
||||
+/* This goes for the MSB to the LSB through the set feature bits,
|
||||
+ * mask_addr should be a u64 and bit an int
|
||||
+ */
|
||||
+#define for_each_netdev_feature(mask_addr, bit) \
|
||||
+ for ((bit) = find_next_netdev_feature((mask_addr), \
|
||||
+ NETDEV_FEATURE_COUNT); \
|
||||
+ (bit) >= 0; \
|
||||
+ (bit) = find_next_netdev_feature((mask_addr), (bit) - 1))
|
||||
|
||||
/* Features valid for ethtool to change */
|
||||
/* = all defined minus driver/device-class-related */
|
||||
diff --git a/include/net/ax25.h b/include/net/ax25.h
|
||||
index e602f8177ebf..b507ce2b1952 100644
|
||||
--- a/include/net/ax25.h
|
||||
+++ b/include/net/ax25.h
|
||||
@@ -199,6 +199,18 @@ static inline void ax25_hold_route(ax25_route *ax25_rt)
|
||||
|
||||
void __ax25_put_route(ax25_route *ax25_rt);
|
||||
|
||||
+extern rwlock_t ax25_route_lock;
|
||||
+
|
||||
+static inline void ax25_route_lock_use(void)
|
||||
+{
|
||||
+ read_lock(&ax25_route_lock);
|
||||
+}
|
||||
+
|
||||
+static inline void ax25_route_lock_unuse(void)
|
||||
+{
|
||||
+ read_unlock(&ax25_route_lock);
|
||||
+}
|
||||
+
|
||||
static inline void ax25_put_route(ax25_route *ax25_rt)
|
||||
{
|
||||
if (atomic_dec_and_test(&ax25_rt->refcount))
|
||||
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
|
||||
index 235c7811a86a..408d76f47bd2 100644
|
||||
--- a/include/net/inetpeer.h
|
||||
+++ b/include/net/inetpeer.h
|
||||
@@ -40,6 +40,7 @@ struct inet_peer {
|
||||
|
||||
u32 metrics[RTAX_MAX];
|
||||
u32 rate_tokens; /* rate limiting for ICMP */
|
||||
+ u32 n_redirects;
|
||||
unsigned long rate_last;
|
||||
union {
|
||||
struct list_head gc_list;
|
||||
diff --git a/include/net/tcp.h b/include/net/tcp.h
|
||||
index c3f4f6a9e6c3..fed2a78fb8cb 100644
|
||||
--- a/include/net/tcp.h
|
||||
+++ b/include/net/tcp.h
|
||||
@@ -1526,6 +1526,7 @@ static inline void tcp_write_queue_purge(struct sock *sk)
|
||||
sk_wmem_free_skb(sk, skb);
|
||||
sk_mem_reclaim(sk);
|
||||
tcp_clear_all_retrans_hints(tcp_sk(sk));
|
||||
+ inet_csk(sk)->icsk_backoff = 0;
|
||||
}
|
||||
|
||||
static inline struct sk_buff *tcp_write_queue_head(const struct sock *sk)
|
||||
diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c
|
||||
index 2fa3be965101..cd9a24e5b97a 100644
|
||||
--- a/net/ax25/ax25_ip.c
|
||||
+++ b/net/ax25/ax25_ip.c
|
||||
@@ -114,6 +114,7 @@ netdev_tx_t ax25_ip_xmit(struct sk_buff *skb)
|
||||
dst = (ax25_address *)(bp + 1);
|
||||
src = (ax25_address *)(bp + 8);
|
||||
|
||||
+ ax25_route_lock_use();
|
||||
route = ax25_get_route(dst, NULL);
|
||||
if (route) {
|
||||
digipeat = route->digipeat;
|
||||
@@ -206,9 +207,8 @@ netdev_tx_t ax25_ip_xmit(struct sk_buff *skb)
|
||||
ax25_queue_xmit(skb, dev);
|
||||
|
||||
put:
|
||||
- if (route)
|
||||
- ax25_put_route(route);
|
||||
|
||||
+ ax25_route_lock_unuse();
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c
|
||||
index d39097737e38..149f82bd83fd 100644
|
||||
--- a/net/ax25/ax25_route.c
|
||||
+++ b/net/ax25/ax25_route.c
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <linux/export.h>
|
||||
|
||||
static ax25_route *ax25_route_list;
|
||||
-static DEFINE_RWLOCK(ax25_route_lock);
|
||||
+DEFINE_RWLOCK(ax25_route_lock);
|
||||
|
||||
void ax25_rt_device_down(struct net_device *dev)
|
||||
{
|
||||
@@ -349,6 +349,7 @@ const struct file_operations ax25_route_fops = {
|
||||
* Find AX.25 route
|
||||
*
|
||||
* Only routes with a reference count of zero can be destroyed.
|
||||
+ * Must be called with ax25_route_lock read locked.
|
||||
*/
|
||||
ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev)
|
||||
{
|
||||
@@ -356,7 +357,6 @@ ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev)
|
||||
ax25_route *ax25_def_rt = NULL;
|
||||
ax25_route *ax25_rt;
|
||||
|
||||
- read_lock(&ax25_route_lock);
|
||||
/*
|
||||
* Bind to the physical interface we heard them on, or the default
|
||||
* route if none is found;
|
||||
@@ -379,11 +379,6 @@ ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev)
|
||||
if (ax25_spe_rt != NULL)
|
||||
ax25_rt = ax25_spe_rt;
|
||||
|
||||
- if (ax25_rt != NULL)
|
||||
- ax25_hold_route(ax25_rt);
|
||||
-
|
||||
- read_unlock(&ax25_route_lock);
|
||||
-
|
||||
return ax25_rt;
|
||||
}
|
||||
|
||||
@@ -414,9 +409,12 @@ int ax25_rt_autobind(ax25_cb *ax25, ax25_address *addr)
|
||||
ax25_route *ax25_rt;
|
||||
int err = 0;
|
||||
|
||||
- if ((ax25_rt = ax25_get_route(addr, NULL)) == NULL)
|
||||
+ ax25_route_lock_use();
|
||||
+ ax25_rt = ax25_get_route(addr, NULL);
|
||||
+ if (!ax25_rt) {
|
||||
+ ax25_route_lock_unuse();
|
||||
return -EHOSTUNREACH;
|
||||
-
|
||||
+ }
|
||||
if ((ax25->ax25_dev = ax25_dev_ax25dev(ax25_rt->dev)) == NULL) {
|
||||
err = -EHOSTUNREACH;
|
||||
goto put;
|
||||
@@ -451,8 +449,7 @@ int ax25_rt_autobind(ax25_cb *ax25, ax25_address *addr)
|
||||
}
|
||||
|
||||
put:
|
||||
- ax25_put_route(ax25_rt);
|
||||
-
|
||||
+ ax25_route_lock_unuse();
|
||||
return err;
|
||||
}
|
||||
|
||||
diff --git a/net/core/dev.c b/net/core/dev.c
|
||||
index 071c589f7994..8e187f90c85d 100644
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -6909,7 +6909,7 @@ static netdev_features_t netdev_sync_upper_features(struct net_device *lower,
|
||||
netdev_features_t feature;
|
||||
int feature_bit;
|
||||
|
||||
- for_each_netdev_feature(&upper_disables, feature_bit) {
|
||||
+ for_each_netdev_feature(upper_disables, feature_bit) {
|
||||
feature = __NETIF_F_BIT(feature_bit);
|
||||
if (!(upper->wanted_features & feature)
|
||||
&& (features & feature)) {
|
||||
@@ -6929,7 +6929,7 @@ static void netdev_sync_lower_features(struct net_device *upper,
|
||||
netdev_features_t feature;
|
||||
int feature_bit;
|
||||
|
||||
- for_each_netdev_feature(&upper_disables, feature_bit) {
|
||||
+ for_each_netdev_feature(upper_disables, feature_bit) {
|
||||
feature = __NETIF_F_BIT(feature_bit);
|
||||
if (!(features & feature) && (lower->features & feature)) {
|
||||
netdev_dbg(upper, "Disabling feature %pNF on lower dev %s.\n",
|
||||
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
|
||||
index 11501165f0df..4a71d78d0c6a 100644
|
||||
--- a/net/core/skbuff.c
|
||||
+++ b/net/core/skbuff.c
|
||||
@@ -383,6 +383,8 @@ static void *__netdev_alloc_frag(unsigned int fragsz, gfp_t gfp_mask)
|
||||
*/
|
||||
void *netdev_alloc_frag(unsigned int fragsz)
|
||||
{
|
||||
+ fragsz = SKB_DATA_ALIGN(fragsz);
|
||||
+
|
||||
return __netdev_alloc_frag(fragsz, GFP_ATOMIC | __GFP_COLD);
|
||||
}
|
||||
EXPORT_SYMBOL(netdev_alloc_frag);
|
||||
@@ -396,6 +398,8 @@ static void *__napi_alloc_frag(unsigned int fragsz, gfp_t gfp_mask)
|
||||
|
||||
void *napi_alloc_frag(unsigned int fragsz)
|
||||
{
|
||||
+ fragsz = SKB_DATA_ALIGN(fragsz);
|
||||
+
|
||||
return __napi_alloc_frag(fragsz, GFP_ATOMIC | __GFP_COLD);
|
||||
}
|
||||
EXPORT_SYMBOL(napi_alloc_frag);
|
||||
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
|
||||
index 86fa45809540..0c5862914f05 100644
|
||||
--- a/net/ipv4/inetpeer.c
|
||||
+++ b/net/ipv4/inetpeer.c
|
||||
@@ -448,6 +448,7 @@ relookup:
|
||||
atomic_set(&p->rid, 0);
|
||||
p->metrics[RTAX_LOCK-1] = INETPEER_METRICS_NEW;
|
||||
p->rate_tokens = 0;
|
||||
+ p->n_redirects = 0;
|
||||
/* 60*HZ is arbitrary, but chosen enough high so that the first
|
||||
* calculation of tokens is at its maximum.
|
||||
*/
|
||||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
|
||||
index 890141d32ab9..d606de65e2d0 100644
|
||||
--- a/net/ipv4/route.c
|
||||
+++ b/net/ipv4/route.c
|
||||
@@ -882,13 +882,15 @@ void ip_rt_send_redirect(struct sk_buff *skb)
|
||||
/* No redirected packets during ip_rt_redirect_silence;
|
||||
* reset the algorithm.
|
||||
*/
|
||||
- if (time_after(jiffies, peer->rate_last + ip_rt_redirect_silence))
|
||||
+ if (time_after(jiffies, peer->rate_last + ip_rt_redirect_silence)) {
|
||||
peer->rate_tokens = 0;
|
||||
+ peer->n_redirects = 0;
|
||||
+ }
|
||||
|
||||
/* Too many ignored redirects; do not send anything
|
||||
* set dst.rate_last to the last seen redirected packet.
|
||||
*/
|
||||
- if (peer->rate_tokens >= ip_rt_redirect_number) {
|
||||
+ if (peer->n_redirects >= ip_rt_redirect_number) {
|
||||
peer->rate_last = jiffies;
|
||||
goto out_put_peer;
|
||||
}
|
||||
@@ -905,6 +907,7 @@ void ip_rt_send_redirect(struct sk_buff *skb)
|
||||
icmp_send(skb, ICMP_REDIRECT, ICMP_REDIR_HOST, gw);
|
||||
peer->rate_last = jiffies;
|
||||
++peer->rate_tokens;
|
||||
+ ++peer->n_redirects;
|
||||
#ifdef CONFIG_IP_ROUTE_VERBOSE
|
||||
if (log_martians &&
|
||||
peer->rate_tokens == ip_rt_redirect_number)
|
||||
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
|
||||
index 9de77d946f5a..2ededb32b754 100644
|
||||
--- a/net/ipv4/tcp.c
|
||||
+++ b/net/ipv4/tcp.c
|
||||
@@ -2292,7 +2292,6 @@ int tcp_disconnect(struct sock *sk, int flags)
|
||||
tp->write_seq += tp->max_window + 2;
|
||||
if (tp->write_seq == 0)
|
||||
tp->write_seq = 1;
|
||||
- icsk->icsk_backoff = 0;
|
||||
tp->snd_cwnd = 2;
|
||||
icsk->icsk_probes_out = 0;
|
||||
tp->packets_out = 0;
|
||||
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
|
||||
index 1ea0c91ba994..82c1064ff4aa 100644
|
||||
--- a/net/ipv4/tcp_ipv4.c
|
||||
+++ b/net/ipv4/tcp_ipv4.c
|
||||
@@ -464,14 +464,15 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
|
||||
if (sock_owned_by_user(sk))
|
||||
break;
|
||||
|
||||
+ skb = tcp_write_queue_head(sk);
|
||||
+ if (WARN_ON_ONCE(!skb))
|
||||
+ break;
|
||||
+
|
||||
icsk->icsk_backoff--;
|
||||
icsk->icsk_rto = tp->srtt_us ? __tcp_set_rto(tp) :
|
||||
TCP_TIMEOUT_INIT;
|
||||
icsk->icsk_rto = inet_csk_rto_backoff(icsk, TCP_RTO_MAX);
|
||||
|
||||
- skb = tcp_write_queue_head(sk);
|
||||
- BUG_ON(!skb);
|
||||
-
|
||||
remaining = icsk->icsk_rto -
|
||||
min(icsk->icsk_rto,
|
||||
tcp_time_stamp - tcp_skb_timestamp(skb));
|
||||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
|
||||
index 8f79f0414bc3..4ce7f9195151 100644
|
||||
--- a/net/ipv6/addrconf.c
|
||||
+++ b/net/ipv6/addrconf.c
|
||||
@@ -1074,7 +1074,8 @@ check_cleanup_prefix_route(struct inet6_ifaddr *ifp, unsigned long *expires)
|
||||
list_for_each_entry(ifa, &idev->addr_list, if_list) {
|
||||
if (ifa == ifp)
|
||||
continue;
|
||||
- if (!ipv6_prefix_equal(&ifa->addr, &ifp->addr,
|
||||
+ if (ifa->prefix_len != ifp->prefix_len ||
|
||||
+ !ipv6_prefix_equal(&ifa->addr, &ifp->addr,
|
||||
ifp->prefix_len))
|
||||
continue;
|
||||
if (ifa->flags & (IFA_F_PERMANENT | IFA_F_NOPREFIXROUTE))
|
||||
diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
|
||||
index 008f3424dcbc..102bf9194662 100644
|
||||
--- a/net/vmw_vsock/vmci_transport.c
|
||||
+++ b/net/vmw_vsock/vmci_transport.c
|
||||
@@ -1656,6 +1656,10 @@ static void vmci_transport_cleanup(struct work_struct *work)
|
||||
|
||||
static void vmci_transport_destruct(struct vsock_sock *vsk)
|
||||
{
|
||||
+ /* transport can be NULL if we hit a failure at init() time */
|
||||
+ if (!vmci_trans(vsk))
|
||||
+ return;
|
||||
+
|
||||
/* Ensure that the detach callback doesn't use the sk/vsk
|
||||
* we are about to destruct.
|
||||
*/
|
||||
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
|
||||
index 007721632b07..0a7e5d992bba 100644
|
||||
--- a/net/x25/af_x25.c
|
||||
+++ b/net/x25/af_x25.c
|
||||
@@ -352,17 +352,15 @@ static unsigned int x25_new_lci(struct x25_neigh *nb)
|
||||
unsigned int lci = 1;
|
||||
struct sock *sk;
|
||||
|
||||
- read_lock_bh(&x25_list_lock);
|
||||
-
|
||||
- while ((sk = __x25_find_socket(lci, nb)) != NULL) {
|
||||
+ while ((sk = x25_find_socket(lci, nb)) != NULL) {
|
||||
sock_put(sk);
|
||||
if (++lci == 4096) {
|
||||
lci = 0;
|
||||
break;
|
||||
}
|
||||
+ cond_resched();
|
||||
}
|
||||
|
||||
- read_unlock_bh(&x25_list_lock);
|
||||
return lci;
|
||||
}
|
||||
|
2707
patch/kernel/cubox-default/patch-4.9.160-161.patch
Normal file
2707
patch/kernel/cubox-default/patch-4.9.160-161.patch
Normal file
File diff suppressed because it is too large
Load diff
853
patch/kernel/cubox-default/patch-4.9.161-162.patch
Normal file
853
patch/kernel/cubox-default/patch-4.9.161-162.patch
Normal file
|
@ -0,0 +1,853 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 239b74a7147b5..fce163d091393 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
-SUBLEVEL = 161
|
||||
+SUBLEVEL = 162
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
diff --git a/arch/arc/include/asm/bitops.h b/arch/arc/include/asm/bitops.h
|
||||
index 8da87feec59aa..99e6d8948f4ac 100644
|
||||
--- a/arch/arc/include/asm/bitops.h
|
||||
+++ b/arch/arc/include/asm/bitops.h
|
||||
@@ -340,7 +340,7 @@ static inline __attribute__ ((const)) int __fls(unsigned long x)
|
||||
/*
|
||||
* __ffs: Similar to ffs, but zero based (0-31)
|
||||
*/
|
||||
-static inline __attribute__ ((const)) int __ffs(unsigned long word)
|
||||
+static inline __attribute__ ((const)) unsigned long __ffs(unsigned long word)
|
||||
{
|
||||
if (!word)
|
||||
return word;
|
||||
@@ -400,9 +400,9 @@ static inline __attribute__ ((const)) int ffs(unsigned long x)
|
||||
/*
|
||||
* __ffs: Similar to ffs, but zero based (0-31)
|
||||
*/
|
||||
-static inline __attribute__ ((const)) int __ffs(unsigned long x)
|
||||
+static inline __attribute__ ((const)) unsigned long __ffs(unsigned long x)
|
||||
{
|
||||
- int n;
|
||||
+ unsigned long n;
|
||||
|
||||
asm volatile(
|
||||
" ffs.f %0, %1 \n" /* 0:31; 31(Z) if src 0 */
|
||||
diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
|
||||
index 334459ad145b4..90863245df53b 100644
|
||||
--- a/arch/powerpc/include/asm/epapr_hcalls.h
|
||||
+++ b/arch/powerpc/include/asm/epapr_hcalls.h
|
||||
@@ -508,7 +508,7 @@ static unsigned long epapr_hypercall(unsigned long *in,
|
||||
|
||||
static inline long epapr_hypercall0_1(unsigned int nr, unsigned long *r2)
|
||||
{
|
||||
- unsigned long in[8];
|
||||
+ unsigned long in[8] = {0};
|
||||
unsigned long out[8];
|
||||
unsigned long r;
|
||||
|
||||
@@ -520,7 +520,7 @@ static inline long epapr_hypercall0_1(unsigned int nr, unsigned long *r2)
|
||||
|
||||
static inline long epapr_hypercall0(unsigned int nr)
|
||||
{
|
||||
- unsigned long in[8];
|
||||
+ unsigned long in[8] = {0};
|
||||
unsigned long out[8];
|
||||
|
||||
return epapr_hypercall(in, out, nr);
|
||||
@@ -528,7 +528,7 @@ static inline long epapr_hypercall0(unsigned int nr)
|
||||
|
||||
static inline long epapr_hypercall1(unsigned int nr, unsigned long p1)
|
||||
{
|
||||
- unsigned long in[8];
|
||||
+ unsigned long in[8] = {0};
|
||||
unsigned long out[8];
|
||||
|
||||
in[0] = p1;
|
||||
@@ -538,7 +538,7 @@ static inline long epapr_hypercall1(unsigned int nr, unsigned long p1)
|
||||
static inline long epapr_hypercall2(unsigned int nr, unsigned long p1,
|
||||
unsigned long p2)
|
||||
{
|
||||
- unsigned long in[8];
|
||||
+ unsigned long in[8] = {0};
|
||||
unsigned long out[8];
|
||||
|
||||
in[0] = p1;
|
||||
@@ -549,7 +549,7 @@ static inline long epapr_hypercall2(unsigned int nr, unsigned long p1,
|
||||
static inline long epapr_hypercall3(unsigned int nr, unsigned long p1,
|
||||
unsigned long p2, unsigned long p3)
|
||||
{
|
||||
- unsigned long in[8];
|
||||
+ unsigned long in[8] = {0};
|
||||
unsigned long out[8];
|
||||
|
||||
in[0] = p1;
|
||||
@@ -562,7 +562,7 @@ static inline long epapr_hypercall4(unsigned int nr, unsigned long p1,
|
||||
unsigned long p2, unsigned long p3,
|
||||
unsigned long p4)
|
||||
{
|
||||
- unsigned long in[8];
|
||||
+ unsigned long in[8] = {0};
|
||||
unsigned long out[8];
|
||||
|
||||
in[0] = p1;
|
||||
diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
|
||||
index a8d85a687cf46..2177c7551ff77 100644
|
||||
--- a/arch/x86/include/asm/uaccess.h
|
||||
+++ b/arch/x86/include/asm/uaccess.h
|
||||
@@ -292,8 +292,7 @@ do { \
|
||||
__put_user_asm(x, ptr, retval, "l", "k", "ir", errret); \
|
||||
break; \
|
||||
case 8: \
|
||||
- __put_user_asm_u64((__typeof__(*ptr))(x), ptr, retval, \
|
||||
- errret); \
|
||||
+ __put_user_asm_u64(x, ptr, retval, errret); \
|
||||
break; \
|
||||
default: \
|
||||
__put_user_bad(); \
|
||||
@@ -427,8 +426,10 @@ do { \
|
||||
#define __put_user_nocheck(x, ptr, size) \
|
||||
({ \
|
||||
int __pu_err; \
|
||||
+ __typeof__(*(ptr)) __pu_val; \
|
||||
+ __pu_val = x; \
|
||||
__uaccess_begin(); \
|
||||
- __put_user_size((x), (ptr), (size), __pu_err, -EFAULT); \
|
||||
+ __put_user_size(__pu_val, (ptr), (size), __pu_err, -EFAULT);\
|
||||
__uaccess_end(); \
|
||||
__builtin_expect(__pu_err, 0); \
|
||||
})
|
||||
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
|
||||
index c8efacf2e65f1..01eb0451b96d3 100644
|
||||
--- a/arch/x86/kvm/svm.c
|
||||
+++ b/arch/x86/kvm/svm.c
|
||||
@@ -2862,6 +2862,14 @@ static int nested_svm_vmexit(struct vcpu_svm *svm)
|
||||
kvm_mmu_reset_context(&svm->vcpu);
|
||||
kvm_mmu_load(&svm->vcpu);
|
||||
|
||||
+ /*
|
||||
+ * Drop what we picked up for L2 via svm_complete_interrupts() so it
|
||||
+ * doesn't end up in L1.
|
||||
+ */
|
||||
+ svm->vcpu.arch.nmi_injected = false;
|
||||
+ kvm_clear_exception_queue(&svm->vcpu);
|
||||
+ kvm_clear_interrupt_queue(&svm->vcpu);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3932,25 +3940,14 @@ static int avic_incomplete_ipi_interception(struct vcpu_svm *svm)
|
||||
kvm_lapic_reg_write(apic, APIC_ICR, icrl);
|
||||
break;
|
||||
case AVIC_IPI_FAILURE_TARGET_NOT_RUNNING: {
|
||||
- int i;
|
||||
- struct kvm_vcpu *vcpu;
|
||||
- struct kvm *kvm = svm->vcpu.kvm;
|
||||
struct kvm_lapic *apic = svm->vcpu.arch.apic;
|
||||
|
||||
/*
|
||||
- * At this point, we expect that the AVIC HW has already
|
||||
- * set the appropriate IRR bits on the valid target
|
||||
- * vcpus. So, we just need to kick the appropriate vcpu.
|
||||
+ * Update ICR high and low, then emulate sending IPI,
|
||||
+ * which is handled when writing APIC_ICR.
|
||||
*/
|
||||
- kvm_for_each_vcpu(i, vcpu, kvm) {
|
||||
- bool m = kvm_apic_match_dest(vcpu, apic,
|
||||
- icrl & KVM_APIC_SHORT_MASK,
|
||||
- GET_APIC_DEST_FIELD(icrh),
|
||||
- icrl & KVM_APIC_DEST_MASK);
|
||||
-
|
||||
- if (m && !avic_vcpu_is_running(vcpu))
|
||||
- kvm_vcpu_wake_up(vcpu);
|
||||
- }
|
||||
+ kvm_lapic_reg_write(apic, APIC_ICR2, icrh);
|
||||
+ kvm_lapic_reg_write(apic, APIC_ICR, icrl);
|
||||
break;
|
||||
}
|
||||
case AVIC_IPI_FAILURE_INVALID_TARGET:
|
||||
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
|
||||
index 344f34746c103..28ce17405aab4 100644
|
||||
--- a/drivers/block/loop.c
|
||||
+++ b/drivers/block/loop.c
|
||||
@@ -81,6 +81,7 @@
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
static DEFINE_IDR(loop_index_idr);
|
||||
+static DEFINE_MUTEX(loop_index_mutex);
|
||||
static DEFINE_MUTEX(loop_ctl_mutex);
|
||||
|
||||
static int max_part;
|
||||
@@ -1559,11 +1560,9 @@ static int lo_compat_ioctl(struct block_device *bdev, fmode_t mode,
|
||||
static int lo_open(struct block_device *bdev, fmode_t mode)
|
||||
{
|
||||
struct loop_device *lo;
|
||||
- int err;
|
||||
+ int err = 0;
|
||||
|
||||
- err = mutex_lock_killable(&loop_ctl_mutex);
|
||||
- if (err)
|
||||
- return err;
|
||||
+ mutex_lock(&loop_index_mutex);
|
||||
lo = bdev->bd_disk->private_data;
|
||||
if (!lo) {
|
||||
err = -ENXIO;
|
||||
@@ -1572,20 +1571,18 @@ static int lo_open(struct block_device *bdev, fmode_t mode)
|
||||
|
||||
atomic_inc(&lo->lo_refcnt);
|
||||
out:
|
||||
- mutex_unlock(&loop_ctl_mutex);
|
||||
+ mutex_unlock(&loop_index_mutex);
|
||||
return err;
|
||||
}
|
||||
|
||||
-static void lo_release(struct gendisk *disk, fmode_t mode)
|
||||
+static void __lo_release(struct loop_device *lo)
|
||||
{
|
||||
- struct loop_device *lo;
|
||||
int err;
|
||||
|
||||
- mutex_lock(&loop_ctl_mutex);
|
||||
- lo = disk->private_data;
|
||||
if (atomic_dec_return(&lo->lo_refcnt))
|
||||
- goto out_unlock;
|
||||
+ return;
|
||||
|
||||
+ mutex_lock(&loop_ctl_mutex);
|
||||
if (lo->lo_flags & LO_FLAGS_AUTOCLEAR) {
|
||||
/*
|
||||
* In autoclear mode, stop the loop thread
|
||||
@@ -1602,10 +1599,16 @@ static void lo_release(struct gendisk *disk, fmode_t mode)
|
||||
loop_flush(lo);
|
||||
}
|
||||
|
||||
-out_unlock:
|
||||
mutex_unlock(&loop_ctl_mutex);
|
||||
}
|
||||
|
||||
+static void lo_release(struct gendisk *disk, fmode_t mode)
|
||||
+{
|
||||
+ mutex_lock(&loop_index_mutex);
|
||||
+ __lo_release(disk->private_data);
|
||||
+ mutex_unlock(&loop_index_mutex);
|
||||
+}
|
||||
+
|
||||
static const struct block_device_operations lo_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = lo_open,
|
||||
@@ -1889,7 +1892,7 @@ static struct kobject *loop_probe(dev_t dev, int *part, void *data)
|
||||
struct kobject *kobj;
|
||||
int err;
|
||||
|
||||
- mutex_lock(&loop_ctl_mutex);
|
||||
+ mutex_lock(&loop_index_mutex);
|
||||
err = loop_lookup(&lo, MINOR(dev) >> part_shift);
|
||||
if (err < 0)
|
||||
err = loop_add(&lo, MINOR(dev) >> part_shift);
|
||||
@@ -1897,7 +1900,7 @@ static struct kobject *loop_probe(dev_t dev, int *part, void *data)
|
||||
kobj = NULL;
|
||||
else
|
||||
kobj = get_disk(lo->lo_disk);
|
||||
- mutex_unlock(&loop_ctl_mutex);
|
||||
+ mutex_unlock(&loop_index_mutex);
|
||||
|
||||
*part = 0;
|
||||
return kobj;
|
||||
@@ -1907,13 +1910,9 @@ static long loop_control_ioctl(struct file *file, unsigned int cmd,
|
||||
unsigned long parm)
|
||||
{
|
||||
struct loop_device *lo;
|
||||
- int ret;
|
||||
-
|
||||
- ret = mutex_lock_killable(&loop_ctl_mutex);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
+ int ret = -ENOSYS;
|
||||
|
||||
- ret = -ENOSYS;
|
||||
+ mutex_lock(&loop_index_mutex);
|
||||
switch (cmd) {
|
||||
case LOOP_CTL_ADD:
|
||||
ret = loop_lookup(&lo, parm);
|
||||
@@ -1927,15 +1926,19 @@ static long loop_control_ioctl(struct file *file, unsigned int cmd,
|
||||
ret = loop_lookup(&lo, parm);
|
||||
if (ret < 0)
|
||||
break;
|
||||
+ mutex_lock(&loop_ctl_mutex);
|
||||
if (lo->lo_state != Lo_unbound) {
|
||||
ret = -EBUSY;
|
||||
+ mutex_unlock(&loop_ctl_mutex);
|
||||
break;
|
||||
}
|
||||
if (atomic_read(&lo->lo_refcnt) > 0) {
|
||||
ret = -EBUSY;
|
||||
+ mutex_unlock(&loop_ctl_mutex);
|
||||
break;
|
||||
}
|
||||
lo->lo_disk->private_data = NULL;
|
||||
+ mutex_unlock(&loop_ctl_mutex);
|
||||
idr_remove(&loop_index_idr, lo->lo_number);
|
||||
loop_remove(lo);
|
||||
break;
|
||||
@@ -1945,7 +1948,7 @@ static long loop_control_ioctl(struct file *file, unsigned int cmd,
|
||||
break;
|
||||
ret = loop_add(&lo, -1);
|
||||
}
|
||||
- mutex_unlock(&loop_ctl_mutex);
|
||||
+ mutex_unlock(&loop_index_mutex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -2028,10 +2031,10 @@ static int __init loop_init(void)
|
||||
THIS_MODULE, loop_probe, NULL, NULL);
|
||||
|
||||
/* pre-create number of devices given by config or max_loop */
|
||||
- mutex_lock(&loop_ctl_mutex);
|
||||
+ mutex_lock(&loop_index_mutex);
|
||||
for (i = 0; i < nr; i++)
|
||||
loop_add(&lo, i);
|
||||
- mutex_unlock(&loop_ctl_mutex);
|
||||
+ mutex_unlock(&loop_index_mutex);
|
||||
|
||||
printk(KERN_INFO "loop: module loaded\n");
|
||||
return 0;
|
||||
diff --git a/drivers/gpu/drm/msm/msm_rd.c b/drivers/gpu/drm/msm/msm_rd.c
|
||||
index 8487f461f05f3..4823019eb422b 100644
|
||||
--- a/drivers/gpu/drm/msm/msm_rd.c
|
||||
+++ b/drivers/gpu/drm/msm/msm_rd.c
|
||||
@@ -112,7 +112,9 @@ static void rd_write(struct msm_rd_state *rd, const void *buf, int sz)
|
||||
char *fptr = &fifo->buf[fifo->head];
|
||||
int n;
|
||||
|
||||
- wait_event(rd->fifo_event, circ_space(&rd->fifo) > 0);
|
||||
+ wait_event(rd->fifo_event, circ_space(&rd->fifo) > 0 || !rd->open);
|
||||
+ if (!rd->open)
|
||||
+ return;
|
||||
|
||||
n = min(sz, circ_space_to_end(&rd->fifo));
|
||||
memcpy(fptr, ptr, n);
|
||||
@@ -202,7 +204,10 @@ out:
|
||||
static int rd_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct msm_rd_state *rd = inode->i_private;
|
||||
+
|
||||
rd->open = false;
|
||||
+ wake_up_all(&rd->fifo_event);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
|
||||
index e77d79c8cd9f2..6224ad37fd80b 100644
|
||||
--- a/drivers/mmc/host/mmc_spi.c
|
||||
+++ b/drivers/mmc/host/mmc_spi.c
|
||||
@@ -1450,6 +1450,7 @@ static int mmc_spi_probe(struct spi_device *spi)
|
||||
mmc->caps &= ~MMC_CAP_NEEDS_POLL;
|
||||
mmc_gpiod_request_cd_irq(mmc);
|
||||
}
|
||||
+ mmc_detect_change(mmc, 0);
|
||||
|
||||
if (host->pdata && host->pdata->flags & MMC_SPI_USE_RO_GPIO) {
|
||||
has_ro = true;
|
||||
diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c
|
||||
index a0eee72186957..e306342506f1f 100644
|
||||
--- a/drivers/net/ethernet/altera/altera_tse_main.c
|
||||
+++ b/drivers/net/ethernet/altera/altera_tse_main.c
|
||||
@@ -692,8 +692,10 @@ static struct phy_device *connect_local_phy(struct net_device *dev)
|
||||
|
||||
phydev = phy_connect(dev, phy_id_fmt, &altera_tse_adjust_link,
|
||||
priv->phy_iface);
|
||||
- if (IS_ERR(phydev))
|
||||
+ if (IS_ERR(phydev)) {
|
||||
netdev_err(dev, "Could not attach to PHY\n");
|
||||
+ phydev = NULL;
|
||||
+ }
|
||||
|
||||
} else {
|
||||
int ret;
|
||||
diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
|
||||
index 4996228fd7e61..955f658f3b65f 100644
|
||||
--- a/drivers/net/ethernet/ibm/ibmveth.c
|
||||
+++ b/drivers/net/ethernet/ibm/ibmveth.c
|
||||
@@ -1240,7 +1240,6 @@ static int ibmveth_poll(struct napi_struct *napi, int budget)
|
||||
struct iphdr *iph;
|
||||
u16 mss = 0;
|
||||
|
||||
-restart_poll:
|
||||
while (frames_processed < budget) {
|
||||
if (!ibmveth_rxq_pending_buffer(adapter))
|
||||
break;
|
||||
@@ -1338,7 +1337,6 @@ restart_poll:
|
||||
napi_reschedule(napi)) {
|
||||
lpar_rc = h_vio_signal(adapter->vdev->unit_address,
|
||||
VIO_IRQ_DISABLE);
|
||||
- goto restart_poll;
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
|
||||
index 5be6b67492d52..393fd3ed6b94c 100644
|
||||
--- a/drivers/net/usb/asix_devices.c
|
||||
+++ b/drivers/net/usb/asix_devices.c
|
||||
@@ -729,8 +729,13 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
|
||||
asix_read_cmd(dev, AX_CMD_STATMNGSTS_REG, 0, 0, 1, &chipcode, 0);
|
||||
chipcode &= AX_CHIPCODE_MASK;
|
||||
|
||||
- (chipcode == AX_AX88772_CHIPCODE) ? ax88772_hw_reset(dev, 0) :
|
||||
- ax88772a_hw_reset(dev, 0);
|
||||
+ ret = (chipcode == AX_AX88772_CHIPCODE) ? ax88772_hw_reset(dev, 0) :
|
||||
+ ax88772a_hw_reset(dev, 0);
|
||||
+
|
||||
+ if (ret < 0) {
|
||||
+ netdev_dbg(dev->net, "Failed to reset AX88772: %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
|
||||
/* Read PHYID register *AFTER* the PHY was reset properly */
|
||||
phyid = asix_get_phyid(dev);
|
||||
diff --git a/drivers/scsi/csiostor/csio_attr.c b/drivers/scsi/csiostor/csio_attr.c
|
||||
index 2d1c4ebd40f91..6587f20cff1a1 100644
|
||||
--- a/drivers/scsi/csiostor/csio_attr.c
|
||||
+++ b/drivers/scsi/csiostor/csio_attr.c
|
||||
@@ -582,12 +582,12 @@ csio_vport_create(struct fc_vport *fc_vport, bool disable)
|
||||
}
|
||||
|
||||
fc_vport_set_state(fc_vport, FC_VPORT_INITIALIZING);
|
||||
+ ln->fc_vport = fc_vport;
|
||||
|
||||
if (csio_fcoe_alloc_vnp(hw, ln))
|
||||
goto error;
|
||||
|
||||
*(struct csio_lnode **)fc_vport->dd_data = ln;
|
||||
- ln->fc_vport = fc_vport;
|
||||
if (!fc_vport->node_name)
|
||||
fc_vport->node_name = wwn_to_u64(csio_ln_wwnn(ln));
|
||||
if (!fc_vport->port_name)
|
||||
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
|
||||
index 12886f96b2860..7be581f7c35d1 100644
|
||||
--- a/drivers/scsi/libsas/sas_expander.c
|
||||
+++ b/drivers/scsi/libsas/sas_expander.c
|
||||
@@ -818,6 +818,7 @@ static struct domain_device *sas_ex_discover_end_dev(
|
||||
rphy = sas_end_device_alloc(phy->port);
|
||||
if (!rphy)
|
||||
goto out_free;
|
||||
+ rphy->identify.phy_identifier = phy_id;
|
||||
|
||||
child->rphy = rphy;
|
||||
get_device(&rphy->dev);
|
||||
@@ -845,6 +846,7 @@ static struct domain_device *sas_ex_discover_end_dev(
|
||||
|
||||
child->rphy = rphy;
|
||||
get_device(&rphy->dev);
|
||||
+ rphy->identify.phy_identifier = phy_id;
|
||||
sas_fill_in_rphy(child, rphy);
|
||||
|
||||
list_add_tail(&child->disco_list_node, &parent->port->disco_list);
|
||||
diff --git a/drivers/thermal/int340x_thermal/processor_thermal_device.c b/drivers/thermal/int340x_thermal/processor_thermal_device.c
|
||||
index ff3b36f339e34..1fdf6fd24cdff 100644
|
||||
--- a/drivers/thermal/int340x_thermal/processor_thermal_device.c
|
||||
+++ b/drivers/thermal/int340x_thermal/processor_thermal_device.c
|
||||
@@ -77,7 +77,12 @@ static ssize_t power_limit_##index##_##suffix##_show(struct device *dev, \
|
||||
struct pci_dev *pci_dev; \
|
||||
struct platform_device *pdev; \
|
||||
struct proc_thermal_device *proc_dev; \
|
||||
-\
|
||||
+ \
|
||||
+ if (proc_thermal_emum_mode == PROC_THERMAL_NONE) { \
|
||||
+ dev_warn(dev, "Attempted to get power limit before device was initialized!\n"); \
|
||||
+ return 0; \
|
||||
+ } \
|
||||
+ \
|
||||
if (proc_thermal_emum_mode == PROC_THERMAL_PLATFORM_DEV) { \
|
||||
pdev = to_platform_device(dev); \
|
||||
proc_dev = platform_get_drvdata(pdev); \
|
||||
@@ -291,11 +296,6 @@ static int proc_thermal_add(struct device *dev,
|
||||
*priv = proc_priv;
|
||||
|
||||
ret = proc_thermal_read_ppcc(proc_priv);
|
||||
- if (!ret) {
|
||||
- ret = sysfs_create_group(&dev->kobj,
|
||||
- &power_limit_attribute_group);
|
||||
-
|
||||
- }
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -309,8 +309,7 @@ static int proc_thermal_add(struct device *dev,
|
||||
|
||||
proc_priv->int340x_zone = int340x_thermal_zone_add(adev, ops);
|
||||
if (IS_ERR(proc_priv->int340x_zone)) {
|
||||
- ret = PTR_ERR(proc_priv->int340x_zone);
|
||||
- goto remove_group;
|
||||
+ return PTR_ERR(proc_priv->int340x_zone);
|
||||
} else
|
||||
ret = 0;
|
||||
|
||||
@@ -324,9 +323,6 @@ static int proc_thermal_add(struct device *dev,
|
||||
|
||||
remove_zone:
|
||||
int340x_thermal_zone_remove(proc_priv->int340x_zone);
|
||||
-remove_group:
|
||||
- sysfs_remove_group(&proc_priv->dev->kobj,
|
||||
- &power_limit_attribute_group);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -357,7 +353,10 @@ static int int3401_add(struct platform_device *pdev)
|
||||
platform_set_drvdata(pdev, proc_priv);
|
||||
proc_thermal_emum_mode = PROC_THERMAL_PLATFORM_DEV;
|
||||
|
||||
- return 0;
|
||||
+ dev_info(&pdev->dev, "Creating sysfs group for PROC_THERMAL_PLATFORM_DEV\n");
|
||||
+
|
||||
+ return sysfs_create_group(&pdev->dev.kobj,
|
||||
+ &power_limit_attribute_group);
|
||||
}
|
||||
|
||||
static int int3401_remove(struct platform_device *pdev)
|
||||
@@ -416,7 +415,7 @@ static int proc_thermal_pci_probe(struct pci_dev *pdev,
|
||||
proc_priv->soc_dts = intel_soc_dts_iosf_init(
|
||||
INTEL_SOC_DTS_INTERRUPT_MSI, 2, 0);
|
||||
|
||||
- if (proc_priv->soc_dts && pdev->irq) {
|
||||
+ if (!IS_ERR(proc_priv->soc_dts) && pdev->irq) {
|
||||
ret = pci_enable_msi(pdev);
|
||||
if (!ret) {
|
||||
ret = request_threaded_irq(pdev->irq, NULL,
|
||||
@@ -434,7 +433,10 @@ static int proc_thermal_pci_probe(struct pci_dev *pdev,
|
||||
dev_err(&pdev->dev, "No auxiliary DTSs enabled\n");
|
||||
}
|
||||
|
||||
- return 0;
|
||||
+ dev_info(&pdev->dev, "Creating sysfs group for PROC_THERMAL_PCI\n");
|
||||
+
|
||||
+ return sysfs_create_group(&pdev->dev.kobj,
|
||||
+ &power_limit_attribute_group);
|
||||
}
|
||||
|
||||
static void proc_thermal_pci_remove(struct pci_dev *pdev)
|
||||
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
|
||||
index 5c471c3481bdf..800996522fdc2 100644
|
||||
--- a/drivers/tty/serial/fsl_lpuart.c
|
||||
+++ b/drivers/tty/serial/fsl_lpuart.c
|
||||
@@ -1494,7 +1494,7 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios,
|
||||
}
|
||||
|
||||
/* ask the core to calculate the divisor */
|
||||
- baud = uart_get_baud_rate(port, termios, old, 50, port->uartclk / 16);
|
||||
+ baud = uart_get_baud_rate(port, termios, old, 50, port->uartclk / 4);
|
||||
|
||||
spin_lock_irqsave(&sport->port.lock, flags);
|
||||
|
||||
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
|
||||
index ed6b9bfe37595..712bd450f8573 100644
|
||||
--- a/drivers/usb/dwc3/gadget.c
|
||||
+++ b/drivers/usb/dwc3/gadget.c
|
||||
@@ -1705,6 +1705,7 @@ static int __dwc3_gadget_start(struct dwc3 *dwc)
|
||||
|
||||
/* begin to receive SETUP packets */
|
||||
dwc->ep0state = EP0_SETUP_PHASE;
|
||||
+ dwc->link_state = DWC3_LINK_STATE_SS_DIS;
|
||||
dwc3_ep0_out_start(dwc);
|
||||
|
||||
dwc3_gadget_enable_irq(dwc);
|
||||
@@ -3096,6 +3097,8 @@ int dwc3_gadget_suspend(struct dwc3 *dwc)
|
||||
dwc3_disconnect_gadget(dwc);
|
||||
__dwc3_gadget_stop(dwc);
|
||||
|
||||
+ synchronize_irq(dwc->irq_gadget);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c
|
||||
index 8784fa12ea2c6..6e9d958004a0d 100644
|
||||
--- a/drivers/usb/gadget/function/f_sourcesink.c
|
||||
+++ b/drivers/usb/gadget/function/f_sourcesink.c
|
||||
@@ -842,7 +842,7 @@ static struct usb_function *source_sink_alloc_func(
|
||||
|
||||
ss = kzalloc(sizeof(*ss), GFP_KERNEL);
|
||||
if (!ss)
|
||||
- return NULL;
|
||||
+ return ERR_PTR(-ENOMEM);
|
||||
|
||||
ss_opts = container_of(fi, struct f_ss_opts, func_inst);
|
||||
|
||||
diff --git a/fs/direct-io.c b/fs/direct-io.c
|
||||
index 07cc38ec66ca6..fc90f0c33cbe4 100644
|
||||
--- a/fs/direct-io.c
|
||||
+++ b/fs/direct-io.c
|
||||
@@ -616,6 +616,7 @@ static int get_more_blocks(struct dio *dio, struct dio_submit *sdio,
|
||||
unsigned long fs_count; /* Number of filesystem-sized blocks */
|
||||
int create;
|
||||
unsigned int i_blkbits = sdio->blkbits + sdio->blkfactor;
|
||||
+ loff_t i_size;
|
||||
|
||||
/*
|
||||
* If there was a memory error and we've overwritten all the
|
||||
@@ -645,8 +646,8 @@ static int get_more_blocks(struct dio *dio, struct dio_submit *sdio,
|
||||
*/
|
||||
create = dio->op == REQ_OP_WRITE;
|
||||
if (dio->flags & DIO_SKIP_HOLES) {
|
||||
- if (fs_startblk <= ((i_size_read(dio->inode) - 1) >>
|
||||
- i_blkbits))
|
||||
+ i_size = i_size_read(dio->inode);
|
||||
+ if (i_size && fs_startblk <= (i_size - 1) >> i_blkbits)
|
||||
create = 0;
|
||||
}
|
||||
|
||||
diff --git a/kernel/locking/rwsem-xadd.c b/kernel/locking/rwsem-xadd.c
|
||||
index a4112dfcd0fb1..be06c45cbe4f9 100644
|
||||
--- a/kernel/locking/rwsem-xadd.c
|
||||
+++ b/kernel/locking/rwsem-xadd.c
|
||||
@@ -195,15 +195,22 @@ static void __rwsem_mark_wake(struct rw_semaphore *sem,
|
||||
woken++;
|
||||
tsk = waiter->task;
|
||||
|
||||
- wake_q_add(wake_q, tsk);
|
||||
+ get_task_struct(tsk);
|
||||
list_del(&waiter->list);
|
||||
/*
|
||||
- * Ensure that the last operation is setting the reader
|
||||
+ * Ensure calling get_task_struct() before setting the reader
|
||||
* waiter to nil such that rwsem_down_read_failed() cannot
|
||||
* race with do_exit() by always holding a reference count
|
||||
* to the task to wakeup.
|
||||
*/
|
||||
smp_store_release(&waiter->task, NULL);
|
||||
+ /*
|
||||
+ * Ensure issuing the wakeup (either by us or someone else)
|
||||
+ * after setting the reader waiter to nil.
|
||||
+ */
|
||||
+ wake_q_add(wake_q, tsk);
|
||||
+ /* wake_q_add() already take the task ref */
|
||||
+ put_task_struct(tsk);
|
||||
}
|
||||
|
||||
adjustment = woken * RWSEM_ACTIVE_READ_BIAS - adjustment;
|
||||
diff --git a/mm/mmap.c b/mm/mmap.c
|
||||
index 283755645d17e..3f2314ad6acd8 100644
|
||||
--- a/mm/mmap.c
|
||||
+++ b/mm/mmap.c
|
||||
@@ -2345,12 +2345,11 @@ int expand_downwards(struct vm_area_struct *vma,
|
||||
struct mm_struct *mm = vma->vm_mm;
|
||||
struct vm_area_struct *prev;
|
||||
unsigned long gap_addr;
|
||||
- int error;
|
||||
+ int error = 0;
|
||||
|
||||
address &= PAGE_MASK;
|
||||
- error = security_mmap_addr(address);
|
||||
- if (error)
|
||||
- return error;
|
||||
+ if (address < mmap_min_addr)
|
||||
+ return -EPERM;
|
||||
|
||||
/* Enforce stack_guard_gap */
|
||||
gap_addr = address - stack_guard_gap;
|
||||
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
|
||||
index 6ef9d32c34f1e..954315e1661df 100644
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -1425,6 +1425,10 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
|
||||
if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))
|
||||
sta->sta.tdls = true;
|
||||
|
||||
+ if (sta->sta.tdls && sdata->vif.type == NL80211_IFTYPE_STATION &&
|
||||
+ !sdata->u.mgd.associated)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
err = sta_apply_parameters(local, sta, params);
|
||||
if (err) {
|
||||
sta_info_free(local, sta);
|
||||
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
|
||||
index af02d2136a066..23f6c8baae951 100644
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -217,7 +217,7 @@ static void ieee80211_handle_mu_mimo_mon(struct ieee80211_sub_if_data *sdata,
|
||||
struct ieee80211_hdr_3addr hdr;
|
||||
u8 category;
|
||||
u8 action_code;
|
||||
- } __packed action;
|
||||
+ } __packed __aligned(2) action;
|
||||
|
||||
if (!sdata)
|
||||
return;
|
||||
@@ -2510,7 +2510,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
|
||||
skb_set_queue_mapping(skb, q);
|
||||
|
||||
if (!--mesh_hdr->ttl) {
|
||||
- IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_ttl);
|
||||
+ if (!is_multicast_ether_addr(hdr->addr1))
|
||||
+ IEEE80211_IFSTA_MESH_CTR_INC(ifmsh,
|
||||
+ dropped_frames_ttl);
|
||||
goto out;
|
||||
}
|
||||
|
||||
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
|
||||
index 36d1d25082e32..7c19d0d2549b1 100644
|
||||
--- a/net/wireless/reg.c
|
||||
+++ b/net/wireless/reg.c
|
||||
@@ -773,7 +773,7 @@ static bool reg_does_bw_fit(const struct ieee80211_freq_range *freq_range,
|
||||
* definitions (the "2.4 GHz band", the "5 GHz band" and the "60GHz band"),
|
||||
* however it is safe for now to assume that a frequency rule should not be
|
||||
* part of a frequency's band if the start freq or end freq are off by more
|
||||
- * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 10 GHz for the
|
||||
+ * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 20 GHz for the
|
||||
* 60 GHz band.
|
||||
* This resolution can be lowered and should be considered as we add
|
||||
* regulatory rule support for other "bands".
|
||||
@@ -788,7 +788,7 @@ static bool freq_in_rule_band(const struct ieee80211_freq_range *freq_range,
|
||||
* with the Channel starting frequency above 45 GHz.
|
||||
*/
|
||||
u32 limit = freq_khz > 45 * ONE_GHZ_IN_KHZ ?
|
||||
- 10 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ;
|
||||
+ 20 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ;
|
||||
if (abs(freq_khz - freq_range->start_freq_khz) <= limit)
|
||||
return true;
|
||||
if (abs(freq_khz - freq_range->end_freq_khz) <= limit)
|
||||
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
|
||||
index 4490a699030b1..555df64d46ffc 100644
|
||||
--- a/sound/core/compress_offload.c
|
||||
+++ b/sound/core/compress_offload.c
|
||||
@@ -529,7 +529,8 @@ static int snd_compress_check_input(struct snd_compr_params *params)
|
||||
{
|
||||
/* first let's check the buffer parameter's */
|
||||
if (params->buffer.fragment_size == 0 ||
|
||||
- params->buffer.fragments > INT_MAX / params->buffer.fragment_size)
|
||||
+ params->buffer.fragments > INT_MAX / params->buffer.fragment_size ||
|
||||
+ params->buffer.fragments == 0)
|
||||
return -EINVAL;
|
||||
|
||||
/* now codec parameters */
|
||||
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
|
||||
index fc57da341d610..136df38c4536c 100644
|
||||
--- a/sound/soc/fsl/imx-audmux.c
|
||||
+++ b/sound/soc/fsl/imx-audmux.c
|
||||
@@ -86,49 +86,49 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
|
||||
if (!buf)
|
||||
return -ENOMEM;
|
||||
|
||||
- ret = snprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n",
|
||||
+ ret = scnprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n",
|
||||
pdcr, ptcr);
|
||||
|
||||
if (ptcr & IMX_AUDMUX_V2_PTCR_TFSDIR)
|
||||
- ret += snprintf(buf + ret, PAGE_SIZE - ret,
|
||||
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret,
|
||||
"TxFS output from %s, ",
|
||||
audmux_port_string((ptcr >> 27) & 0x7));
|
||||
else
|
||||
- ret += snprintf(buf + ret, PAGE_SIZE - ret,
|
||||
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret,
|
||||
"TxFS input, ");
|
||||
|
||||
if (ptcr & IMX_AUDMUX_V2_PTCR_TCLKDIR)
|
||||
- ret += snprintf(buf + ret, PAGE_SIZE - ret,
|
||||
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret,
|
||||
"TxClk output from %s",
|
||||
audmux_port_string((ptcr >> 22) & 0x7));
|
||||
else
|
||||
- ret += snprintf(buf + ret, PAGE_SIZE - ret,
|
||||
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret,
|
||||
"TxClk input");
|
||||
|
||||
- ret += snprintf(buf + ret, PAGE_SIZE - ret, "\n");
|
||||
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret, "\n");
|
||||
|
||||
if (ptcr & IMX_AUDMUX_V2_PTCR_SYN) {
|
||||
- ret += snprintf(buf + ret, PAGE_SIZE - ret,
|
||||
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret,
|
||||
"Port is symmetric");
|
||||
} else {
|
||||
if (ptcr & IMX_AUDMUX_V2_PTCR_RFSDIR)
|
||||
- ret += snprintf(buf + ret, PAGE_SIZE - ret,
|
||||
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret,
|
||||
"RxFS output from %s, ",
|
||||
audmux_port_string((ptcr >> 17) & 0x7));
|
||||
else
|
||||
- ret += snprintf(buf + ret, PAGE_SIZE - ret,
|
||||
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret,
|
||||
"RxFS input, ");
|
||||
|
||||
if (ptcr & IMX_AUDMUX_V2_PTCR_RCLKDIR)
|
||||
- ret += snprintf(buf + ret, PAGE_SIZE - ret,
|
||||
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret,
|
||||
"RxClk output from %s",
|
||||
audmux_port_string((ptcr >> 12) & 0x7));
|
||||
else
|
||||
- ret += snprintf(buf + ret, PAGE_SIZE - ret,
|
||||
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret,
|
||||
"RxClk input");
|
||||
}
|
||||
|
||||
- ret += snprintf(buf + ret, PAGE_SIZE - ret,
|
||||
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret,
|
||||
"\nData received from %s\n",
|
||||
audmux_port_string((pdcr >> 13) & 0x7));
|
||||
|
||||
diff --git a/sound/soc/intel/boards/broadwell.c b/sound/soc/intel/boards/broadwell.c
|
||||
index 7486a0022fdea..993d2c105ae14 100644
|
||||
--- a/sound/soc/intel/boards/broadwell.c
|
||||
+++ b/sound/soc/intel/boards/broadwell.c
|
||||
@@ -191,7 +191,7 @@ static struct snd_soc_dai_link broadwell_rt286_dais[] = {
|
||||
.stream_name = "Loopback",
|
||||
.cpu_dai_name = "Loopback Pin",
|
||||
.platform_name = "haswell-pcm-audio",
|
||||
- .dynamic = 0,
|
||||
+ .dynamic = 1,
|
||||
.codec_name = "snd-soc-dummy",
|
||||
.codec_dai_name = "snd-soc-dummy-dai",
|
||||
.trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
|
||||
diff --git a/sound/soc/intel/boards/haswell.c b/sound/soc/intel/boards/haswell.c
|
||||
index 863f1d5e2a2c9..11d0cc2b0e390 100644
|
||||
--- a/sound/soc/intel/boards/haswell.c
|
||||
+++ b/sound/soc/intel/boards/haswell.c
|
||||
@@ -145,7 +145,7 @@ static struct snd_soc_dai_link haswell_rt5640_dais[] = {
|
||||
.stream_name = "Loopback",
|
||||
.cpu_dai_name = "Loopback Pin",
|
||||
.platform_name = "haswell-pcm-audio",
|
||||
- .dynamic = 0,
|
||||
+ .dynamic = 1,
|
||||
.codec_name = "snd-soc-dummy",
|
||||
.codec_dai_name = "snd-soc-dummy-dai",
|
||||
.trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
|
||||
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
|
||||
index 8bfc534e3b342..ab647f1fe11bd 100644
|
||||
--- a/sound/soc/soc-dapm.c
|
||||
+++ b/sound/soc/soc-dapm.c
|
||||
@@ -1976,19 +1976,19 @@ static ssize_t dapm_widget_power_read_file(struct file *file,
|
||||
out = is_connected_output_ep(w, NULL, NULL);
|
||||
}
|
||||
|
||||
- ret = snprintf(buf, PAGE_SIZE, "%s: %s%s in %d out %d",
|
||||
+ ret = scnprintf(buf, PAGE_SIZE, "%s: %s%s in %d out %d",
|
||||
w->name, w->power ? "On" : "Off",
|
||||
w->force ? " (forced)" : "", in, out);
|
||||
|
||||
if (w->reg >= 0)
|
||||
- ret += snprintf(buf + ret, PAGE_SIZE - ret,
|
||||
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret,
|
||||
" - R%d(0x%x) mask 0x%x",
|
||||
w->reg, w->reg, w->mask << w->shift);
|
||||
|
||||
- ret += snprintf(buf + ret, PAGE_SIZE - ret, "\n");
|
||||
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret, "\n");
|
||||
|
||||
if (w->sname)
|
||||
- ret += snprintf(buf + ret, PAGE_SIZE - ret, " stream %s %s\n",
|
||||
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret, " stream %s %s\n",
|
||||
w->sname,
|
||||
w->active ? "active" : "inactive");
|
||||
|
||||
@@ -2001,7 +2001,7 @@ static ssize_t dapm_widget_power_read_file(struct file *file,
|
||||
if (!p->connect)
|
||||
continue;
|
||||
|
||||
- ret += snprintf(buf + ret, PAGE_SIZE - ret,
|
||||
+ ret += scnprintf(buf + ret, PAGE_SIZE - ret,
|
||||
" %s \"%s\" \"%s\"\n",
|
||||
(rdir == SND_SOC_DAPM_DIR_IN) ? "in" : "out",
|
||||
p->name ? p->name : "static",
|
3813
patch/kernel/cubox-default/patch-4.9.162-163.patch
Normal file
3813
patch/kernel/cubox-default/patch-4.9.162-163.patch
Normal file
File diff suppressed because it is too large
Load diff
879
patch/kernel/cubox-default/patch-4.9.163-164.patch
Normal file
879
patch/kernel/cubox-default/patch-4.9.163-164.patch
Normal file
|
@ -0,0 +1,879 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 8a5330e279ad..e1bcc76388dc 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
-SUBLEVEL = 163
|
||||
+SUBLEVEL = 164
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
diff --git a/arch/x86/events/perf_event.h b/arch/x86/events/perf_event.h
|
||||
index 1ce6ae35f6a2..c42c9d50c8ee 100644
|
||||
--- a/arch/x86/events/perf_event.h
|
||||
+++ b/arch/x86/events/perf_event.h
|
||||
@@ -996,12 +996,12 @@ static inline int intel_pmu_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static inline int intel_cpuc_prepare(struct cpu_hw_event *cpuc, int cpu)
|
||||
+static inline int intel_cpuc_prepare(struct cpu_hw_events *cpuc, int cpu)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static inline void intel_cpuc_finish(struct cpu_hw_event *cpuc)
|
||||
+static inline void intel_cpuc_finish(struct cpu_hw_events *cpuc)
|
||||
{
|
||||
}
|
||||
|
||||
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
|
||||
index b62e6ab66b31..67414616eb35 100644
|
||||
--- a/drivers/md/raid10.c
|
||||
+++ b/drivers/md/raid10.c
|
||||
@@ -4489,7 +4489,6 @@ bio_full:
|
||||
atomic_inc(&r10_bio->remaining);
|
||||
read_bio->bi_next = NULL;
|
||||
generic_make_request(read_bio);
|
||||
- sector_nr += nr_sectors;
|
||||
sectors_done += nr_sectors;
|
||||
if (sector_nr <= last)
|
||||
goto read_more;
|
||||
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
|
||||
index 700567603107..0fc1f73b0d23 100644
|
||||
--- a/drivers/mmc/host/tmio_mmc_pio.c
|
||||
+++ b/drivers/mmc/host/tmio_mmc_pio.c
|
||||
@@ -675,7 +675,7 @@ static bool __tmio_mmc_sdcard_irq(struct tmio_mmc_host *host,
|
||||
return false;
|
||||
}
|
||||
|
||||
-static void tmio_mmc_sdio_irq(int irq, void *devid)
|
||||
+static bool tmio_mmc_sdio_irq(int irq, void *devid)
|
||||
{
|
||||
struct tmio_mmc_host *host = devid;
|
||||
struct mmc_host *mmc = host->mmc;
|
||||
@@ -684,7 +684,7 @@ static void tmio_mmc_sdio_irq(int irq, void *devid)
|
||||
unsigned int sdio_status;
|
||||
|
||||
if (!(pdata->flags & TMIO_MMC_SDIO_IRQ))
|
||||
- return;
|
||||
+ return false;
|
||||
|
||||
status = sd_ctrl_read16(host, CTL_SDIO_STATUS);
|
||||
ireg = status & TMIO_SDIO_MASK_ALL & ~host->sdcard_irq_mask;
|
||||
@@ -697,6 +697,8 @@ static void tmio_mmc_sdio_irq(int irq, void *devid)
|
||||
|
||||
if (mmc->caps & MMC_CAP_SDIO_IRQ && ireg & TMIO_SDIO_STAT_IOIRQ)
|
||||
mmc_signal_sdio_irq(mmc);
|
||||
+
|
||||
+ return ireg;
|
||||
}
|
||||
|
||||
irqreturn_t tmio_mmc_irq(int irq, void *devid)
|
||||
@@ -718,9 +720,10 @@ irqreturn_t tmio_mmc_irq(int irq, void *devid)
|
||||
if (__tmio_mmc_sdcard_irq(host, ireg, status))
|
||||
return IRQ_HANDLED;
|
||||
|
||||
- tmio_mmc_sdio_irq(irq, devid);
|
||||
+ if (tmio_mmc_sdio_irq(irq, devid))
|
||||
+ return IRQ_HANDLED;
|
||||
|
||||
- return IRQ_HANDLED;
|
||||
+ return IRQ_NONE;
|
||||
}
|
||||
EXPORT_SYMBOL(tmio_mmc_irq);
|
||||
|
||||
diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c
|
||||
index dae9dcfa8f36..e5283387097f 100644
|
||||
--- a/drivers/net/ethernet/mellanox/mlx4/cmd.c
|
||||
+++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c
|
||||
@@ -2633,6 +2633,8 @@ int mlx4_cmd_use_events(struct mlx4_dev *dev)
|
||||
if (!priv->cmd.context)
|
||||
return -ENOMEM;
|
||||
|
||||
+ if (mlx4_is_mfunc(dev))
|
||||
+ mutex_lock(&priv->cmd.slave_cmd_mutex);
|
||||
down_write(&priv->cmd.switch_sem);
|
||||
for (i = 0; i < priv->cmd.max_cmds; ++i) {
|
||||
priv->cmd.context[i].token = i;
|
||||
@@ -2658,6 +2660,8 @@ int mlx4_cmd_use_events(struct mlx4_dev *dev)
|
||||
down(&priv->cmd.poll_sem);
|
||||
priv->cmd.use_events = 1;
|
||||
up_write(&priv->cmd.switch_sem);
|
||||
+ if (mlx4_is_mfunc(dev))
|
||||
+ mutex_unlock(&priv->cmd.slave_cmd_mutex);
|
||||
|
||||
return err;
|
||||
}
|
||||
@@ -2670,6 +2674,8 @@ void mlx4_cmd_use_polling(struct mlx4_dev *dev)
|
||||
struct mlx4_priv *priv = mlx4_priv(dev);
|
||||
int i;
|
||||
|
||||
+ if (mlx4_is_mfunc(dev))
|
||||
+ mutex_lock(&priv->cmd.slave_cmd_mutex);
|
||||
down_write(&priv->cmd.switch_sem);
|
||||
priv->cmd.use_events = 0;
|
||||
|
||||
@@ -2677,9 +2683,12 @@ void mlx4_cmd_use_polling(struct mlx4_dev *dev)
|
||||
down(&priv->cmd.event_sem);
|
||||
|
||||
kfree(priv->cmd.context);
|
||||
+ priv->cmd.context = NULL;
|
||||
|
||||
up(&priv->cmd.poll_sem);
|
||||
up_write(&priv->cmd.switch_sem);
|
||||
+ if (mlx4_is_mfunc(dev))
|
||||
+ mutex_unlock(&priv->cmd.slave_cmd_mutex);
|
||||
}
|
||||
|
||||
struct mlx4_cmd_mailbox *mlx4_alloc_cmd_mailbox(struct mlx4_dev *dev)
|
||||
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
|
||||
index 9d1a7d5ae835..79944302dd46 100644
|
||||
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
|
||||
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
|
||||
@@ -2677,13 +2677,13 @@ static int qp_get_mtt_size(struct mlx4_qp_context *qpc)
|
||||
int total_pages;
|
||||
int total_mem;
|
||||
int page_offset = (be32_to_cpu(qpc->params2) >> 6) & 0x3f;
|
||||
+ int tot;
|
||||
|
||||
sq_size = 1 << (log_sq_size + log_sq_sride + 4);
|
||||
rq_size = (srq|rss|xrc) ? 0 : (1 << (log_rq_size + log_rq_stride + 4));
|
||||
total_mem = sq_size + rq_size;
|
||||
- total_pages =
|
||||
- roundup_pow_of_two((total_mem + (page_offset << 6)) >>
|
||||
- page_shift);
|
||||
+ tot = (total_mem + (page_offset << 6)) >> page_shift;
|
||||
+ total_pages = !tot ? 1 : roundup_pow_of_two(tot);
|
||||
|
||||
return total_pages;
|
||||
}
|
||||
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
|
||||
index 71836a7f56b0..480883a7a3e5 100644
|
||||
--- a/drivers/net/ethernet/renesas/ravb_main.c
|
||||
+++ b/drivers/net/ethernet/renesas/ravb_main.c
|
||||
@@ -457,7 +457,7 @@ static int ravb_dmac_init(struct net_device *ndev)
|
||||
RCR_EFFS | RCR_ENCF | RCR_ETS0 | RCR_ESF | 0x18000000, RCR);
|
||||
|
||||
/* Set FIFO size */
|
||||
- ravb_write(ndev, TGC_TQP_AVBMODE1 | 0x00222200, TGC);
|
||||
+ ravb_write(ndev, TGC_TQP_AVBMODE1 | 0x00112200, TGC);
|
||||
|
||||
/* Timestamp enable */
|
||||
ravb_write(ndev, TCCR_TFEN, TCCR);
|
||||
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
|
||||
index 4a2609c4dd6e..72fb55ca27f3 100644
|
||||
--- a/drivers/net/ipvlan/ipvlan_main.c
|
||||
+++ b/drivers/net/ipvlan/ipvlan_main.c
|
||||
@@ -463,7 +463,12 @@ static int ipvlan_nl_changelink(struct net_device *dev,
|
||||
struct ipvl_port *port = ipvlan_port_get_rtnl(ipvlan->phy_dev);
|
||||
int err = 0;
|
||||
|
||||
- if (data && data[IFLA_IPVLAN_MODE]) {
|
||||
+ if (!data)
|
||||
+ return 0;
|
||||
+ if (!ns_capable(dev_net(ipvlan->phy_dev)->user_ns, CAP_NET_ADMIN))
|
||||
+ return -EPERM;
|
||||
+
|
||||
+ if (data[IFLA_IPVLAN_MODE]) {
|
||||
u16 nmode = nla_get_u16(data[IFLA_IPVLAN_MODE]);
|
||||
|
||||
err = ipvlan_set_port_mode(port, nmode);
|
||||
@@ -530,6 +535,8 @@ static int ipvlan_link_new(struct net *src_net, struct net_device *dev,
|
||||
struct ipvl_dev *tmp = netdev_priv(phy_dev);
|
||||
|
||||
phy_dev = tmp->phy_dev;
|
||||
+ if (!ns_capable(dev_net(phy_dev)->user_ns, CAP_NET_ADMIN))
|
||||
+ return -EPERM;
|
||||
} else if (!netif_is_ipvlan_port(phy_dev)) {
|
||||
err = ipvlan_port_create(phy_dev);
|
||||
if (err < 0)
|
||||
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
|
||||
index 09deef4bed09..a9bbdcec0bad 100644
|
||||
--- a/drivers/net/phy/mdio_bus.c
|
||||
+++ b/drivers/net/phy/mdio_bus.c
|
||||
@@ -319,7 +319,6 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner)
|
||||
err = device_register(&bus->dev);
|
||||
if (err) {
|
||||
pr_err("mii_bus %s failed to register\n", bus->id);
|
||||
- put_device(&bus->dev);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c
|
||||
index 3045c9662ed6..5a8befdfa5e4 100644
|
||||
--- a/drivers/net/ppp/pptp.c
|
||||
+++ b/drivers/net/ppp/pptp.c
|
||||
@@ -541,6 +541,7 @@ static void pptp_sock_destruct(struct sock *sk)
|
||||
pppox_unbind_sock(sk);
|
||||
}
|
||||
skb_queue_purge(&sk->sk_receive_queue);
|
||||
+ dst_release(rcu_dereference_protected(sk->sk_dst_cache, 1));
|
||||
}
|
||||
|
||||
static int pptp_create(struct net *net, struct socket *sock, int kern)
|
||||
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
|
||||
index 373713faa1f5..016f5da425ab 100644
|
||||
--- a/drivers/net/vxlan.c
|
||||
+++ b/drivers/net/vxlan.c
|
||||
@@ -1380,6 +1380,14 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)
|
||||
goto drop;
|
||||
}
|
||||
|
||||
+ rcu_read_lock();
|
||||
+
|
||||
+ if (unlikely(!(vxlan->dev->flags & IFF_UP))) {
|
||||
+ rcu_read_unlock();
|
||||
+ atomic_long_inc(&vxlan->dev->rx_dropped);
|
||||
+ goto drop;
|
||||
+ }
|
||||
+
|
||||
stats = this_cpu_ptr(vxlan->dev->tstats);
|
||||
u64_stats_update_begin(&stats->syncp);
|
||||
stats->rx_packets++;
|
||||
@@ -1387,6 +1395,9 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)
|
||||
u64_stats_update_end(&stats->syncp);
|
||||
|
||||
gro_cells_receive(&vxlan->gro_cells, skb);
|
||||
+
|
||||
+ rcu_read_unlock();
|
||||
+
|
||||
return 0;
|
||||
|
||||
drop:
|
||||
@@ -2362,6 +2373,8 @@ static void vxlan_uninit(struct net_device *dev)
|
||||
{
|
||||
struct vxlan_dev *vxlan = netdev_priv(dev);
|
||||
|
||||
+ gro_cells_destroy(&vxlan->gro_cells);
|
||||
+
|
||||
vxlan_fdb_delete_default(vxlan);
|
||||
|
||||
free_percpu(dev->tstats);
|
||||
@@ -3112,7 +3125,6 @@ static void vxlan_dellink(struct net_device *dev, struct list_head *head)
|
||||
{
|
||||
struct vxlan_dev *vxlan = netdev_priv(dev);
|
||||
|
||||
- gro_cells_destroy(&vxlan->gro_cells);
|
||||
list_del(&vxlan->next);
|
||||
unregister_netdevice_queue(dev, head);
|
||||
}
|
||||
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
|
||||
index 72e914de473e..3cefd602b5b1 100644
|
||||
--- a/drivers/vhost/vsock.c
|
||||
+++ b/drivers/vhost/vsock.c
|
||||
@@ -640,7 +640,7 @@ static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u64 guest_cid)
|
||||
hash_del_rcu(&vsock->hash);
|
||||
|
||||
vsock->guest_cid = guest_cid;
|
||||
- hash_add_rcu(vhost_vsock_hash, &vsock->hash, guest_cid);
|
||||
+ hash_add_rcu(vhost_vsock_hash, &vsock->hash, vsock->guest_cid);
|
||||
spin_unlock_bh(&vhost_vsock_lock);
|
||||
|
||||
return 0;
|
||||
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
|
||||
index 12c2882bf647..eef069616a2f 100644
|
||||
--- a/include/acpi/acconfig.h
|
||||
+++ b/include/acpi/acconfig.h
|
||||
@@ -122,7 +122,7 @@
|
||||
|
||||
/* Maximum object reference count (detects object deletion issues) */
|
||||
|
||||
-#define ACPI_MAX_REFERENCE_COUNT 0x1000
|
||||
+#define ACPI_MAX_REFERENCE_COUNT 0x4000
|
||||
|
||||
/* Default page size for use in mapping memory for operation regions */
|
||||
|
||||
diff --git a/include/linux/of.h b/include/linux/of.h
|
||||
index a19cc85b9373..aac3f09c5d90 100644
|
||||
--- a/include/linux/of.h
|
||||
+++ b/include/linux/of.h
|
||||
@@ -148,16 +148,20 @@ extern raw_spinlock_t devtree_lock;
|
||||
#ifdef CONFIG_OF
|
||||
void of_core_init(void);
|
||||
|
||||
-static inline bool is_of_node(struct fwnode_handle *fwnode)
|
||||
+static inline bool is_of_node(const struct fwnode_handle *fwnode)
|
||||
{
|
||||
return !IS_ERR_OR_NULL(fwnode) && fwnode->type == FWNODE_OF;
|
||||
}
|
||||
|
||||
-static inline struct device_node *to_of_node(struct fwnode_handle *fwnode)
|
||||
-{
|
||||
- return is_of_node(fwnode) ?
|
||||
- container_of(fwnode, struct device_node, fwnode) : NULL;
|
||||
-}
|
||||
+#define to_of_node(__fwnode) \
|
||||
+ ({ \
|
||||
+ typeof(__fwnode) __to_of_node_fwnode = (__fwnode); \
|
||||
+ \
|
||||
+ is_of_node(__to_of_node_fwnode) ? \
|
||||
+ container_of(__to_of_node_fwnode, \
|
||||
+ struct device_node, fwnode) : \
|
||||
+ NULL; \
|
||||
+ })
|
||||
|
||||
static inline bool of_have_populated_dt(void)
|
||||
{
|
||||
@@ -529,12 +533,12 @@ static inline void of_core_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
-static inline bool is_of_node(struct fwnode_handle *fwnode)
|
||||
+static inline bool is_of_node(const struct fwnode_handle *fwnode)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
-static inline struct device_node *to_of_node(struct fwnode_handle *fwnode)
|
||||
+static inline struct device_node *to_of_node(const struct fwnode_handle *fwnode)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
diff --git a/include/net/gro_cells.h b/include/net/gro_cells.h
|
||||
index 95f33eeee984..6db0e8534127 100644
|
||||
--- a/include/net/gro_cells.h
|
||||
+++ b/include/net/gro_cells.h
|
||||
@@ -18,22 +18,36 @@ static inline int gro_cells_receive(struct gro_cells *gcells, struct sk_buff *sk
|
||||
{
|
||||
struct gro_cell *cell;
|
||||
struct net_device *dev = skb->dev;
|
||||
+ int res;
|
||||
|
||||
- if (!gcells->cells || skb_cloned(skb) || !(dev->features & NETIF_F_GRO))
|
||||
- return netif_rx(skb);
|
||||
+ rcu_read_lock();
|
||||
+ if (unlikely(!(dev->flags & IFF_UP)))
|
||||
+ goto drop;
|
||||
+
|
||||
+ if (!gcells->cells || skb_cloned(skb) || !(dev->features & NETIF_F_GRO)) {
|
||||
+ res = netif_rx(skb);
|
||||
+ goto unlock;
|
||||
+ }
|
||||
|
||||
cell = this_cpu_ptr(gcells->cells);
|
||||
|
||||
if (skb_queue_len(&cell->napi_skbs) > netdev_max_backlog) {
|
||||
+drop:
|
||||
atomic_long_inc(&dev->rx_dropped);
|
||||
kfree_skb(skb);
|
||||
- return NET_RX_DROP;
|
||||
+ res = NET_RX_DROP;
|
||||
+ goto unlock;
|
||||
}
|
||||
|
||||
__skb_queue_tail(&cell->napi_skbs, skb);
|
||||
if (skb_queue_len(&cell->napi_skbs) == 1)
|
||||
napi_schedule(&cell->napi);
|
||||
- return NET_RX_SUCCESS;
|
||||
+
|
||||
+ res = NET_RX_SUCCESS;
|
||||
+
|
||||
+unlock:
|
||||
+ rcu_read_unlock();
|
||||
+ return res;
|
||||
}
|
||||
|
||||
/* called under BH context */
|
||||
diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
|
||||
index 16737cd8dae8..52694cb759b0 100644
|
||||
--- a/net/hsr/hsr_device.c
|
||||
+++ b/net/hsr/hsr_device.c
|
||||
@@ -94,9 +94,8 @@ static void hsr_check_announce(struct net_device *hsr_dev,
|
||||
&& (old_operstate != IF_OPER_UP)) {
|
||||
/* Went up */
|
||||
hsr->announce_count = 0;
|
||||
- hsr->announce_timer.expires = jiffies +
|
||||
- msecs_to_jiffies(HSR_ANNOUNCE_INTERVAL);
|
||||
- add_timer(&hsr->announce_timer);
|
||||
+ mod_timer(&hsr->announce_timer,
|
||||
+ jiffies + msecs_to_jiffies(HSR_ANNOUNCE_INTERVAL));
|
||||
}
|
||||
|
||||
if ((hsr_dev->operstate != IF_OPER_UP) && (old_operstate == IF_OPER_UP))
|
||||
@@ -331,6 +330,7 @@ static void hsr_announce(unsigned long data)
|
||||
{
|
||||
struct hsr_priv *hsr;
|
||||
struct hsr_port *master;
|
||||
+ unsigned long interval;
|
||||
|
||||
hsr = (struct hsr_priv *) data;
|
||||
|
||||
@@ -342,18 +342,16 @@ static void hsr_announce(unsigned long data)
|
||||
hsr->protVersion);
|
||||
hsr->announce_count++;
|
||||
|
||||
- hsr->announce_timer.expires = jiffies +
|
||||
- msecs_to_jiffies(HSR_ANNOUNCE_INTERVAL);
|
||||
+ interval = msecs_to_jiffies(HSR_ANNOUNCE_INTERVAL);
|
||||
} else {
|
||||
send_hsr_supervision_frame(master, HSR_TLV_LIFE_CHECK,
|
||||
hsr->protVersion);
|
||||
|
||||
- hsr->announce_timer.expires = jiffies +
|
||||
- msecs_to_jiffies(HSR_LIFE_CHECK_INTERVAL);
|
||||
+ interval = msecs_to_jiffies(HSR_LIFE_CHECK_INTERVAL);
|
||||
}
|
||||
|
||||
if (is_admin_up(master->dev))
|
||||
- add_timer(&hsr->announce_timer);
|
||||
+ mod_timer(&hsr->announce_timer, jiffies + interval);
|
||||
|
||||
rcu_read_unlock();
|
||||
}
|
||||
@@ -485,7 +483,7 @@ int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2],
|
||||
|
||||
res = hsr_add_port(hsr, hsr_dev, HSR_PT_MASTER);
|
||||
if (res)
|
||||
- return res;
|
||||
+ goto err_add_port;
|
||||
|
||||
res = register_netdevice(hsr_dev);
|
||||
if (res)
|
||||
@@ -505,6 +503,8 @@ int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2],
|
||||
fail:
|
||||
hsr_for_each_port(hsr, port)
|
||||
hsr_del_port(port);
|
||||
+err_add_port:
|
||||
+ hsr_del_node(&hsr->self_node_db);
|
||||
|
||||
return res;
|
||||
}
|
||||
diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c
|
||||
index 284a9b820df8..6705420b3111 100644
|
||||
--- a/net/hsr/hsr_framereg.c
|
||||
+++ b/net/hsr/hsr_framereg.c
|
||||
@@ -124,6 +124,18 @@ int hsr_create_self_node(struct list_head *self_node_db,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+void hsr_del_node(struct list_head *self_node_db)
|
||||
+{
|
||||
+ struct hsr_node *node;
|
||||
+
|
||||
+ rcu_read_lock();
|
||||
+ node = list_first_or_null_rcu(self_node_db, struct hsr_node, mac_list);
|
||||
+ rcu_read_unlock();
|
||||
+ if (node) {
|
||||
+ list_del_rcu(&node->mac_list);
|
||||
+ kfree(node);
|
||||
+ }
|
||||
+}
|
||||
|
||||
/* Allocate an hsr_node and add it to node_db. 'addr' is the node's AddressA;
|
||||
* seq_out is used to initialize filtering of outgoing duplicate frames
|
||||
diff --git a/net/hsr/hsr_framereg.h b/net/hsr/hsr_framereg.h
|
||||
index 4e04f0e868e9..43958a338095 100644
|
||||
--- a/net/hsr/hsr_framereg.h
|
||||
+++ b/net/hsr/hsr_framereg.h
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
struct hsr_node;
|
||||
|
||||
+void hsr_del_node(struct list_head *self_node_db);
|
||||
struct hsr_node *hsr_add_node(struct list_head *node_db, unsigned char addr[],
|
||||
u16 seq_out);
|
||||
struct hsr_node *hsr_get_node(struct hsr_port *port, struct sk_buff *skb,
|
||||
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
|
||||
index 528a6777cda0..1bcbb7399fe6 100644
|
||||
--- a/net/ipv4/inet_connection_sock.c
|
||||
+++ b/net/ipv4/inet_connection_sock.c
|
||||
@@ -790,7 +790,6 @@ static void inet_child_forget(struct sock *sk, struct request_sock *req,
|
||||
tcp_sk(child)->fastopen_rsk = NULL;
|
||||
}
|
||||
inet_csk_destroy_sock(child);
|
||||
- reqsk_put(req);
|
||||
}
|
||||
|
||||
struct sock *inet_csk_reqsk_queue_add(struct sock *sk,
|
||||
@@ -861,6 +860,7 @@ void inet_csk_listen_stop(struct sock *sk)
|
||||
sock_hold(child);
|
||||
|
||||
inet_child_forget(sk, req, child);
|
||||
+ reqsk_put(req);
|
||||
bh_unlock_sock(child);
|
||||
local_bh_enable();
|
||||
sock_put(child);
|
||||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
|
||||
index d606de65e2d0..c42fb2330b45 100644
|
||||
--- a/net/ipv4/route.c
|
||||
+++ b/net/ipv4/route.c
|
||||
@@ -1613,6 +1613,10 @@ static void ip_del_fnhe(struct fib_nh *nh, __be32 daddr)
|
||||
if (fnhe->fnhe_daddr == daddr) {
|
||||
rcu_assign_pointer(*fnhe_p, rcu_dereference_protected(
|
||||
fnhe->fnhe_next, lockdep_is_held(&fnhe_lock)));
|
||||
+ /* set fnhe_daddr to 0 to ensure it won't bind with
|
||||
+ * new dsts in rt_bind_exception().
|
||||
+ */
|
||||
+ fnhe->fnhe_daddr = 0;
|
||||
fnhe_flush_routes(fnhe);
|
||||
kfree_rcu(fnhe, rcu);
|
||||
break;
|
||||
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
|
||||
index 0597ad73a1fa..b596c413d297 100644
|
||||
--- a/net/ipv4/syncookies.c
|
||||
+++ b/net/ipv4/syncookies.c
|
||||
@@ -225,7 +225,12 @@ struct sock *tcp_get_cookie_sock(struct sock *sk, struct sk_buff *skb,
|
||||
if (child) {
|
||||
atomic_set(&req->rsk_refcnt, 1);
|
||||
sock_rps_save_rxhash(child, skb);
|
||||
- inet_csk_reqsk_queue_add(sk, req, child);
|
||||
+ if (!inet_csk_reqsk_queue_add(sk, req, child)) {
|
||||
+ bh_unlock_sock(child);
|
||||
+ sock_put(child);
|
||||
+ child = NULL;
|
||||
+ reqsk_put(req);
|
||||
+ }
|
||||
} else {
|
||||
reqsk_free(req);
|
||||
}
|
||||
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
|
||||
index dbb153c6b21a..48fe63c4fe24 100644
|
||||
--- a/net/ipv4/tcp_input.c
|
||||
+++ b/net/ipv4/tcp_input.c
|
||||
@@ -6479,7 +6479,13 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
|
||||
af_ops->send_synack(fastopen_sk, dst, &fl, req,
|
||||
&foc, TCP_SYNACK_FASTOPEN);
|
||||
/* Add the child socket directly into the accept queue */
|
||||
- inet_csk_reqsk_queue_add(sk, req, fastopen_sk);
|
||||
+ if (!inet_csk_reqsk_queue_add(sk, req, fastopen_sk)) {
|
||||
+ reqsk_fastopen_remove(fastopen_sk, req, false);
|
||||
+ bh_unlock_sock(fastopen_sk);
|
||||
+ sock_put(fastopen_sk);
|
||||
+ reqsk_put(req);
|
||||
+ goto drop;
|
||||
+ }
|
||||
sk->sk_data_ready(sk);
|
||||
bh_unlock_sock(fastopen_sk);
|
||||
sock_put(fastopen_sk);
|
||||
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
|
||||
index b0a72677b7e5..27c93baed708 100644
|
||||
--- a/net/ipv6/route.c
|
||||
+++ b/net/ipv6/route.c
|
||||
@@ -3211,7 +3211,7 @@ static int rt6_fill_node(struct net *net,
|
||||
table = rt->rt6i_table->tb6_id;
|
||||
else
|
||||
table = RT6_TABLE_UNSPEC;
|
||||
- rtm->rtm_table = table;
|
||||
+ rtm->rtm_table = table < 256 ? table : RT_TABLE_COMPAT;
|
||||
if (nla_put_u32(skb, RTA_TABLE, table))
|
||||
goto nla_put_failure;
|
||||
if (rt->rt6i_flags & RTF_REJECT) {
|
||||
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
|
||||
index 75de3dd8b862..c9c6a5e829ab 100644
|
||||
--- a/net/ipv6/sit.c
|
||||
+++ b/net/ipv6/sit.c
|
||||
@@ -767,8 +767,9 @@ static bool check_6rd(struct ip_tunnel *tunnel, const struct in6_addr *v6dst,
|
||||
pbw0 = tunnel->ip6rd.prefixlen >> 5;
|
||||
pbi0 = tunnel->ip6rd.prefixlen & 0x1f;
|
||||
|
||||
- d = (ntohl(v6dst->s6_addr32[pbw0]) << pbi0) >>
|
||||
- tunnel->ip6rd.relay_prefixlen;
|
||||
+ d = tunnel->ip6rd.relay_prefixlen < 32 ?
|
||||
+ (ntohl(v6dst->s6_addr32[pbw0]) << pbi0) >>
|
||||
+ tunnel->ip6rd.relay_prefixlen : 0;
|
||||
|
||||
pbi1 = pbi0 - tunnel->ip6rd.relay_prefixlen;
|
||||
if (pbi1 > 0)
|
||||
diff --git a/net/l2tp/l2tp_ip6.c b/net/l2tp/l2tp_ip6.c
|
||||
index 5e6d09863480..8d412b9b0214 100644
|
||||
--- a/net/l2tp/l2tp_ip6.c
|
||||
+++ b/net/l2tp/l2tp_ip6.c
|
||||
@@ -680,9 +680,6 @@ static int l2tp_ip6_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
|
||||
if (flags & MSG_OOB)
|
||||
goto out;
|
||||
|
||||
- if (addr_len)
|
||||
- *addr_len = sizeof(*lsa);
|
||||
-
|
||||
if (flags & MSG_ERRQUEUE)
|
||||
return ipv6_recv_error(sk, msg, len, addr_len);
|
||||
|
||||
@@ -712,6 +709,7 @@ static int l2tp_ip6_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
|
||||
lsa->l2tp_conn_id = 0;
|
||||
if (ipv6_addr_type(&lsa->l2tp_addr) & IPV6_ADDR_LINKLOCAL)
|
||||
lsa->l2tp_scope_id = inet6_iif(skb);
|
||||
+ *addr_len = sizeof(*lsa);
|
||||
}
|
||||
|
||||
if (np->rxopt.all)
|
||||
diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_client.c
|
||||
index 60ef9605167e..0fce919bf47d 100644
|
||||
--- a/net/rxrpc/conn_client.c
|
||||
+++ b/net/rxrpc/conn_client.c
|
||||
@@ -355,7 +355,7 @@ static int rxrpc_get_client_conn(struct rxrpc_call *call,
|
||||
* normally have to take channel_lock but we do this before anyone else
|
||||
* can see the connection.
|
||||
*/
|
||||
- list_add_tail(&call->chan_wait_link, &candidate->waiting_calls);
|
||||
+ list_add(&call->chan_wait_link, &candidate->waiting_calls);
|
||||
|
||||
if (cp->exclusive) {
|
||||
call->conn = candidate;
|
||||
@@ -430,7 +430,7 @@ found_extant_conn:
|
||||
spin_lock(&conn->channel_lock);
|
||||
call->conn = conn;
|
||||
call->security_ix = conn->security_ix;
|
||||
- list_add(&call->chan_wait_link, &conn->waiting_calls);
|
||||
+ list_add_tail(&call->chan_wait_link, &conn->waiting_calls);
|
||||
spin_unlock(&conn->channel_lock);
|
||||
_leave(" = 0 [extant %d]", conn->debug_id);
|
||||
return 0;
|
||||
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
|
||||
index 915abe98174e..cecf51a5aec4 100644
|
||||
--- a/net/unix/af_unix.c
|
||||
+++ b/net/unix/af_unix.c
|
||||
@@ -891,7 +891,7 @@ retry:
|
||||
addr->hash ^= sk->sk_type;
|
||||
|
||||
__unix_remove_socket(sk);
|
||||
- u->addr = addr;
|
||||
+ smp_store_release(&u->addr, addr);
|
||||
__unix_insert_socket(&unix_socket_table[addr->hash], sk);
|
||||
spin_unlock(&unix_table_lock);
|
||||
err = 0;
|
||||
@@ -1061,7 +1061,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
|
||||
|
||||
err = 0;
|
||||
__unix_remove_socket(sk);
|
||||
- u->addr = addr;
|
||||
+ smp_store_release(&u->addr, addr);
|
||||
__unix_insert_socket(list, sk);
|
||||
|
||||
out_unlock:
|
||||
@@ -1332,15 +1332,29 @@ restart:
|
||||
RCU_INIT_POINTER(newsk->sk_wq, &newu->peer_wq);
|
||||
otheru = unix_sk(other);
|
||||
|
||||
- /* copy address information from listening to new sock*/
|
||||
- if (otheru->addr) {
|
||||
- atomic_inc(&otheru->addr->refcnt);
|
||||
- newu->addr = otheru->addr;
|
||||
- }
|
||||
+ /* copy address information from listening to new sock
|
||||
+ *
|
||||
+ * The contents of *(otheru->addr) and otheru->path
|
||||
+ * are seen fully set up here, since we have found
|
||||
+ * otheru in hash under unix_table_lock. Insertion
|
||||
+ * into the hash chain we'd found it in had been done
|
||||
+ * in an earlier critical area protected by unix_table_lock,
|
||||
+ * the same one where we'd set *(otheru->addr) contents,
|
||||
+ * as well as otheru->path and otheru->addr itself.
|
||||
+ *
|
||||
+ * Using smp_store_release() here to set newu->addr
|
||||
+ * is enough to make those stores, as well as stores
|
||||
+ * to newu->path visible to anyone who gets newu->addr
|
||||
+ * by smp_load_acquire(). IOW, the same warranties
|
||||
+ * as for unix_sock instances bound in unix_bind() or
|
||||
+ * in unix_autobind().
|
||||
+ */
|
||||
if (otheru->path.dentry) {
|
||||
path_get(&otheru->path);
|
||||
newu->path = otheru->path;
|
||||
}
|
||||
+ atomic_inc(&otheru->addr->refcnt);
|
||||
+ smp_store_release(&newu->addr, otheru->addr);
|
||||
|
||||
/* Set credentials */
|
||||
copy_peercred(sk, other);
|
||||
@@ -1453,7 +1467,7 @@ out:
|
||||
static int unix_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_len, int peer)
|
||||
{
|
||||
struct sock *sk = sock->sk;
|
||||
- struct unix_sock *u;
|
||||
+ struct unix_address *addr;
|
||||
DECLARE_SOCKADDR(struct sockaddr_un *, sunaddr, uaddr);
|
||||
int err = 0;
|
||||
|
||||
@@ -1468,19 +1482,15 @@ static int unix_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_
|
||||
sock_hold(sk);
|
||||
}
|
||||
|
||||
- u = unix_sk(sk);
|
||||
- unix_state_lock(sk);
|
||||
- if (!u->addr) {
|
||||
+ addr = smp_load_acquire(&unix_sk(sk)->addr);
|
||||
+ if (!addr) {
|
||||
sunaddr->sun_family = AF_UNIX;
|
||||
sunaddr->sun_path[0] = 0;
|
||||
*uaddr_len = sizeof(short);
|
||||
} else {
|
||||
- struct unix_address *addr = u->addr;
|
||||
-
|
||||
*uaddr_len = addr->len;
|
||||
memcpy(sunaddr, addr->name, *uaddr_len);
|
||||
}
|
||||
- unix_state_unlock(sk);
|
||||
sock_put(sk);
|
||||
out:
|
||||
return err;
|
||||
@@ -2094,11 +2104,11 @@ static int unix_seqpacket_recvmsg(struct socket *sock, struct msghdr *msg,
|
||||
|
||||
static void unix_copy_addr(struct msghdr *msg, struct sock *sk)
|
||||
{
|
||||
- struct unix_sock *u = unix_sk(sk);
|
||||
+ struct unix_address *addr = smp_load_acquire(&unix_sk(sk)->addr);
|
||||
|
||||
- if (u->addr) {
|
||||
- msg->msg_namelen = u->addr->len;
|
||||
- memcpy(msg->msg_name, u->addr->name, u->addr->len);
|
||||
+ if (addr) {
|
||||
+ msg->msg_namelen = addr->len;
|
||||
+ memcpy(msg->msg_name, addr->name, addr->len);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2814,7 +2824,7 @@ static int unix_seq_show(struct seq_file *seq, void *v)
|
||||
(s->sk_state == TCP_ESTABLISHED ? SS_CONNECTING : SS_DISCONNECTING),
|
||||
sock_i_ino(s));
|
||||
|
||||
- if (u->addr) {
|
||||
+ if (u->addr) { // under unix_table_lock here
|
||||
int i, len;
|
||||
seq_putc(seq, ' ');
|
||||
|
||||
diff --git a/net/unix/diag.c b/net/unix/diag.c
|
||||
index 384c84e83462..3183d9b8ab33 100644
|
||||
--- a/net/unix/diag.c
|
||||
+++ b/net/unix/diag.c
|
||||
@@ -10,7 +10,8 @@
|
||||
|
||||
static int sk_diag_dump_name(struct sock *sk, struct sk_buff *nlskb)
|
||||
{
|
||||
- struct unix_address *addr = unix_sk(sk)->addr;
|
||||
+ /* might or might not have unix_table_lock */
|
||||
+ struct unix_address *addr = smp_load_acquire(&unix_sk(sk)->addr);
|
||||
|
||||
if (!addr)
|
||||
return 0;
|
||||
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
|
||||
index 0a7e5d992bba..770ababb8f92 100644
|
||||
--- a/net/x25/af_x25.c
|
||||
+++ b/net/x25/af_x25.c
|
||||
@@ -678,8 +678,7 @@ static int x25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
|
||||
struct sockaddr_x25 *addr = (struct sockaddr_x25 *)uaddr;
|
||||
int len, i, rc = 0;
|
||||
|
||||
- if (!sock_flag(sk, SOCK_ZAPPED) ||
|
||||
- addr_len != sizeof(struct sockaddr_x25) ||
|
||||
+ if (addr_len != sizeof(struct sockaddr_x25) ||
|
||||
addr->sx25_family != AF_X25) {
|
||||
rc = -EINVAL;
|
||||
goto out;
|
||||
@@ -694,9 +693,13 @@ static int x25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
|
||||
}
|
||||
|
||||
lock_sock(sk);
|
||||
- x25_sk(sk)->source_addr = addr->sx25_addr;
|
||||
- x25_insert_socket(sk);
|
||||
- sock_reset_flag(sk, SOCK_ZAPPED);
|
||||
+ if (sock_flag(sk, SOCK_ZAPPED)) {
|
||||
+ x25_sk(sk)->source_addr = addr->sx25_addr;
|
||||
+ x25_insert_socket(sk);
|
||||
+ sock_reset_flag(sk, SOCK_ZAPPED);
|
||||
+ } else {
|
||||
+ rc = -EINVAL;
|
||||
+ }
|
||||
release_sock(sk);
|
||||
SOCK_DEBUG(sk, "x25_bind: socket is bound\n");
|
||||
out:
|
||||
@@ -812,8 +815,13 @@ static int x25_connect(struct socket *sock, struct sockaddr *uaddr,
|
||||
sock->state = SS_CONNECTED;
|
||||
rc = 0;
|
||||
out_put_neigh:
|
||||
- if (rc)
|
||||
+ if (rc) {
|
||||
+ read_lock_bh(&x25_list_lock);
|
||||
x25_neigh_put(x25->neighbour);
|
||||
+ x25->neighbour = NULL;
|
||||
+ read_unlock_bh(&x25_list_lock);
|
||||
+ x25->state = X25_STATE_0;
|
||||
+ }
|
||||
out_put_route:
|
||||
x25_route_put(rt);
|
||||
out:
|
||||
diff --git a/security/keys/proc.c b/security/keys/proc.c
|
||||
index ec493ddadd11..f2c7e090a66d 100644
|
||||
--- a/security/keys/proc.c
|
||||
+++ b/security/keys/proc.c
|
||||
@@ -187,7 +187,7 @@ static int proc_keys_show(struct seq_file *m, void *v)
|
||||
|
||||
struct keyring_search_context ctx = {
|
||||
.index_key = key->index_key,
|
||||
- .cred = current_cred(),
|
||||
+ .cred = m->file->f_cred,
|
||||
.match_data.cmp = lookup_user_key_possessed,
|
||||
.match_data.raw_data = key,
|
||||
.match_data.lookup_type = KEYRING_SEARCH_LOOKUP_DIRECT,
|
||||
@@ -207,11 +207,7 @@ static int proc_keys_show(struct seq_file *m, void *v)
|
||||
}
|
||||
}
|
||||
|
||||
- /* check whether the current task is allowed to view the key (assuming
|
||||
- * non-possession)
|
||||
- * - the caller holds a spinlock, and thus the RCU read lock, making our
|
||||
- * access to __current_cred() safe
|
||||
- */
|
||||
+ /* check whether the current task is allowed to view the key */
|
||||
rc = key_task_permission(key_ref, ctx.cred, KEY_NEED_VIEW);
|
||||
if (rc < 0)
|
||||
return 0;
|
||||
diff --git a/security/lsm_audit.c b/security/lsm_audit.c
|
||||
index 37f04dadc8d6..44a20c218409 100644
|
||||
--- a/security/lsm_audit.c
|
||||
+++ b/security/lsm_audit.c
|
||||
@@ -321,6 +321,7 @@ static void dump_common_audit_data(struct audit_buffer *ab,
|
||||
if (a->u.net->sk) {
|
||||
struct sock *sk = a->u.net->sk;
|
||||
struct unix_sock *u;
|
||||
+ struct unix_address *addr;
|
||||
int len = 0;
|
||||
char *p = NULL;
|
||||
|
||||
@@ -351,14 +352,15 @@ static void dump_common_audit_data(struct audit_buffer *ab,
|
||||
#endif
|
||||
case AF_UNIX:
|
||||
u = unix_sk(sk);
|
||||
+ addr = smp_load_acquire(&u->addr);
|
||||
+ if (!addr)
|
||||
+ break;
|
||||
if (u->path.dentry) {
|
||||
audit_log_d_path(ab, " path=", &u->path);
|
||||
break;
|
||||
}
|
||||
- if (!u->addr)
|
||||
- break;
|
||||
- len = u->addr->len-sizeof(short);
|
||||
- p = &u->addr->name->sun_path[0];
|
||||
+ len = addr->len-sizeof(short);
|
||||
+ p = &addr->name->sun_path[0];
|
||||
audit_log_format(ab, " path=");
|
||||
if (*p)
|
||||
audit_log_untrustedstring(ab, p);
|
||||
diff --git a/sound/firewire/bebob/bebob.c b/sound/firewire/bebob/bebob.c
|
||||
index 3b4eaffe4a7f..a205b93fd9ac 100644
|
||||
--- a/sound/firewire/bebob/bebob.c
|
||||
+++ b/sound/firewire/bebob/bebob.c
|
||||
@@ -474,7 +474,19 @@ static const struct ieee1394_device_id bebob_id_table[] = {
|
||||
/* Focusrite, SaffirePro 26 I/O */
|
||||
SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, 0x00000003, &saffirepro_26_spec),
|
||||
/* Focusrite, SaffirePro 10 I/O */
|
||||
- SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, 0x00000006, &saffirepro_10_spec),
|
||||
+ {
|
||||
+ // The combination of vendor_id and model_id is the same as the
|
||||
+ // same as the one of Liquid Saffire 56.
|
||||
+ .match_flags = IEEE1394_MATCH_VENDOR_ID |
|
||||
+ IEEE1394_MATCH_MODEL_ID |
|
||||
+ IEEE1394_MATCH_SPECIFIER_ID |
|
||||
+ IEEE1394_MATCH_VERSION,
|
||||
+ .vendor_id = VEN_FOCUSRITE,
|
||||
+ .model_id = 0x000006,
|
||||
+ .specifier_id = 0x00a02d,
|
||||
+ .version = 0x010001,
|
||||
+ .driver_data = (kernel_ulong_t)&saffirepro_10_spec,
|
||||
+ },
|
||||
/* Focusrite, Saffire(no label and LE) */
|
||||
SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, MODEL_FOCUSRITE_SAFFIRE_BOTH,
|
||||
&saffire_spec),
|
3732
patch/kernel/cubox-default/patch-4.9.164-165.patch
Normal file
3732
patch/kernel/cubox-default/patch-4.9.164-165.patch
Normal file
File diff suppressed because it is too large
Load diff
782
patch/kernel/cubox-default/patch-4.9.165-166.patch
Normal file
782
patch/kernel/cubox-default/patch-4.9.165-166.patch
Normal file
|
@ -0,0 +1,782 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 9b61da532c42..90478086eff5 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
-SUBLEVEL = 165
|
||||
+SUBLEVEL = 166
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
|
||||
index 5963be2e05f0..28bef94cf792 100644
|
||||
--- a/arch/arm64/kernel/traps.c
|
||||
+++ b/arch/arm64/kernel/traps.c
|
||||
@@ -266,10 +266,12 @@ void die(const char *str, struct pt_regs *regs, int err)
|
||||
{
|
||||
struct thread_info *thread = current_thread_info();
|
||||
int ret;
|
||||
+ unsigned long flags;
|
||||
+
|
||||
+ raw_spin_lock_irqsave(&die_lock, flags);
|
||||
|
||||
oops_enter();
|
||||
|
||||
- raw_spin_lock_irq(&die_lock);
|
||||
console_verbose();
|
||||
bust_spinlocks(1);
|
||||
ret = __die(str, err, thread, regs);
|
||||
@@ -279,13 +281,15 @@ void die(const char *str, struct pt_regs *regs, int err)
|
||||
|
||||
bust_spinlocks(0);
|
||||
add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
|
||||
- raw_spin_unlock_irq(&die_lock);
|
||||
oops_exit();
|
||||
|
||||
if (in_interrupt())
|
||||
panic("Fatal exception in interrupt");
|
||||
if (panic_on_oops)
|
||||
panic("Fatal exception");
|
||||
+
|
||||
+ raw_spin_unlock_irqrestore(&die_lock, flags);
|
||||
+
|
||||
if (ret != NOTIFY_STOP)
|
||||
do_exit(SIGSEGV);
|
||||
}
|
||||
diff --git a/arch/mips/include/asm/jump_label.h b/arch/mips/include/asm/jump_label.h
|
||||
index e77672539e8e..e4456e450f94 100644
|
||||
--- a/arch/mips/include/asm/jump_label.h
|
||||
+++ b/arch/mips/include/asm/jump_label.h
|
||||
@@ -21,15 +21,15 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_MICROMIPS
|
||||
-#define NOP_INSN "nop32"
|
||||
+#define B_INSN "b32"
|
||||
#else
|
||||
-#define NOP_INSN "nop"
|
||||
+#define B_INSN "b"
|
||||
#endif
|
||||
|
||||
static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
|
||||
{
|
||||
- asm_volatile_goto("1:\t" NOP_INSN "\n\t"
|
||||
- "nop\n\t"
|
||||
+ asm_volatile_goto("1:\t" B_INSN " 2f\n\t"
|
||||
+ "2:\tnop\n\t"
|
||||
".pushsection __jump_table, \"aw\"\n\t"
|
||||
WORD_INSN " 1b, %l[l_yes], %0\n\t"
|
||||
".popsection\n\t"
|
||||
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
|
||||
index f0a0e6d62be3..2d965d91fee4 100644
|
||||
--- a/arch/mips/kernel/vmlinux.lds.S
|
||||
+++ b/arch/mips/kernel/vmlinux.lds.S
|
||||
@@ -138,6 +138,13 @@ SECTIONS
|
||||
PERCPU_SECTION(1 << CONFIG_MIPS_L1_CACHE_SHIFT)
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_MIPS_ELF_APPENDED_DTB
|
||||
+ .appended_dtb : AT(ADDR(.appended_dtb) - LOAD_OFFSET) {
|
||||
+ *(.appended_dtb)
|
||||
+ KEEP(*(.appended_dtb))
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
#ifdef CONFIG_RELOCATABLE
|
||||
. = ALIGN(4);
|
||||
|
||||
@@ -162,11 +169,6 @@ SECTIONS
|
||||
__appended_dtb = .;
|
||||
/* leave space for appended DTB */
|
||||
. += 0x100000;
|
||||
-#elif defined(CONFIG_MIPS_ELF_APPENDED_DTB)
|
||||
- .appended_dtb : AT(ADDR(.appended_dtb) - LOAD_OFFSET) {
|
||||
- *(.appended_dtb)
|
||||
- KEEP(*(.appended_dtb))
|
||||
- }
|
||||
#endif
|
||||
/*
|
||||
* Align to 64K in attempt to eliminate holes before the
|
||||
diff --git a/arch/mips/loongson64/lemote-2f/irq.c b/arch/mips/loongson64/lemote-2f/irq.c
|
||||
index cab5f43e0e29..d371f0294cbb 100644
|
||||
--- a/arch/mips/loongson64/lemote-2f/irq.c
|
||||
+++ b/arch/mips/loongson64/lemote-2f/irq.c
|
||||
@@ -102,7 +102,7 @@ static struct irqaction ip6_irqaction = {
|
||||
static struct irqaction cascade_irqaction = {
|
||||
.handler = no_action,
|
||||
.name = "cascade",
|
||||
- .flags = IRQF_NO_THREAD,
|
||||
+ .flags = IRQF_NO_THREAD | IRQF_NO_SUSPEND,
|
||||
};
|
||||
|
||||
void __init mach_init_irq(void)
|
||||
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
|
||||
index aec6e9eef489..55884cb5a0fc 100644
|
||||
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
|
||||
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
|
||||
@@ -531,11 +531,9 @@ static int vmw_fb_set_par(struct fb_info *info)
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC)
|
||||
};
|
||||
- struct drm_display_mode *old_mode;
|
||||
struct drm_display_mode *mode;
|
||||
int ret;
|
||||
|
||||
- old_mode = par->set_mode;
|
||||
mode = drm_mode_duplicate(vmw_priv->dev, &new_mode);
|
||||
if (!mode) {
|
||||
DRM_ERROR("Could not create new fb mode.\n");
|
||||
@@ -546,11 +544,7 @@ static int vmw_fb_set_par(struct fb_info *info)
|
||||
mode->vdisplay = var->yres;
|
||||
vmw_guess_mode_timing(mode);
|
||||
|
||||
- if (old_mode && drm_mode_equal(old_mode, mode)) {
|
||||
- drm_mode_destroy(vmw_priv->dev, mode);
|
||||
- mode = old_mode;
|
||||
- old_mode = NULL;
|
||||
- } else if (!vmw_kms_validate_mode_vram(vmw_priv,
|
||||
+ if (!vmw_kms_validate_mode_vram(vmw_priv,
|
||||
mode->hdisplay *
|
||||
DIV_ROUND_UP(var->bits_per_pixel, 8),
|
||||
mode->vdisplay)) {
|
||||
@@ -613,8 +607,8 @@ static int vmw_fb_set_par(struct fb_info *info)
|
||||
schedule_delayed_work(&par->local_work, 0);
|
||||
|
||||
out_unlock:
|
||||
- if (old_mode)
|
||||
- drm_mode_destroy(vmw_priv->dev, old_mode);
|
||||
+ if (par->set_mode)
|
||||
+ drm_mode_destroy(vmw_priv->dev, par->set_mode);
|
||||
par->set_mode = mode;
|
||||
|
||||
drm_modeset_unlock_all(vmw_priv->dev);
|
||||
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
|
||||
index ca22483d253f..c1233d0288a0 100644
|
||||
--- a/drivers/iommu/amd_iommu.c
|
||||
+++ b/drivers/iommu/amd_iommu.c
|
||||
@@ -2599,7 +2599,12 @@ static int map_sg(struct device *dev, struct scatterlist *sglist,
|
||||
|
||||
/* Everything is mapped - write the right values into s->dma_address */
|
||||
for_each_sg(sglist, s, nelems, i) {
|
||||
- s->dma_address += address + s->offset;
|
||||
+ /*
|
||||
+ * Add in the remaining piece of the scatter-gather offset that
|
||||
+ * was masked out when we were determining the physical address
|
||||
+ * via (sg_phys(s) & PAGE_MASK) earlier.
|
||||
+ */
|
||||
+ s->dma_address += address + (s->offset & ~PAGE_MASK);
|
||||
s->dma_length = s->length;
|
||||
}
|
||||
|
||||
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
|
||||
index 20397aba6849..d92967e2e385 100644
|
||||
--- a/drivers/media/usb/uvc/uvc_ctrl.c
|
||||
+++ b/drivers/media/usb/uvc/uvc_ctrl.c
|
||||
@@ -1203,7 +1203,7 @@ static void uvc_ctrl_fill_event(struct uvc_video_chain *chain,
|
||||
|
||||
__uvc_query_v4l2_ctrl(chain, ctrl, mapping, &v4l2_ctrl);
|
||||
|
||||
- memset(ev->reserved, 0, sizeof(ev->reserved));
|
||||
+ memset(ev, 0, sizeof(*ev));
|
||||
ev->type = V4L2_EVENT_CTRL;
|
||||
ev->id = v4l2_ctrl.id;
|
||||
ev->u.ctrl.value = value;
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
|
||||
index bd6884223a0d..c56d649fa7da 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
|
||||
@@ -1231,7 +1231,7 @@ static u32 user_flags(const struct v4l2_ctrl *ctrl)
|
||||
|
||||
static void fill_event(struct v4l2_event *ev, struct v4l2_ctrl *ctrl, u32 changes)
|
||||
{
|
||||
- memset(ev->reserved, 0, sizeof(ev->reserved));
|
||||
+ memset(ev, 0, sizeof(*ev));
|
||||
ev->type = V4L2_EVENT_CTRL;
|
||||
ev->id = ctrl->id;
|
||||
ev->u.ctrl.changes = changes;
|
||||
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
|
||||
index c763b404510f..3e139692fe8f 100644
|
||||
--- a/drivers/mmc/host/pxamci.c
|
||||
+++ b/drivers/mmc/host/pxamci.c
|
||||
@@ -181,7 +181,7 @@ static void pxamci_dma_irq(void *param);
|
||||
static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data)
|
||||
{
|
||||
struct dma_async_tx_descriptor *tx;
|
||||
- enum dma_data_direction direction;
|
||||
+ enum dma_transfer_direction direction;
|
||||
struct dma_slave_config config;
|
||||
struct dma_chan *chan;
|
||||
unsigned int nob = data->blocks;
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
index 21aec5c252ee..bbfe7be214e1 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
|
||||
@@ -4277,7 +4277,7 @@ static void ath10k_tpc_config_disp_tables(struct ath10k *ar,
|
||||
rate_code[i],
|
||||
type);
|
||||
snprintf(buff, sizeof(buff), "%8d ", tpc[j]);
|
||||
- strncat(tpc_value, buff, strlen(buff));
|
||||
+ strlcat(tpc_value, buff, sizeof(tpc_value));
|
||||
}
|
||||
tpc_stats->tpc_table[type].pream_idx[i] = pream_idx;
|
||||
tpc_stats->tpc_table[type].rate_code[i] = rate_code[i];
|
||||
diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
|
||||
index e664ca7c0afd..13f23c00538b 100644
|
||||
--- a/drivers/power/supply/charger-manager.c
|
||||
+++ b/drivers/power/supply/charger-manager.c
|
||||
@@ -1212,7 +1212,6 @@ static int charger_extcon_init(struct charger_manager *cm,
|
||||
if (ret < 0) {
|
||||
pr_info("Cannot register extcon_dev for %s(cable: %s)\n",
|
||||
cable->extcon_name, cable->name);
|
||||
- ret = -EINVAL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -1634,7 +1633,7 @@ static int charger_manager_probe(struct platform_device *pdev)
|
||||
|
||||
if (IS_ERR(desc)) {
|
||||
dev_err(&pdev->dev, "No platform data (desc) found\n");
|
||||
- return -ENODEV;
|
||||
+ return PTR_ERR(desc);
|
||||
}
|
||||
|
||||
cm = devm_kzalloc(&pdev->dev,
|
||||
diff --git a/drivers/rtc/rtc-lib.c b/drivers/rtc/rtc-lib.c
|
||||
index e6bfb9c42a10..5b136bdc03d4 100644
|
||||
--- a/drivers/rtc/rtc-lib.c
|
||||
+++ b/drivers/rtc/rtc-lib.c
|
||||
@@ -52,13 +52,11 @@ EXPORT_SYMBOL(rtc_year_days);
|
||||
*/
|
||||
void rtc_time64_to_tm(time64_t time, struct rtc_time *tm)
|
||||
{
|
||||
- unsigned int month, year;
|
||||
- unsigned long secs;
|
||||
+ unsigned int month, year, secs;
|
||||
int days;
|
||||
|
||||
/* time must be positive */
|
||||
- days = div_s64(time, 86400);
|
||||
- secs = time - (unsigned int) days * 86400;
|
||||
+ days = div_s64_rem(time, 86400, &secs);
|
||||
|
||||
/* day of the week, 1970-01-01 was a Thursday */
|
||||
tm->tm_wday = (days + 4) % 7;
|
||||
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
|
||||
index 5cfd56f08ffb..0b858414c558 100644
|
||||
--- a/drivers/scsi/ufs/ufshcd.c
|
||||
+++ b/drivers/scsi/ufs/ufshcd.c
|
||||
@@ -1348,10 +1348,11 @@ static int ufshcd_comp_devman_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
|
||||
u32 upiu_flags;
|
||||
int ret = 0;
|
||||
|
||||
- if (hba->ufs_version == UFSHCI_VERSION_20)
|
||||
- lrbp->command_type = UTP_CMD_TYPE_UFS_STORAGE;
|
||||
- else
|
||||
+ if ((hba->ufs_version == UFSHCI_VERSION_10) ||
|
||||
+ (hba->ufs_version == UFSHCI_VERSION_11))
|
||||
lrbp->command_type = UTP_CMD_TYPE_DEV_MANAGE;
|
||||
+ else
|
||||
+ lrbp->command_type = UTP_CMD_TYPE_UFS_STORAGE;
|
||||
|
||||
ufshcd_prepare_req_desc_hdr(lrbp, &upiu_flags, DMA_NONE);
|
||||
if (hba->dev_cmd.type == DEV_CMD_TYPE_QUERY)
|
||||
@@ -1375,10 +1376,11 @@ static int ufshcd_comp_scsi_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
|
||||
u32 upiu_flags;
|
||||
int ret = 0;
|
||||
|
||||
- if (hba->ufs_version == UFSHCI_VERSION_20)
|
||||
- lrbp->command_type = UTP_CMD_TYPE_UFS_STORAGE;
|
||||
- else
|
||||
+ if ((hba->ufs_version == UFSHCI_VERSION_10) ||
|
||||
+ (hba->ufs_version == UFSHCI_VERSION_11))
|
||||
lrbp->command_type = UTP_CMD_TYPE_SCSI;
|
||||
+ else
|
||||
+ lrbp->command_type = UTP_CMD_TYPE_UFS_STORAGE;
|
||||
|
||||
if (likely(lrbp->cmd)) {
|
||||
ufshcd_prepare_req_desc_hdr(lrbp, &upiu_flags,
|
||||
diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c
|
||||
index 699447aa8b43..747560feb63e 100644
|
||||
--- a/drivers/tty/serial/sprd_serial.c
|
||||
+++ b/drivers/tty/serial/sprd_serial.c
|
||||
@@ -36,7 +36,7 @@
|
||||
#define SPRD_FIFO_SIZE 128
|
||||
#define SPRD_DEF_RATE 26000000
|
||||
#define SPRD_BAUD_IO_LIMIT 3000000
|
||||
-#define SPRD_TIMEOUT 256
|
||||
+#define SPRD_TIMEOUT 256000
|
||||
|
||||
/* the offset of serial registers and BITs for them */
|
||||
/* data registers */
|
||||
@@ -63,6 +63,7 @@
|
||||
|
||||
/* interrupt clear register */
|
||||
#define SPRD_ICLR 0x0014
|
||||
+#define SPRD_ICLR_TIMEOUT BIT(13)
|
||||
|
||||
/* line control register */
|
||||
#define SPRD_LCR 0x0018
|
||||
@@ -298,7 +299,8 @@ static irqreturn_t sprd_handle_irq(int irq, void *dev_id)
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
- serial_out(port, SPRD_ICLR, ~0);
|
||||
+ if (ims & SPRD_IMSR_TIMEOUT)
|
||||
+ serial_out(port, SPRD_ICLR, SPRD_ICLR_TIMEOUT);
|
||||
|
||||
if (ims & (SPRD_IMSR_RX_FIFO_FULL |
|
||||
SPRD_IMSR_BREAK_DETECT | SPRD_IMSR_TIMEOUT))
|
||||
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
|
||||
index 5e6136d2ed71..c6578b321838 100644
|
||||
--- a/drivers/usb/core/config.c
|
||||
+++ b/drivers/usb/core/config.c
|
||||
@@ -763,18 +763,21 @@ void usb_destroy_configuration(struct usb_device *dev)
|
||||
return;
|
||||
|
||||
if (dev->rawdescriptors) {
|
||||
- for (i = 0; i < dev->descriptor.bNumConfigurations; i++)
|
||||
+ for (i = 0; i < dev->descriptor.bNumConfigurations &&
|
||||
+ i < USB_MAXCONFIG; i++)
|
||||
kfree(dev->rawdescriptors[i]);
|
||||
|
||||
kfree(dev->rawdescriptors);
|
||||
dev->rawdescriptors = NULL;
|
||||
}
|
||||
|
||||
- for (c = 0; c < dev->descriptor.bNumConfigurations; c++) {
|
||||
+ for (c = 0; c < dev->descriptor.bNumConfigurations &&
|
||||
+ c < USB_MAXCONFIG; c++) {
|
||||
struct usb_host_config *cf = &dev->config[c];
|
||||
|
||||
kfree(cf->string);
|
||||
- for (i = 0; i < cf->desc.bNumInterfaces; i++) {
|
||||
+ for (i = 0; i < cf->desc.bNumInterfaces &&
|
||||
+ i < USB_MAXINTERFACES; i++) {
|
||||
if (cf->intf_cache[i])
|
||||
kref_put(&cf->intf_cache[i]->ref,
|
||||
usb_release_interface_cache);
|
||||
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
|
||||
index d95ae092f154..baa1510a5298 100644
|
||||
--- a/drivers/video/backlight/pwm_bl.c
|
||||
+++ b/drivers/video/backlight/pwm_bl.c
|
||||
@@ -78,10 +78,11 @@ static void pwm_backlight_power_on(struct pwm_bl_data *pb, int brightness)
|
||||
if (err < 0)
|
||||
dev_err(pb->dev, "failed to enable power supply\n");
|
||||
|
||||
+ pwm_enable(pb->pwm);
|
||||
+
|
||||
if (pb->enable_gpios)
|
||||
set_gpios(pb->enable_gpios, 1);
|
||||
|
||||
- pwm_enable(pb->pwm);
|
||||
pb->enabled = true;
|
||||
}
|
||||
|
||||
@@ -90,12 +91,12 @@ static void pwm_backlight_power_off(struct pwm_bl_data *pb)
|
||||
if (!pb->enabled)
|
||||
return;
|
||||
|
||||
- pwm_config(pb->pwm, 0, pb->period);
|
||||
- pwm_disable(pb->pwm);
|
||||
-
|
||||
if (pb->enable_gpios)
|
||||
set_gpios(pb->enable_gpios, 0);
|
||||
|
||||
+ pwm_config(pb->pwm, 0, pb->period);
|
||||
+ pwm_disable(pb->pwm);
|
||||
+
|
||||
regulator_disable(pb->power_supply);
|
||||
pb->enabled = false;
|
||||
}
|
||||
diff --git a/fs/dcache.c b/fs/dcache.c
|
||||
index 29c0286bd638..05bad55352bb 100644
|
||||
--- a/fs/dcache.c
|
||||
+++ b/fs/dcache.c
|
||||
@@ -1522,7 +1522,7 @@ static void check_and_drop(void *_data)
|
||||
{
|
||||
struct detach_data *data = _data;
|
||||
|
||||
- if (!data->mountpoint && !data->select.found)
|
||||
+ if (!data->mountpoint && list_empty(&data->select.dispose))
|
||||
__d_drop(data->select.start);
|
||||
}
|
||||
|
||||
@@ -1564,17 +1564,15 @@ void d_invalidate(struct dentry *dentry)
|
||||
|
||||
d_walk(dentry, &data, detach_and_collect, check_and_drop);
|
||||
|
||||
- if (data.select.found)
|
||||
+ if (!list_empty(&data.select.dispose))
|
||||
shrink_dentry_list(&data.select.dispose);
|
||||
+ else if (!data.mountpoint)
|
||||
+ return;
|
||||
|
||||
if (data.mountpoint) {
|
||||
detach_mounts(data.mountpoint);
|
||||
dput(data.mountpoint);
|
||||
}
|
||||
-
|
||||
- if (!data.mountpoint && !data.select.found)
|
||||
- break;
|
||||
-
|
||||
cond_resched();
|
||||
}
|
||||
}
|
||||
diff --git a/fs/ext4/ext4_jbd2.h b/fs/ext4/ext4_jbd2.h
|
||||
index f97611171023..4b7cc1af03a0 100644
|
||||
--- a/fs/ext4/ext4_jbd2.h
|
||||
+++ b/fs/ext4/ext4_jbd2.h
|
||||
@@ -391,7 +391,7 @@ static inline void ext4_update_inode_fsync_trans(handle_t *handle,
|
||||
{
|
||||
struct ext4_inode_info *ei = EXT4_I(inode);
|
||||
|
||||
- if (ext4_handle_valid(handle)) {
|
||||
+ if (ext4_handle_valid(handle) && !is_handle_aborted(handle)) {
|
||||
ei->i_sync_tid = handle->h_transaction->t_tid;
|
||||
if (datasync)
|
||||
ei->i_datasync_tid = handle->h_transaction->t_tid;
|
||||
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
|
||||
index 08fca4add1e2..fe76d0957a1f 100644
|
||||
--- a/fs/ext4/file.c
|
||||
+++ b/fs/ext4/file.c
|
||||
@@ -79,7 +79,7 @@ ext4_unaligned_aio(struct inode *inode, struct iov_iter *from, loff_t pos)
|
||||
struct super_block *sb = inode->i_sb;
|
||||
int blockmask = sb->s_blocksize - 1;
|
||||
|
||||
- if (pos >= i_size_read(inode))
|
||||
+ if (pos >= ALIGN(i_size_read(inode), sb->s_blocksize))
|
||||
return 0;
|
||||
|
||||
if ((pos | iov_iter_alignment(from)) & blockmask)
|
||||
diff --git a/fs/ext4/indirect.c b/fs/ext4/indirect.c
|
||||
index 58229c1b4a3d..14007e621d2a 100644
|
||||
--- a/fs/ext4/indirect.c
|
||||
+++ b/fs/ext4/indirect.c
|
||||
@@ -1385,10 +1385,14 @@ end_range:
|
||||
partial->p + 1,
|
||||
partial2->p,
|
||||
(chain+n-1) - partial);
|
||||
- BUFFER_TRACE(partial->bh, "call brelse");
|
||||
- brelse(partial->bh);
|
||||
- BUFFER_TRACE(partial2->bh, "call brelse");
|
||||
- brelse(partial2->bh);
|
||||
+ while (partial > chain) {
|
||||
+ BUFFER_TRACE(partial->bh, "call brelse");
|
||||
+ brelse(partial->bh);
|
||||
+ }
|
||||
+ while (partial2 > chain2) {
|
||||
+ BUFFER_TRACE(partial2->bh, "call brelse");
|
||||
+ brelse(partial2->bh);
|
||||
+ }
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/fs/udf/truncate.c b/fs/udf/truncate.c
|
||||
index 42b8c57795cb..c6ce7503a329 100644
|
||||
--- a/fs/udf/truncate.c
|
||||
+++ b/fs/udf/truncate.c
|
||||
@@ -260,6 +260,9 @@ void udf_truncate_extents(struct inode *inode)
|
||||
epos.block = eloc;
|
||||
epos.bh = udf_tread(sb,
|
||||
udf_get_lb_pblock(sb, &eloc, 0));
|
||||
+ /* Error reading indirect block? */
|
||||
+ if (!epos.bh)
|
||||
+ return;
|
||||
if (elen)
|
||||
indirect_ext_len =
|
||||
(elen + sb->s_blocksize - 1) >>
|
||||
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h
|
||||
index a8a574897d3c..fe757514feb1 100644
|
||||
--- a/include/linux/ceph/libceph.h
|
||||
+++ b/include/linux/ceph/libceph.h
|
||||
@@ -276,6 +276,8 @@ extern void ceph_destroy_client(struct ceph_client *client);
|
||||
extern int __ceph_open_session(struct ceph_client *client,
|
||||
unsigned long started);
|
||||
extern int ceph_open_session(struct ceph_client *client);
|
||||
+int ceph_wait_for_latest_osdmap(struct ceph_client *client,
|
||||
+ unsigned long timeout);
|
||||
|
||||
/* pagevec.c */
|
||||
extern void ceph_release_page_vector(struct page **pages, int num_pages);
|
||||
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
|
||||
index 197a30d221e9..146054ceea8e 100644
|
||||
--- a/include/net/inet_connection_sock.h
|
||||
+++ b/include/net/inet_connection_sock.h
|
||||
@@ -289,11 +289,6 @@ static inline int inet_csk_reqsk_queue_len(const struct sock *sk)
|
||||
return reqsk_queue_len(&inet_csk(sk)->icsk_accept_queue);
|
||||
}
|
||||
|
||||
-static inline int inet_csk_reqsk_queue_young(const struct sock *sk)
|
||||
-{
|
||||
- return reqsk_queue_len_young(&inet_csk(sk)->icsk_accept_queue);
|
||||
-}
|
||||
-
|
||||
static inline int inet_csk_reqsk_queue_is_full(const struct sock *sk)
|
||||
{
|
||||
return inet_csk_reqsk_queue_len(sk) >= sk->sk_max_ack_backlog;
|
||||
diff --git a/kernel/futex.c b/kernel/futex.c
|
||||
index 30fe0432c46d..2e766ffff2cb 100644
|
||||
--- a/kernel/futex.c
|
||||
+++ b/kernel/futex.c
|
||||
@@ -3110,6 +3110,10 @@ int handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi)
|
||||
{
|
||||
u32 uval, uninitialized_var(nval), mval;
|
||||
|
||||
+ /* Futex address must be 32bit aligned */
|
||||
+ if ((((unsigned long)uaddr) % sizeof(*uaddr)) != 0)
|
||||
+ return -1;
|
||||
+
|
||||
retry:
|
||||
if (get_user(uval, uaddr))
|
||||
return -1;
|
||||
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
|
||||
index 26fc428476b9..d5b779d7e79f 100644
|
||||
--- a/kernel/locking/lockdep.c
|
||||
+++ b/kernel/locking/lockdep.c
|
||||
@@ -3446,6 +3446,9 @@ __lock_set_class(struct lockdep_map *lock, const char *name,
|
||||
unsigned int depth;
|
||||
int i;
|
||||
|
||||
+ if (unlikely(!debug_locks))
|
||||
+ return 0;
|
||||
+
|
||||
depth = curr->lockdep_depth;
|
||||
/*
|
||||
* This function is about (re)setting the class of a held lock,
|
||||
diff --git a/lib/int_sqrt.c b/lib/int_sqrt.c
|
||||
index 1ef4cc344977..1afb545a37c5 100644
|
||||
--- a/lib/int_sqrt.c
|
||||
+++ b/lib/int_sqrt.c
|
||||
@@ -22,6 +22,9 @@ unsigned long int_sqrt(unsigned long x)
|
||||
return x;
|
||||
|
||||
m = 1UL << (BITS_PER_LONG - 2);
|
||||
+ while (m > x)
|
||||
+ m >>= 2;
|
||||
+
|
||||
while (m != 0) {
|
||||
b = y + m;
|
||||
y >>= 1;
|
||||
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
|
||||
index c88a6007e643..ca1836941f3c 100644
|
||||
--- a/net/bluetooth/hci_sock.c
|
||||
+++ b/net/bluetooth/hci_sock.c
|
||||
@@ -826,8 +826,6 @@ static int hci_sock_release(struct socket *sock)
|
||||
if (!sk)
|
||||
return 0;
|
||||
|
||||
- hdev = hci_pi(sk)->hdev;
|
||||
-
|
||||
switch (hci_pi(sk)->channel) {
|
||||
case HCI_CHANNEL_MONITOR:
|
||||
atomic_dec(&monitor_promisc);
|
||||
@@ -849,6 +847,7 @@ static int hci_sock_release(struct socket *sock)
|
||||
|
||||
bt_sock_unlink(&hci_sk_list, sk);
|
||||
|
||||
+ hdev = hci_pi(sk)->hdev;
|
||||
if (hdev) {
|
||||
if (hci_pi(sk)->channel == HCI_CHANNEL_USER) {
|
||||
/* When releasing an user channel exclusive access,
|
||||
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
|
||||
index 464e88599b9d..bf0294cf4d22 100644
|
||||
--- a/net/ceph/ceph_common.c
|
||||
+++ b/net/ceph/ceph_common.c
|
||||
@@ -699,7 +699,6 @@ int __ceph_open_session(struct ceph_client *client, unsigned long started)
|
||||
}
|
||||
EXPORT_SYMBOL(__ceph_open_session);
|
||||
|
||||
-
|
||||
int ceph_open_session(struct ceph_client *client)
|
||||
{
|
||||
int ret;
|
||||
@@ -715,6 +714,23 @@ int ceph_open_session(struct ceph_client *client)
|
||||
}
|
||||
EXPORT_SYMBOL(ceph_open_session);
|
||||
|
||||
+int ceph_wait_for_latest_osdmap(struct ceph_client *client,
|
||||
+ unsigned long timeout)
|
||||
+{
|
||||
+ u64 newest_epoch;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = ceph_monc_get_version(&client->monc, "osdmap", &newest_epoch);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ if (client->osdc.osdmap->epoch >= newest_epoch)
|
||||
+ return 0;
|
||||
+
|
||||
+ ceph_osdc_maybe_request_map(&client->osdc);
|
||||
+ return ceph_monc_wait_osdmap(&client->monc, newest_epoch, timeout);
|
||||
+}
|
||||
+EXPORT_SYMBOL(ceph_wait_for_latest_osdmap);
|
||||
|
||||
static int __init init_ceph_lib(void)
|
||||
{
|
||||
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c
|
||||
index 500481003de4..288c1fcbcdf6 100644
|
||||
--- a/net/ceph/mon_client.c
|
||||
+++ b/net/ceph/mon_client.c
|
||||
@@ -914,6 +914,15 @@ int ceph_monc_blacklist_add(struct ceph_mon_client *monc,
|
||||
mutex_unlock(&monc->mutex);
|
||||
|
||||
ret = wait_generic_request(req);
|
||||
+ if (!ret)
|
||||
+ /*
|
||||
+ * Make sure we have the osdmap that includes the blacklist
|
||||
+ * entry. This is needed to ensure that the OSDs pick up the
|
||||
+ * new blacklist before processing any future requests from
|
||||
+ * this client.
|
||||
+ */
|
||||
+ ret = ceph_wait_for_latest_osdmap(monc->client, 0);
|
||||
+
|
||||
out:
|
||||
put_generic_request(req);
|
||||
return ret;
|
||||
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
|
||||
index 28ad6f187e19..1d6d3aaa8c3d 100644
|
||||
--- a/net/dccp/ipv4.c
|
||||
+++ b/net/dccp/ipv4.c
|
||||
@@ -596,13 +596,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
|
||||
if (inet_csk_reqsk_queue_is_full(sk))
|
||||
goto drop;
|
||||
|
||||
- /*
|
||||
- * Accept backlog is full. If we have already queued enough
|
||||
- * of warm entries in syn queue, drop request. It is better than
|
||||
- * clogging syn queue with openreqs with exponentially increasing
|
||||
- * timeout.
|
||||
- */
|
||||
- if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1)
|
||||
+ if (sk_acceptq_is_full(sk))
|
||||
goto drop;
|
||||
|
||||
req = inet_reqsk_alloc(&dccp_request_sock_ops, sk, true);
|
||||
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
|
||||
index 6cbcf399d22b..93c706172f40 100644
|
||||
--- a/net/dccp/ipv6.c
|
||||
+++ b/net/dccp/ipv6.c
|
||||
@@ -328,7 +328,7 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
|
||||
if (inet_csk_reqsk_queue_is_full(sk))
|
||||
goto drop;
|
||||
|
||||
- if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1)
|
||||
+ if (sk_acceptq_is_full(sk))
|
||||
goto drop;
|
||||
|
||||
req = inet_reqsk_alloc(&dccp6_request_sock_ops, sk, true);
|
||||
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
|
||||
index 48fe63c4fe24..cd4f13dda49e 100644
|
||||
--- a/net/ipv4/tcp_input.c
|
||||
+++ b/net/ipv4/tcp_input.c
|
||||
@@ -6374,13 +6374,7 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
|
||||
goto drop;
|
||||
}
|
||||
|
||||
-
|
||||
- /* Accept backlog is full. If we have already queued enough
|
||||
- * of warm entries in syn queue, drop request. It is better than
|
||||
- * clogging syn queue with openreqs with exponentially increasing
|
||||
- * timeout.
|
||||
- */
|
||||
- if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) {
|
||||
+ if (sk_acceptq_is_full(sk)) {
|
||||
NET_INC_STATS(sock_net(sk), LINUX_MIB_LISTENOVERFLOWS);
|
||||
goto drop;
|
||||
}
|
||||
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
|
||||
index c6b046ddefdd..1b5e217d1bb2 100644
|
||||
--- a/sound/pci/hda/hda_codec.c
|
||||
+++ b/sound/pci/hda/hda_codec.c
|
||||
@@ -3004,6 +3004,7 @@ static void hda_call_codec_resume(struct hda_codec *codec)
|
||||
hda_jackpoll_work(&codec->jackpoll_work.work);
|
||||
else
|
||||
snd_hda_jack_report_sync(codec);
|
||||
+ codec->core.dev.power.power_state = PMSG_ON;
|
||||
atomic_dec(&codec->core.in_pm);
|
||||
}
|
||||
|
||||
@@ -3036,10 +3037,62 @@ static int hda_codec_runtime_resume(struct device *dev)
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
+#ifdef CONFIG_PM_SLEEP
|
||||
+static int hda_codec_force_resume(struct device *dev)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ /* The get/put pair below enforces the runtime resume even if the
|
||||
+ * device hasn't been used at suspend time. This trick is needed to
|
||||
+ * update the jack state change during the sleep.
|
||||
+ */
|
||||
+ pm_runtime_get_noresume(dev);
|
||||
+ ret = pm_runtime_force_resume(dev);
|
||||
+ pm_runtime_put(dev);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int hda_codec_pm_suspend(struct device *dev)
|
||||
+{
|
||||
+ dev->power.power_state = PMSG_SUSPEND;
|
||||
+ return pm_runtime_force_suspend(dev);
|
||||
+}
|
||||
+
|
||||
+static int hda_codec_pm_resume(struct device *dev)
|
||||
+{
|
||||
+ dev->power.power_state = PMSG_RESUME;
|
||||
+ return hda_codec_force_resume(dev);
|
||||
+}
|
||||
+
|
||||
+static int hda_codec_pm_freeze(struct device *dev)
|
||||
+{
|
||||
+ dev->power.power_state = PMSG_FREEZE;
|
||||
+ return pm_runtime_force_suspend(dev);
|
||||
+}
|
||||
+
|
||||
+static int hda_codec_pm_thaw(struct device *dev)
|
||||
+{
|
||||
+ dev->power.power_state = PMSG_THAW;
|
||||
+ return hda_codec_force_resume(dev);
|
||||
+}
|
||||
+
|
||||
+static int hda_codec_pm_restore(struct device *dev)
|
||||
+{
|
||||
+ dev->power.power_state = PMSG_RESTORE;
|
||||
+ return hda_codec_force_resume(dev);
|
||||
+}
|
||||
+#endif /* CONFIG_PM_SLEEP */
|
||||
+
|
||||
/* referred in hda_bind.c */
|
||||
const struct dev_pm_ops hda_codec_driver_pm = {
|
||||
- SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
- pm_runtime_force_resume)
|
||||
+#ifdef CONFIG_PM_SLEEP
|
||||
+ .suspend = hda_codec_pm_suspend,
|
||||
+ .resume = hda_codec_pm_resume,
|
||||
+ .freeze = hda_codec_pm_freeze,
|
||||
+ .thaw = hda_codec_pm_thaw,
|
||||
+ .poweroff = hda_codec_pm_suspend,
|
||||
+ .restore = hda_codec_pm_restore,
|
||||
+#endif /* CONFIG_PM_SLEEP */
|
||||
SET_RUNTIME_PM_OPS(hda_codec_runtime_suspend, hda_codec_runtime_resume,
|
||||
NULL)
|
||||
};
|
||||
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
|
||||
index e128d1c71c30..3ff025b64527 100644
|
||||
--- a/tools/objtool/check.c
|
||||
+++ b/tools/objtool/check.c
|
||||
@@ -2132,9 +2132,10 @@ static void cleanup(struct objtool_file *file)
|
||||
elf_close(file->elf);
|
||||
}
|
||||
|
||||
+static struct objtool_file file;
|
||||
+
|
||||
int check(const char *_objname, bool orc)
|
||||
{
|
||||
- struct objtool_file file;
|
||||
int ret, warnings = 0;
|
||||
|
||||
objname = _objname;
|
1795
patch/kernel/cubox-default/patch-4.9.166-167.patch
Normal file
1795
patch/kernel/cubox-default/patch-4.9.166-167.patch
Normal file
File diff suppressed because it is too large
Load diff
2778
patch/kernel/cubox-default/patch-4.9.167-168.patch
Normal file
2778
patch/kernel/cubox-default/patch-4.9.167-168.patch
Normal file
File diff suppressed because it is too large
Load diff
3142
patch/kernel/cubox-default/patch-4.9.168-169.patch
Normal file
3142
patch/kernel/cubox-default/patch-4.9.168-169.patch
Normal file
File diff suppressed because it is too large
Load diff
4521
patch/kernel/cubox-default/patch-4.9.169-170.patch
Normal file
4521
patch/kernel/cubox-default/patch-4.9.169-170.patch
Normal file
File diff suppressed because it is too large
Load diff
1955
patch/kernel/cubox-default/patch-4.9.170-171.patch
Normal file
1955
patch/kernel/cubox-default/patch-4.9.170-171.patch
Normal file
File diff suppressed because it is too large
Load diff
3013
patch/kernel/cubox-default/patch-4.9.171-172.patch
Normal file
3013
patch/kernel/cubox-default/patch-4.9.171-172.patch
Normal file
File diff suppressed because it is too large
Load diff
881
patch/kernel/cubox-default/patch-4.9.172-173.patch
Normal file
881
patch/kernel/cubox-default/patch-4.9.172-173.patch
Normal file
|
@ -0,0 +1,881 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 75cba5fbdb46..a4e35453f9e4 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
-SUBLEVEL = 172
|
||||
+SUBLEVEL = 173
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
index 84df85ea6296..7efde03daadd 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
@@ -26,5 +26,5 @@
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
- hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
|
||||
+ hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi b/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
|
||||
index e0280cac2484..fed72a5f3ffa 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
|
||||
@@ -90,6 +90,7 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_enet>;
|
||||
phy-mode = "rgmii";
|
||||
+ phy-reset-duration = <10>; /* in msecs */
|
||||
phy-reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
|
||||
phy-supply = <&vdd_eth_io_reg>;
|
||||
status = "disabled";
|
||||
diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h
|
||||
index 8d665f1b29f8..f0fe566a9910 100644
|
||||
--- a/arch/s390/include/asm/elf.h
|
||||
+++ b/arch/s390/include/asm/elf.h
|
||||
@@ -215,11 +215,14 @@ do { \
|
||||
|
||||
/*
|
||||
* Cache aliasing on the latest machines calls for a mapping granularity
|
||||
- * of 512KB. For 64-bit processes use a 512KB alignment and a randomization
|
||||
- * of up to 1GB. For 31-bit processes the virtual address space is limited,
|
||||
- * use no alignment and limit the randomization to 8MB.
|
||||
+ * of 512KB for the anonymous mapping base. For 64-bit processes use a
|
||||
+ * 512KB alignment and a randomization of up to 1GB. For 31-bit processes
|
||||
+ * the virtual address space is limited, use no alignment and limit the
|
||||
+ * randomization to 8MB.
|
||||
+ * For the additional randomization of the program break use 32MB for
|
||||
+ * 64-bit and 8MB for 31-bit.
|
||||
*/
|
||||
-#define BRK_RND_MASK (is_compat_task() ? 0x7ffUL : 0x3ffffUL)
|
||||
+#define BRK_RND_MASK (is_compat_task() ? 0x7ffUL : 0x1fffUL)
|
||||
#define MMAP_RND_MASK (is_compat_task() ? 0x7ffUL : 0x3ff80UL)
|
||||
#define MMAP_ALIGN_MASK (is_compat_task() ? 0 : 0x7fUL)
|
||||
#define STACK_RND_MASK MMAP_RND_MASK
|
||||
diff --git a/drivers/ata/libata-zpodd.c b/drivers/ata/libata-zpodd.c
|
||||
index 0ad96c647541..7017a81d53cf 100644
|
||||
--- a/drivers/ata/libata-zpodd.c
|
||||
+++ b/drivers/ata/libata-zpodd.c
|
||||
@@ -51,38 +51,52 @@ static int eject_tray(struct ata_device *dev)
|
||||
/* Per the spec, only slot type and drawer type ODD can be supported */
|
||||
static enum odd_mech_type zpodd_get_mech_type(struct ata_device *dev)
|
||||
{
|
||||
- char buf[16];
|
||||
+ char *buf;
|
||||
unsigned int ret;
|
||||
- struct rm_feature_desc *desc = (void *)(buf + 8);
|
||||
+ struct rm_feature_desc *desc;
|
||||
struct ata_taskfile tf;
|
||||
static const char cdb[] = { GPCMD_GET_CONFIGURATION,
|
||||
2, /* only 1 feature descriptor requested */
|
||||
0, 3, /* 3, removable medium feature */
|
||||
0, 0, 0,/* reserved */
|
||||
- 0, sizeof(buf),
|
||||
+ 0, 16,
|
||||
0, 0, 0,
|
||||
};
|
||||
|
||||
+ buf = kzalloc(16, GFP_KERNEL);
|
||||
+ if (!buf)
|
||||
+ return ODD_MECH_TYPE_UNSUPPORTED;
|
||||
+ desc = (void *)(buf + 8);
|
||||
+
|
||||
ata_tf_init(dev, &tf);
|
||||
tf.flags = ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
|
||||
tf.command = ATA_CMD_PACKET;
|
||||
tf.protocol = ATAPI_PROT_PIO;
|
||||
- tf.lbam = sizeof(buf);
|
||||
+ tf.lbam = 16;
|
||||
|
||||
ret = ata_exec_internal(dev, &tf, cdb, DMA_FROM_DEVICE,
|
||||
- buf, sizeof(buf), 0);
|
||||
- if (ret)
|
||||
+ buf, 16, 0);
|
||||
+ if (ret) {
|
||||
+ kfree(buf);
|
||||
return ODD_MECH_TYPE_UNSUPPORTED;
|
||||
+ }
|
||||
|
||||
- if (be16_to_cpu(desc->feature_code) != 3)
|
||||
+ if (be16_to_cpu(desc->feature_code) != 3) {
|
||||
+ kfree(buf);
|
||||
return ODD_MECH_TYPE_UNSUPPORTED;
|
||||
+ }
|
||||
|
||||
- if (desc->mech_type == 0 && desc->load == 0 && desc->eject == 1)
|
||||
+ if (desc->mech_type == 0 && desc->load == 0 && desc->eject == 1) {
|
||||
+ kfree(buf);
|
||||
return ODD_MECH_TYPE_SLOT;
|
||||
- else if (desc->mech_type == 1 && desc->load == 0 && desc->eject == 1)
|
||||
+ } else if (desc->mech_type == 1 && desc->load == 0 &&
|
||||
+ desc->eject == 1) {
|
||||
+ kfree(buf);
|
||||
return ODD_MECH_TYPE_DRAWER;
|
||||
- else
|
||||
+ } else {
|
||||
+ kfree(buf);
|
||||
return ODD_MECH_TYPE_UNSUPPORTED;
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Test if ODD is zero power ready by sense code */
|
||||
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
|
||||
index aac84329c759..b863386be911 100644
|
||||
--- a/drivers/gpio/gpiolib-of.c
|
||||
+++ b/drivers/gpio/gpiolib-of.c
|
||||
@@ -531,7 +531,13 @@ int of_gpiochip_add(struct gpio_chip *chip)
|
||||
|
||||
of_node_get(chip->of_node);
|
||||
|
||||
- return of_gpiochip_scan_gpios(chip);
|
||||
+ status = of_gpiochip_scan_gpios(chip);
|
||||
+ if (status) {
|
||||
+ of_node_put(chip->of_node);
|
||||
+ gpiochip_remove_pin_ranges(chip);
|
||||
+ }
|
||||
+
|
||||
+ return status;
|
||||
}
|
||||
|
||||
void of_gpiochip_remove(struct gpio_chip *chip)
|
||||
diff --git a/drivers/leds/leds-pca9532.c b/drivers/leds/leds-pca9532.c
|
||||
index 09a7cffbc46f..896b38f6f9c0 100644
|
||||
--- a/drivers/leds/leds-pca9532.c
|
||||
+++ b/drivers/leds/leds-pca9532.c
|
||||
@@ -488,6 +488,7 @@ static int pca9532_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *id)
|
||||
{
|
||||
int devid;
|
||||
+ const struct of_device_id *of_id;
|
||||
struct pca9532_data *data = i2c_get_clientdata(client);
|
||||
struct pca9532_platform_data *pca9532_pdata =
|
||||
dev_get_platdata(&client->dev);
|
||||
@@ -503,8 +504,11 @@ static int pca9532_probe(struct i2c_client *client,
|
||||
dev_err(&client->dev, "no platform data\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
- devid = (int)(uintptr_t)of_match_device(
|
||||
- of_pca9532_leds_match, &client->dev)->data;
|
||||
+ of_id = of_match_device(of_pca9532_leds_match,
|
||||
+ &client->dev);
|
||||
+ if (unlikely(!of_id))
|
||||
+ return -EINVAL;
|
||||
+ devid = (int)(uintptr_t) of_id->data;
|
||||
} else {
|
||||
devid = id->driver_data;
|
||||
}
|
||||
diff --git a/drivers/media/platform/vivid/vivid-vid-common.c b/drivers/media/platform/vivid/vivid-vid-common.c
|
||||
index f9a810e3f521..5f052189a6c4 100644
|
||||
--- a/drivers/media/platform/vivid/vivid-vid-common.c
|
||||
+++ b/drivers/media/platform/vivid/vivid-vid-common.c
|
||||
@@ -841,6 +841,7 @@ int vidioc_g_edid(struct file *file, void *_fh,
|
||||
if (edid->start_block + edid->blocks > dev->edid_blocks)
|
||||
edid->blocks = dev->edid_blocks - edid->start_block;
|
||||
memcpy(edid->edid, dev->edid, edid->blocks * 128);
|
||||
- cec_set_edid_phys_addr(edid->edid, edid->blocks * 128, adap->phys_addr);
|
||||
+ if (adap)
|
||||
+ cec_set_edid_phys_addr(edid->edid, edid->blocks * 128, adap->phys_addr);
|
||||
return 0;
|
||||
}
|
||||
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
|
||||
index bd719e25dd76..2dd17e01e3a7 100644
|
||||
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
|
||||
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
|
||||
@@ -3184,6 +3184,7 @@ static ssize_t ehea_probe_port(struct device *dev,
|
||||
|
||||
if (ehea_add_adapter_mr(adapter)) {
|
||||
pr_err("creating MR failed\n");
|
||||
+ of_node_put(eth_dn);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
|
||||
index 1edc973df4c4..7377dca6eb57 100644
|
||||
--- a/drivers/net/ethernet/micrel/ks8851.c
|
||||
+++ b/drivers/net/ethernet/micrel/ks8851.c
|
||||
@@ -547,9 +547,8 @@ static void ks8851_rx_pkts(struct ks8851_net *ks)
|
||||
/* set dma read address */
|
||||
ks8851_wrreg16(ks, KS_RXFDPR, RXFDPR_RXFPAI | 0x00);
|
||||
|
||||
- /* start the packet dma process, and set auto-dequeue rx */
|
||||
- ks8851_wrreg16(ks, KS_RXQCR,
|
||||
- ks->rc_rxqcr | RXQCR_SDA | RXQCR_ADRFE);
|
||||
+ /* start DMA access */
|
||||
+ ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr | RXQCR_SDA);
|
||||
|
||||
if (rxlen > 4) {
|
||||
unsigned int rxalign;
|
||||
@@ -580,7 +579,8 @@ static void ks8851_rx_pkts(struct ks8851_net *ks)
|
||||
}
|
||||
}
|
||||
|
||||
- ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr);
|
||||
+ /* end DMA access and dequeue packet */
|
||||
+ ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr | RXQCR_RRXEF);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -797,6 +797,15 @@ static void ks8851_tx_work(struct work_struct *work)
|
||||
static int ks8851_net_open(struct net_device *dev)
|
||||
{
|
||||
struct ks8851_net *ks = netdev_priv(dev);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = request_threaded_irq(dev->irq, NULL, ks8851_irq,
|
||||
+ IRQF_TRIGGER_LOW | IRQF_ONESHOT,
|
||||
+ dev->name, ks);
|
||||
+ if (ret < 0) {
|
||||
+ netdev_err(dev, "failed to get irq\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
|
||||
/* lock the card, even if we may not actually be doing anything
|
||||
* else at the moment */
|
||||
@@ -861,6 +870,7 @@ static int ks8851_net_open(struct net_device *dev)
|
||||
netif_dbg(ks, ifup, ks->netdev, "network device up\n");
|
||||
|
||||
mutex_unlock(&ks->lock);
|
||||
+ mii_check_link(&ks->mii);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -911,6 +921,8 @@ static int ks8851_net_stop(struct net_device *dev)
|
||||
dev_kfree_skb(txb);
|
||||
}
|
||||
|
||||
+ free_irq(dev->irq, ks);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1516,6 +1528,7 @@ static int ks8851_probe(struct spi_device *spi)
|
||||
|
||||
spi_set_drvdata(spi, ks);
|
||||
|
||||
+ netif_carrier_off(ks->netdev);
|
||||
ndev->if_port = IF_PORT_100BASET;
|
||||
ndev->netdev_ops = &ks8851_netdev_ops;
|
||||
ndev->irq = spi->irq;
|
||||
@@ -1542,14 +1555,6 @@ static int ks8851_probe(struct spi_device *spi)
|
||||
ks8851_read_selftest(ks);
|
||||
ks8851_init_mac(ks);
|
||||
|
||||
- ret = request_threaded_irq(spi->irq, NULL, ks8851_irq,
|
||||
- IRQF_TRIGGER_LOW | IRQF_ONESHOT,
|
||||
- ndev->name, ks);
|
||||
- if (ret < 0) {
|
||||
- dev_err(&spi->dev, "failed to get irq\n");
|
||||
- goto err_irq;
|
||||
- }
|
||||
-
|
||||
ret = register_netdev(ndev);
|
||||
if (ret) {
|
||||
dev_err(&spi->dev, "failed to register network device\n");
|
||||
@@ -1562,14 +1567,10 @@ static int ks8851_probe(struct spi_device *spi)
|
||||
|
||||
return 0;
|
||||
|
||||
-
|
||||
err_netdev:
|
||||
- free_irq(ndev->irq, ks);
|
||||
-
|
||||
-err_irq:
|
||||
+err_id:
|
||||
if (gpio_is_valid(gpio))
|
||||
gpio_set_value(gpio, 0);
|
||||
-err_id:
|
||||
regulator_disable(ks->vdd_reg);
|
||||
err_reg:
|
||||
regulator_disable(ks->vdd_io);
|
||||
@@ -1587,7 +1588,6 @@ static int ks8851_remove(struct spi_device *spi)
|
||||
dev_info(&spi->dev, "remove\n");
|
||||
|
||||
unregister_netdev(priv->netdev);
|
||||
- free_irq(spi->irq, priv);
|
||||
if (gpio_is_valid(priv->gpio))
|
||||
gpio_set_value(priv->gpio, 0);
|
||||
regulator_disable(priv->vdd_reg);
|
||||
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
|
||||
index 0a2318cad34d..63ebc491057b 100644
|
||||
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
|
||||
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
|
||||
@@ -1038,6 +1038,8 @@ int qlcnic_do_lb_test(struct qlcnic_adapter *adapter, u8 mode)
|
||||
|
||||
for (i = 0; i < QLCNIC_NUM_ILB_PKT; i++) {
|
||||
skb = netdev_alloc_skb(adapter->netdev, QLCNIC_ILB_PKT_SIZE);
|
||||
+ if (!skb)
|
||||
+ break;
|
||||
qlcnic_create_loopback_buff(skb->data, adapter->mac_addr);
|
||||
skb_put(skb, QLCNIC_ILB_PKT_SIZE);
|
||||
adapter->ahw->diag_cnt = 0;
|
||||
diff --git a/drivers/net/ethernet/ti/netcp_ethss.c b/drivers/net/ethernet/ti/netcp_ethss.c
|
||||
index d543298d6750..ff24524e7f46 100644
|
||||
--- a/drivers/net/ethernet/ti/netcp_ethss.c
|
||||
+++ b/drivers/net/ethernet/ti/netcp_ethss.c
|
||||
@@ -3122,12 +3122,16 @@ static int gbe_probe(struct netcp_device *netcp_device, struct device *dev,
|
||||
|
||||
ret = netcp_txpipe_init(&gbe_dev->tx_pipe, netcp_device,
|
||||
gbe_dev->dma_chan_name, gbe_dev->tx_queue_id);
|
||||
- if (ret)
|
||||
+ if (ret) {
|
||||
+ of_node_put(interfaces);
|
||||
return ret;
|
||||
+ }
|
||||
|
||||
ret = netcp_txpipe_open(&gbe_dev->tx_pipe);
|
||||
- if (ret)
|
||||
+ if (ret) {
|
||||
+ of_node_put(interfaces);
|
||||
return ret;
|
||||
+ }
|
||||
|
||||
/* Create network interfaces */
|
||||
INIT_LIST_HEAD(&gbe_dev->gbe_intf_head);
|
||||
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
|
||||
index c688d68c39aa..a8afc92cbfca 100644
|
||||
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
|
||||
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
|
||||
@@ -1548,12 +1548,14 @@ static int axienet_probe(struct platform_device *pdev)
|
||||
ret = of_address_to_resource(np, 0, &dmares);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "unable to get DMA resource\n");
|
||||
+ of_node_put(np);
|
||||
goto free_netdev;
|
||||
}
|
||||
lp->dma_regs = devm_ioremap_resource(&pdev->dev, &dmares);
|
||||
if (IS_ERR(lp->dma_regs)) {
|
||||
dev_err(&pdev->dev, "could not map DMA regs\n");
|
||||
ret = PTR_ERR(lp->dma_regs);
|
||||
+ of_node_put(np);
|
||||
goto free_netdev;
|
||||
}
|
||||
lp->rx_irq = irq_of_parse_and_map(np, 1);
|
||||
diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c
|
||||
index f1f8227e7342..01f95d192d25 100644
|
||||
--- a/drivers/net/usb/ipheth.c
|
||||
+++ b/drivers/net/usb/ipheth.c
|
||||
@@ -148,6 +148,7 @@ struct ipheth_device {
|
||||
u8 bulk_in;
|
||||
u8 bulk_out;
|
||||
struct delayed_work carrier_work;
|
||||
+ bool confirmed_pairing;
|
||||
};
|
||||
|
||||
static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags);
|
||||
@@ -259,7 +260,7 @@ static void ipheth_rcvbulk_callback(struct urb *urb)
|
||||
|
||||
dev->net->stats.rx_packets++;
|
||||
dev->net->stats.rx_bytes += len;
|
||||
-
|
||||
+ dev->confirmed_pairing = true;
|
||||
netif_rx(skb);
|
||||
ipheth_rx_submit(dev, GFP_ATOMIC);
|
||||
}
|
||||
@@ -280,14 +281,24 @@ static void ipheth_sndbulk_callback(struct urb *urb)
|
||||
dev_err(&dev->intf->dev, "%s: urb status: %d\n",
|
||||
__func__, status);
|
||||
|
||||
- netif_wake_queue(dev->net);
|
||||
+ if (status == 0)
|
||||
+ netif_wake_queue(dev->net);
|
||||
+ else
|
||||
+ // on URB error, trigger immediate poll
|
||||
+ schedule_delayed_work(&dev->carrier_work, 0);
|
||||
}
|
||||
|
||||
static int ipheth_carrier_set(struct ipheth_device *dev)
|
||||
{
|
||||
- struct usb_device *udev = dev->udev;
|
||||
+ struct usb_device *udev;
|
||||
int retval;
|
||||
|
||||
+ if (!dev)
|
||||
+ return 0;
|
||||
+ if (!dev->confirmed_pairing)
|
||||
+ return 0;
|
||||
+
|
||||
+ udev = dev->udev;
|
||||
retval = usb_control_msg(udev,
|
||||
usb_rcvctrlpipe(udev, IPHETH_CTRL_ENDP),
|
||||
IPHETH_CMD_CARRIER_CHECK, /* request */
|
||||
@@ -302,11 +313,14 @@ static int ipheth_carrier_set(struct ipheth_device *dev)
|
||||
return retval;
|
||||
}
|
||||
|
||||
- if (dev->ctrl_buf[0] == IPHETH_CARRIER_ON)
|
||||
+ if (dev->ctrl_buf[0] == IPHETH_CARRIER_ON) {
|
||||
netif_carrier_on(dev->net);
|
||||
- else
|
||||
+ if (dev->tx_urb->status != -EINPROGRESS)
|
||||
+ netif_wake_queue(dev->net);
|
||||
+ } else {
|
||||
netif_carrier_off(dev->net);
|
||||
-
|
||||
+ netif_stop_queue(dev->net);
|
||||
+ }
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -386,7 +400,6 @@ static int ipheth_open(struct net_device *net)
|
||||
return retval;
|
||||
|
||||
schedule_delayed_work(&dev->carrier_work, IPHETH_CARRIER_CHECK_TIMEOUT);
|
||||
- netif_start_queue(net);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -489,7 +502,7 @@ static int ipheth_probe(struct usb_interface *intf,
|
||||
dev->udev = udev;
|
||||
dev->net = netdev;
|
||||
dev->intf = intf;
|
||||
-
|
||||
+ dev->confirmed_pairing = false;
|
||||
/* Set up endpoints */
|
||||
hintf = usb_altnum_to_altsetting(intf, IPHETH_ALT_INTFNUM);
|
||||
if (hintf == NULL) {
|
||||
@@ -540,7 +553,9 @@ static int ipheth_probe(struct usb_interface *intf,
|
||||
retval = -EIO;
|
||||
goto err_register_netdev;
|
||||
}
|
||||
-
|
||||
+ // carrier down and transmit queues stopped until packet from device
|
||||
+ netif_carrier_off(netdev);
|
||||
+ netif_tx_stop_all_queues(netdev);
|
||||
dev_info(&intf->dev, "Apple iPhone USB Ethernet device attached\n");
|
||||
return 0;
|
||||
|
||||
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c
|
||||
index 237688af179b..f7630cf581cd 100644
|
||||
--- a/drivers/s390/scsi/zfcp_fc.c
|
||||
+++ b/drivers/s390/scsi/zfcp_fc.c
|
||||
@@ -238,10 +238,6 @@ static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range,
|
||||
list_for_each_entry(port, &adapter->port_list, list) {
|
||||
if ((port->d_id & range) == (ntoh24(page->rscn_fid) & range))
|
||||
zfcp_fc_test_link(port);
|
||||
- if (!port->d_id)
|
||||
- zfcp_erp_port_reopen(port,
|
||||
- ZFCP_STATUS_COMMON_ERP_FAILED,
|
||||
- "fcrscn1");
|
||||
}
|
||||
read_unlock_irqrestore(&adapter->port_list_lock, flags);
|
||||
}
|
||||
@@ -249,6 +245,7 @@ static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range,
|
||||
static void zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req)
|
||||
{
|
||||
struct fsf_status_read_buffer *status_buffer = (void *)fsf_req->data;
|
||||
+ struct zfcp_adapter *adapter = fsf_req->adapter;
|
||||
struct fc_els_rscn *head;
|
||||
struct fc_els_rscn_page *page;
|
||||
u16 i;
|
||||
@@ -261,6 +258,22 @@ static void zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req)
|
||||
/* see FC-FS */
|
||||
no_entries = head->rscn_plen / sizeof(struct fc_els_rscn_page);
|
||||
|
||||
+ if (no_entries > 1) {
|
||||
+ /* handle failed ports */
|
||||
+ unsigned long flags;
|
||||
+ struct zfcp_port *port;
|
||||
+
|
||||
+ read_lock_irqsave(&adapter->port_list_lock, flags);
|
||||
+ list_for_each_entry(port, &adapter->port_list, list) {
|
||||
+ if (port->d_id)
|
||||
+ continue;
|
||||
+ zfcp_erp_port_reopen(port,
|
||||
+ ZFCP_STATUS_COMMON_ERP_FAILED,
|
||||
+ "fcrscn1");
|
||||
+ }
|
||||
+ read_unlock_irqrestore(&adapter->port_list_lock, flags);
|
||||
+ }
|
||||
+
|
||||
for (i = 1; i < no_entries; i++) {
|
||||
/* skip head and start with 1st element */
|
||||
page++;
|
||||
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
|
||||
index f9f899ec9427..c158967b59d7 100644
|
||||
--- a/drivers/scsi/qla4xxx/ql4_os.c
|
||||
+++ b/drivers/scsi/qla4xxx/ql4_os.c
|
||||
@@ -3207,6 +3207,8 @@ static int qla4xxx_conn_bind(struct iscsi_cls_session *cls_session,
|
||||
if (iscsi_conn_bind(cls_session, cls_conn, is_leading))
|
||||
return -EINVAL;
|
||||
ep = iscsi_lookup_endpoint(transport_fd);
|
||||
+ if (!ep)
|
||||
+ return -EINVAL;
|
||||
conn = cls_conn->dd_data;
|
||||
qla_conn = conn->dd_data;
|
||||
qla_conn->qla_ep = ep->dd_data;
|
||||
diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c
|
||||
index 9f61583af150..41b667c8385c 100644
|
||||
--- a/drivers/staging/rtl8712/rtl8712_cmd.c
|
||||
+++ b/drivers/staging/rtl8712/rtl8712_cmd.c
|
||||
@@ -158,17 +158,9 @@ static u8 write_macreg_hdl(struct _adapter *padapter, u8 *pbuf)
|
||||
|
||||
static u8 read_bbreg_hdl(struct _adapter *padapter, u8 *pbuf)
|
||||
{
|
||||
- u32 val;
|
||||
- void (*pcmd_callback)(struct _adapter *dev, struct cmd_obj *pcmd);
|
||||
struct cmd_obj *pcmd = (struct cmd_obj *)pbuf;
|
||||
|
||||
- if (pcmd->rsp && pcmd->rspsz > 0)
|
||||
- memcpy(pcmd->rsp, (u8 *)&val, pcmd->rspsz);
|
||||
- pcmd_callback = cmd_callback[pcmd->cmdcode].callback;
|
||||
- if (!pcmd_callback)
|
||||
- r8712_free_cmd_obj(pcmd);
|
||||
- else
|
||||
- pcmd_callback(padapter, pcmd);
|
||||
+ r8712_free_cmd_obj(pcmd);
|
||||
return H2C_SUCCESS;
|
||||
}
|
||||
|
||||
diff --git a/drivers/staging/rtl8712/rtl8712_cmd.h b/drivers/staging/rtl8712/rtl8712_cmd.h
|
||||
index 67e9e910aef9..d10a59d4a550 100644
|
||||
--- a/drivers/staging/rtl8712/rtl8712_cmd.h
|
||||
+++ b/drivers/staging/rtl8712/rtl8712_cmd.h
|
||||
@@ -152,7 +152,7 @@ enum rtl8712_h2c_cmd {
|
||||
static struct _cmd_callback cmd_callback[] = {
|
||||
{GEN_CMD_CODE(_Read_MACREG), NULL}, /*0*/
|
||||
{GEN_CMD_CODE(_Write_MACREG), NULL},
|
||||
- {GEN_CMD_CODE(_Read_BBREG), &r8712_getbbrfreg_cmdrsp_callback},
|
||||
+ {GEN_CMD_CODE(_Read_BBREG), NULL},
|
||||
{GEN_CMD_CODE(_Write_BBREG), NULL},
|
||||
{GEN_CMD_CODE(_Read_RFREG), &r8712_getbbrfreg_cmdrsp_callback},
|
||||
{GEN_CMD_CODE(_Write_RFREG), NULL}, /*5*/
|
||||
diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c
|
||||
index 73137f4aac20..d4462512605b 100644
|
||||
--- a/drivers/tty/serial/ar933x_uart.c
|
||||
+++ b/drivers/tty/serial/ar933x_uart.c
|
||||
@@ -52,11 +52,6 @@ struct ar933x_uart_port {
|
||||
struct clk *clk;
|
||||
};
|
||||
|
||||
-static inline bool ar933x_uart_console_enabled(void)
|
||||
-{
|
||||
- return IS_ENABLED(CONFIG_SERIAL_AR933X_CONSOLE);
|
||||
-}
|
||||
-
|
||||
static inline unsigned int ar933x_uart_read(struct ar933x_uart_port *up,
|
||||
int offset)
|
||||
{
|
||||
@@ -511,6 +506,7 @@ static struct uart_ops ar933x_uart_ops = {
|
||||
.verify_port = ar933x_uart_verify_port,
|
||||
};
|
||||
|
||||
+#ifdef CONFIG_SERIAL_AR933X_CONSOLE
|
||||
static struct ar933x_uart_port *
|
||||
ar933x_console_ports[CONFIG_SERIAL_AR933X_NR_UARTS];
|
||||
|
||||
@@ -607,14 +603,7 @@ static struct console ar933x_uart_console = {
|
||||
.index = -1,
|
||||
.data = &ar933x_uart_driver,
|
||||
};
|
||||
-
|
||||
-static void ar933x_uart_add_console_port(struct ar933x_uart_port *up)
|
||||
-{
|
||||
- if (!ar933x_uart_console_enabled())
|
||||
- return;
|
||||
-
|
||||
- ar933x_console_ports[up->port.line] = up;
|
||||
-}
|
||||
+#endif /* CONFIG_SERIAL_AR933X_CONSOLE */
|
||||
|
||||
static struct uart_driver ar933x_uart_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
@@ -703,7 +692,9 @@ static int ar933x_uart_probe(struct platform_device *pdev)
|
||||
baud = ar933x_uart_get_baud(port->uartclk, 0, AR933X_UART_MAX_STEP);
|
||||
up->max_baud = min_t(unsigned int, baud, AR933X_UART_MAX_BAUD);
|
||||
|
||||
- ar933x_uart_add_console_port(up);
|
||||
+#ifdef CONFIG_SERIAL_AR933X_CONSOLE
|
||||
+ ar933x_console_ports[up->port.line] = up;
|
||||
+#endif
|
||||
|
||||
ret = uart_add_one_port(&ar933x_uart_driver, &up->port);
|
||||
if (ret)
|
||||
@@ -752,8 +743,9 @@ static int __init ar933x_uart_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
- if (ar933x_uart_console_enabled())
|
||||
- ar933x_uart_driver.cons = &ar933x_uart_console;
|
||||
+#ifdef CONFIG_SERIAL_AR933X_CONSOLE
|
||||
+ ar933x_uart_driver.cons = &ar933x_uart_console;
|
||||
+#endif
|
||||
|
||||
ret = uart_register_driver(&ar933x_uart_driver);
|
||||
if (ret)
|
||||
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
|
||||
index ea6b62cece88..82451bb6622b 100644
|
||||
--- a/drivers/tty/serial/sc16is7xx.c
|
||||
+++ b/drivers/tty/serial/sc16is7xx.c
|
||||
@@ -1482,7 +1482,7 @@ static int __init sc16is7xx_init(void)
|
||||
ret = i2c_add_driver(&sc16is7xx_i2c_uart_driver);
|
||||
if (ret < 0) {
|
||||
pr_err("failed to init sc16is7xx i2c --> %d\n", ret);
|
||||
- return ret;
|
||||
+ goto err_i2c;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1490,10 +1490,18 @@ static int __init sc16is7xx_init(void)
|
||||
ret = spi_register_driver(&sc16is7xx_spi_uart_driver);
|
||||
if (ret < 0) {
|
||||
pr_err("failed to init sc16is7xx spi --> %d\n", ret);
|
||||
- return ret;
|
||||
+ goto err_spi;
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
+
|
||||
+err_spi:
|
||||
+#ifdef CONFIG_SERIAL_SC16IS7XX_I2C
|
||||
+ i2c_del_driver(&sc16is7xx_i2c_uart_driver);
|
||||
+#endif
|
||||
+err_i2c:
|
||||
+ uart_unregister_driver(&sc16is7xx_uart);
|
||||
+ return ret;
|
||||
}
|
||||
module_init(sc16is7xx_init);
|
||||
|
||||
diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c
|
||||
index 40396a265a3f..f57d293a1791 100644
|
||||
--- a/drivers/usb/gadget/udc/net2272.c
|
||||
+++ b/drivers/usb/gadget/udc/net2272.c
|
||||
@@ -958,6 +958,7 @@ net2272_dequeue(struct usb_ep *_ep, struct usb_request *_req)
|
||||
break;
|
||||
}
|
||||
if (&req->req != _req) {
|
||||
+ ep->stopped = stopped;
|
||||
spin_unlock_irqrestore(&ep->dev->lock, flags);
|
||||
return -EINVAL;
|
||||
}
|
||||
diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c
|
||||
index 7a8c36642293..dfaed8e8cc52 100644
|
||||
--- a/drivers/usb/gadget/udc/net2280.c
|
||||
+++ b/drivers/usb/gadget/udc/net2280.c
|
||||
@@ -870,9 +870,6 @@ static void start_queue(struct net2280_ep *ep, u32 dmactl, u32 td_dma)
|
||||
(void) readl(&ep->dev->pci->pcimstctl);
|
||||
|
||||
writel(BIT(DMA_START), &dma->dmastat);
|
||||
-
|
||||
- if (!ep->is_in)
|
||||
- stop_out_naking(ep);
|
||||
}
|
||||
|
||||
static void start_dma(struct net2280_ep *ep, struct net2280_request *req)
|
||||
@@ -911,6 +908,7 @@ static void start_dma(struct net2280_ep *ep, struct net2280_request *req)
|
||||
writel(BIT(DMA_START), &dma->dmastat);
|
||||
return;
|
||||
}
|
||||
+ stop_out_naking(ep);
|
||||
}
|
||||
|
||||
tmp = dmactl_default;
|
||||
@@ -1279,9 +1277,9 @@ static int net2280_dequeue(struct usb_ep *_ep, struct usb_request *_req)
|
||||
break;
|
||||
}
|
||||
if (&req->req != _req) {
|
||||
+ ep->stopped = stopped;
|
||||
spin_unlock_irqrestore(&ep->dev->lock, flags);
|
||||
- dev_err(&ep->dev->pdev->dev, "%s: Request mismatch\n",
|
||||
- __func__);
|
||||
+ ep_dbg(ep->dev, "%s: Request mismatch\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c
|
||||
index 43618976d68a..3efb7b0e8269 100644
|
||||
--- a/drivers/usb/host/u132-hcd.c
|
||||
+++ b/drivers/usb/host/u132-hcd.c
|
||||
@@ -3208,6 +3208,9 @@ static int __init u132_hcd_init(void)
|
||||
printk(KERN_INFO "driver %s\n", hcd_name);
|
||||
workqueue = create_singlethread_workqueue("u132");
|
||||
retval = platform_driver_register(&u132_platform_driver);
|
||||
+ if (retval)
|
||||
+ destroy_workqueue(workqueue);
|
||||
+
|
||||
return retval;
|
||||
}
|
||||
|
||||
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
|
||||
index 1d48e62f4f52..0d5b667c0e65 100644
|
||||
--- a/drivers/vfio/vfio_iommu_type1.c
|
||||
+++ b/drivers/vfio/vfio_iommu_type1.c
|
||||
@@ -53,10 +53,16 @@ module_param_named(disable_hugepages,
|
||||
MODULE_PARM_DESC(disable_hugepages,
|
||||
"Disable VFIO IOMMU support for IOMMU hugepages.");
|
||||
|
||||
+static unsigned int dma_entry_limit __read_mostly = U16_MAX;
|
||||
+module_param_named(dma_entry_limit, dma_entry_limit, uint, 0644);
|
||||
+MODULE_PARM_DESC(dma_entry_limit,
|
||||
+ "Maximum number of user DMA mappings per container (65535).");
|
||||
+
|
||||
struct vfio_iommu {
|
||||
struct list_head domain_list;
|
||||
struct mutex lock;
|
||||
struct rb_root dma_list;
|
||||
+ unsigned int dma_avail;
|
||||
bool v2;
|
||||
bool nesting;
|
||||
};
|
||||
@@ -384,6 +390,7 @@ static void vfio_remove_dma(struct vfio_iommu *iommu, struct vfio_dma *dma)
|
||||
vfio_unmap_unpin(iommu, dma);
|
||||
vfio_unlink_dma(iommu, dma);
|
||||
kfree(dma);
|
||||
+ iommu->dma_avail++;
|
||||
}
|
||||
|
||||
static unsigned long vfio_pgsize_bitmap(struct vfio_iommu *iommu)
|
||||
@@ -584,12 +591,18 @@ static int vfio_dma_do_map(struct vfio_iommu *iommu,
|
||||
return -EEXIST;
|
||||
}
|
||||
|
||||
+ if (!iommu->dma_avail) {
|
||||
+ mutex_unlock(&iommu->lock);
|
||||
+ return -ENOSPC;
|
||||
+ }
|
||||
+
|
||||
dma = kzalloc(sizeof(*dma), GFP_KERNEL);
|
||||
if (!dma) {
|
||||
mutex_unlock(&iommu->lock);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
+ iommu->dma_avail--;
|
||||
dma->iova = iova;
|
||||
dma->vaddr = vaddr;
|
||||
dma->prot = prot;
|
||||
@@ -905,6 +918,7 @@ static void *vfio_iommu_type1_open(unsigned long arg)
|
||||
|
||||
INIT_LIST_HEAD(&iommu->domain_list);
|
||||
iommu->dma_list = RB_ROOT;
|
||||
+ iommu->dma_avail = dma_entry_limit;
|
||||
mutex_init(&iommu->lock);
|
||||
|
||||
return iommu;
|
||||
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
|
||||
index 30d9d9e7057d..7a4052501866 100644
|
||||
--- a/fs/ceph/inode.c
|
||||
+++ b/fs/ceph/inode.c
|
||||
@@ -523,6 +523,7 @@ static void ceph_i_callback(struct rcu_head *head)
|
||||
struct inode *inode = container_of(head, struct inode, i_rcu);
|
||||
struct ceph_inode_info *ci = ceph_inode(inode);
|
||||
|
||||
+ kfree(ci->i_symlink);
|
||||
kmem_cache_free(ceph_inode_cachep, ci);
|
||||
}
|
||||
|
||||
@@ -554,7 +555,6 @@ void ceph_destroy_inode(struct inode *inode)
|
||||
ceph_put_snap_realm(mdsc, realm);
|
||||
}
|
||||
|
||||
- kfree(ci->i_symlink);
|
||||
while ((n = rb_first(&ci->i_fragtree)) != NULL) {
|
||||
frag = rb_entry(n, struct ceph_inode_frag, node);
|
||||
rb_erase(n, &ci->i_fragtree);
|
||||
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
|
||||
index ebecfb8fba06..28d8a57a9908 100644
|
||||
--- a/fs/nfs/client.c
|
||||
+++ b/fs/nfs/client.c
|
||||
@@ -440,7 +440,7 @@ void nfs_init_timeout_values(struct rpc_timeout *to, int proto,
|
||||
case XPRT_TRANSPORT_RDMA:
|
||||
if (retrans == NFS_UNSPEC_RETRANS)
|
||||
to->to_retries = NFS_DEF_TCP_RETRANS;
|
||||
- if (timeo == NFS_UNSPEC_TIMEO || to->to_retries == 0)
|
||||
+ if (timeo == NFS_UNSPEC_TIMEO || to->to_initval == 0)
|
||||
to->to_initval = NFS_DEF_TCP_TIMEO * HZ / 10;
|
||||
if (to->to_initval > NFS_MAX_TCP_TIMEOUT)
|
||||
to->to_initval = NFS_MAX_TCP_TIMEOUT;
|
||||
diff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c
|
||||
index 38865deab3ac..0c96773d1829 100644
|
||||
--- a/net/bridge/br_netfilter_hooks.c
|
||||
+++ b/net/bridge/br_netfilter_hooks.c
|
||||
@@ -512,6 +512,7 @@ static unsigned int br_nf_pre_routing(void *priv,
|
||||
nf_bridge->ipv4_daddr = ip_hdr(skb)->daddr;
|
||||
|
||||
skb->protocol = htons(ETH_P_IP);
|
||||
+ skb->transport_header = skb->network_header + ip_hdr(skb)->ihl * 4;
|
||||
|
||||
NF_HOOK(NFPROTO_IPV4, NF_INET_PRE_ROUTING, state->net, state->sk, skb,
|
||||
skb->dev, NULL,
|
||||
diff --git a/net/bridge/br_netfilter_ipv6.c b/net/bridge/br_netfilter_ipv6.c
|
||||
index a1b57cb07f1e..8c08dd07419f 100644
|
||||
--- a/net/bridge/br_netfilter_ipv6.c
|
||||
+++ b/net/bridge/br_netfilter_ipv6.c
|
||||
@@ -235,6 +235,8 @@ unsigned int br_nf_pre_routing_ipv6(void *priv,
|
||||
nf_bridge->ipv6_daddr = ipv6_hdr(skb)->daddr;
|
||||
|
||||
skb->protocol = htons(ETH_P_IPV6);
|
||||
+ skb->transport_header = skb->network_header + sizeof(struct ipv6hdr);
|
||||
+
|
||||
NF_HOOK(NFPROTO_IPV6, NF_INET_PRE_ROUTING, state->net, state->sk, skb,
|
||||
skb->dev, NULL,
|
||||
br_nf_pre_routing_finish_ipv6);
|
||||
diff --git a/net/netfilter/nft_set_rbtree.c b/net/netfilter/nft_set_rbtree.c
|
||||
index 93820e0d8814..4ee8acded0a4 100644
|
||||
--- a/net/netfilter/nft_set_rbtree.c
|
||||
+++ b/net/netfilter/nft_set_rbtree.c
|
||||
@@ -191,10 +191,6 @@ static void *nft_rbtree_deactivate(const struct net *net,
|
||||
else if (d > 0)
|
||||
parent = parent->rb_right;
|
||||
else {
|
||||
- if (!nft_set_elem_active(&rbe->ext, genmask)) {
|
||||
- parent = parent->rb_left;
|
||||
- continue;
|
||||
- }
|
||||
if (nft_rbtree_interval_end(rbe) &&
|
||||
!nft_rbtree_interval_end(this)) {
|
||||
parent = parent->rb_left;
|
||||
@@ -203,6 +199,9 @@ static void *nft_rbtree_deactivate(const struct net *net,
|
||||
nft_rbtree_interval_end(this)) {
|
||||
parent = parent->rb_right;
|
||||
continue;
|
||||
+ } else if (!nft_set_elem_active(&rbe->ext, genmask)) {
|
||||
+ parent = parent->rb_left;
|
||||
+ continue;
|
||||
}
|
||||
nft_set_elem_change_active(net, set, &rbe->ext);
|
||||
return rbe;
|
||||
diff --git a/scripts/kconfig/lxdialog/inputbox.c b/scripts/kconfig/lxdialog/inputbox.c
|
||||
index d58de1dc5360..510049a7bd1d 100644
|
||||
--- a/scripts/kconfig/lxdialog/inputbox.c
|
||||
+++ b/scripts/kconfig/lxdialog/inputbox.c
|
||||
@@ -126,7 +126,8 @@ do_resize:
|
||||
case KEY_DOWN:
|
||||
break;
|
||||
case KEY_BACKSPACE:
|
||||
- case 127:
|
||||
+ case 8: /* ^H */
|
||||
+ case 127: /* ^? */
|
||||
if (pos) {
|
||||
wattrset(dialog, dlg.inputbox.atr);
|
||||
if (input_x == 0) {
|
||||
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
|
||||
index d42d534a66cd..f7049e288e93 100644
|
||||
--- a/scripts/kconfig/nconf.c
|
||||
+++ b/scripts/kconfig/nconf.c
|
||||
@@ -1046,7 +1046,7 @@ static int do_match(int key, struct match_state *state, int *ans)
|
||||
state->match_direction = FIND_NEXT_MATCH_UP;
|
||||
*ans = get_mext_match(state->pattern,
|
||||
state->match_direction);
|
||||
- } else if (key == KEY_BACKSPACE || key == 127) {
|
||||
+ } else if (key == KEY_BACKSPACE || key == 8 || key == 127) {
|
||||
state->pattern[strlen(state->pattern)-1] = '\0';
|
||||
adj_match_dir(&state->match_direction);
|
||||
} else
|
||||
diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c
|
||||
index 4b2f44c20caf..9a65035cf787 100644
|
||||
--- a/scripts/kconfig/nconf.gui.c
|
||||
+++ b/scripts/kconfig/nconf.gui.c
|
||||
@@ -439,7 +439,8 @@ int dialog_inputbox(WINDOW *main_window,
|
||||
case KEY_F(F_EXIT):
|
||||
case KEY_F(F_BACK):
|
||||
break;
|
||||
- case 127:
|
||||
+ case 8: /* ^H */
|
||||
+ case 127: /* ^? */
|
||||
case KEY_BACKSPACE:
|
||||
if (cursor_position > 0) {
|
||||
memmove(&result[cursor_position-1],
|
2517
patch/kernel/cubox-default/patch-4.9.173-174.patch
Normal file
2517
patch/kernel/cubox-default/patch-4.9.173-174.patch
Normal file
File diff suppressed because it is too large
Load diff
714
patch/kernel/cubox-default/patch-4.9.174-175.patch
Normal file
714
patch/kernel/cubox-default/patch-4.9.174-175.patch
Normal file
|
@ -0,0 +1,714 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index f5836837df15..e52b0579e176 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
-SUBLEVEL = 174
|
||||
+SUBLEVEL = 175
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
|
||||
index 098ab775135f..a30829052a00 100644
|
||||
--- a/arch/x86/events/intel/core.c
|
||||
+++ b/arch/x86/events/intel/core.c
|
||||
@@ -2867,7 +2867,7 @@ static int intel_pmu_hw_config(struct perf_event *event)
|
||||
return ret;
|
||||
|
||||
if (event->attr.precise_ip) {
|
||||
- if (!event->attr.freq) {
|
||||
+ if (!(event->attr.freq || event->attr.wakeup_events)) {
|
||||
event->hw.flags |= PERF_X86_EVENT_AUTO_RELOAD;
|
||||
if (!(event->attr.sample_type &
|
||||
~intel_pmu_free_running_flags(event)))
|
||||
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
|
||||
index 10332c24f961..44ef1d66caa6 100644
|
||||
--- a/drivers/block/virtio_blk.c
|
||||
+++ b/drivers/block/virtio_blk.c
|
||||
@@ -392,6 +392,8 @@ static int init_vq(struct virtio_blk *vblk)
|
||||
if (err)
|
||||
num_vqs = 1;
|
||||
|
||||
+ num_vqs = min_t(unsigned int, nr_cpu_ids, num_vqs);
|
||||
+
|
||||
vblk->vqs = kmalloc_array(num_vqs, sizeof(*vblk->vqs), GFP_KERNEL);
|
||||
if (!vblk->vqs)
|
||||
return -ENOMEM;
|
||||
diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
|
||||
index 863d030786e5..e7a6651ceeab 100644
|
||||
--- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
|
||||
+++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
|
||||
@@ -1473,7 +1473,6 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,
|
||||
if (IS_ERR(regmap))
|
||||
ret = PTR_ERR(regmap);
|
||||
if (ret) {
|
||||
- ret = PTR_ERR(regmap);
|
||||
dev_err(dev,
|
||||
"Failed to get system configuration registers: %d\n",
|
||||
ret);
|
||||
@@ -1529,6 +1528,7 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,
|
||||
of_node_put(remote);
|
||||
|
||||
hdmi->ddc_adpt = of_find_i2c_adapter_by_node(i2c_np);
|
||||
+ of_node_put(i2c_np);
|
||||
if (!hdmi->ddc_adpt) {
|
||||
dev_err(dev, "Failed to get ddc i2c adapter by node\n");
|
||||
return -EINVAL;
|
||||
diff --git a/drivers/infiniband/hw/hfi1/rc.c b/drivers/infiniband/hw/hfi1/rc.c
|
||||
index e8e0fa58cb71..b08786614c1b 100644
|
||||
--- a/drivers/infiniband/hw/hfi1/rc.c
|
||||
+++ b/drivers/infiniband/hw/hfi1/rc.c
|
||||
@@ -2394,7 +2394,7 @@ send_last:
|
||||
update_ack_queue(qp, next);
|
||||
}
|
||||
e = &qp->s_ack_queue[qp->r_head_ack_queue];
|
||||
- if (e->opcode == OP(RDMA_READ_REQUEST) && e->rdma_sge.mr) {
|
||||
+ if (e->rdma_sge.mr) {
|
||||
rvt_put_mr(e->rdma_sge.mr);
|
||||
e->rdma_sge.mr = NULL;
|
||||
}
|
||||
@@ -2469,7 +2469,7 @@ send_last:
|
||||
update_ack_queue(qp, next);
|
||||
}
|
||||
e = &qp->s_ack_queue[qp->r_head_ack_queue];
|
||||
- if (e->opcode == OP(RDMA_READ_REQUEST) && e->rdma_sge.mr) {
|
||||
+ if (e->rdma_sge.mr) {
|
||||
rvt_put_mr(e->rdma_sge.mr);
|
||||
e->rdma_sge.mr = NULL;
|
||||
}
|
||||
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
|
||||
index 157e93421fb8..13bbe5795e4e 100644
|
||||
--- a/drivers/iommu/amd_iommu_init.c
|
||||
+++ b/drivers/iommu/amd_iommu_init.c
|
||||
@@ -318,7 +318,7 @@ static void iommu_write_l2(struct amd_iommu *iommu, u8 address, u32 val)
|
||||
static void iommu_set_exclusion_range(struct amd_iommu *iommu)
|
||||
{
|
||||
u64 start = iommu->exclusion_start & PAGE_MASK;
|
||||
- u64 limit = (start + iommu->exclusion_length) & PAGE_MASK;
|
||||
+ u64 limit = (start + iommu->exclusion_length - 1) & PAGE_MASK;
|
||||
u64 entry;
|
||||
|
||||
if (!iommu->exclusion_start)
|
||||
diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c
|
||||
index 89a52b941ea8..894d97e4ace5 100644
|
||||
--- a/drivers/scsi/csiostor/csio_scsi.c
|
||||
+++ b/drivers/scsi/csiostor/csio_scsi.c
|
||||
@@ -1713,8 +1713,11 @@ csio_scsi_err_handler(struct csio_hw *hw, struct csio_ioreq *req)
|
||||
}
|
||||
|
||||
out:
|
||||
- if (req->nsge > 0)
|
||||
+ if (req->nsge > 0) {
|
||||
scsi_dma_unmap(cmnd);
|
||||
+ if (req->dcopy && (host_status == DID_OK))
|
||||
+ host_status = csio_scsi_copy_to_sgl(hw, req);
|
||||
+ }
|
||||
|
||||
cmnd->result = (((host_status) << 16) | scsi_status);
|
||||
cmnd->scsi_done(cmnd);
|
||||
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
|
||||
index 7be581f7c35d..1a6f65db615e 100644
|
||||
--- a/drivers/scsi/libsas/sas_expander.c
|
||||
+++ b/drivers/scsi/libsas/sas_expander.c
|
||||
@@ -47,17 +47,16 @@ static void smp_task_timedout(unsigned long _task)
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&task->task_state_lock, flags);
|
||||
- if (!(task->task_state_flags & SAS_TASK_STATE_DONE))
|
||||
+ if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) {
|
||||
task->task_state_flags |= SAS_TASK_STATE_ABORTED;
|
||||
+ complete(&task->slow_task->completion);
|
||||
+ }
|
||||
spin_unlock_irqrestore(&task->task_state_lock, flags);
|
||||
-
|
||||
- complete(&task->slow_task->completion);
|
||||
}
|
||||
|
||||
static void smp_task_done(struct sas_task *task)
|
||||
{
|
||||
- if (!del_timer(&task->slow_task->timer))
|
||||
- return;
|
||||
+ del_timer(&task->slow_task->timer);
|
||||
complete(&task->slow_task->completion);
|
||||
}
|
||||
|
||||
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
|
||||
index 9a34afcb1c4c..5c3dfd92ea02 100644
|
||||
--- a/drivers/scsi/qla2xxx/qla_attr.c
|
||||
+++ b/drivers/scsi/qla2xxx/qla_attr.c
|
||||
@@ -345,7 +345,7 @@ qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj,
|
||||
}
|
||||
|
||||
ha->optrom_region_start = start;
|
||||
- ha->optrom_region_size = start + size;
|
||||
+ ha->optrom_region_size = size;
|
||||
|
||||
ha->optrom_state = QLA_SREADING;
|
||||
ha->optrom_buffer = vmalloc(ha->optrom_region_size);
|
||||
@@ -418,7 +418,7 @@ qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj,
|
||||
}
|
||||
|
||||
ha->optrom_region_start = start;
|
||||
- ha->optrom_region_size = start + size;
|
||||
+ ha->optrom_region_size = size;
|
||||
|
||||
ha->optrom_state = QLA_SWRITING;
|
||||
ha->optrom_buffer = vmalloc(ha->optrom_region_size);
|
||||
diff --git a/drivers/staging/greybus/power_supply.c b/drivers/staging/greybus/power_supply.c
|
||||
index e85c988b7034..adea629b8065 100644
|
||||
--- a/drivers/staging/greybus/power_supply.c
|
||||
+++ b/drivers/staging/greybus/power_supply.c
|
||||
@@ -521,7 +521,7 @@ static int gb_power_supply_prop_descriptors_get(struct gb_power_supply *gbpsy)
|
||||
|
||||
op = gb_operation_create(connection,
|
||||
GB_POWER_SUPPLY_TYPE_GET_PROP_DESCRIPTORS,
|
||||
- sizeof(req), sizeof(*resp) + props_count *
|
||||
+ sizeof(*req), sizeof(*resp) + props_count *
|
||||
sizeof(struct gb_power_supply_props_desc),
|
||||
GFP_KERNEL);
|
||||
if (!op)
|
||||
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
|
||||
index 1e91b803ee4e..73dc5a6c6108 100644
|
||||
--- a/drivers/usb/dwc3/core.c
|
||||
+++ b/drivers/usb/dwc3/core.c
|
||||
@@ -991,7 +991,7 @@ static int dwc3_probe(struct platform_device *pdev)
|
||||
dwc->regs_size = resource_size(res);
|
||||
|
||||
/* default to highest possible threshold */
|
||||
- lpm_nyet_threshold = 0xff;
|
||||
+ lpm_nyet_threshold = 0xf;
|
||||
|
||||
/* default to -3.5dB de-emphasis */
|
||||
tx_de_emphasis = 1;
|
||||
diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c
|
||||
index 972f5a5fe577..1f20fa0a67c0 100644
|
||||
--- a/drivers/usb/serial/f81232.c
|
||||
+++ b/drivers/usb/serial/f81232.c
|
||||
@@ -560,9 +560,12 @@ static int f81232_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
|
||||
static void f81232_close(struct usb_serial_port *port)
|
||||
{
|
||||
+ struct f81232_private *port_priv = usb_get_serial_port_data(port);
|
||||
+
|
||||
f81232_port_disable(port);
|
||||
usb_serial_generic_close(port);
|
||||
usb_kill_urb(port->interrupt_in_urb);
|
||||
+ flush_work(&port_priv->interrupt_work);
|
||||
}
|
||||
|
||||
static void f81232_dtr_rts(struct usb_serial_port *port, int on)
|
||||
@@ -656,6 +659,40 @@ static int f81232_port_remove(struct usb_serial_port *port)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int f81232_suspend(struct usb_serial *serial, pm_message_t message)
|
||||
+{
|
||||
+ struct usb_serial_port *port = serial->port[0];
|
||||
+ struct f81232_private *port_priv = usb_get_serial_port_data(port);
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(port->read_urbs); ++i)
|
||||
+ usb_kill_urb(port->read_urbs[i]);
|
||||
+
|
||||
+ usb_kill_urb(port->interrupt_in_urb);
|
||||
+
|
||||
+ if (port_priv)
|
||||
+ flush_work(&port_priv->interrupt_work);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int f81232_resume(struct usb_serial *serial)
|
||||
+{
|
||||
+ struct usb_serial_port *port = serial->port[0];
|
||||
+ int result;
|
||||
+
|
||||
+ if (tty_port_initialized(&port->port)) {
|
||||
+ result = usb_submit_urb(port->interrupt_in_urb, GFP_NOIO);
|
||||
+ if (result) {
|
||||
+ dev_err(&port->dev, "submit interrupt urb failed: %d\n",
|
||||
+ result);
|
||||
+ return result;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return usb_serial_generic_resume(serial);
|
||||
+}
|
||||
+
|
||||
static struct usb_serial_driver f81232_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
@@ -679,6 +716,8 @@ static struct usb_serial_driver f81232_device = {
|
||||
.read_int_callback = f81232_read_int_callback,
|
||||
.port_probe = f81232_port_probe,
|
||||
.port_remove = f81232_port_remove,
|
||||
+ .suspend = f81232_suspend,
|
||||
+ .resume = f81232_resume,
|
||||
};
|
||||
|
||||
static struct usb_serial_driver * const serial_drivers[] = {
|
||||
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
|
||||
index 13f2c051dbf2..afb4b0bf47b3 100644
|
||||
--- a/drivers/usb/storage/scsiglue.c
|
||||
+++ b/drivers/usb/storage/scsiglue.c
|
||||
@@ -81,6 +81,7 @@ static const char* host_info(struct Scsi_Host *host)
|
||||
static int slave_alloc (struct scsi_device *sdev)
|
||||
{
|
||||
struct us_data *us = host_to_us(sdev->host);
|
||||
+ int maxp;
|
||||
|
||||
/*
|
||||
* Set the INQUIRY transfer length to 36. We don't use any of
|
||||
@@ -90,20 +91,17 @@ static int slave_alloc (struct scsi_device *sdev)
|
||||
sdev->inquiry_len = 36;
|
||||
|
||||
/*
|
||||
- * USB has unusual DMA-alignment requirements: Although the
|
||||
- * starting address of each scatter-gather element doesn't matter,
|
||||
- * the length of each element except the last must be divisible
|
||||
- * by the Bulk maxpacket value. There's currently no way to
|
||||
- * express this by block-layer constraints, so we'll cop out
|
||||
- * and simply require addresses to be aligned at 512-byte
|
||||
- * boundaries. This is okay since most block I/O involves
|
||||
- * hardware sectors that are multiples of 512 bytes in length,
|
||||
- * and since host controllers up through USB 2.0 have maxpacket
|
||||
- * values no larger than 512.
|
||||
- *
|
||||
- * But it doesn't suffice for Wireless USB, where Bulk maxpacket
|
||||
- * values can be as large as 2048. To make that work properly
|
||||
- * will require changes to the block layer.
|
||||
+ * USB has unusual scatter-gather requirements: the length of each
|
||||
+ * scatterlist element except the last must be divisible by the
|
||||
+ * Bulk maxpacket value. Fortunately this value is always a
|
||||
+ * power of 2. Inform the block layer about this requirement.
|
||||
+ */
|
||||
+ maxp = usb_maxpacket(us->pusb_dev, us->recv_bulk_pipe, 0);
|
||||
+ blk_queue_virt_boundary(sdev->request_queue, maxp - 1);
|
||||
+
|
||||
+ /*
|
||||
+ * Some host controllers may have alignment requirements.
|
||||
+ * We'll play it safe by requiring 512-byte alignment always.
|
||||
*/
|
||||
blk_queue_update_dma_alignment(sdev->request_queue, (512 - 1));
|
||||
|
||||
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
|
||||
index 64af88977b03..97621e5bdad7 100644
|
||||
--- a/drivers/usb/storage/uas.c
|
||||
+++ b/drivers/usb/storage/uas.c
|
||||
@@ -796,24 +796,33 @@ static int uas_slave_alloc(struct scsi_device *sdev)
|
||||
{
|
||||
struct uas_dev_info *devinfo =
|
||||
(struct uas_dev_info *)sdev->host->hostdata;
|
||||
+ int maxp;
|
||||
|
||||
sdev->hostdata = devinfo;
|
||||
|
||||
/*
|
||||
- * USB has unusual DMA-alignment requirements: Although the
|
||||
- * starting address of each scatter-gather element doesn't matter,
|
||||
- * the length of each element except the last must be divisible
|
||||
- * by the Bulk maxpacket value. There's currently no way to
|
||||
- * express this by block-layer constraints, so we'll cop out
|
||||
- * and simply require addresses to be aligned at 512-byte
|
||||
- * boundaries. This is okay since most block I/O involves
|
||||
- * hardware sectors that are multiples of 512 bytes in length,
|
||||
- * and since host controllers up through USB 2.0 have maxpacket
|
||||
- * values no larger than 512.
|
||||
+ * We have two requirements here. We must satisfy the requirements
|
||||
+ * of the physical HC and the demands of the protocol, as we
|
||||
+ * definitely want no additional memory allocation in this path
|
||||
+ * ruling out using bounce buffers.
|
||||
*
|
||||
- * But it doesn't suffice for Wireless USB, where Bulk maxpacket
|
||||
- * values can be as large as 2048. To make that work properly
|
||||
- * will require changes to the block layer.
|
||||
+ * For a transmission on USB to continue we must never send
|
||||
+ * a package that is smaller than maxpacket. Hence the length of each
|
||||
+ * scatterlist element except the last must be divisible by the
|
||||
+ * Bulk maxpacket value.
|
||||
+ * If the HC does not ensure that through SG,
|
||||
+ * the upper layer must do that. We must assume nothing
|
||||
+ * about the capabilities off the HC, so we use the most
|
||||
+ * pessimistic requirement.
|
||||
+ */
|
||||
+
|
||||
+ maxp = usb_maxpacket(devinfo->udev, devinfo->data_in_pipe, 0);
|
||||
+ blk_queue_virt_boundary(sdev->request_queue, maxp - 1);
|
||||
+
|
||||
+ /*
|
||||
+ * The protocol has no requirements on alignment in the strict sense.
|
||||
+ * Controllers may or may not have alignment restrictions.
|
||||
+ * As this is not exported, we use an extremely conservative guess.
|
||||
*/
|
||||
blk_queue_update_dma_alignment(sdev->request_queue, (512 - 1));
|
||||
|
||||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
|
||||
index 61054f12be7c..d83fc669eeac 100644
|
||||
--- a/include/linux/kernel.h
|
||||
+++ b/include/linux/kernel.h
|
||||
@@ -55,8 +55,8 @@
|
||||
|
||||
#define u64_to_user_ptr(x) ( \
|
||||
{ \
|
||||
- typecheck(u64, x); \
|
||||
- (void __user *)(uintptr_t)x; \
|
||||
+ typecheck(u64, (x)); \
|
||||
+ (void __user *)(uintptr_t)(x); \
|
||||
} \
|
||||
)
|
||||
|
||||
diff --git a/include/linux/mm.h b/include/linux/mm.h
|
||||
index 11a5a46ce72b..e3c8d40a18b5 100644
|
||||
--- a/include/linux/mm.h
|
||||
+++ b/include/linux/mm.h
|
||||
@@ -777,6 +777,15 @@ static inline void get_page(struct page *page)
|
||||
get_zone_device_page(page);
|
||||
}
|
||||
|
||||
+static inline __must_check bool try_get_page(struct page *page)
|
||||
+{
|
||||
+ page = compound_head(page);
|
||||
+ if (WARN_ON_ONCE(page_ref_count(page) <= 0))
|
||||
+ return false;
|
||||
+ page_ref_inc(page);
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
static inline void put_page(struct page *page)
|
||||
{
|
||||
page = compound_head(page);
|
||||
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
|
||||
index 4931787193c3..57a7dba49d29 100644
|
||||
--- a/include/net/bluetooth/hci_core.h
|
||||
+++ b/include/net/bluetooth/hci_core.h
|
||||
@@ -176,6 +176,9 @@ struct adv_info {
|
||||
|
||||
#define HCI_MAX_SHORT_NAME_LENGTH 10
|
||||
|
||||
+/* Min encryption key size to match with SMP */
|
||||
+#define HCI_MIN_ENC_KEY_SIZE 7
|
||||
+
|
||||
/* Default LE RPA expiry time, 15 minutes */
|
||||
#define HCI_DEFAULT_RPA_TIMEOUT (15 * 60)
|
||||
|
||||
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
|
||||
index cf94460504bb..be7f489788e2 100644
|
||||
--- a/kernel/irq/manage.c
|
||||
+++ b/kernel/irq/manage.c
|
||||
@@ -332,8 +332,10 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)
|
||||
desc->affinity_notify = notify;
|
||||
raw_spin_unlock_irqrestore(&desc->lock, flags);
|
||||
|
||||
- if (old_notify)
|
||||
+ if (old_notify) {
|
||||
+ cancel_work_sync(&old_notify->work);
|
||||
kref_put(&old_notify->kref, old_notify->release);
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/kernel/time/timer_stats.c b/kernel/time/timer_stats.c
|
||||
index 087204c733eb..c74920f318c5 100644
|
||||
--- a/kernel/time/timer_stats.c
|
||||
+++ b/kernel/time/timer_stats.c
|
||||
@@ -417,7 +417,7 @@ static int __init init_tstats_procfs(void)
|
||||
{
|
||||
struct proc_dir_entry *pe;
|
||||
|
||||
- pe = proc_create("timer_stats", 0644, NULL, &tstats_fops);
|
||||
+ pe = proc_create("timer_stats", 0600, NULL, &tstats_fops);
|
||||
if (!pe)
|
||||
return -ENOMEM;
|
||||
return 0;
|
||||
diff --git a/lib/ubsan.c b/lib/ubsan.c
|
||||
index 60e108c5c173..c652b4a820cc 100644
|
||||
--- a/lib/ubsan.c
|
||||
+++ b/lib/ubsan.c
|
||||
@@ -86,11 +86,13 @@ static bool is_inline_int(struct type_descriptor *type)
|
||||
return bits <= inline_bits;
|
||||
}
|
||||
|
||||
-static s_max get_signed_val(struct type_descriptor *type, unsigned long val)
|
||||
+static s_max get_signed_val(struct type_descriptor *type, void *val)
|
||||
{
|
||||
if (is_inline_int(type)) {
|
||||
unsigned extra_bits = sizeof(s_max)*8 - type_bit_width(type);
|
||||
- return ((s_max)val) << extra_bits >> extra_bits;
|
||||
+ unsigned long ulong_val = (unsigned long)val;
|
||||
+
|
||||
+ return ((s_max)ulong_val) << extra_bits >> extra_bits;
|
||||
}
|
||||
|
||||
if (type_bit_width(type) == 64)
|
||||
@@ -99,15 +101,15 @@ static s_max get_signed_val(struct type_descriptor *type, unsigned long val)
|
||||
return *(s_max *)val;
|
||||
}
|
||||
|
||||
-static bool val_is_negative(struct type_descriptor *type, unsigned long val)
|
||||
+static bool val_is_negative(struct type_descriptor *type, void *val)
|
||||
{
|
||||
return type_is_signed(type) && get_signed_val(type, val) < 0;
|
||||
}
|
||||
|
||||
-static u_max get_unsigned_val(struct type_descriptor *type, unsigned long val)
|
||||
+static u_max get_unsigned_val(struct type_descriptor *type, void *val)
|
||||
{
|
||||
if (is_inline_int(type))
|
||||
- return val;
|
||||
+ return (unsigned long)val;
|
||||
|
||||
if (type_bit_width(type) == 64)
|
||||
return *(u64 *)val;
|
||||
@@ -116,7 +118,7 @@ static u_max get_unsigned_val(struct type_descriptor *type, unsigned long val)
|
||||
}
|
||||
|
||||
static void val_to_string(char *str, size_t size, struct type_descriptor *type,
|
||||
- unsigned long value)
|
||||
+ void *value)
|
||||
{
|
||||
if (type_is_int(type)) {
|
||||
if (type_bit_width(type) == 128) {
|
||||
@@ -168,8 +170,8 @@ static void ubsan_epilogue(unsigned long *flags)
|
||||
current->in_ubsan--;
|
||||
}
|
||||
|
||||
-static void handle_overflow(struct overflow_data *data, unsigned long lhs,
|
||||
- unsigned long rhs, char op)
|
||||
+static void handle_overflow(struct overflow_data *data, void *lhs,
|
||||
+ void *rhs, char op)
|
||||
{
|
||||
|
||||
struct type_descriptor *type = data->type;
|
||||
@@ -196,8 +198,7 @@ static void handle_overflow(struct overflow_data *data, unsigned long lhs,
|
||||
}
|
||||
|
||||
void __ubsan_handle_add_overflow(struct overflow_data *data,
|
||||
- unsigned long lhs,
|
||||
- unsigned long rhs)
|
||||
+ void *lhs, void *rhs)
|
||||
{
|
||||
|
||||
handle_overflow(data, lhs, rhs, '+');
|
||||
@@ -205,23 +206,21 @@ void __ubsan_handle_add_overflow(struct overflow_data *data,
|
||||
EXPORT_SYMBOL(__ubsan_handle_add_overflow);
|
||||
|
||||
void __ubsan_handle_sub_overflow(struct overflow_data *data,
|
||||
- unsigned long lhs,
|
||||
- unsigned long rhs)
|
||||
+ void *lhs, void *rhs)
|
||||
{
|
||||
handle_overflow(data, lhs, rhs, '-');
|
||||
}
|
||||
EXPORT_SYMBOL(__ubsan_handle_sub_overflow);
|
||||
|
||||
void __ubsan_handle_mul_overflow(struct overflow_data *data,
|
||||
- unsigned long lhs,
|
||||
- unsigned long rhs)
|
||||
+ void *lhs, void *rhs)
|
||||
{
|
||||
handle_overflow(data, lhs, rhs, '*');
|
||||
}
|
||||
EXPORT_SYMBOL(__ubsan_handle_mul_overflow);
|
||||
|
||||
void __ubsan_handle_negate_overflow(struct overflow_data *data,
|
||||
- unsigned long old_val)
|
||||
+ void *old_val)
|
||||
{
|
||||
unsigned long flags;
|
||||
char old_val_str[VALUE_LENGTH];
|
||||
@@ -242,8 +241,7 @@ EXPORT_SYMBOL(__ubsan_handle_negate_overflow);
|
||||
|
||||
|
||||
void __ubsan_handle_divrem_overflow(struct overflow_data *data,
|
||||
- unsigned long lhs,
|
||||
- unsigned long rhs)
|
||||
+ void *lhs, void *rhs)
|
||||
{
|
||||
unsigned long flags;
|
||||
char rhs_val_str[VALUE_LENGTH];
|
||||
@@ -328,7 +326,7 @@ static void ubsan_type_mismatch_common(struct type_mismatch_data_common *data,
|
||||
}
|
||||
|
||||
void __ubsan_handle_type_mismatch(struct type_mismatch_data *data,
|
||||
- unsigned long ptr)
|
||||
+ void *ptr)
|
||||
{
|
||||
struct type_mismatch_data_common common_data = {
|
||||
.location = &data->location,
|
||||
@@ -337,12 +335,12 @@ void __ubsan_handle_type_mismatch(struct type_mismatch_data *data,
|
||||
.type_check_kind = data->type_check_kind
|
||||
};
|
||||
|
||||
- ubsan_type_mismatch_common(&common_data, ptr);
|
||||
+ ubsan_type_mismatch_common(&common_data, (unsigned long)ptr);
|
||||
}
|
||||
EXPORT_SYMBOL(__ubsan_handle_type_mismatch);
|
||||
|
||||
void __ubsan_handle_type_mismatch_v1(struct type_mismatch_data_v1 *data,
|
||||
- unsigned long ptr)
|
||||
+ void *ptr)
|
||||
{
|
||||
|
||||
struct type_mismatch_data_common common_data = {
|
||||
@@ -352,7 +350,7 @@ void __ubsan_handle_type_mismatch_v1(struct type_mismatch_data_v1 *data,
|
||||
.type_check_kind = data->type_check_kind
|
||||
};
|
||||
|
||||
- ubsan_type_mismatch_common(&common_data, ptr);
|
||||
+ ubsan_type_mismatch_common(&common_data, (unsigned long)ptr);
|
||||
}
|
||||
EXPORT_SYMBOL(__ubsan_handle_type_mismatch_v1);
|
||||
|
||||
@@ -376,7 +374,7 @@ void __ubsan_handle_nonnull_return(struct nonnull_return_data *data)
|
||||
EXPORT_SYMBOL(__ubsan_handle_nonnull_return);
|
||||
|
||||
void __ubsan_handle_vla_bound_not_positive(struct vla_bound_data *data,
|
||||
- unsigned long bound)
|
||||
+ void *bound)
|
||||
{
|
||||
unsigned long flags;
|
||||
char bound_str[VALUE_LENGTH];
|
||||
@@ -393,8 +391,7 @@ void __ubsan_handle_vla_bound_not_positive(struct vla_bound_data *data,
|
||||
}
|
||||
EXPORT_SYMBOL(__ubsan_handle_vla_bound_not_positive);
|
||||
|
||||
-void __ubsan_handle_out_of_bounds(struct out_of_bounds_data *data,
|
||||
- unsigned long index)
|
||||
+void __ubsan_handle_out_of_bounds(struct out_of_bounds_data *data, void *index)
|
||||
{
|
||||
unsigned long flags;
|
||||
char index_str[VALUE_LENGTH];
|
||||
@@ -412,7 +409,7 @@ void __ubsan_handle_out_of_bounds(struct out_of_bounds_data *data,
|
||||
EXPORT_SYMBOL(__ubsan_handle_out_of_bounds);
|
||||
|
||||
void __ubsan_handle_shift_out_of_bounds(struct shift_out_of_bounds_data *data,
|
||||
- unsigned long lhs, unsigned long rhs)
|
||||
+ void *lhs, void *rhs)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct type_descriptor *rhs_type = data->rhs_type;
|
||||
@@ -463,7 +460,7 @@ void __ubsan_handle_builtin_unreachable(struct unreachable_data *data)
|
||||
EXPORT_SYMBOL(__ubsan_handle_builtin_unreachable);
|
||||
|
||||
void __ubsan_handle_load_invalid_value(struct invalid_value_data *data,
|
||||
- unsigned long val)
|
||||
+ void *val)
|
||||
{
|
||||
unsigned long flags;
|
||||
char val_str[VALUE_LENGTH];
|
||||
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
|
||||
index cc061495f653..fe4fb0c1fa61 100644
|
||||
--- a/net/bluetooth/hci_conn.c
|
||||
+++ b/net/bluetooth/hci_conn.c
|
||||
@@ -1165,6 +1165,14 @@ int hci_conn_check_link_mode(struct hci_conn *conn)
|
||||
!test_bit(HCI_CONN_ENCRYPT, &conn->flags))
|
||||
return 0;
|
||||
|
||||
+ /* The minimum encryption key size needs to be enforced by the
|
||||
+ * host stack before establishing any L2CAP connections. The
|
||||
+ * specification in theory allows a minimum of 1, but to align
|
||||
+ * BR/EDR and LE transports, a minimum of 7 is chosen.
|
||||
+ */
|
||||
+ if (conn->enc_key_size < HCI_MIN_ENC_KEY_SIZE)
|
||||
+ return 0;
|
||||
+
|
||||
return 1;
|
||||
}
|
||||
|
||||
diff --git a/net/bluetooth/hidp/sock.c b/net/bluetooth/hidp/sock.c
|
||||
index 008ba439bd62..cc80c76177b6 100644
|
||||
--- a/net/bluetooth/hidp/sock.c
|
||||
+++ b/net/bluetooth/hidp/sock.c
|
||||
@@ -76,6 +76,7 @@ static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
|
||||
sockfd_put(csock);
|
||||
return err;
|
||||
}
|
||||
+ ca.name[sizeof(ca.name)-1] = 0;
|
||||
|
||||
err = hidp_connection_add(&ca, csock, isock);
|
||||
if (!err && copy_to_user(argp, &ca, sizeof(ca)))
|
||||
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
|
||||
index 84f86745c30e..828bc615a190 100644
|
||||
--- a/sound/soc/codecs/cs4270.c
|
||||
+++ b/sound/soc/codecs/cs4270.c
|
||||
@@ -643,6 +643,7 @@ static const struct regmap_config cs4270_regmap = {
|
||||
.reg_defaults = cs4270_reg_defaults,
|
||||
.num_reg_defaults = ARRAY_SIZE(cs4270_reg_defaults),
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
+ .write_flag_mask = CS4270_I2C_INCR,
|
||||
|
||||
.readable_reg = cs4270_reg_is_readable,
|
||||
.volatile_reg = cs4270_reg_is_volatile,
|
||||
diff --git a/sound/soc/codecs/nau8810.c b/sound/soc/codecs/nau8810.c
|
||||
index e45518629968..2234d0c04165 100644
|
||||
--- a/sound/soc/codecs/nau8810.c
|
||||
+++ b/sound/soc/codecs/nau8810.c
|
||||
@@ -414,9 +414,9 @@ static const struct snd_soc_dapm_widget nau8810_dapm_widgets[] = {
|
||||
SND_SOC_DAPM_MIXER("Mono Mixer", NAU8810_REG_POWER3,
|
||||
NAU8810_MOUTMX_EN_SFT, 0, &nau8810_mono_mixer_controls[0],
|
||||
ARRAY_SIZE(nau8810_mono_mixer_controls)),
|
||||
- SND_SOC_DAPM_DAC("DAC", "HiFi Playback", NAU8810_REG_POWER3,
|
||||
+ SND_SOC_DAPM_DAC("DAC", "Playback", NAU8810_REG_POWER3,
|
||||
NAU8810_DAC_EN_SFT, 0),
|
||||
- SND_SOC_DAPM_ADC("ADC", "HiFi Capture", NAU8810_REG_POWER2,
|
||||
+ SND_SOC_DAPM_ADC("ADC", "Capture", NAU8810_REG_POWER2,
|
||||
NAU8810_ADC_EN_SFT, 0),
|
||||
SND_SOC_DAPM_PGA("SpkN Out", NAU8810_REG_POWER3,
|
||||
NAU8810_NSPK_EN_SFT, 0, NULL, 0),
|
||||
diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
|
||||
index 28fdfc5ec544..c27e3476848a 100644
|
||||
--- a/sound/soc/codecs/tlv320aic32x4.c
|
||||
+++ b/sound/soc/codecs/tlv320aic32x4.c
|
||||
@@ -316,6 +316,8 @@ static const struct snd_soc_dapm_widget aic32x4_dapm_widgets[] = {
|
||||
SND_SOC_DAPM_INPUT("IN2_R"),
|
||||
SND_SOC_DAPM_INPUT("IN3_L"),
|
||||
SND_SOC_DAPM_INPUT("IN3_R"),
|
||||
+ SND_SOC_DAPM_INPUT("CM_L"),
|
||||
+ SND_SOC_DAPM_INPUT("CM_R"),
|
||||
};
|
||||
|
||||
static const struct snd_soc_dapm_route aic32x4_dapm_routes[] = {
|
||||
diff --git a/sound/soc/intel/common/sst-firmware.c b/sound/soc/intel/common/sst-firmware.c
|
||||
index 79a9fdf94d38..582b30a5118d 100644
|
||||
--- a/sound/soc/intel/common/sst-firmware.c
|
||||
+++ b/sound/soc/intel/common/sst-firmware.c
|
||||
@@ -1252,11 +1252,15 @@ struct sst_dsp *sst_dsp_new(struct device *dev,
|
||||
goto irq_err;
|
||||
|
||||
err = sst_dma_new(sst);
|
||||
- if (err)
|
||||
- dev_warn(dev, "sst_dma_new failed %d\n", err);
|
||||
+ if (err) {
|
||||
+ dev_err(dev, "sst_dma_new failed %d\n", err);
|
||||
+ goto dma_err;
|
||||
+ }
|
||||
|
||||
return sst;
|
||||
|
||||
+dma_err:
|
||||
+ free_irq(sst->irq, sst);
|
||||
irq_err:
|
||||
if (sst->ops->free)
|
||||
sst->ops->free(sst);
|
||||
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
|
||||
index b111ecda6439..1dbcdc99dbe3 100644
|
||||
--- a/sound/soc/soc-pcm.c
|
||||
+++ b/sound/soc/soc-pcm.c
|
||||
@@ -894,10 +894,13 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
|
||||
codec_params = *params;
|
||||
|
||||
/* fixup params based on TDM slot masks */
|
||||
- if (codec_dai->tx_mask)
|
||||
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
|
||||
+ codec_dai->tx_mask)
|
||||
soc_pcm_codec_params_fixup(&codec_params,
|
||||
codec_dai->tx_mask);
|
||||
- if (codec_dai->rx_mask)
|
||||
+
|
||||
+ if (substream->stream == SNDRV_PCM_STREAM_CAPTURE &&
|
||||
+ codec_dai->rx_mask)
|
||||
soc_pcm_codec_params_fixup(&codec_params,
|
||||
codec_dai->rx_mask);
|
||||
|
5210
patch/kernel/cubox-default/patch-4.9.175-176.patch
Normal file
5210
patch/kernel/cubox-default/patch-4.9.175-176.patch
Normal file
File diff suppressed because it is too large
Load diff
1740
patch/kernel/cubox-default/patch-4.9.176-177.patch
Normal file
1740
patch/kernel/cubox-default/patch-4.9.176-177.patch
Normal file
File diff suppressed because it is too large
Load diff
1538
patch/kernel/cubox-default/patch-4.9.177-178.patch
Normal file
1538
patch/kernel/cubox-default/patch-4.9.177-178.patch
Normal file
File diff suppressed because it is too large
Load diff
1654
patch/kernel/cubox-default/patch-4.9.178-179.patch
Normal file
1654
patch/kernel/cubox-default/patch-4.9.178-179.patch
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,72 +0,0 @@
|
|||
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
|
||||
index ccc4c71..71a4d00 100644
|
||||
--- a/drivers/net/wireless/ath/regd.c
|
||||
+++ b/drivers/net/wireless/ath/regd.c
|
||||
@@ -49,12 +49,9 @@ static int __ath_regd_init(struct ath_regulatory *reg);
|
||||
#define ATH9K_5GHZ_5725_5850 REG_RULE(5725-10, 5850+10, 40, 0, 30,\
|
||||
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
|
||||
|
||||
-#define ATH9K_2GHZ_ALL ATH9K_2GHZ_CH01_11, \
|
||||
- ATH9K_2GHZ_CH12_13, \
|
||||
- ATH9K_2GHZ_CH14
|
||||
+#define ATH9K_2GHZ_ALL REG_RULE(2400, 2483, 40, 0, 30, 0)
|
||||
|
||||
-#define ATH9K_5GHZ_ALL ATH9K_5GHZ_5150_5350, \
|
||||
- ATH9K_5GHZ_5470_5850
|
||||
+#define ATH9K_5GHZ_ALL REG_RULE(5140, 5860, 40, 0, 30, 0)
|
||||
|
||||
/* This one skips what we call "mid band" */
|
||||
#define ATH9K_5GHZ_NO_MIDBAND ATH9K_5GHZ_5150_5350, \
|
||||
@@ -76,9 +73,8 @@ static const struct ieee80211_regdomain ath_world_regdom_63_65 = {
|
||||
.n_reg_rules = 4,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
- ATH9K_2GHZ_CH01_11,
|
||||
- ATH9K_2GHZ_CH12_13,
|
||||
- ATH9K_5GHZ_NO_MIDBAND,
|
||||
+ ATH9K_2GHZ_ALL,
|
||||
+ ATH9K_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -87,8 +83,8 @@ static const struct ieee80211_regdomain ath_world_regdom_64 = {
|
||||
.n_reg_rules = 3,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
- ATH9K_2GHZ_CH01_11,
|
||||
- ATH9K_5GHZ_NO_MIDBAND,
|
||||
+ ATH9K_2GHZ_ALL,
|
||||
+ ATH9K_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -97,7 +93,7 @@ static const struct ieee80211_regdomain ath_world_regdom_66_69 = {
|
||||
.n_reg_rules = 3,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
- ATH9K_2GHZ_CH01_11,
|
||||
+ ATH9K_2GHZ_ALL,
|
||||
ATH9K_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
@@ -107,8 +103,7 @@ static const struct ieee80211_regdomain ath_world_regdom_67_68_6A_6C = {
|
||||
.n_reg_rules = 4,
|
||||
.alpha2 = "99",
|
||||
.reg_rules = {
|
||||
- ATH9K_2GHZ_CH01_11,
|
||||
- ATH9K_2GHZ_CH12_13,
|
||||
+ ATH9K_2GHZ_ALL,
|
||||
ATH9K_5GHZ_ALL,
|
||||
}
|
||||
};
|
||||
@@ -253,9 +253,7 @@ static bool ath_is_radar_freq(u16 center_freq,
|
||||
struct ath_regulatory *reg)
|
||||
|
||||
{
|
||||
- if (reg->country_code == CTRY_INDIA)
|
||||
- return (center_freq >= 5500 && center_freq <= 5700);
|
||||
- return (center_freq >= 5260 && center_freq <= 5700);
|
||||
+ return false;
|
||||
}
|
||||
|
||||
static void ath_force_clear_no_ir_chan(struct wiphy *wiphy,
|
|
@ -0,0 +1,73 @@
|
|||
From f5528e96b7dd2b30e1accc518df85d14baad6bae Mon Sep 17 00:00:00 2001
|
||||
From: Peter Chen <peter.chen@nxp.com>
|
||||
Date: Thu, 18 May 2017 08:48:57 +0800
|
||||
Subject: [PATCH 1/9] binding-doc: power: pwrseq-generic: add binding doc for
|
||||
generic power sequence library
|
||||
|
||||
Add binding doc for generic power sequence library.
|
||||
|
||||
Signed-off-by: Peter Chen <peter.chen@nxp.com>
|
||||
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
|
||||
Acked-by: Rob Herring <robh@kernel.org>
|
||||
---
|
||||
.../bindings/power/pwrseq/pwrseq-generic.txt | 48 +++++++++++++++++++
|
||||
1 file changed, 48 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt b/Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt
|
||||
new file mode 100644
|
||||
index 000000000000..ebf0d477b688
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt
|
||||
@@ -0,0 +1,48 @@
|
||||
+The generic power sequence library
|
||||
+
|
||||
+Some hard-wired devices (eg USB/MMC) need to do power sequence before
|
||||
+the device can be enumerated on the bus, the typical power sequence
|
||||
+like: enable USB PHY clock, toggle reset pin, etc. But current
|
||||
+Linux device driver lacks of such code to do it, it may cause some
|
||||
+hard-wired devices works abnormal or can't be recognized by
|
||||
+controller at all. The power sequence will be done before this device
|
||||
+can be found at the bus.
|
||||
+
|
||||
+The power sequence properties is under the device node.
|
||||
+
|
||||
+Optional properties:
|
||||
+- clocks: the input clocks for device.
|
||||
+- reset-gpios: Should specify the GPIO for reset.
|
||||
+- reset-duration-us: the duration in microsecond for assert reset signal.
|
||||
+
|
||||
+Below is the example of USB power sequence properties on USB device
|
||||
+nodes which have two level USB hubs.
|
||||
+
|
||||
+&usbotg1 {
|
||||
+ vbus-supply = <®_usb_otg1_vbus>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_usb_otg1_id>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ genesys: hub@1 {
|
||||
+ compatible = "usb5e3,608";
|
||||
+ reg = <1>;
|
||||
+
|
||||
+ clocks = <&clks IMX6SX_CLK_CKO>;
|
||||
+ reset-gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; /* hub reset pin */
|
||||
+ reset-duration-us = <10>;
|
||||
+
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ asix: ethernet@1 {
|
||||
+ compatible = "usbb95,1708";
|
||||
+ reg = <1>;
|
||||
+
|
||||
+ clocks = <&clks IMX6SX_CLK_IPG>;
|
||||
+ reset-gpios = <&gpio4 6 GPIO_ACTIVE_LOW>; /* ethernet_rst */
|
||||
+ reset-duration-us = <15>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,853 @@
|
|||
From e42fbf22376c41b275d47b9cfac360c66ee718dc Mon Sep 17 00:00:00 2001
|
||||
From: Peter Chen <peter.chen@nxp.com>
|
||||
Date: Thu, 18 May 2017 08:48:58 +0800
|
||||
Subject: [PATCH 2/9] power: add power sequence library
|
||||
|
||||
We have an well-known problem that the device needs to do some power
|
||||
sequence before it can be recognized by related host, the typical
|
||||
example like hard-wired mmc devices and usb devices.
|
||||
|
||||
This power sequence is hard to be described at device tree and handled by
|
||||
related host driver, so we have created a common power sequence
|
||||
library to cover this requirement. The core code has supplied
|
||||
some common helpers for host driver, and individual power sequence
|
||||
libraries handle kinds of power sequence for devices. The pwrseq
|
||||
librares always need to allocate extra instance for compatible
|
||||
string match.
|
||||
|
||||
pwrseq_generic is intended for general purpose of power sequence, which
|
||||
handles gpios and clocks currently, and can cover other controls in
|
||||
future. The host driver just needs to call of_pwrseq_on/of_pwrseq_off
|
||||
if only one power sequence is needed, else call of_pwrseq_on_list
|
||||
/of_pwrseq_off_list instead (eg, USB hub driver).
|
||||
|
||||
For new power sequence library, it can add its compatible string
|
||||
to pwrseq_of_match_table, then the pwrseq core will match it with
|
||||
DT's, and choose this library at runtime.
|
||||
|
||||
Signed-off-by: Peter Chen <peter.chen@nxp.com>
|
||||
Tested-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
|
||||
Tested-by Joshua Clayton <stillcompiling@gmail.com>
|
||||
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
|
||||
Tested-by: Matthias Kaehlcke <mka@chromium.org>
|
||||
---
|
||||
Documentation/power/power-sequence/design.rst | 54 +++
|
||||
MAINTAINERS | 9 +
|
||||
drivers/power/Kconfig | 1 +
|
||||
drivers/power/Makefile | 1 +
|
||||
drivers/power/pwrseq/Kconfig | 20 ++
|
||||
drivers/power/pwrseq/Makefile | 2 +
|
||||
drivers/power/pwrseq/core.c | 335 ++++++++++++++++++
|
||||
drivers/power/pwrseq/pwrseq_generic.c | 234 ++++++++++++
|
||||
include/linux/power/pwrseq.h | 81 +++++
|
||||
9 files changed, 737 insertions(+)
|
||||
create mode 100644 Documentation/power/power-sequence/design.rst
|
||||
create mode 100644 drivers/power/pwrseq/Kconfig
|
||||
create mode 100644 drivers/power/pwrseq/Makefile
|
||||
create mode 100644 drivers/power/pwrseq/core.c
|
||||
create mode 100644 drivers/power/pwrseq/pwrseq_generic.c
|
||||
create mode 100644 include/linux/power/pwrseq.h
|
||||
|
||||
diff --git a/Documentation/power/power-sequence/design.rst b/Documentation/power/power-sequence/design.rst
|
||||
new file mode 100644
|
||||
index 000000000000..554608e5f3b6
|
||||
--- /dev/null
|
||||
+++ b/Documentation/power/power-sequence/design.rst
|
||||
@@ -0,0 +1,54 @@
|
||||
+====================================
|
||||
+Power Sequence Library
|
||||
+====================================
|
||||
+
|
||||
+:Date: Feb, 2017
|
||||
+:Author: Peter Chen <peter.chen@nxp.com>
|
||||
+
|
||||
+
|
||||
+Introduction
|
||||
+============
|
||||
+
|
||||
+We have an well-known problem that the device needs to do a power
|
||||
+sequence before it can be recognized by related host, the typical
|
||||
+examples are hard-wired mmc devices and usb devices. The host controller
|
||||
+can't know what kinds of this device is in its bus if the power
|
||||
+sequence has not done, since the related devices driver's probe calling
|
||||
+is determined by runtime according to eunumeration results. Besides,
|
||||
+the devices may have custom power sequence, so the power sequence library
|
||||
+which is independent with the devices is needed.
|
||||
+
|
||||
+Design
|
||||
+============
|
||||
+
|
||||
+The power sequence library includes the core file and customer power
|
||||
+sequence library. The core file exports interfaces are called by
|
||||
+host controller driver for power sequence and customer power sequence
|
||||
+library files to register its power sequence instance to global
|
||||
+power sequence list. The custom power sequence library creates power
|
||||
+sequence instance and implement custom power sequence.
|
||||
+
|
||||
+Since the power sequence describes hardware design, the description is
|
||||
+located at board description file, eg, device tree dts file. And
|
||||
+a specific power sequence belongs to device, so its description
|
||||
+is under the device node, please refer to:
|
||||
+Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt
|
||||
+
|
||||
+Custom power sequence library allocates one power sequence instance at
|
||||
+bootup periods using postcore_initcall, this static allocated instance is
|
||||
+used to compare with device-tree (DT) node to see if this library can be
|
||||
+used for the node or not. When the result is matched, the core API will
|
||||
+try to get resourses (->get, implemented at each library) for power
|
||||
+sequence, if all resources are got, it will try to allocate another
|
||||
+instance for next possible request from host driver.
|
||||
+
|
||||
+Then, the host controller driver can carry out power sequence on for this
|
||||
+DT node, the library will do corresponding operations, like open clocks,
|
||||
+toggle gpio, etc. The power sequence off routine will close and free the
|
||||
+resources, and is called when the parent is removed. And the power
|
||||
+sequence suspend and resume routine can be called at host driver's
|
||||
+suspend and resume routine if needed.
|
||||
+
|
||||
+The exported interfaces
|
||||
+.. kernel-doc:: drivers/power/pwrseq/core.c
|
||||
+ :export:
|
||||
diff --git a/MAINTAINERS b/MAINTAINERS
|
||||
index 429c6c624861..88fd31d1870f 100644
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -12599,6 +12599,15 @@ F: drivers/firmware/psci/
|
||||
F: include/linux/psci.h
|
||||
F: include/uapi/linux/psci.h
|
||||
|
||||
+POWER SEQUENCE LIBRARY
|
||||
+M: Peter Chen <Peter.Chen@nxp.com>
|
||||
+T: git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
|
||||
+L: linux-pm@vger.kernel.org
|
||||
+S: Maintained
|
||||
+F: Documentation/devicetree/bindings/power/pwrseq/
|
||||
+F: drivers/power/pwrseq/
|
||||
+F: include/linux/power/pwrseq.h
|
||||
+
|
||||
POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS
|
||||
M: Sebastian Reichel <sre@kernel.org>
|
||||
L: linux-pm@vger.kernel.org
|
||||
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
|
||||
index ff0350ca3b74..78b6fa270cf9 100644
|
||||
--- a/drivers/power/Kconfig
|
||||
+++ b/drivers/power/Kconfig
|
||||
@@ -2,3 +2,4 @@
|
||||
source "drivers/power/avs/Kconfig"
|
||||
source "drivers/power/reset/Kconfig"
|
||||
source "drivers/power/supply/Kconfig"
|
||||
+source "drivers/power/pwrseq/Kconfig"
|
||||
diff --git a/drivers/power/Makefile b/drivers/power/Makefile
|
||||
index b7c2e372186b..13046c7fb499 100644
|
||||
--- a/drivers/power/Makefile
|
||||
+++ b/drivers/power/Makefile
|
||||
@@ -2,3 +2,4 @@
|
||||
obj-$(CONFIG_POWER_AVS) += avs/
|
||||
obj-$(CONFIG_POWER_RESET) += reset/
|
||||
obj-$(CONFIG_POWER_SUPPLY) += supply/
|
||||
+obj-$(CONFIG_POWER_SEQUENCE) += pwrseq/
|
||||
diff --git a/drivers/power/pwrseq/Kconfig b/drivers/power/pwrseq/Kconfig
|
||||
new file mode 100644
|
||||
index 000000000000..c6b356926cca
|
||||
--- /dev/null
|
||||
+++ b/drivers/power/pwrseq/Kconfig
|
||||
@@ -0,0 +1,20 @@
|
||||
+#
|
||||
+# Power Sequence library
|
||||
+#
|
||||
+
|
||||
+menuconfig POWER_SEQUENCE
|
||||
+ bool "Power sequence control"
|
||||
+ help
|
||||
+ It is used for drivers which needs to do power sequence
|
||||
+ (eg, turn on clock, toggle reset gpio) before the related
|
||||
+ devices can be found by hardware, eg, USB bus.
|
||||
+
|
||||
+if POWER_SEQUENCE
|
||||
+
|
||||
+config PWRSEQ_GENERIC
|
||||
+ bool "Generic power sequence control"
|
||||
+ depends on OF
|
||||
+ help
|
||||
+ This is the generic power sequence control library, and is
|
||||
+ supposed to support common power sequence usage.
|
||||
+endif
|
||||
diff --git a/drivers/power/pwrseq/Makefile b/drivers/power/pwrseq/Makefile
|
||||
new file mode 100644
|
||||
index 000000000000..ad82389028c2
|
||||
--- /dev/null
|
||||
+++ b/drivers/power/pwrseq/Makefile
|
||||
@@ -0,0 +1,2 @@
|
||||
+obj-$(CONFIG_POWER_SEQUENCE) += core.o
|
||||
+obj-$(CONFIG_PWRSEQ_GENERIC) += pwrseq_generic.o
|
||||
diff --git a/drivers/power/pwrseq/core.c b/drivers/power/pwrseq/core.c
|
||||
new file mode 100644
|
||||
index 000000000000..3d19e62a2e76
|
||||
--- /dev/null
|
||||
+++ b/drivers/power/pwrseq/core.c
|
||||
@@ -0,0 +1,335 @@
|
||||
+/*
|
||||
+ * core.c power sequence core file
|
||||
+ *
|
||||
+ * Copyright (C) 2016 Freescale Semiconductor, Inc.
|
||||
+ * Author: Peter Chen <peter.chen@nxp.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 of
|
||||
+ * the License as published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/list.h>
|
||||
+#include <linux/mutex.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/power/pwrseq.h>
|
||||
+
|
||||
+static DEFINE_MUTEX(pwrseq_list_mutex);
|
||||
+static LIST_HEAD(pwrseq_list);
|
||||
+
|
||||
+static int pwrseq_get(struct device_node *np, struct pwrseq *p)
|
||||
+{
|
||||
+ if (p && p->get)
|
||||
+ return p->get(np, p);
|
||||
+
|
||||
+ return -ENOTSUPP;
|
||||
+}
|
||||
+
|
||||
+static int pwrseq_on(struct pwrseq *p)
|
||||
+{
|
||||
+ if (p && p->on)
|
||||
+ return p->on(p);
|
||||
+
|
||||
+ return -ENOTSUPP;
|
||||
+}
|
||||
+
|
||||
+static void pwrseq_off(struct pwrseq *p)
|
||||
+{
|
||||
+ if (p && p->off)
|
||||
+ p->off(p);
|
||||
+}
|
||||
+
|
||||
+static void pwrseq_put(struct pwrseq *p)
|
||||
+{
|
||||
+ if (p && p->put)
|
||||
+ p->put(p);
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * pwrseq_register - Add pwrseq instance to global pwrseq list
|
||||
+ *
|
||||
+ * @pwrseq: the pwrseq instance
|
||||
+ */
|
||||
+void pwrseq_register(struct pwrseq *pwrseq)
|
||||
+{
|
||||
+ mutex_lock(&pwrseq_list_mutex);
|
||||
+ list_add(&pwrseq->node, &pwrseq_list);
|
||||
+ mutex_unlock(&pwrseq_list_mutex);
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(pwrseq_register);
|
||||
+
|
||||
+/**
|
||||
+ * pwrseq_unregister - Remove pwrseq instance from global pwrseq list
|
||||
+ *
|
||||
+ * @pwrseq: the pwrseq instance
|
||||
+ */
|
||||
+void pwrseq_unregister(struct pwrseq *pwrseq)
|
||||
+{
|
||||
+ mutex_lock(&pwrseq_list_mutex);
|
||||
+ list_del(&pwrseq->node);
|
||||
+ mutex_unlock(&pwrseq_list_mutex);
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(pwrseq_unregister);
|
||||
+
|
||||
+static struct pwrseq *pwrseq_find_available_instance(struct device_node *np)
|
||||
+{
|
||||
+ struct pwrseq *pwrseq;
|
||||
+
|
||||
+ mutex_lock(&pwrseq_list_mutex);
|
||||
+ list_for_each_entry(pwrseq, &pwrseq_list, node) {
|
||||
+ if (pwrseq->used)
|
||||
+ continue;
|
||||
+
|
||||
+ /* compare compatible string for pwrseq node */
|
||||
+ if (of_match_node(pwrseq->pwrseq_of_match_table, np)) {
|
||||
+ pwrseq->used = true;
|
||||
+ mutex_unlock(&pwrseq_list_mutex);
|
||||
+ return pwrseq;
|
||||
+ }
|
||||
+
|
||||
+ /* return generic pwrseq instance */
|
||||
+ if (!strcmp(pwrseq->pwrseq_of_match_table->compatible,
|
||||
+ "generic")) {
|
||||
+ pr_debug("using generic pwrseq instance for %s\n",
|
||||
+ np->full_name);
|
||||
+ pwrseq->used = true;
|
||||
+ mutex_unlock(&pwrseq_list_mutex);
|
||||
+ return pwrseq;
|
||||
+ }
|
||||
+ }
|
||||
+ mutex_unlock(&pwrseq_list_mutex);
|
||||
+ pr_debug("Can't find any pwrseq instances for %s\n", np->full_name);
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * of_pwrseq_on - Carry out power sequence on for device node
|
||||
+ *
|
||||
+ * @np: the device node would like to power on
|
||||
+ *
|
||||
+ * Carry out a single device power on. If multiple devices
|
||||
+ * need to be handled, use of_pwrseq_on_list() instead.
|
||||
+ *
|
||||
+ * Return a pointer to the power sequence instance on success,
|
||||
+ * or an error code otherwise.
|
||||
+ */
|
||||
+struct pwrseq *of_pwrseq_on(struct device_node *np)
|
||||
+{
|
||||
+ struct pwrseq *pwrseq;
|
||||
+ int ret;
|
||||
+
|
||||
+ pwrseq = pwrseq_find_available_instance(np);
|
||||
+ if (!pwrseq)
|
||||
+ return ERR_PTR(-ENOENT);
|
||||
+
|
||||
+ ret = pwrseq_get(np, pwrseq);
|
||||
+ if (ret) {
|
||||
+ /* Mark current pwrseq as unused */
|
||||
+ pwrseq->used = false;
|
||||
+ return ERR_PTR(ret);
|
||||
+ }
|
||||
+
|
||||
+ ret = pwrseq_on(pwrseq);
|
||||
+ if (ret)
|
||||
+ goto pwr_put;
|
||||
+
|
||||
+ return pwrseq;
|
||||
+
|
||||
+pwr_put:
|
||||
+ pwrseq_put(pwrseq);
|
||||
+ return ERR_PTR(ret);
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(of_pwrseq_on);
|
||||
+
|
||||
+/**
|
||||
+ * of_pwrseq_off - Carry out power sequence off for this pwrseq instance
|
||||
+ *
|
||||
+ * @pwrseq: the pwrseq instance which related device would like to be off
|
||||
+ *
|
||||
+ * This API is used to power off single device, it is the opposite
|
||||
+ * operation for of_pwrseq_on.
|
||||
+ */
|
||||
+void of_pwrseq_off(struct pwrseq *pwrseq)
|
||||
+{
|
||||
+ pwrseq_off(pwrseq);
|
||||
+ pwrseq_put(pwrseq);
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(of_pwrseq_off);
|
||||
+
|
||||
+/**
|
||||
+ * of_pwrseq_on_list - Carry out power sequence on for list
|
||||
+ *
|
||||
+ * @np: the device node would like to power on
|
||||
+ * @head: the list head for pwrseq list on this bus
|
||||
+ *
|
||||
+ * This API is used to power on multiple devices at single bus.
|
||||
+ * If there are several devices on bus (eg, USB bus), uses this
|
||||
+ * this API. Otherwise, use of_pwrseq_on instead. After the device
|
||||
+ * is powered on successfully, it will be added to pwrseq list for
|
||||
+ * this bus. The caller needs to use mutex_lock for concurrent.
|
||||
+ *
|
||||
+ * Return 0 on success, or an error value otherwise.
|
||||
+ */
|
||||
+int of_pwrseq_on_list(struct device_node *np, struct list_head *head)
|
||||
+{
|
||||
+ struct pwrseq *pwrseq;
|
||||
+ struct pwrseq_list_per_dev *pwrseq_list_node;
|
||||
+
|
||||
+ pwrseq_list_node = kzalloc(sizeof(*pwrseq_list_node), GFP_KERNEL);
|
||||
+ if (!pwrseq_list_node)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ pwrseq = of_pwrseq_on(np);
|
||||
+ if (IS_ERR(pwrseq)) {
|
||||
+ kfree(pwrseq_list_node);
|
||||
+ return PTR_ERR(pwrseq);
|
||||
+ }
|
||||
+
|
||||
+ pwrseq_list_node->pwrseq = pwrseq;
|
||||
+ list_add(&pwrseq_list_node->list, head);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(of_pwrseq_on_list);
|
||||
+
|
||||
+/**
|
||||
+ * of_pwrseq_off_list - Carry out power sequence off for the list
|
||||
+ *
|
||||
+ * @head: the list head for pwrseq instance list on this bus
|
||||
+ *
|
||||
+ * This API is used to power off all devices on this bus, it is
|
||||
+ * the opposite operation for of_pwrseq_on_list.
|
||||
+ * The caller needs to use mutex_lock for concurrent.
|
||||
+ */
|
||||
+void of_pwrseq_off_list(struct list_head *head)
|
||||
+{
|
||||
+ struct pwrseq *pwrseq;
|
||||
+ struct pwrseq_list_per_dev *pwrseq_list_node, *tmp_node;
|
||||
+
|
||||
+ list_for_each_entry_safe(pwrseq_list_node, tmp_node, head, list) {
|
||||
+ pwrseq = pwrseq_list_node->pwrseq;
|
||||
+ of_pwrseq_off(pwrseq);
|
||||
+ list_del(&pwrseq_list_node->list);
|
||||
+ kfree(pwrseq_list_node);
|
||||
+ }
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(of_pwrseq_off_list);
|
||||
+
|
||||
+/**
|
||||
+ * pwrseq_suspend - Carry out power sequence suspend for this pwrseq instance
|
||||
+ *
|
||||
+ * @pwrseq: the pwrseq instance
|
||||
+ *
|
||||
+ * This API is used to do suspend operation on pwrseq instance.
|
||||
+ *
|
||||
+ * Return 0 on success, or an error value otherwise.
|
||||
+ */
|
||||
+int pwrseq_suspend(struct pwrseq *p)
|
||||
+{
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ if (p && p->suspend)
|
||||
+ ret = p->suspend(p);
|
||||
+ else
|
||||
+ return ret;
|
||||
+
|
||||
+ if (!ret)
|
||||
+ p->suspended = true;
|
||||
+ else
|
||||
+ pr_err("%s failed\n", __func__);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(pwrseq_suspend);
|
||||
+
|
||||
+/**
|
||||
+ * pwrseq_resume - Carry out power sequence resume for this pwrseq instance
|
||||
+ *
|
||||
+ * @pwrseq: the pwrseq instance
|
||||
+ *
|
||||
+ * This API is used to do resume operation on pwrseq instance.
|
||||
+ *
|
||||
+ * Return 0 on success, or an error value otherwise.
|
||||
+ */
|
||||
+int pwrseq_resume(struct pwrseq *p)
|
||||
+{
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ if (p && p->resume)
|
||||
+ ret = p->resume(p);
|
||||
+ else
|
||||
+ return ret;
|
||||
+
|
||||
+ if (!ret)
|
||||
+ p->suspended = false;
|
||||
+ else
|
||||
+ pr_err("%s failed\n", __func__);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(pwrseq_resume);
|
||||
+
|
||||
+/**
|
||||
+ * pwrseq_suspend_list - Carry out power sequence suspend for list
|
||||
+ *
|
||||
+ * @head: the list head for pwrseq instance list on this bus
|
||||
+ *
|
||||
+ * This API is used to do suspend on all power sequence instances on this bus.
|
||||
+ * The caller needs to use mutex_lock for concurrent.
|
||||
+ */
|
||||
+int pwrseq_suspend_list(struct list_head *head)
|
||||
+{
|
||||
+ struct pwrseq *pwrseq;
|
||||
+ struct pwrseq_list_per_dev *pwrseq_list_node;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ list_for_each_entry(pwrseq_list_node, head, list) {
|
||||
+ ret = pwrseq_suspend(pwrseq_list_node->pwrseq);
|
||||
+ if (ret)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (ret) {
|
||||
+ list_for_each_entry(pwrseq_list_node, head, list) {
|
||||
+ pwrseq = pwrseq_list_node->pwrseq;
|
||||
+ if (pwrseq->suspended)
|
||||
+ pwrseq_resume(pwrseq);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(pwrseq_suspend_list);
|
||||
+
|
||||
+/**
|
||||
+ * pwrseq_resume_list - Carry out power sequence resume for the list
|
||||
+ *
|
||||
+ * @head: the list head for pwrseq instance list on this bus
|
||||
+ *
|
||||
+ * This API is used to do resume on all power sequence instances on this bus.
|
||||
+ * The caller needs to use mutex_lock for concurrent.
|
||||
+ */
|
||||
+int pwrseq_resume_list(struct list_head *head)
|
||||
+{
|
||||
+ struct pwrseq_list_per_dev *pwrseq_list_node;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ list_for_each_entry(pwrseq_list_node, head, list) {
|
||||
+ ret = pwrseq_resume(pwrseq_list_node->pwrseq);
|
||||
+ if (ret)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(pwrseq_resume_list);
|
||||
diff --git a/drivers/power/pwrseq/pwrseq_generic.c b/drivers/power/pwrseq/pwrseq_generic.c
|
||||
new file mode 100644
|
||||
index 000000000000..4e7c09086cfb
|
||||
--- /dev/null
|
||||
+++ b/drivers/power/pwrseq/pwrseq_generic.c
|
||||
@@ -0,0 +1,234 @@
|
||||
+/*
|
||||
+ * pwrseq_generic.c Generic power sequence handling
|
||||
+ *
|
||||
+ * Copyright (C) 2016 Freescale Semiconductor, Inc.
|
||||
+ * Author: Peter Chen <peter.chen@nxp.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 of
|
||||
+ * the License as published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/gpio.h>
|
||||
+#include <linux/gpio/consumer.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/of_gpio.h>
|
||||
+#include <linux/slab.h>
|
||||
+
|
||||
+#include <linux/power/pwrseq.h>
|
||||
+
|
||||
+struct pwrseq_generic {
|
||||
+ struct pwrseq pwrseq;
|
||||
+ struct gpio_desc *gpiod_reset;
|
||||
+ struct clk *clks[PWRSEQ_MAX_CLKS];
|
||||
+ u32 duration_us;
|
||||
+ bool suspended;
|
||||
+};
|
||||
+
|
||||
+#define to_generic_pwrseq(p) container_of(p, struct pwrseq_generic, pwrseq)
|
||||
+
|
||||
+static int pwrseq_generic_alloc_instance(void);
|
||||
+static const struct of_device_id generic_id_table[] = {
|
||||
+ { .compatible = "generic",},
|
||||
+ { /* sentinel */ }
|
||||
+};
|
||||
+
|
||||
+static int pwrseq_generic_suspend(struct pwrseq *pwrseq)
|
||||
+{
|
||||
+ struct pwrseq_generic *pwrseq_gen = to_generic_pwrseq(pwrseq);
|
||||
+ int clk;
|
||||
+
|
||||
+ for (clk = PWRSEQ_MAX_CLKS - 1; clk >= 0; clk--)
|
||||
+ clk_disable_unprepare(pwrseq_gen->clks[clk]);
|
||||
+
|
||||
+ pwrseq_gen->suspended = true;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int pwrseq_generic_resume(struct pwrseq *pwrseq)
|
||||
+{
|
||||
+ struct pwrseq_generic *pwrseq_gen = to_generic_pwrseq(pwrseq);
|
||||
+ int clk, ret = 0;
|
||||
+
|
||||
+ for (clk = 0; clk < PWRSEQ_MAX_CLKS && pwrseq_gen->clks[clk]; clk++) {
|
||||
+ ret = clk_prepare_enable(pwrseq_gen->clks[clk]);
|
||||
+ if (ret) {
|
||||
+ pr_err("Can't enable clock, ret=%d\n", ret);
|
||||
+ goto err_disable_clks;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ pwrseq_gen->suspended = false;
|
||||
+ return ret;
|
||||
+
|
||||
+err_disable_clks:
|
||||
+ while (--clk >= 0)
|
||||
+ clk_disable_unprepare(pwrseq_gen->clks[clk]);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static void pwrseq_generic_put(struct pwrseq *pwrseq)
|
||||
+{
|
||||
+ struct pwrseq_generic *pwrseq_gen = to_generic_pwrseq(pwrseq);
|
||||
+ int clk;
|
||||
+
|
||||
+ if (pwrseq_gen->gpiod_reset)
|
||||
+ gpiod_put(pwrseq_gen->gpiod_reset);
|
||||
+
|
||||
+ for (clk = 0; clk < PWRSEQ_MAX_CLKS; clk++)
|
||||
+ clk_put(pwrseq_gen->clks[clk]);
|
||||
+
|
||||
+ pwrseq_unregister(&pwrseq_gen->pwrseq);
|
||||
+ kfree(pwrseq_gen);
|
||||
+}
|
||||
+
|
||||
+static void pwrseq_generic_off(struct pwrseq *pwrseq)
|
||||
+{
|
||||
+ struct pwrseq_generic *pwrseq_gen = to_generic_pwrseq(pwrseq);
|
||||
+ int clk;
|
||||
+
|
||||
+ if (pwrseq_gen->suspended)
|
||||
+ return;
|
||||
+
|
||||
+ for (clk = PWRSEQ_MAX_CLKS - 1; clk >= 0; clk--)
|
||||
+ clk_disable_unprepare(pwrseq_gen->clks[clk]);
|
||||
+}
|
||||
+
|
||||
+static int pwrseq_generic_on(struct pwrseq *pwrseq)
|
||||
+{
|
||||
+ struct pwrseq_generic *pwrseq_gen = to_generic_pwrseq(pwrseq);
|
||||
+ int clk, ret = 0;
|
||||
+ struct gpio_desc *gpiod_reset = pwrseq_gen->gpiod_reset;
|
||||
+
|
||||
+ for (clk = 0; clk < PWRSEQ_MAX_CLKS && pwrseq_gen->clks[clk]; clk++) {
|
||||
+ ret = clk_prepare_enable(pwrseq_gen->clks[clk]);
|
||||
+ if (ret) {
|
||||
+ pr_err("Can't enable clock, ret=%d\n", ret);
|
||||
+ goto err_disable_clks;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (gpiod_reset) {
|
||||
+ u32 duration_us = pwrseq_gen->duration_us;
|
||||
+
|
||||
+ if (duration_us <= 10)
|
||||
+ udelay(10);
|
||||
+ else
|
||||
+ usleep_range(duration_us, duration_us + 100);
|
||||
+ gpiod_set_value(gpiod_reset, 0);
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+
|
||||
+err_disable_clks:
|
||||
+ while (--clk >= 0)
|
||||
+ clk_disable_unprepare(pwrseq_gen->clks[clk]);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int pwrseq_generic_get(struct device_node *np, struct pwrseq *pwrseq)
|
||||
+{
|
||||
+ struct pwrseq_generic *pwrseq_gen = to_generic_pwrseq(pwrseq);
|
||||
+ enum of_gpio_flags flags;
|
||||
+ int reset_gpio, clk, ret = 0;
|
||||
+
|
||||
+ for (clk = 0; clk < PWRSEQ_MAX_CLKS; clk++) {
|
||||
+ pwrseq_gen->clks[clk] = of_clk_get(np, clk);
|
||||
+ if (IS_ERR(pwrseq_gen->clks[clk])) {
|
||||
+ ret = PTR_ERR(pwrseq_gen->clks[clk]);
|
||||
+ if (ret != -ENOENT)
|
||||
+ goto err_put_clks;
|
||||
+ pwrseq_gen->clks[clk] = NULL;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ reset_gpio = of_get_named_gpio_flags(np, "reset-gpios", 0, &flags);
|
||||
+ if (gpio_is_valid(reset_gpio)) {
|
||||
+ unsigned long gpio_flags;
|
||||
+
|
||||
+ if (flags & OF_GPIO_ACTIVE_LOW)
|
||||
+ gpio_flags = GPIOF_ACTIVE_LOW | GPIOF_OUT_INIT_LOW;
|
||||
+ else
|
||||
+ gpio_flags = GPIOF_OUT_INIT_HIGH;
|
||||
+
|
||||
+ ret = gpio_request_one(reset_gpio, gpio_flags,
|
||||
+ "pwrseq-reset-gpios");
|
||||
+ if (ret)
|
||||
+ goto err_put_clks;
|
||||
+
|
||||
+ pwrseq_gen->gpiod_reset = gpio_to_desc(reset_gpio);
|
||||
+ of_property_read_u32(np, "reset-duration-us",
|
||||
+ &pwrseq_gen->duration_us);
|
||||
+ } else if (reset_gpio == -ENOENT) {
|
||||
+ ; /* no such gpio */
|
||||
+ } else {
|
||||
+ ret = reset_gpio;
|
||||
+ pr_err("Failed to get reset gpio on %s, err = %d\n",
|
||||
+ np->full_name, reset_gpio);
|
||||
+ goto err_put_clks;
|
||||
+ }
|
||||
+
|
||||
+ /* allocate new one for later pwrseq instance request */
|
||||
+ ret = pwrseq_generic_alloc_instance();
|
||||
+ if (ret)
|
||||
+ goto err_put_gpio;
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+err_put_gpio:
|
||||
+ if (pwrseq_gen->gpiod_reset)
|
||||
+ gpiod_put(pwrseq_gen->gpiod_reset);
|
||||
+err_put_clks:
|
||||
+ while (--clk >= 0)
|
||||
+ clk_put(pwrseq_gen->clks[clk]);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * pwrseq_generic_alloc_instance - power sequence instance allocation
|
||||
+ *
|
||||
+ * This function is used to allocate one generic power sequence instance,
|
||||
+ * it is called when the system boots up and after one power sequence
|
||||
+ * instance is got successfully.
|
||||
+ *
|
||||
+ * Return zero on success or an error code otherwise.
|
||||
+ */
|
||||
+static int pwrseq_generic_alloc_instance(void)
|
||||
+{
|
||||
+ struct pwrseq_generic *pwrseq_gen;
|
||||
+
|
||||
+ pwrseq_gen = kzalloc(sizeof(*pwrseq_gen), GFP_KERNEL);
|
||||
+ if (!pwrseq_gen)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ pwrseq_gen->pwrseq.pwrseq_of_match_table = generic_id_table;
|
||||
+ pwrseq_gen->pwrseq.get = pwrseq_generic_get;
|
||||
+ pwrseq_gen->pwrseq.on = pwrseq_generic_on;
|
||||
+ pwrseq_gen->pwrseq.off = pwrseq_generic_off;
|
||||
+ pwrseq_gen->pwrseq.put = pwrseq_generic_put;
|
||||
+ pwrseq_gen->pwrseq.suspend = pwrseq_generic_suspend;
|
||||
+ pwrseq_gen->pwrseq.resume = pwrseq_generic_resume;
|
||||
+
|
||||
+ pwrseq_register(&pwrseq_gen->pwrseq);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/* Allocate one pwrseq instance during boots up */
|
||||
+static int __init pwrseq_generic_register(void)
|
||||
+{
|
||||
+ return pwrseq_generic_alloc_instance();
|
||||
+}
|
||||
+postcore_initcall(pwrseq_generic_register)
|
||||
diff --git a/include/linux/power/pwrseq.h b/include/linux/power/pwrseq.h
|
||||
new file mode 100644
|
||||
index 000000000000..cbc344cdf9d2
|
||||
--- /dev/null
|
||||
+++ b/include/linux/power/pwrseq.h
|
||||
@@ -0,0 +1,81 @@
|
||||
+#ifndef __LINUX_PWRSEQ_H
|
||||
+#define __LINUX_PWRSEQ_H
|
||||
+
|
||||
+#include <linux/of.h>
|
||||
+
|
||||
+#define PWRSEQ_MAX_CLKS 3
|
||||
+
|
||||
+/**
|
||||
+ * struct pwrseq - the power sequence structure
|
||||
+ * @pwrseq_of_match_table: the OF device id table this pwrseq library supports
|
||||
+ * @node: the list pointer to be added to pwrseq list
|
||||
+ * @get: the API is used to get pwrseq instance from the device node
|
||||
+ * @on: do power on for this pwrseq instance
|
||||
+ * @off: do power off for this pwrseq instance
|
||||
+ * @put: release the resources on this pwrseq instance
|
||||
+ * @suspend: do suspend operation on this pwrseq instance
|
||||
+ * @resume: do resume operation on this pwrseq instance
|
||||
+ * @used: this pwrseq instance is used by device
|
||||
+ */
|
||||
+struct pwrseq {
|
||||
+ const struct of_device_id *pwrseq_of_match_table;
|
||||
+ struct list_head node;
|
||||
+ int (*get)(struct device_node *np, struct pwrseq *p);
|
||||
+ int (*on)(struct pwrseq *p);
|
||||
+ void (*off)(struct pwrseq *p);
|
||||
+ void (*put)(struct pwrseq *p);
|
||||
+ int (*suspend)(struct pwrseq *p);
|
||||
+ int (*resume)(struct pwrseq *p);
|
||||
+ bool used;
|
||||
+ bool suspended;
|
||||
+};
|
||||
+
|
||||
+/* used for power sequence instance list in one driver */
|
||||
+struct pwrseq_list_per_dev {
|
||||
+ struct pwrseq *pwrseq;
|
||||
+ struct list_head list;
|
||||
+};
|
||||
+
|
||||
+#if IS_ENABLED(CONFIG_POWER_SEQUENCE)
|
||||
+void pwrseq_register(struct pwrseq *pwrseq);
|
||||
+void pwrseq_unregister(struct pwrseq *pwrseq);
|
||||
+struct pwrseq *of_pwrseq_on(struct device_node *np);
|
||||
+void of_pwrseq_off(struct pwrseq *pwrseq);
|
||||
+int of_pwrseq_on_list(struct device_node *np, struct list_head *head);
|
||||
+void of_pwrseq_off_list(struct list_head *head);
|
||||
+int pwrseq_suspend(struct pwrseq *p);
|
||||
+int pwrseq_resume(struct pwrseq *p);
|
||||
+int pwrseq_suspend_list(struct list_head *head);
|
||||
+int pwrseq_resume_list(struct list_head *head);
|
||||
+#else
|
||||
+static inline void pwrseq_register(struct pwrseq *pwrseq) {}
|
||||
+static inline void pwrseq_unregister(struct pwrseq *pwrseq) {}
|
||||
+static inline struct pwrseq *of_pwrseq_on(struct device_node *np)
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
+static void of_pwrseq_off(struct pwrseq *pwrseq) {}
|
||||
+static int of_pwrseq_on_list(struct device_node *np, struct list_head *head)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+static void of_pwrseq_off_list(struct list_head *head) {}
|
||||
+static int pwrseq_suspend(struct pwrseq *p)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+static int pwrseq_resume(struct pwrseq *p)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+static int pwrseq_suspend_list(struct list_head *head)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+static int pwrseq_resume_list(struct list_head *head)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif /* CONFIG_POWER_SEQUENCE */
|
||||
+
|
||||
+#endif /* __LINUX_PWRSEQ_H */
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
From 65bfdb21c26a922b2ada21140782251465159ae3 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Chen <peter.chen@nxp.com>
|
||||
Date: Thu, 18 May 2017 08:48:59 +0800
|
||||
Subject: [PATCH 3/9] binding-doc: usb: usb-device: add optional properties for
|
||||
power sequence
|
||||
|
||||
Add optional properties for power sequence.
|
||||
|
||||
Signed-off-by: Peter Chen <peter.chen@nxp.com>
|
||||
Acked-by: Rob Herring <robh@kernel.org>
|
||||
---
|
||||
Documentation/devicetree/bindings/usb/usb-device.txt | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/usb/usb-device.txt b/Documentation/devicetree/bindings/usb/usb-device.txt
|
||||
index 036be172b1ae..cb85f82a12bb 100644
|
||||
--- a/Documentation/devicetree/bindings/usb/usb-device.txt
|
||||
+++ b/Documentation/devicetree/bindings/usb/usb-device.txt
|
||||
@@ -65,6 +65,9 @@ Required properties for host-controller nodes with device nodes:
|
||||
- #address-cells: shall be 1
|
||||
- #size-cells: shall be 0
|
||||
|
||||
+Optional properties:
|
||||
+power sequence properties, see
|
||||
+Documentation/devicetree/bindings/power/pwrseq/pwrseq-generic.txt for detail
|
||||
|
||||
Example:
|
||||
|
||||
@@ -72,9 +75,13 @@ Example:
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
- hub@1 { /* hub connected to port 1 */
|
||||
+ genesys: hub@1 { /* hub connected to port 1 */
|
||||
compatible = "usb5e3,608";
|
||||
reg = <1>;
|
||||
+
|
||||
+ clocks = <&clks IMX6SX_CLK_CKO>;
|
||||
+ reset-gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; /* hub reset pin */
|
||||
+ reset-duration-us = <10>;
|
||||
};
|
||||
|
||||
device@2 { /* device connected to port 2 */
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,165 @@
|
|||
From a42362841fe263a6c97a1793ccd4b9246ac2b108 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Chen <peter.chen@nxp.com>
|
||||
Date: Thu, 18 May 2017 08:49:00 +0800
|
||||
Subject: [PATCH 4/9] usb: core: add power sequence handling for USB devices
|
||||
|
||||
Some hard-wired USB devices need to do power sequence to let the
|
||||
device work normally, the typical power sequence like: enable USB
|
||||
PHY clock, toggle reset pin, etc. But current Linux USB driver
|
||||
lacks of such code to do it, it may cause some hard-wired USB devices
|
||||
works abnormal or can't be recognized by controller at all.
|
||||
|
||||
In this patch, it calls power sequence library APIs to finish
|
||||
the power sequence events. It will do power on sequence at hub's
|
||||
probe for all devices under this hub (includes root hub).
|
||||
At hub_disconnect, it will do power off sequence which is at powered
|
||||
on list.
|
||||
|
||||
Signed-off-by: Peter Chen <peter.chen@nxp.com>
|
||||
Tested-by Joshua Clayton <stillcompiling@gmail.com>
|
||||
Tested-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
|
||||
Reviewed-by: Vaibhav Hiremath <hvaibhav.linux@gmail.com>
|
||||
---
|
||||
drivers/usb/Kconfig | 1 +
|
||||
drivers/usb/core/hub.c | 49 ++++++++++++++++++++++++++++++++++++++----
|
||||
drivers/usb/core/hub.h | 1 +
|
||||
3 files changed, 47 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
|
||||
index 6e59d370ef81..2162fd85b32d 100644
|
||||
--- a/drivers/usb/Kconfig
|
||||
+++ b/drivers/usb/Kconfig
|
||||
@@ -47,6 +47,7 @@ config USB
|
||||
depends on USB_ARCH_HAS_HCD
|
||||
select GENERIC_ALLOCATOR
|
||||
select USB_COMMON
|
||||
+ select POWER_SEQUENCE
|
||||
select NLS # for UTF-8 strings
|
||||
---help---
|
||||
Universal Serial Bus (USB) is a specification for a serial bus
|
||||
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
|
||||
index 236313f41f4a..3db75b0d2426 100644
|
||||
--- a/drivers/usb/core/hub.c
|
||||
+++ b/drivers/usb/core/hub.c
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <linux/random.h>
|
||||
#include <linux/pm_qos.h>
|
||||
#include <linux/kobject.h>
|
||||
+#include <linux/power/pwrseq.h>
|
||||
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/byteorder.h>
|
||||
@@ -1705,6 +1706,7 @@ static void hub_disconnect(struct usb_interface *intf)
|
||||
hub->error = 0;
|
||||
hub_quiesce(hub, HUB_DISCONNECT);
|
||||
|
||||
+ of_pwrseq_off_list(&hub->pwrseq_on_list);
|
||||
mutex_lock(&usb_port_peer_mutex);
|
||||
|
||||
/* Avoid races with recursively_mark_NOTATTACHED() */
|
||||
@@ -1751,11 +1753,41 @@ static bool hub_descriptor_is_sane(struct usb_host_interface *desc)
|
||||
return true;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_OF
|
||||
+static int hub_of_pwrseq_on(struct usb_hub *hub)
|
||||
+{
|
||||
+ struct device *parent;
|
||||
+ struct usb_device *hdev = hub->hdev;
|
||||
+ struct device_node *np;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (hdev->parent)
|
||||
+ parent = &hdev->dev;
|
||||
+ else
|
||||
+ parent = bus_to_hcd(hdev->bus)->self.sysdev;
|
||||
+
|
||||
+ for_each_child_of_node(parent->of_node, np) {
|
||||
+ ret = of_pwrseq_on_list(np, &hub->pwrseq_on_list);
|
||||
+ /* Maybe no power sequence library is chosen */
|
||||
+ if (ret && ret != -ENOENT)
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+#else
|
||||
+static int hub_of_pwrseq_on(struct usb_hub *hub)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
||||
{
|
||||
struct usb_host_interface *desc;
|
||||
struct usb_device *hdev;
|
||||
struct usb_hub *hub;
|
||||
+ int ret = -ENODEV;
|
||||
|
||||
desc = intf->cur_altsetting;
|
||||
hdev = interface_to_usbdev(intf);
|
||||
@@ -1846,6 +1878,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
||||
INIT_DELAYED_WORK(&hub->leds, led_work);
|
||||
INIT_DELAYED_WORK(&hub->init_work, NULL);
|
||||
INIT_WORK(&hub->events, hub_event);
|
||||
+ INIT_LIST_HEAD(&hub->pwrseq_on_list);
|
||||
spin_lock_init(&hub->irq_urb_lock);
|
||||
timer_setup(&hub->irq_urb_retry, hub_retry_irq_urb, 0);
|
||||
usb_get_intf(intf);
|
||||
@@ -1861,11 +1894,14 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
||||
if (id->driver_info & HUB_QUIRK_CHECK_PORT_AUTOSUSPEND)
|
||||
hub->quirk_check_port_auto_suspend = 1;
|
||||
|
||||
- if (hub_configure(hub, &desc->endpoint[0].desc) >= 0)
|
||||
- return 0;
|
||||
+ if (hub_configure(hub, &desc->endpoint[0].desc) >= 0) {
|
||||
+ ret = hub_of_pwrseq_on(hub);
|
||||
+ if (!ret)
|
||||
+ return 0;
|
||||
+ }
|
||||
|
||||
hub_disconnect(intf);
|
||||
- return -ENODEV;
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -3720,7 +3756,7 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
|
||||
|
||||
/* stop hub_wq and related activity */
|
||||
hub_quiesce(hub, HUB_SUSPEND);
|
||||
- return 0;
|
||||
+ return pwrseq_suspend_list(&hub->pwrseq_on_list);
|
||||
}
|
||||
|
||||
/* Report wakeup requests from the ports of a resuming root hub */
|
||||
@@ -3760,8 +3796,13 @@ static void report_wakeup_requests(struct usb_hub *hub)
|
||||
static int hub_resume(struct usb_interface *intf)
|
||||
{
|
||||
struct usb_hub *hub = usb_get_intfdata(intf);
|
||||
+ int ret;
|
||||
|
||||
dev_dbg(&intf->dev, "%s\n", __func__);
|
||||
+ ret = pwrseq_resume_list(&hub->pwrseq_on_list);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
hub_activate(hub, HUB_RESUME);
|
||||
|
||||
/*
|
||||
diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h
|
||||
index a9e24e4b8df1..feab956a1414 100644
|
||||
--- a/drivers/usb/core/hub.h
|
||||
+++ b/drivers/usb/core/hub.h
|
||||
@@ -72,6 +72,7 @@ struct usb_hub {
|
||||
spinlock_t irq_urb_lock;
|
||||
struct timer_list irq_urb_retry;
|
||||
struct usb_port **ports;
|
||||
+ struct list_head pwrseq_on_list; /* powered pwrseq node list */
|
||||
};
|
||||
|
||||
/**
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
From bf1b3a63aa2f3438750f5acdf372705f8a1beb41 Mon Sep 17 00:00:00 2001
|
||||
From: Joshua Clayton <stillcompiling@gmail.com>
|
||||
Date: Thu, 18 May 2017 08:49:01 +0800
|
||||
Subject: [PATCH 5/9] ARM: dts: imx6qdl: Enable usb node children with <reg>
|
||||
|
||||
Give usb nodes #address and #size attributes, so that a child node
|
||||
representing a permanently connected device such as an onboard hub may
|
||||
be addressed with a <reg> attribute
|
||||
|
||||
Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
|
||||
Signed-off-by: Peter Chen <peter.chen@nxp.com>
|
||||
---
|
||||
arch/arm/boot/dts/imx6qdl.dtsi | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
|
||||
index fe17a3405edc..a5f2f981255f 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
|
||||
@@ -977,6 +977,8 @@
|
||||
|
||||
usbh1: usb@2184200 {
|
||||
compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
reg = <0x02184200 0x200>;
|
||||
interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX6QDL_CLK_USBOH3>;
|
||||
@@ -991,6 +993,8 @@
|
||||
|
||||
usbh2: usb@2184400 {
|
||||
compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
reg = <0x02184400 0x200>;
|
||||
interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX6QDL_CLK_USBOH3>;
|
||||
@@ -1006,6 +1010,8 @@
|
||||
|
||||
usbh3: usb@2184600 {
|
||||
compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
reg = <0x02184600 0x200>;
|
||||
interrupts = <0 42 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks IMX6QDL_CLK_USBOH3>;
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
From c46707dde637ec75182c2f42f61aab96486bbcee Mon Sep 17 00:00:00 2001
|
||||
From: Peter Chen <peter.chen@nxp.com>
|
||||
Date: Thu, 18 May 2017 08:49:02 +0800
|
||||
Subject: [PATCH 6/9] ARM: dts: imx6qdl-udoo.dtsi: fix onboard USB HUB property
|
||||
|
||||
The current dts describes USB HUB's property at USB controller's
|
||||
entry, it is improper. The USB HUB should be the child node
|
||||
under USB controller, and power sequence properties are under
|
||||
it. Besides, using gpio pinctrl setting for USB2415's reset pin.
|
||||
|
||||
Signed-off-by: Peter Chen <peter.chen@nxp.com>
|
||||
Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
|
||||
Tested-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
|
||||
---
|
||||
arch/arm/boot/dts/imx6qdl-udoo.dtsi | 26 ++++++++++++--------------
|
||||
1 file changed, 12 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-udoo.dtsi b/arch/arm/boot/dts/imx6qdl-udoo.dtsi
|
||||
index 776bfc77f89d..4781a9e04338 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-udoo.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-udoo.dtsi
|
||||
@@ -5,6 +5,8 @@
|
||||
* Author: Fabio Estevam <fabio.estevam@freescale.com>
|
||||
*/
|
||||
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+
|
||||
/ {
|
||||
aliases {
|
||||
backlight = &backlight;
|
||||
@@ -62,17 +64,6 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
- reg_usb_h1_vbus: regulator@0 {
|
||||
- compatible = "regulator-fixed";
|
||||
- reg = <0>;
|
||||
- regulator-name = "usb_h1_vbus";
|
||||
- regulator-min-microvolt = <5000000>;
|
||||
- regulator-max-microvolt = <5000000>;
|
||||
- enable-active-high;
|
||||
- startup-delay-us = <2>; /* USB2415 requires a POR of 1 us minimum */
|
||||
- gpio = <&gpio7 12 0>;
|
||||
- };
|
||||
-
|
||||
reg_panel: regulator@1 {
|
||||
compatible = "regulator-fixed";
|
||||
reg = <1>;
|
||||
@@ -205,7 +196,7 @@
|
||||
|
||||
pinctrl_usbh: usbhgrp {
|
||||
fsl,pins = <
|
||||
- MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x80000000
|
||||
+ MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x1b0b0
|
||||
MX6QDL_PAD_NANDF_CS2__CCM_CLKO2 0x130b0
|
||||
>;
|
||||
};
|
||||
@@ -282,9 +273,16 @@
|
||||
&usbh1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usbh>;
|
||||
- vbus-supply = <®_usb_h1_vbus>;
|
||||
- clocks = <&clks IMX6QDL_CLK_CKO>;
|
||||
status = "okay";
|
||||
+
|
||||
+ usb2415: hub@1 {
|
||||
+ compatible = "usb424,2514";
|
||||
+ reg = <1>;
|
||||
+
|
||||
+ clocks = <&clks IMX6QDL_CLK_CKO>;
|
||||
+ reset-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>;
|
||||
+ reset-duration-us = <3000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&usdhc3 {
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
From 0ae59d1767a9cf9875b35a026b5df13eeb3694db Mon Sep 17 00:00:00 2001
|
||||
From: Joshua Clayton <stillcompiling@gmail.com>
|
||||
Date: Thu, 18 May 2017 08:49:03 +0800
|
||||
Subject: [PATCH 7/9] ARM: dts: imx6q-evi: Fix onboard hub reset line
|
||||
|
||||
Previously the onboard hub was made to work by treating its
|
||||
reset gpio as a regulator enable.
|
||||
Get rid of that kludge now that pwseq has added reset gpio support
|
||||
Move pin muxing the hub reset pin into the usbh1 group
|
||||
|
||||
Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
|
||||
Signed-off-by: Peter Chen <peter.chen@nxp.com>
|
||||
---
|
||||
arch/arm/boot/dts/imx6q-evi.dts | 25 +++++++------------------
|
||||
1 file changed, 7 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/imx6q-evi.dts b/arch/arm/boot/dts/imx6q-evi.dts
|
||||
index c63f371ede8b..546d9d4e8ca1 100644
|
||||
--- a/arch/arm/boot/dts/imx6q-evi.dts
|
||||
+++ b/arch/arm/boot/dts/imx6q-evi.dts
|
||||
@@ -55,18 +55,6 @@
|
||||
reg = <0x10000000 0x40000000>;
|
||||
};
|
||||
|
||||
- reg_usbh1_vbus: regulator-usbhubreset {
|
||||
- compatible = "regulator-fixed";
|
||||
- regulator-name = "usbh1_vbus";
|
||||
- regulator-min-microvolt = <5000000>;
|
||||
- regulator-max-microvolt = <5000000>;
|
||||
- enable-active-high;
|
||||
- startup-delay-us = <2>;
|
||||
- pinctrl-names = "default";
|
||||
- pinctrl-0 = <&pinctrl_usbh1_hubreset>;
|
||||
- gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>;
|
||||
- };
|
||||
-
|
||||
reg_usb_otg_vbus: regulator-usbotgvbus {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "usb_otg_vbus";
|
||||
@@ -214,12 +202,18 @@
|
||||
};
|
||||
|
||||
&usbh1 {
|
||||
- vbus-supply = <®_usbh1_vbus>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usbh1>;
|
||||
dr_mode = "host";
|
||||
disable-over-current;
|
||||
status = "okay";
|
||||
+
|
||||
+ usb2415host: hub@1 {
|
||||
+ compatible = "usb424,2513";
|
||||
+ reg = <1>;
|
||||
+ reset-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>;
|
||||
+ reset-duration-us = <3000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&usbotg {
|
||||
@@ -482,11 +476,6 @@
|
||||
MX6QDL_PAD_GPIO_3__USB_H1_OC 0x1b0b0
|
||||
/* usbh1_b OC */
|
||||
MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x1b0b0
|
||||
- >;
|
||||
- };
|
||||
-
|
||||
- pinctrl_usbh1_hubreset: usbh1hubresetgrp {
|
||||
- fsl,pins = <
|
||||
MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x1b0b0
|
||||
>;
|
||||
};
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,511 @@
|
|||
From 9a4d8e886600c7c330590a2435dd74eb16d480ce Mon Sep 17 00:00:00 2001
|
||||
From: Steve Arnold <nerdboy@gentoo.org>
|
||||
Date: Fri, 15 Dec 2017 16:43:22 -0800
|
||||
Subject: [PATCH 8/9] ARM: dts,driver: imx6,udooqdl: add arduino manager driver
|
||||
and update dts
|
||||
|
||||
* note this is required to upload sketches to sam3 from arduino IDE
|
||||
|
||||
Signed-off-by: Steve Arnold <nerdboy@gentoo.org>
|
||||
---
|
||||
arch/arm/boot/dts/imx6qdl-udoo.dtsi | 20 ++
|
||||
drivers/misc/Kconfig | 7 +
|
||||
drivers/misc/Makefile | 1 +
|
||||
drivers/misc/udoo_ard.c | 417 ++++++++++++++++++++++++++++
|
||||
4 files changed, 445 insertions(+)
|
||||
create mode 100755 drivers/misc/udoo_ard.c
|
||||
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-udoo.dtsi b/arch/arm/boot/dts/imx6qdl-udoo.dtsi
|
||||
index 4781a9e04338..554f601eb72a 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-udoo.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-udoo.dtsi
|
||||
@@ -84,6 +84,17 @@
|
||||
mux-int-port = <1>;
|
||||
mux-ext-port = <6>;
|
||||
};
|
||||
+
|
||||
+ udoo_ard: udoo_ard_manager {
|
||||
+ compatible = "udoo,imx6q-udoo-ard";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_udooard>;
|
||||
+ bossac-clk-gpio = <&gpio6 3 0>;
|
||||
+ bossac-dat-gpio = <&gpio5 18 0>;
|
||||
+ bossac-erase-gpio = <&gpio4 21 0>;
|
||||
+ bossac-reset-gpio = <&gpio1 0 0>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
};
|
||||
|
||||
&fec {
|
||||
@@ -201,6 +212,15 @@
|
||||
>;
|
||||
};
|
||||
|
||||
+ pinctrl_udooard: udooardgrp {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_DISP0_DAT0__GPIO4_IO21 0x80000000
|
||||
+ MX6QDL_PAD_CSI0_DAT17__GPIO6_IO03 0x80000000
|
||||
+ MX6QDL_PAD_CSI0_PIXCLK__GPIO5_IO18 0x80000000
|
||||
+ MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x80000000
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
pinctrl_usdhc3: usdhc3grp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059
|
||||
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
|
||||
index 2cf9db44e4b2..f4616fc61808 100644
|
||||
--- a/drivers/misc/Kconfig
|
||||
+++ b/drivers/misc/Kconfig
|
||||
@@ -487,6 +487,13 @@ config PVPANIC
|
||||
a paravirtualized device provided by QEMU; it lets a virtual machine
|
||||
(guest) communicate panic events to the host.
|
||||
|
||||
+config UDOO_ARD
|
||||
+ tristate "UDOO-Arduino erase/reset Driver"
|
||||
+ default y
|
||||
+ help
|
||||
+ This driver is used to erase and reset arduino board via command sent
|
||||
+ over USB-to-SERIAL connection.
|
||||
+
|
||||
source "drivers/misc/c2port/Kconfig"
|
||||
source "drivers/misc/eeprom/Kconfig"
|
||||
source "drivers/misc/cb710/Kconfig"
|
||||
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
|
||||
index dcc801e8834e..13e132dd62c9 100644
|
||||
--- a/drivers/misc/Makefile
|
||||
+++ b/drivers/misc/Makefile
|
||||
@@ -54,6 +54,7 @@ obj-y += cape/
|
||||
obj-$(CONFIG_ECHO) += echo/
|
||||
obj-$(CONFIG_VEXPRESS_SYSCFG) += vexpress-syscfg.o
|
||||
obj-$(CONFIG_CXL_BASE) += cxl/
|
||||
+obj-$(CONFIG_UDOO_ARD) += udoo_ard.o
|
||||
obj-$(CONFIG_PCI_ENDPOINT_TEST) += pci_endpoint_test.o
|
||||
obj-$(CONFIG_OCXL) += ocxl/
|
||||
obj-y += cardreader/
|
||||
diff --git a/drivers/misc/udoo_ard.c b/drivers/misc/udoo_ard.c
|
||||
new file mode 100755
|
||||
index 000000000000..2210738e09c0
|
||||
--- /dev/null
|
||||
+++ b/drivers/misc/udoo_ard.c
|
||||
@@ -0,0 +1,417 @@
|
||||
+/*
|
||||
+ * udoo_ard.c
|
||||
+ * UDOO quad/dual Arduino flash erase / CPU resetter
|
||||
+ *
|
||||
+ * Copyright (C) 2013-2015 Aidilab srl
|
||||
+ * Author: UDOO Team <social@udoo.org>
|
||||
+ * Author: Giuseppe Pagano <giuseppe.pagano@seco.com>
|
||||
+ * Author: Francesco Montefoschi <francesco.monte@gmail.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 Foundation.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
+ * more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License along with
|
||||
+ * this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/interrupt.h>
|
||||
+#include <linux/errno.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/io.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/gpio.h>
|
||||
+#include <linux/sched.h>
|
||||
+#include <linux/sched/clock.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/workqueue.h>
|
||||
+#include <linux/fs.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/of_address.h>
|
||||
+#include <linux/of_gpio.h>
|
||||
+#include <linux/of_irq.h>
|
||||
+#include <linux/of_platform.h>
|
||||
+#include <linux/uaccess.h>
|
||||
+
|
||||
+#define DRIVER_NAME "udoo_ard"
|
||||
+#define PINCTRL_DEFAULT "default"
|
||||
+#define AUTH_TOKEN 0x5A5A
|
||||
+#define MAX_MSEC_SINCE_LAST_IRQ 400
|
||||
+#define GRAY_TIME_BETWEEN_RESET 10000 // In this time we can't accept new erase/reset code
|
||||
+
|
||||
+static struct workqueue_struct *erase_reset_wq;
|
||||
+typedef struct {
|
||||
+ struct work_struct erase_reset_work;
|
||||
+ struct pinctrl *pinctrl;
|
||||
+ struct pinctrl_state *pins_default;
|
||||
+ int step;
|
||||
+ int cmdcode;
|
||||
+ int erase_reset_lock;
|
||||
+ int gpio_bossac_clk;
|
||||
+ int gpio_bossac_dat;
|
||||
+ int gpio_ard_erase;
|
||||
+ int gpio_ard_reset;
|
||||
+ unsigned long last_int_time_in_ns;
|
||||
+ unsigned long last_int_time_in_sec;
|
||||
+} erase_reset_work_t;
|
||||
+
|
||||
+erase_reset_work_t *work;
|
||||
+static u32 origTX, origRX; // original UART4 TX/RX pad control registers
|
||||
+static int major; // for /dev/udoo_ard
|
||||
+static struct class *udoo_class;
|
||||
+
|
||||
+static struct platform_device_id udoo_ard_devtype[] = {
|
||||
+ {
|
||||
+ /* keep it for coldfire */
|
||||
+ .name = DRIVER_NAME,
|
||||
+ .driver_data = 0,
|
||||
+ }, {
|
||||
+ /* sentinel */
|
||||
+ }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(platform, udoo_ard_devtype);
|
||||
+
|
||||
+static const struct of_device_id udoo_ard_dt_ids[] = {
|
||||
+ { .compatible = "udoo,imx6q-udoo-ard", .data = &udoo_ard_devtype[0], },
|
||||
+ { /* sentinel */ }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, udoo_ard_dt_ids);
|
||||
+
|
||||
+static void disable_serial(void)
|
||||
+{
|
||||
+ u32 addrTX;
|
||||
+ void __iomem *_addrTX;
|
||||
+
|
||||
+ printk("[bossac] Disable UART4 serial port.\n");
|
||||
+
|
||||
+ addrTX = 0x20E01F8;
|
||||
+ _addrTX = ioremap(addrTX, 8);
|
||||
+
|
||||
+ origTX = __raw_readl(_addrTX);
|
||||
+ origRX = __raw_readl(_addrTX + 0x4);
|
||||
+
|
||||
+ __raw_writel(0x15, _addrTX);
|
||||
+ __raw_writel(0x15, _addrTX + 0x4);
|
||||
+
|
||||
+ iounmap(_addrTX);
|
||||
+}
|
||||
+
|
||||
+static void enable_serial(void)
|
||||
+{
|
||||
+ u32 addrTX;
|
||||
+ void __iomem *_addrTX;
|
||||
+
|
||||
+ printk("[bossac] Enable UART4 serial port.\n");
|
||||
+
|
||||
+ addrTX = 0x20E01F8;
|
||||
+ _addrTX = ioremap(addrTX, 8);
|
||||
+
|
||||
+ __raw_writel(origTX, _addrTX);
|
||||
+ __raw_writel(origRX, _addrTX + 0x4);
|
||||
+
|
||||
+ iounmap(_addrTX);
|
||||
+}
|
||||
+
|
||||
+static void erase_reset(void)
|
||||
+{
|
||||
+ printk("[bossac] UDOO ERASE and RESET on Sam3x started.\n");
|
||||
+
|
||||
+ gpio_direction_input(work->gpio_ard_erase);
|
||||
+ gpio_set_value(work->gpio_ard_reset, 1);
|
||||
+ msleep(1);
|
||||
+
|
||||
+ gpio_direction_output(work->gpio_ard_erase, 1);
|
||||
+ msleep(300);
|
||||
+ gpio_direction_input(work->gpio_ard_erase);
|
||||
+
|
||||
+ msleep(10);
|
||||
+ gpio_set_value(work->gpio_ard_reset, 0);
|
||||
+
|
||||
+ msleep(80);
|
||||
+ gpio_set_value(work->gpio_ard_reset, 1);
|
||||
+
|
||||
+ printk("[bossac] UDOO ERASE and RESET on Sam3x EXECUTED.\n");
|
||||
+}
|
||||
+
|
||||
+static void shutdown_sam3x(void)
|
||||
+{
|
||||
+ printk("[bossac] RESET on Sam3x.\n");
|
||||
+
|
||||
+ gpio_set_value(work->gpio_ard_reset, 0);
|
||||
+}
|
||||
+
|
||||
+static void erase_reset_wq_function( struct work_struct *work2)
|
||||
+{
|
||||
+ disable_serial();
|
||||
+ erase_reset();
|
||||
+ msleep(GRAY_TIME_BETWEEN_RESET);
|
||||
+
|
||||
+ work->erase_reset_lock = 0;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * Called everytime the gpio_bossac_clk signal toggles.
|
||||
+ * If the auth token (16 bit) is found, we look for the command code (4 bit).
|
||||
+ * The code 0x0F is sent by Bossac to trigger an erase/reset (to achieve this,
|
||||
+ * erase_reset_wq is scheduled). Before starting to program the flash, we disable
|
||||
+ * the UART4 serial port, otherwise there is too noise on the serial lines (the
|
||||
+ * programming port and UART4 port are connected together, see hw schematics).
|
||||
+ * When Bossac finishes to flash/verify, the code 0x00 is sent which re-enables
|
||||
+ * the UART4 port.
|
||||
+ */
|
||||
+static irqreturn_t udoo_bossac_req(int irq, void *dev_id)
|
||||
+{
|
||||
+ int retval, auth_bit, expected_bit, msec_since_last_irq;
|
||||
+ u64 nowsec;
|
||||
+ unsigned long rem_nsec;
|
||||
+ erase_reset_work_t *erase_reset_work;
|
||||
+
|
||||
+ auth_bit = 0;
|
||||
+ if (gpio_get_value(work->gpio_bossac_dat) != 0x0) {
|
||||
+ auth_bit = 1;
|
||||
+ }
|
||||
+
|
||||
+ erase_reset_work = (erase_reset_work_t *)work;
|
||||
+
|
||||
+ nowsec = local_clock();
|
||||
+ rem_nsec = do_div(nowsec, 1000000000) ;
|
||||
+ msec_since_last_irq = (((unsigned long)nowsec * 1000) + rem_nsec/1000000 ) - (((unsigned long)erase_reset_work->last_int_time_in_sec * 1000) + erase_reset_work->last_int_time_in_ns/1000000);
|
||||
+
|
||||
+ if (msec_since_last_irq > MAX_MSEC_SINCE_LAST_IRQ) {
|
||||
+ erase_reset_work->step = 0;
|
||||
+#ifdef DEBUG
|
||||
+ printk("[bossac] Reset authentication timeout!\n");
|
||||
+#endif
|
||||
+ }
|
||||
+
|
||||
+#ifdef DEBUG
|
||||
+ printk("[bossac] STEP %d -> 0x%d \n", erase_reset_work->step, auth_bit);
|
||||
+#endif
|
||||
+ erase_reset_work->last_int_time_in_ns = rem_nsec;
|
||||
+ erase_reset_work->last_int_time_in_sec = nowsec;
|
||||
+
|
||||
+ if ( erase_reset_work->step < 16 ) { // Authenticating received token bit.
|
||||
+ expected_bit = (( AUTH_TOKEN >> erase_reset_work->step ) & 0x01 );
|
||||
+ if ( auth_bit == expected_bit ) {
|
||||
+ erase_reset_work->step = erase_reset_work->step + 1;
|
||||
+ } else {
|
||||
+ erase_reset_work->step = 0;
|
||||
+ }
|
||||
+ } else { // Passed all authentication step. Receiving command code.
|
||||
+ erase_reset_work->cmdcode = erase_reset_work->cmdcode | (auth_bit << (erase_reset_work->step - 16));
|
||||
+ erase_reset_work->step = erase_reset_work->step + 1;
|
||||
+ }
|
||||
+
|
||||
+#ifdef DEBUG
|
||||
+ printk("erase_reset_work->erase_reset_lock = %d \n", erase_reset_work->erase_reset_lock);
|
||||
+#endif
|
||||
+ if ( erase_reset_work->step == 20 ) { // Passed authentication and code acquiring step.
|
||||
+#ifdef DEBUG
|
||||
+ printk("[bossac] Received code = 0x%04x \n", erase_reset_work->cmdcode);
|
||||
+#endif
|
||||
+ if (erase_reset_work->cmdcode == 0xF) {
|
||||
+ if (erase_reset_work->erase_reset_lock == 0) {
|
||||
+ erase_reset_work->erase_reset_lock = 1;
|
||||
+ retval = queue_work( erase_reset_wq, (struct work_struct *)work );
|
||||
+ } else {
|
||||
+#ifdef DEBUG
|
||||
+ printk("Erase and reset operation already in progress. Do nothing.\n");
|
||||
+#endif
|
||||
+ }
|
||||
+ } else {
|
||||
+ enable_serial();
|
||||
+ }
|
||||
+ erase_reset_work->step = 0;
|
||||
+ erase_reset_work->cmdcode = 0;
|
||||
+ }
|
||||
+
|
||||
+ return IRQ_HANDLED;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * Takes control of clock, data, erase, reset GPIOs.
|
||||
+ */
|
||||
+static int gpio_setup(void)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = gpio_request(work->gpio_bossac_clk, "BOSSA_CLK");
|
||||
+ if (ret) {
|
||||
+ printk(KERN_ERR "request BOSSA_CLK IRQ\n");
|
||||
+ return -1;
|
||||
+ } else {
|
||||
+ gpio_direction_input(work->gpio_bossac_clk);
|
||||
+ }
|
||||
+
|
||||
+ ret = gpio_request(work->gpio_bossac_dat, "BOSSA_DAT");
|
||||
+ if (ret) {
|
||||
+ printk(KERN_ERR "request BOSSA_DAT IRQ\n");
|
||||
+ return -1;
|
||||
+ } else {
|
||||
+ gpio_direction_input(work->gpio_bossac_dat);
|
||||
+ }
|
||||
+
|
||||
+ ret = gpio_request(work->gpio_ard_erase, "BOSSAC");
|
||||
+ if (ret) {
|
||||
+ printk(KERN_ERR "request GPIO FOR ARDUINO ERASE\n");
|
||||
+ return -1;
|
||||
+ } else {
|
||||
+ gpio_direction_input(work->gpio_ard_erase);
|
||||
+ }
|
||||
+
|
||||
+ ret = gpio_request(work->gpio_ard_reset, "BOSSAC");
|
||||
+ if (ret) {
|
||||
+ printk(KERN_ERR "request GPIO FOR ARDUINO RESET\n");
|
||||
+ return -1;
|
||||
+ } else {
|
||||
+ gpio_direction_output(work->gpio_ard_reset, 1);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static ssize_t device_write(struct file *filp, const char *buff, size_t len, loff_t *off)
|
||||
+{
|
||||
+ char msg[10];
|
||||
+ long res;
|
||||
+
|
||||
+ if (len > 10)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+
|
||||
+ res = copy_from_user(msg, buff, len);
|
||||
+ if (res) {
|
||||
+ return -EFAULT;
|
||||
+ }
|
||||
+ msg[len] = '\0';
|
||||
+
|
||||
+ if (strcmp(msg, "erase")==0) {
|
||||
+ erase_reset();
|
||||
+ } else if (strcmp(msg, "shutdown")==0) {
|
||||
+ shutdown_sam3x();
|
||||
+ } else if (strcmp(msg, "uartoff")==0) {
|
||||
+ disable_serial();
|
||||
+ } else if (strcmp(msg, "uarton")==0) {
|
||||
+ enable_serial();
|
||||
+ } else {
|
||||
+ printk("[bossac] udoo_ard invalid operation! %s", msg);
|
||||
+ }
|
||||
+
|
||||
+ return len;
|
||||
+}
|
||||
+
|
||||
+static struct file_operations fops = {
|
||||
+ .write = device_write,
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * If a fdt udoo_ard entry is found, we register an IRQ on bossac clock line
|
||||
+ * and we create /dev/udoo_ard
|
||||
+ */
|
||||
+static int udoo_ard_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ int retval;
|
||||
+ struct device *temp_class;
|
||||
+ struct platform_device *bdev;
|
||||
+ struct device_node *np;
|
||||
+
|
||||
+ bdev = kzalloc(sizeof(*bdev), GFP_KERNEL);
|
||||
+ np = pdev->dev.of_node;
|
||||
+
|
||||
+ if (!np)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ work = (erase_reset_work_t *)kmalloc(sizeof(erase_reset_work_t), GFP_KERNEL);
|
||||
+ if (work) {
|
||||
+ work->gpio_ard_reset = of_get_named_gpio(np, "bossac-reset-gpio", 0);
|
||||
+ work->gpio_ard_erase = of_get_named_gpio(np, "bossac-erase-gpio", 0);
|
||||
+ work->gpio_bossac_clk = of_get_named_gpio(np, "bossac-clk-gpio", 0);
|
||||
+ work->gpio_bossac_dat = of_get_named_gpio(np, "bossac-dat-gpio", 0);
|
||||
+ work->pinctrl = devm_pinctrl_get(&pdev->dev);
|
||||
+ work->pins_default = pinctrl_lookup_state(work->pinctrl, PINCTRL_DEFAULT);
|
||||
+ } else {
|
||||
+ printk("[bossac] Failed to allocate data structure.");
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ pinctrl_select_state(work->pinctrl, work->pins_default);
|
||||
+ gpio_setup();
|
||||
+
|
||||
+ printk("[bossac] Registering IRQ %d for BOSSAC Arduino erase/reset operation\n", gpio_to_irq(work->gpio_bossac_clk));
|
||||
+ retval = request_irq(gpio_to_irq(work->gpio_bossac_clk), udoo_bossac_req, IRQF_TRIGGER_FALLING, "UDOO", bdev);
|
||||
+
|
||||
+ major = register_chrdev(major, "udoo_ard", &fops);
|
||||
+ if (major < 0) {
|
||||
+ printk(KERN_ERR "[bossac] Cannot get major for UDOO Ard\n");
|
||||
+ return -EBUSY;
|
||||
+ }
|
||||
+
|
||||
+ udoo_class = class_create(THIS_MODULE, "udoo_ard");
|
||||
+ if (IS_ERR(udoo_class)) {
|
||||
+ return PTR_ERR(udoo_class);
|
||||
+ }
|
||||
+
|
||||
+ temp_class = device_create(udoo_class, NULL, MKDEV(major, 0), NULL, "udoo_ard");
|
||||
+ if (IS_ERR(temp_class)) {
|
||||
+ return PTR_ERR(temp_class);
|
||||
+ }
|
||||
+
|
||||
+ printk("[bossac] Created device file /dev/udoo_ard\n");
|
||||
+
|
||||
+ erase_reset_wq = create_workqueue("erase_reset_queue");
|
||||
+ if (erase_reset_wq) {
|
||||
+
|
||||
+ /* Queue some work (item 1) */
|
||||
+ if (work) {
|
||||
+ INIT_WORK( (struct work_struct *)work, erase_reset_wq_function );
|
||||
+ work->step = 1;
|
||||
+ work->cmdcode = 0;
|
||||
+ work->last_int_time_in_ns = 0;
|
||||
+ work->last_int_time_in_sec = 0;
|
||||
+ work->erase_reset_lock = 0;
|
||||
+ // retval = queue_work( erase_reset_wq, (struct work_struct *)work );
|
||||
+ }
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int udoo_ard_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ printk("[bossac] Unloading UDOO ard driver.\n");
|
||||
+ free_irq(gpio_to_irq(work->gpio_bossac_clk), NULL);
|
||||
+
|
||||
+ gpio_free(work->gpio_ard_reset);
|
||||
+ gpio_free(work->gpio_ard_erase);
|
||||
+ gpio_free(work->gpio_bossac_clk);
|
||||
+ gpio_free(work->gpio_bossac_dat);
|
||||
+
|
||||
+ device_destroy(udoo_class, MKDEV(major, 0));
|
||||
+ class_destroy(udoo_class);
|
||||
+ unregister_chrdev(major, "udoo_ard");
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct platform_driver udoo_ard_driver = {
|
||||
+ .driver = {
|
||||
+ .name = DRIVER_NAME,
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .of_match_table = udoo_ard_dt_ids,
|
||||
+ },
|
||||
+ .id_table = udoo_ard_devtype,
|
||||
+ .probe = udoo_ard_probe,
|
||||
+ .remove = udoo_ard_remove,
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(udoo_ard_driver);
|
||||
+
|
||||
+MODULE_ALIAS("platform:"DRIVER_NAME);
|
||||
+MODULE_LICENSE("GPL");
|
||||
--
|
||||
2.20.1
|
||||
|
208
patch/kernel/udoo-dev/general-packaging-4.17-dev.patch
Normal file
208
patch/kernel/udoo-dev/general-packaging-4.17-dev.patch
Normal file
|
@ -0,0 +1,208 @@
|
|||
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
|
||||
index 90c9a8a..3c79b90 100755
|
||||
--- a/scripts/package/builddeb
|
||||
+++ b/scripts/package/builddeb
|
||||
@@ -29,6 +29,27 @@ create_package() {
|
||||
# in case we are in a restrictive umask environment like 0077
|
||||
chmod -R a+rX "$pdir"
|
||||
|
||||
+ # Create preinstall and post install script to remove dtb
|
||||
+ if [[ "$1" == *dtb* ]]; then
|
||||
+ echo "if [ -d /boot/dtb-$version ]; then mv /boot/dtb-$version /boot/dtb-$version.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "if [ -d /boot/dtb.old ]; then rm -rf /boot/dtb.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "if [ -d /boot/dtb ]; then mv /boot/dtb /boot/dtb.old; fi" >> $pdir/DEBIAN/preinst
|
||||
+ echo "exit 0" >> $pdir/DEBIAN/preinst
|
||||
+ chmod 775 $pdir/DEBIAN/preinst
|
||||
+
|
||||
+ echo "if [ -d /boot/dtb-$version.old ]; then rm -rf /boot/dtb-$version.old; fi" >> $pdir/DEBIAN/postinst
|
||||
+ echo "ln -sf dtb-$version /boot/dtb > /dev/null 2>&1 || mv /boot/dtb-$version /boot/dtb" >> $pdir/DEBIAN/postinst
|
||||
+ echo "exit 0" >> $pdir/DEBIAN/postinst
|
||||
+ chmod 775 $pdir/DEBIAN/postinst
|
||||
+ fi
|
||||
+
|
||||
+ # Create postinstall script for headers
|
||||
+ if [[ "$1" == *headers* ]]; then
|
||||
+ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; find -type f -exec touch {} +;make -s scripts >/dev/null 2>&1" >> $pdir/DEBIAN/postinst
|
||||
+ echo "exit 0" >> $pdir/DEBIAN/postinst
|
||||
+ chmod 775 $pdir/DEBIAN/postinst
|
||||
+ fi
|
||||
+
|
||||
# Create the package
|
||||
dpkg-gencontrol -p$pname -P"$pdir"
|
||||
dpkg --build "$pdir" ..
|
||||
@@ -39,9 +60,11 @@ tmpdir="$objtree/debian/tmp"
|
||||
kernel_headers_dir="$objtree/debian/hdrtmp"
|
||||
libc_headers_dir="$objtree/debian/headertmp"
|
||||
dbg_dir="$objtree/debian/dbgtmp"
|
||||
-packagename=linux-image-$version
|
||||
-kernel_headers_packagename=linux-headers-$version
|
||||
-libc_headers_packagename=linux-libc-dev
|
||||
+dtb_dir="$objtree/debian/dtbtmp"
|
||||
+packagename=linux-image-dev"$LOCALVERSION"
|
||||
+kernel_headers_packagename=linux-headers-dev"$LOCALVERSION"
|
||||
+dtb_packagename=linux-dtb-dev"$LOCALVERSION"
|
||||
+libc_headers_packagename=linux-libc-dev-dev"$LOCALVERSION"
|
||||
dbg_packagename=$packagename-dbg
|
||||
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
@@ -52,6 +75,15 @@ fi
|
||||
# XXX: have each arch Makefile export a variable of the canonical image install
|
||||
# path instead
|
||||
case $ARCH in
|
||||
+aarch64|arm64)
|
||||
+ image_name=Image
|
||||
+ installed_image_path="boot/vmlinuz-$version"
|
||||
+
|
||||
+ ;;
|
||||
+arm*)
|
||||
+ image_name=zImage
|
||||
+ installed_image_path="boot/vmlinuz-$version"
|
||||
+ ;;
|
||||
um)
|
||||
installed_image_path="usr/bin/linux-$version"
|
||||
;;
|
||||
@@ -65,7 +97,9 @@ esac
|
||||
BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)"
|
||||
|
||||
# Setup the directory structure
|
||||
-rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files
|
||||
+rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" "$dtb_dir" $objtree/debian/files
|
||||
+mkdir -m 755 -p "$dtb_dir/DEBIAN"
|
||||
+mkdir -p "$dtb_dir/boot/dtb-$version" "$dtb_dir/usr/share/doc/$dtb_packagename"
|
||||
mkdir -m 755 -p "$tmpdir/DEBIAN"
|
||||
mkdir -p "$tmpdir/lib" "$tmpdir/boot"
|
||||
mkdir -p "$kernel_headers_dir/lib/modules/$version/"
|
||||
@@ -118,6 +152,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
+if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG ; then
|
||||
+ #mkdir -p "$tmpdir/boot/dtb"
|
||||
+ INSTALL_DTBS_PATH="$dtb_dir/boot/dtb-$version" $MAKE KBUILD_SRC= dtbs_install
|
||||
+fi
|
||||
+
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
$MAKE headers_check KBUILD_SRC=
|
||||
$MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr"
|
||||
@@ -137,7 +176,7 @@ fi
|
||||
for script in postinst postrm preinst prerm ; do
|
||||
mkdir -p "$tmpdir$debhookdir/$script.d"
|
||||
cat <<EOF > "$tmpdir/DEBIAN/$script"
|
||||
-#!/bin/sh
|
||||
+#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
@@ -153,9 +192,60 @@ EOF
|
||||
chmod 755 "$tmpdir/DEBIAN/$script"
|
||||
done
|
||||
|
||||
+##
|
||||
+## Create sym link to kernel image
|
||||
+##
|
||||
+sed -e "s/set -e//g" -i $tmpdir/DEBIAN/postinst
|
||||
+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/postinst
|
||||
+cat >> $tmpdir/DEBIAN/postinst <<EOT
|
||||
+if [ "\$(grep nand /proc/partitions)" != "" ] && [ "\$(grep mmc /proc/partitions)" = "" ]; then
|
||||
+ mkimage -A arm -O linux -T kernel -C none -a "0x40008000" -e "0x40008000" -n "Linux kernel" -d /$installed_image_path /boot/uImage > /dev/null 2>&1
|
||||
+ cp /boot/uImage /tmp/uImage
|
||||
+ sync
|
||||
+ mountpoint -q /boot || mount /boot
|
||||
+ cp /tmp/uImage /boot/uImage
|
||||
+ rm -f /$installed_image_path
|
||||
+else
|
||||
+ ln -sf $(basename $installed_image_path) /boot/$image_name || mv /$installed_image_path /boot/$image_name
|
||||
+fi
|
||||
+touch /boot/.next
|
||||
+exit 0
|
||||
+EOT
|
||||
+
|
||||
+##
|
||||
+## FAT install workaround
|
||||
+##
|
||||
+sed -e "s/set -e//g" -i $tmpdir/DEBIAN/preinst
|
||||
+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/preinst
|
||||
+cat >> $tmpdir/DEBIAN/preinst <<EOT
|
||||
+# exit if we are running chroot
|
||||
+if [ "\$(stat -c %d:%i /)" != "\$(stat -c %d:%i /proc/1/root/.)" ]; then exit 0; fi
|
||||
+
|
||||
+check_and_unmount (){
|
||||
+ boot_device=\$(mountpoint -d /boot)
|
||||
+
|
||||
+ for file in /dev/* ; do
|
||||
+ CURRENT_DEVICE=\$(printf "%d:%d" \$(stat --printf="0x%t 0x%T" \$file))
|
||||
+ if [[ "\$CURRENT_DEVICE" = "\$boot_device" ]]; then
|
||||
+ boot_partition=\$file
|
||||
+ break
|
||||
+ fi
|
||||
+ done
|
||||
+
|
||||
+ bootfstype=\$(blkid -s TYPE -o value \$boot_partition)
|
||||
+ if [ "\$bootfstype" = "vfat" ]; then
|
||||
+ umount /boot
|
||||
+ rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/$image_name /boot/uImage
|
||||
+ fi
|
||||
+}
|
||||
+mountpoint -q /boot && check_and_unmount
|
||||
+EOT
|
||||
+echo "exit 0" >> $tmpdir/DEBIAN/preinst
|
||||
+
|
||||
# Build kernel header package
|
||||
(cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl) > "$objtree/debian/hdrsrcfiles"
|
||||
(cd $srctree; find arch/*/include include scripts -type f -o -type l) >> "$objtree/debian/hdrsrcfiles"
|
||||
+(cd $srctree; find security/*/include -type f) >> "$objtree/debian/hdrsrcfiles"
|
||||
(cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles"
|
||||
(cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles"
|
||||
if grep -q '^CONFIG_STACK_VALIDATION=y' $KCONFIG_CONFIG ; then
|
||||
@@ -167,15 +257,19 @@ if grep -q '^CONFIG_GCC_PLUGINS=y' $KCONFIG_CONFIG ; then
|
||||
fi
|
||||
destdir=$kernel_headers_dir/usr/src/linux-headers-$version
|
||||
mkdir -p "$destdir"
|
||||
+(cd $destdir; patch -p1 < /tmp/headers-debian-byteshift.patch)
|
||||
(cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd $destdir; tar -xf -)
|
||||
(cd $objtree; tar -c -f - -T -) < "$objtree/debian/hdrobjfiles" | (cd $destdir; tar -xf -)
|
||||
(cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be
|
||||
ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build"
|
||||
rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
|
||||
|
||||
+(cd $destdir; make M=scripts clean)
|
||||
+
|
||||
if [ "$ARCH" != "um" ]; then
|
||||
create_package "$kernel_headers_packagename" "$kernel_headers_dir"
|
||||
- create_package "$libc_headers_packagename" "$libc_headers_dir"
|
||||
+ # create_package "$libc_headers_packagename" "$libc_headers_dir"
|
||||
+ create_package "$dtb_packagename" "$dtb_dir"
|
||||
fi
|
||||
|
||||
create_package "$packagename" "$tmpdir"
|
||||
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
|
||||
index 6adb3a1..00e12eb 100755
|
||||
--- a/scripts/package/mkdebian
|
||||
+++ b/scripts/package/mkdebian
|
||||
@@ -61,10 +61,12 @@ else
|
||||
packageversion=$version-$revision
|
||||
fi
|
||||
sourcename=$KDEB_SOURCENAME
|
||||
-packagename=linux-image-$version
|
||||
-kernel_headers_packagename=linux-headers-$version
|
||||
+packagename=linux-image-dev$LOCALVERSION
|
||||
+kernel_headers_packagename=linux-headers-dev$LOCALVERSION
|
||||
+dtb_packagename=linux-dtb-dev$LOCALVERSION
|
||||
dbg_packagename=$packagename-dbg
|
||||
debarch=
|
||||
+image_name=
|
||||
set_debarch
|
||||
|
||||
if [ "$ARCH" = "um" ] ; then
|
||||
@@ -168,6 +170,11 @@ Architecture: $debarch
|
||||
Description: Linux kernel debugging symbols for $version
|
||||
This package will come in handy if you need to debug the kernel. It provides
|
||||
all the necessary debug symbols for the kernel and its modules.
|
||||
+
|
||||
+Package: $dtb_packagename
|
||||
+Architecture: $debarch
|
||||
+Description: Linux DTB, version $version
|
||||
+ This package contains device blobs from the Linux kernel, version $version
|
||||
EOF
|
||||
|
||||
cat <<EOF > debian/rules
|
Loading…
Add table
Reference in a new issue