mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 12:32:19 +07:00
af873fcece
Based on 1 normalized pattern(s): license terms gnu general public license gpl version 2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 161 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Steve Winslow <swinslow@gmail.com> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190528170027.447718015@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
46 lines
1.2 KiB
C
46 lines
1.2 KiB
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/**
|
|
* Copyright (C) ST-Ericsson SA 2010
|
|
* Author: Shujuan Chen <shujuan.chen@stericsson.com> for ST-Ericsson.
|
|
* Author: Jonas Linde <jonas.linde@stericsson.com> for ST-Ericsson.
|
|
* Author: Joakim Bech <joakim.xx.bech@stericsson.com> for ST-Ericsson.
|
|
* Author: Berne Hebark <berne.herbark@stericsson.com> for ST-Ericsson.
|
|
* Author: Niklas Hernaeus <niklas.hernaeus@stericsson.com> for ST-Ericsson.
|
|
*/
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/bitmap.h>
|
|
#include <linux/device.h>
|
|
|
|
#include "cryp.h"
|
|
#include "cryp_p.h"
|
|
#include "cryp_irq.h"
|
|
#include "cryp_irqp.h"
|
|
|
|
void cryp_enable_irq_src(struct cryp_device_data *device_data, u32 irq_src)
|
|
{
|
|
u32 i;
|
|
|
|
dev_dbg(device_data->dev, "[%s]", __func__);
|
|
|
|
i = readl_relaxed(&device_data->base->imsc);
|
|
i = i | irq_src;
|
|
writel_relaxed(i, &device_data->base->imsc);
|
|
}
|
|
|
|
void cryp_disable_irq_src(struct cryp_device_data *device_data, u32 irq_src)
|
|
{
|
|
u32 i;
|
|
|
|
dev_dbg(device_data->dev, "[%s]", __func__);
|
|
|
|
i = readl_relaxed(&device_data->base->imsc);
|
|
i = i & ~irq_src;
|
|
writel_relaxed(i, &device_data->base->imsc);
|
|
}
|
|
|
|
bool cryp_pending_irq_src(struct cryp_device_data *device_data, u32 irq_src)
|
|
{
|
|
return (readl_relaxed(&device_data->base->mis) & irq_src) > 0;
|
|
}
|