1dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo/*
2dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo * Spinlock support for the Hexagon architecture
3dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo *
4e1858b2a21cd84a855945a4747fb2db41b250c22Richard Kuo * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo *
6dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo * This program is free software; you can redistribute it and/or modify
7dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo * it under the terms of the GNU General Public License version 2 and
8dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo * only version 2 as published by the Free Software Foundation.
9dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo *
10dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo * This program is distributed in the hope that it will be useful,
11dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo * but WITHOUT ANY WARRANTY; without even the implied warranty of
12dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo * GNU General Public License for more details.
14dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo *
15dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo * You should have received a copy of the GNU General Public License
16dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo * along with this program; if not, write to the Free Software
17dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo * 02110-1301, USA.
19dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo */
20dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo
21dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo#ifndef _ASM_SPINLOCK_TYPES_H
22dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo#define _ASM_SPINLOCK_TYPES_H
23dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo
24dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo#ifndef __LINUX_SPINLOCK_TYPES_H
25dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo# error "please don't include this file directly"
26dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo#endif
27dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo
28dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuotypedef struct {
29dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo	volatile unsigned int lock;
30dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo} arch_spinlock_t;
31dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo
32dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo#define __ARCH_SPIN_LOCK_UNLOCKED	{ 0 }
33dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo
34dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuotypedef struct {
35dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo	volatile unsigned int lock;
36dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo} arch_rwlock_t;
37dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo
38dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo#define __ARCH_RW_LOCK_UNLOCKED		{ 0 }
39dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo
40dd472da380c3819740d740cfd70b7f8e700e834bRichard Kuo#endif
41