linux/drivers/hwspinlock/sprd_hwspinlock.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Spreadtrum hardware spinlock driver
 * Copyright (C) 2017 Spreadtrum  - http://www.spreadtrum.com
 */

#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/hwspinlock.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>

#include "hwspinlock_internal.h"

/* hwspinlock registers definition */
#define HWSPINLOCK_RECCTRL
#define HWSPINLOCK_MASTERID(_X_)
#define HWSPINLOCK_TOKEN(_X_)

/* unlocked value */
#define HWSPINLOCK_NOTTAKEN
/* bits definition of RECCTRL reg */
#define HWSPINLOCK_USER_BITS

/* hwspinlock number */
#define SPRD_HWLOCKS_NUM

struct sprd_hwspinlock_dev {};

/* try to lock the hardware spinlock */
static int sprd_hwspinlock_trylock(struct hwspinlock *lock)
{}

/* unlock the hardware spinlock */
static void sprd_hwspinlock_unlock(struct hwspinlock *lock)
{}

/* The specs recommended below number as the retry delay time */
static void sprd_hwspinlock_relax(struct hwspinlock *lock)
{}

static const struct hwspinlock_ops sprd_hwspinlock_ops =;

static void sprd_hwspinlock_disable(void *data)
{}

static int sprd_hwspinlock_probe(struct platform_device *pdev)
{}

static const struct of_device_id sprd_hwspinlock_of_match[] =;
MODULE_DEVICE_TABLE(of, sprd_hwspinlock_of_match);

static struct platform_driver sprd_hwspinlock_driver =;
module_platform_driver();

MODULE_LICENSE();
MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_AUTHOR();