linux/drivers/hwspinlock/omap_hwspinlock.c

// SPDX-License-Identifier: GPL-2.0
/*
 * OMAP hardware spinlock driver
 *
 * Copyright (C) 2010-2021 Texas Instruments Incorporated - https://www.ti.com
 *
 * Contact: Simon Que <[email protected]>
 *          Hari Kanigeri <[email protected]>
 *          Ohad Ben-Cohen <[email protected]>
 *          Suman Anna <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/bitops.h>
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/hwspinlock.h>
#include <linux/of.h>
#include <linux/platform_device.h>

#include "hwspinlock_internal.h"

/* Spinlock register offsets */
#define SYSSTATUS_OFFSET
#define LOCK_BASE_OFFSET

#define SPINLOCK_NUMLOCKS_BIT_OFFSET

/* Possible values of SPINLOCK_LOCK_REG */
#define SPINLOCK_NOTTAKEN
#define SPINLOCK_TAKEN

static int omap_hwspinlock_trylock(struct hwspinlock *lock)
{}

static void omap_hwspinlock_unlock(struct hwspinlock *lock)
{}

/*
 * relax the OMAP interconnect while spinning on it.
 *
 * The specs recommended that the retry delay time will be
 * just over half of the time that a requester would be
 * expected to hold the lock.
 *
 * The number below is taken from an hardware specs example,
 * obviously it is somewhat arbitrary.
 */
static void omap_hwspinlock_relax(struct hwspinlock *lock)
{}

static const struct hwspinlock_ops omap_hwspinlock_ops =;

static int omap_hwspinlock_probe(struct platform_device *pdev)
{}

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

static struct platform_driver omap_hwspinlock_driver =;

static int __init omap_hwspinlock_init(void)
{}
/* board init code might need to reserve hwspinlocks for predefined purposes */
postcore_initcall(omap_hwspinlock_init);

static void __exit omap_hwspinlock_exit(void)
{}
module_exit(omap_hwspinlock_exit);

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