omap3530/assp/inc/locks.h
author arunabha
Wed, 03 Mar 2010 13:10:32 +0000
changeset 23 117faf51deac
parent 0 6663340f3fc9
permissions -rwxr-xr-x
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver this storage driver is for the West Bridge Astoria chipset. This device has a USB, SD and processor port for communication with a baseband processor. In our port, we connected this device DVK to the Beagleboard through the SPI interface of the OMAP3. After driver installation, the Symbian OS can see an external device or D: drive represented by the SD card. In this driver, the USB interface is not used directly, though this may be the subject of future contributions. The appropriate way to test the driver is to access the external volume and do file read and write to it, pretty much the same way you would test a thumb drive on your PC
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
     1
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
     2
// All rights reserved.
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
     3
// This component and the accompanying materials are made available
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
     4
// under the terms of the License "Eclipse Public License v1.0"
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
     5
// which accompanies this distribution, and is available
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
     7
//
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
     8
// Initial Contributors:
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    10
//
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    11
// Contributors:
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    12
//
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    13
// Description:
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    14
//
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    15
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    16
#ifndef __95_locks_h__
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    17
#define __95_locks_h__
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    18
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    19
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    20
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    21
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    22
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    23
#define __SPIN_LOCK_IRQ_R(lock)					((void)NKern::DisableAllInterrupts())
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    24
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    25
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    26
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    27
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    28
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    29
#define __SPIN_UNLOCK_IRQ_R(lock)				(NKern::EnableAllInterrupts())
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    30
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    31
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    32
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    33
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    34
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    35
#define __SPIN_FLASH_IRQ_R(lock)				(NKern::EnableAllInterrupts(),(void)NKern::DisableAllInterrupts(),((TBool)TRUE))
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    36
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    37
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    38
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    39
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    40
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    41
#define __SPIN_LOCK_IRQ_W(lock)					((void)NKern::DisableAllInterrupts())
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    42
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    43
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    44
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    45
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    46
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    47
#define __SPIN_UNLOCK_IRQ_W(lock)				(NKern::EnableAllInterrupts())
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    48
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    49
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    50
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    51
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    52
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    53
#define __SPIN_FLASH_IRQ_W(lock)				(NKern::EnableAllInterrupts(),(void)NKern::DisableAllInterrupts(),((TBool)TRUE))
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    54
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    55
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    56
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    57
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    58
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    59
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    60
#define __SPIN_LOCK_R(lock)						
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    61
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    62
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    63
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    64
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    65
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    66
#define __SPIN_UNLOCK_R(lock)					
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    67
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    68
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    69
@internalComponent
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    70
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    71
#define __SPIN_FLASH_R(lock)					((TBool)FALSE)
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    72
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    73
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    74
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    75
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    76
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    77
#define __SPIN_LOCK_W(lock)						
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    78
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    79
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    80
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    81
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    82
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    83
#define __SPIN_UNLOCK_W(lock)					
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    84
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    85
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    86
@internalComponent
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    87
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    88
#define __SPIN_FLASH_W(lock)					((TBool)FALSE)
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    89
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    90
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    91
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    92
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    93
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    94
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    95
#define __SPIN_LOCK_IRQSAVE_R(lock)				(NKern::DisableAllInterrupts())
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    96
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    97
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    98
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
    99
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   100
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   101
#define __SPIN_UNLOCK_IRQRESTORE_R(lock,irq)	(NKern::RestoreInterrupts(irq))
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   102
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   103
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   104
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   105
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   106
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   107
#define __SPIN_FLASH_IRQRESTORE_R(lock,irq)		(NKern::RestoreInterrupts(irq),((void)NKern::DisableAllInterrupts()),((TBool)TRUE))
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   108
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   109
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   110
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   111
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   112
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   113
#define __SPIN_LOCK_IRQSAVE_W(lock)				(NKern::DisableAllInterrupts())
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   114
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   115
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   116
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   117
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   118
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   119
#define __SPIN_UNLOCK_IRQRESTORE_W(lock,irq)	(NKern::RestoreInterrupts(irq))
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   120
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   121
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   122
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   123
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   124
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   125
#define __SPIN_FLASH_IRQRESTORE_W(lock,irq)		(NKern::RestoreInterrupts(irq),((void)NKern::DisableAllInterrupts()),((TBool)TRUE))
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   126
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   127
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   128
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   129
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   130
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   131
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   132
#define __SPIN_FLASH_PREEMPT_R(lock)			((TBool)NKern::PreemptionPoint())
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   133
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   134
/**
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   135
@publishedPartner
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   136
@prototype
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   137
*/
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   138
#define __SPIN_FLASH_PREEMPT_W(lock)			((TBool)NKern::PreemptionPoint())
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   139
6663340f3fc9 Add EPL'd beagleboard code
Pat Downey <patd@symbian.org>
parents:
diff changeset
   140
#endif