diff options
author | Ed Tanous <ed.tanous@intel.com> | 2019-07-31 20:43:37 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2019-08-01 18:19:38 +0300 |
commit | d0f63ef62c76c932a2003eaa42c0b250065ae06f (patch) | |
tree | 4c0e3cb32dc80f80460bdbf82ff6d401d4ff194f /meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed/0004-Test-code-for-LPC-MBOX.patch | |
parent | b4f66bacb1b8e661d794fa7a189e2f66f5092e2e (diff) | |
download | openbmc-d0f63ef62c76c932a2003eaa42c0b250065ae06f.tar.xz |
Update to internal 7-31-19
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed/0004-Test-code-for-LPC-MBOX.patch')
-rw-r--r-- | meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed/0004-Test-code-for-LPC-MBOX.patch | 112 |
1 files changed, 0 insertions, 112 deletions
diff --git a/meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed/0004-Test-code-for-LPC-MBOX.patch b/meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed/0004-Test-code-for-LPC-MBOX.patch deleted file mode 100644 index dbb163d20..000000000 --- a/meta-openbmc-mods/meta-ast2500/recipes-kernel/linux/linux-aspeed/0004-Test-code-for-LPC-MBOX.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 2f3587cf9e44f261fe74413ef6a54467686c910b Mon Sep 17 00:00:00 2001 -From: Jae Hyun Yoo <jae.hyun.yoo@intel.com> -Date: Tue, 20 Nov 2018 15:49:15 -0800 -Subject: [PATCH] Test code for LPC MBOX - -Blocked interrupt driven code for test. - -Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com> ---- - drivers/misc/aspeed-lpc-mbox.c | 21 ++++++++++++++++++++- - 1 file changed, 20 insertions(+), 1 deletion(-) - -diff --git a/drivers/misc/aspeed-lpc-mbox.c b/drivers/misc/aspeed-lpc-mbox.c -index 0f0c711bafee..0933e0553953 100644 ---- a/drivers/misc/aspeed-lpc-mbox.c -+++ b/drivers/misc/aspeed-lpc-mbox.c -@@ -19,6 +19,8 @@ - - #define DEVICE_NAME "aspeed-mbox" - -+#define MBX_USE_INTERRUPT 0 -+ - #define ASPEED_MBOX_NUM_REGS 16 - - #define ASPEED_MBOX_DATA_0 0x00 -@@ -79,12 +81,14 @@ static int aspeed_mbox_open(struct inode *inode, struct file *file) - struct aspeed_mbox *mbox = file_mbox(file); - - if (atomic_inc_return(&aspeed_mbox_open_count) == 1) { -+#if MBX_USE_INTERRUPT - /* - * Clear the interrupt status bit if it was left on and unmask - * interrupts. - * ASPEED_MBOX_CTRL_RECV bit is W1C, this also unmasks in 1 step - */ - aspeed_mbox_outb(mbox, ASPEED_MBOX_CTRL_RECV, ASPEED_MBOX_BMC_CTRL); -+#endif - return 0; - } - -@@ -106,6 +110,7 @@ static ssize_t aspeed_mbox_read(struct file *file, char __user *buf, - if (count + *ppos > ASPEED_MBOX_NUM_REGS) - return -EINVAL; - -+#if MBX_USE_INTERRUPT - if (file->f_flags & O_NONBLOCK) { - if (!(aspeed_mbox_inb(mbox, ASPEED_MBOX_BMC_CTRL) & - ASPEED_MBOX_CTRL_RECV)) -@@ -115,6 +120,7 @@ static ssize_t aspeed_mbox_read(struct file *file, char __user *buf, - ASPEED_MBOX_CTRL_RECV)) { - return -ERESTARTSYS; - } -+#endif - - mutex_lock(&mbox->mutex); - -@@ -129,8 +135,10 @@ static ssize_t aspeed_mbox_read(struct file *file, char __user *buf, - count--; - } - -+#if MBX_USE_INTERRUPT - /* ASPEED_MBOX_CTRL_RECV bit is write to clear, this also unmasks in 1 step */ - aspeed_mbox_outb(mbox, ASPEED_MBOX_CTRL_RECV, ASPEED_MBOX_BMC_CTRL); -+#endif - ret = p - buf; - - out_unlock: -@@ -180,7 +188,9 @@ static unsigned int aspeed_mbox_poll(struct file *file, poll_table *wait) - - poll_wait(file, &mbox->queue, wait); - -+#if MBX_USE_INTERRUPT - if (aspeed_mbox_inb(mbox, ASPEED_MBOX_BMC_CTRL) & ASPEED_MBOX_CTRL_RECV) -+#endif - mask |= POLLIN; - - return mask; -@@ -206,6 +216,7 @@ static irqreturn_t aspeed_mbox_irq(int irq, void *arg) - { - struct aspeed_mbox *mbox = arg; - -+#if MBX_USE_INTERRUPT - if (!(aspeed_mbox_inb(mbox, ASPEED_MBOX_BMC_CTRL) & ASPEED_MBOX_CTRL_RECV)) - return IRQ_NONE; - -@@ -216,6 +227,7 @@ static irqreturn_t aspeed_mbox_irq(int irq, void *arg) - - /* Mask it off, we'll clear it when we the data gets read */ - aspeed_mbox_outb(mbox, ASPEED_MBOX_CTRL_MASK, ASPEED_MBOX_BMC_CTRL); -+#endif - - wake_up(&mbox->queue); - return IRQ_HANDLED; -@@ -248,7 +260,14 @@ static int aspeed_mbox_config_irq(struct aspeed_mbox *mbox, - aspeed_mbox_outb(mbox, 0xff, ASPEED_MBOX_STATUS_0); - aspeed_mbox_outb(mbox, 0xff, ASPEED_MBOX_STATUS_1); - -- aspeed_mbox_outb(mbox, ASPEED_MBOX_CTRL_RECV, ASPEED_MBOX_BMC_CTRL); -+ aspeed_mbox_outb(mbox, aspeed_mbox_inb(mbox, ASPEED_MBOX_BMC_CTRL) | ASPEED_MBOX_CTRL_MASK, ASPEED_MBOX_BMC_CTRL); -+ -+ /* -+ * Because mailbox data register init value is random, need to give a -+ * init value to mailbox data register. -+ */ -+ aspeed_mbox_outb(mbox, 0x00, ASPEED_MBOX_DATA_0); -+ - return 0; - } - --- -2.7.4 - |