author | arunabha |
Tue, 13 Jul 2010 13:08:00 +0100 | |
changeset 41 | e73f15023e91 |
parent 23 | 117faf51deac |
child 51 | 254b9435d75e |
permissions | -rw-r--r-- |
23
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
1 |
/* Cypress West Bridge HAL for beagleboard SPI Symbian header file (cyashalbeagleboard_spi.h) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
2 |
## =========================== |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
3 |
## |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
4 |
## Copyright Cypress Semiconductor Corporation, 2006-2009, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
5 |
## All Rights Reserved |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
6 |
## UNPUBLISHED, LICENSED SOFTWARE. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
7 |
## |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
8 |
## CONFIDENTIAL AND PROPRIETARY INFORMATION |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
9 |
## WHICH IS THE PROPERTY OF CYPRESS. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
10 |
## |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
11 |
## Use of this file is governed |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
12 |
## by the license agreement included in the file |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
13 |
## |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
14 |
## <install>/license/license.txt |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
15 |
## |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
16 |
## where <install> is the Cypress software |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
17 |
## installation root directory path. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
18 |
## |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
19 |
## =========================== |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
20 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
21 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
22 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
23 |
* This file contains the defintion of the hardware abstraction layer on beagleboard |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
24 |
* talking to the West Bridge device through SPI interface |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
25 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
26 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
27 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
28 |
#ifndef _INCLUDED_CYASHALBEAGLEBOARD_H_ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
29 |
#define _INCLUDED_CYASHALBEAGLEBOARD_H_ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
30 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
31 |
typedef struct CyAsHalSleepChannel_t { |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
32 |
/* TODO: |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
33 |
wait_queue_head_t wq ;*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
34 |
int wq ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
35 |
} CyAsHalSleepChannel ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
36 |
typedef CyAsHalSleepChannel CyAnHalSleepChannel; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
37 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
38 |
#include "cyastypes.h" |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
39 |
#include "cyas_cplus_start.h" |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
40 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
41 |
typedef enum CyAsHalInterfaceMode |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
42 |
{ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
43 |
CyAsHalCRAMMode = 0, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
44 |
CyAsHalSRAMMode = 1, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
45 |
CyAsHalADMMode = 2, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
46 |
CyAsHalPNANDLBD8Mode = 3, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
47 |
CyAsHalPNANDLBD16Mode = 4, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
48 |
CyAsHalPNANDSBD8Mode = 5, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
49 |
CyAsHalPNANDSBD16Mode = 6, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
50 |
CyAsHalSPIMode = 7, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
51 |
CyAsHalLNAMode = 8, |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
52 |
CyAsHalUnknownMode = 9 |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
53 |
} CyAsHalInterfaceMode; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
54 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
55 |
/************************************************************************************************* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
56 |
* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
57 |
* Below are the data structures that must be defined by the HAL layer |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
58 |
* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
59 |
*************************************************************************************************/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
60 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
61 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
62 |
* The HAL layer must define a TAG for identifying a specific West Bridge device in the system. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
63 |
* In this case the tag is a void * which is really an OMAP device pointer |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
64 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
65 |
typedef void * CyAsHalDeviceTag ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
66 |
typedef CyAsHalDeviceTag CyAnHalDeviceTag; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
67 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
68 |
/* This must be included after the CyAsHalDeviceTag type is defined */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
69 |
#include "cyashalcb.h" |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
70 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
71 |
/************************************************************************************************* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
72 |
* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
73 |
* Below are the functions that communicate with the West Bridge device. These are system dependent |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
74 |
* and must be defined by the HAL layer for a given system. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
75 |
* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
76 |
*************************************************************************************************/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
77 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
78 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
79 |
* This function must be defined to write a register within the West Bridge |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
80 |
* device. The addr value is the address of the register to write with |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
81 |
* respect to the base address of the West Bridge device. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
82 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
83 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
84 |
CyAsHalWriteRegister(CyAsHalDeviceTag tag, uint16_t addr, uint16_t data) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
85 |
#define CyAnHalWriteRegister(tag, addr, data) CyAsHalWriteRegister((CyAsHalDeviceTag)(tag), (addr), (data)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
86 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
87 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
88 |
* This function must be defined to read a register from the West Bridge |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
89 |
* device. The addr value is the address of the register to read with |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
90 |
* respect to the base address of the West Bridge device. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
91 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
92 |
uint16_t |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
93 |
CyAsHalReadRegister(CyAsHalDeviceTag tag, uint16_t addr) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
94 |
#define CyAnHalReadRegister(tag, addr) CyAsHalReadRegister((CyAsHalDeviceTag)(tag), (addr)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
95 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
96 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
97 |
* This function must be defined to transfer a block of data to the West Bridge device. This |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
98 |
* function can use the burst write (DMA) capabilities of West Bridge to do this, or it can |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
99 |
* just copy the data using writes. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
100 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
101 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
102 |
CyAsHalDmaSetupWrite(CyAsHalDeviceTag tag, uint8_t ep, void *buf, uint32_t size, uint16_t maxsize) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
103 |
#define CyAnHalDmaSetupWrite(tag, ep, buf, sz, max) \ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
104 |
CyAsHalDmaSetupWrite((CyAsHalDeviceTag)(tag), (ep), (buf), (sz), (max)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
105 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
106 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
107 |
* This function must be defined to transfer a block of data from the West Bridge device. This |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
108 |
* function can use the burst read (DMA) capabilities of West Bridge to do this, or it can just |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
109 |
* copy the data using reads. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
110 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
111 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
112 |
CyAsHalDmaSetupRead(CyAsHalDeviceTag tag, uint8_t ep, void *buf, uint32_t size, uint16_t maxsize) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
113 |
#define CyAnHalDmaSetupRead(tag, ep, buf, sz, max) \ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
114 |
CyAsHalDmaSetupRead((CyAsHalDeviceTag)(tag), (ep), (buf), (sz), (max)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
115 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
116 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
117 |
* This function must be defined to cancel any pending DMA request. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
118 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
119 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
120 |
CyAsHalDmaCancelRequest(CyAsHalDeviceTag tag, uint8_t ep) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
121 |
#define CyAnHalDmaCancelRequest(tag, ep) CyAsHalDmaCancelRequest((CyAsHalDeviceTag)(tag), (ep)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
122 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
123 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
124 |
* This function must be defined to allow the West Bridge API to register a callback function that is |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
125 |
* called when a DMA transfer is complete. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
126 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
127 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
128 |
CyAsHalDmaRegisterCallback(CyAsHalDeviceTag tag, CyAsHalDmaCompleteCallback cb) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
129 |
#define CyAnHalDmaRegisterCallback(tag, cb) \ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
130 |
CyAsHalDmaRegisterCallback((CyAsHalDeviceTag)(tag), (CyAsHalDmaRegisterCallback)(cb)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
131 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
132 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
133 |
* This function must be defined to return the maximum size of DMA request that can be handled |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
134 |
* on the given endpoint. The return value should be the maximum size in bytes that the DMA |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
135 |
* module can handle. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
136 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
137 |
extern uint32_t |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
138 |
CyAsHalDmaMaxRequestSize(CyAsHalDeviceTag tag, CyAsEndPointNumber_t ep) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
139 |
#define CyAnHalDmaMaxRequestSize(tag, ep) \ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
140 |
CyAsHalDmaMaxRequestSize((CyAsHalDeviceTag)(tag), (CyAsEndPointNumber_t)(ep)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
141 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
142 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
143 |
* This function must be defined to set the state of the WAKEUP pin on the West Bridge device. Generally |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
144 |
* this is done via a GPIO of some type. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
145 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
146 |
extern CyBool |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
147 |
CyAsHalSetWakeupPin(CyAsHalDeviceTag tag, CyBool state) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
148 |
#define CyAnHalSetWakeupPin(tag, state) CyAsHalSetWakeupPin((CyAsHalDeviceTag)(tag), (state)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
149 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
150 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
151 |
* This function is called when the West Bridge PLL loses lock, because |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
152 |
* of a problem in the supply voltage or the input clock. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
153 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
154 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
155 |
CyAsHalPllLockLossHandler(CyAsHalDeviceTag tag) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
156 |
#define CyAnHalPllLockLossHandler(tag) CyAsHalPllLockLossHandler((CyAsHalDeviceTag)(tag)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
157 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
158 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
159 |
* Function to re-synchronise connection between Processor and West Bridge. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
160 |
* This is a no-operation for this HAL. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
161 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
162 |
extern CyBool |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
163 |
CyAsHalSyncDeviceClocks(CyAsHalDeviceTag tag) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
164 |
#define CyAsHalSyncDeviceClocks(tag) (CyTrue) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
165 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
166 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
167 |
* Function to re-initialize West Bridge register when waking up from standby. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
168 |
* This is a no-operation for this HAL. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
169 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
170 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
171 |
CyAsHalInitDevRegisters(CyAsHalDeviceTag tag, CyBool is_standby_wakeup ) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
172 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
173 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
174 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
175 |
* Function to read and save register values before Astoria is put into standby mode. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
176 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
177 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
178 |
CyAsHalReadRegsBeforeStandby ( |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
179 |
CyAsHalDeviceTag tag) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
180 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
181 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
182 |
* Function to restore original values to registers after Astoria wakes up from standby mode. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
183 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
184 |
extern void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
185 |
CyAsHalRestoreRegsAfterStandby ( |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
186 |
CyAsHalDeviceTag tag) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
187 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
188 |
/************************************************************************************************* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
189 |
* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
190 |
* Below are the functions that must be defined to provide the basic operating system services |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
191 |
* required by the API. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
192 |
* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
193 |
*************************************************************************************************/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
194 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
195 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
196 |
* This function is required by the API to allocate memory. This function is expected to work |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
197 |
* exactly like malloc(). |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
198 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
199 |
void * |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
200 |
CyAsHalAlloc(uint32_t cnt) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
201 |
#define CyAnHalAlloc(cnt) CyAsHalAlloc(cnt) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
202 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
203 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
204 |
* This function is required by the API to free memory allocated with CyAsHalAlloc(). This function is |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
205 |
* expected to work exacly like free(). |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
206 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
207 |
void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
208 |
CyAsHalFree(void *mem_p) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
209 |
#define CyAnHalFree(ptr) CyAsHalFree(ptr) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
210 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
211 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
212 |
* This function is required by the API to allocate memory during a callback. This function must be able to |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
213 |
* provide storage at inturupt time. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
214 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
215 |
void * |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
216 |
CyAsHalCBAlloc(uint32_t cnt) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
217 |
#define CyAnHalCBAlloc(cnt) CyAsHalCBAlloc(cnt) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
218 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
219 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
220 |
* This function is required by the API to free memory allocated with CyAsHalCBAlloc. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
221 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
222 |
void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
223 |
CyAsHalCBFree(void *mem_p) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
224 |
#define CyAsHalCBFree(ptr) CyAsHalFree(ptr) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
225 |
#define CyAnHalCBFree(ptr) CyAsHalFree(ptr) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
226 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
227 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
228 |
* This function is required to set a block of memory to a specific value. This function is |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
229 |
* expected to work exactly like memset() |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
230 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
231 |
void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
232 |
CyAsHalMemSet(void *ptr, uint8_t value, uint32_t cnt) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
233 |
#define CyAnHalMemSet(ptr, value, cnt) CyAsHalMemSet((ptr), (value), (cnt)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
234 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
235 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
236 |
* This function is expected to create a sleep channel. The data structure that represents the |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
237 |
* sleep channel is given by the pointer in the argument. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
238 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
239 |
CyBool |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
240 |
CyAsHalCreateSleepChannel(CyAsHalSleepChannel *channel) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
241 |
#define CyAnHalCreateSleepChannel(ch) CyAsHalCreateSleepChannel((CyAsHalSleepChannel *)(ch)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
242 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
243 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
244 |
* This function is expected to destroy a sleep channel. The data structure that represents the |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
245 |
* sleep channel is given by the pointer in the argument. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
246 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
247 |
CyBool |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
248 |
CyAsHalDestroySleepChannel(CyAsHalSleepChannel *channel) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
249 |
#define CyAnHalDestroySleepChannel(ch) CyAsHalDestroySleepChannel((CyAsHalSleepChannel *)(ch)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
250 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
251 |
CyBool |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
252 |
CyAsHalSleepOn(CyAsHalSleepChannel *channel, uint32_t ms) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
253 |
#define CyAnHalSleepOn(ch, ms) CyAsHalSleepOn((CyAsHalSleepChannel *)(ch), (ms)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
254 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
255 |
CyBool |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
256 |
CyAsHalWake(CyAsHalSleepChannel *channel) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
257 |
#define CyAnHalWake(ch) CyAsHalWake((CyAsHalSleepChannel *)(ch)) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
258 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
259 |
uint32_t |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
260 |
CyAsHalDisableInterrupts(void) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
261 |
#define CyAnHalDisableInterrupts() CyAsHalDisableInterrupts() |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
262 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
263 |
void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
264 |
CyAsHalEnableInterrupts(uint32_t); |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
265 |
#define CyAnHalEnableInterrupts(msk) CyAsHalEnableInterrupts(msk) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
266 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
267 |
void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
268 |
CyAsHalSleep150(void) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
269 |
#define CyAnHalSleep150() CyAsHalSleep150() |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
270 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
271 |
void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
272 |
CyAsHalSleep(uint32_t ms) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
273 |
#define CyAnHalSleep(ms) CyAsHalSleep(ms) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
274 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
275 |
#define CyAsHalIsPolling() (CyFalse) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
276 |
#define CyAsHalDisablePolling() |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
277 |
#define CyAsHalEnablePolling() |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
278 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
279 |
#define CyAnHalIsPolling() (CyFalse) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
280 |
#define CyAnHalDisablePolling() |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
281 |
#define CyAnHalEnablePolling() |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
282 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
283 |
#define CyAsHalPrintMessage |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
284 |
//#define CyAsHalPrintMessage Kern::Printf |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
285 |
#define CyAnHalPrintMessage CyAsHalPrintMessage |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
286 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
287 |
void |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
288 |
CyAsHalPrintMessage2(const char* msg); |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
289 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
290 |
/*#define CyAsHalAssert(cond) if (!(cond)) { CyAsHalPrintMessage ("Assertion failed at %s:%d\n", __FILE__, __LINE__); }*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
291 |
#define CyAsHalAssert(cond) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
292 |
#define CyAnHalAssert(cond) CyAsHalAssert(cond) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
293 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
294 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
295 |
As this is a completely interrupt driven HAL, there is no |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
296 |
need to implement the following functions. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
297 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
298 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
299 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
300 |
* These are the functions that are not part of the HAL layer, but are required to be called |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
301 |
* for this HAL. |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
302 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
303 |
int StartBeagleboardHal(const char *pgm, CyAsHalDeviceTag *tag, CyBool debug) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
304 |
int StopBeagleboardHal(const char *pgm, CyAsHalDeviceTag tag) ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
305 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
306 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
307 |
* Constants |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
308 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
309 |
#define CY_AS_OMAP_KERNEL_HAL_SIG (0x1441) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
310 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
311 |
#define CYAS_DEV_MAX_ADDR (0xFF) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
312 |
#define CYAS_DEV_ADDR_RANGE (CYAS_DEV_MAX_ADDR << 16) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
313 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
314 |
/* The base address is added in the kernel module code. */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
315 |
#define CYAS_DEV_CALC_ADDR(addr) (addr << 16) |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
316 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
317 |
/* |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
318 |
* Data structures |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
319 |
*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
320 |
typedef struct CyAsOmapDevKernel |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
321 |
{ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
322 |
/* This is the signature for this data structure */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
323 |
unsigned int m_sig ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
324 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
325 |
/* Address base of West Bridge Device */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
326 |
void *m_addr_base ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
327 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
328 |
/* This is a pointer to the next West Bridge device in the system */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
329 |
struct CyAsOmapDevKernel *m_next_p ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
330 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
331 |
/* This is for thread sync */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
332 |
/* TODO: struct completion thread_complete ;*/ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
333 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
334 |
/* This is for thread to wait for interrupts */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
335 |
CyAsHalSleepChannel thread_sc ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
336 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
337 |
/* This is for thread to exit upon StopOmapKernel */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
338 |
int thread_flag ; /* set 1 to exit */ |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
339 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
340 |
} CyAsOmapDevKernel ; |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
341 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
342 |
extern int |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
343 |
CyAsHalAstoriaInit(void); |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
344 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
345 |
#include "cyas_cplus_end.h" |
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
346 |
|
117faf51deac
Bug 1996 - Contribution for West Bridge Astoria Symbian Storage Driver
arunabha
parents:
diff
changeset
|
347 |
#endif |