2#include "irx_imports.h"
8IRX_ID(
"ssbus_service", 1, 1);
11int _start(
int argc,
char *argv[])
19 if (RegisterLibraryEntries(&_exp_ssbusc)) {
21 return MODULE_NO_RESIDENT_END;
25 return MODULE_RESIDENT_END;
29static vu32 *delay_table[13] =
46int SetDelay(
int device,
unsigned int value)
50 if (device >= (
sizeof(delay_table) /
sizeof(delay_table[0]))) {
53 v1 = delay_table[device];
61int GetDelay(
int device)
65 if (device >= (
sizeof(delay_table) /
sizeof(delay_table[0]))) {
68 v1 = delay_table[device];
75static vu32 *base_address_table[13] =
92int SetBaseAddress(
int device,
unsigned int value)
96 if (device >= (
sizeof(base_address_table) /
sizeof(base_address_table[0]))) {
99 v1 = base_address_table[device];
107int GetBaseAddress(
int device)
111 if (device >= (
sizeof(base_address_table) /
sizeof(base_address_table[0]))) {
114 v1 = base_address_table[device];
121int SetRecoveryTime(
unsigned int value)
125 result = (*((vu32 *)0xBF801020) & (~0xF)) | (value & 0xF);
126 *((vu32 *)0xBF801020) = result;
130int GetRecoveryTime(
void)
132 return *((vu32 *)0xBF801020) & 0xF;
135int SetHoldTime(
unsigned int value)
139 result = (*((vu32 *)0xBF801020) & (~0xF0)) | ((value << 4) & 0xF0);
140 *((vu32 *)0xBF801020) = result;
146 return (*((vu32 *)0xBF801020) >> 4) & 0xF;
149int SetFloatTime(
unsigned int value)
153 result = (*((vu32 *)0xBF801020) & (~0xF00)) | ((value << 8) & 0xF00);
154 *((vu32 *)0xBF801020) = result;
158int GetFloatTime(
void)
160 return (*((vu32 *)0xBF801020) >> 8) & 0xF;
163int SetStrobeTime(
unsigned int value)
167 result = (*((vu32 *)0xBF801020) & (~0xF000)) | ((value << 12) & 0xF000);
168 *((vu32 *)0xBF801020) = result;
172int GetStrobeTime(
void)
174 return (*((vu32 *)0xBF801020) >> 12) & 0xF;
177int SetCommonDelay(
unsigned int value)
182 *((vu32 *)0xBF801020) = value;
186int GetCommonDelay(
void)
188 return *((vu32 *)0xBF801020);
int CpuResumeIntr(int state)
int CpuSuspendIntr(int *state)