/*
|
/*
|
* FILE: mon960_calls.c
|
* FILE: mon960_calls.c
|
* AUTHOR: kma
|
* AUTHOR: kma
|
* DESCR: system calls to mon960
|
* DESCR: system calls to mon960
|
*/
|
*/
|
|
|
#ident "$Id: mon960_calls.c,v 1.1 2005-12-20 09:42:38 jcastillo Exp $"
|
#ident "$Id: mon960_calls.c,v 1.1 2005-12-20 09:42:38 jcastillo Exp $"
|
|
|
#include <linux/config.h>
|
#include <linux/config.h>
|
#include <asm/mon960.h>
|
#include <asm/mon960.h>
|
|
|
#define SYSCALL(number) \
|
#define SYSCALL(number) \
|
asm("calls %0; ret" \
|
asm("calls %0; ret" \
|
: : "lI"(number): "g0");
|
: : "lI"(number): "g0");
|
|
|
unsigned long mon_entry(void)
|
unsigned long mon_entry(void)
|
{
|
{
|
SYSCALL(254);
|
SYSCALL(254);
|
}
|
}
|
|
|
unsigned long get_prcbptr(void)
|
unsigned long get_prcbptr(void)
|
{
|
{
|
SYSCALL(245);
|
SYSCALL(245);
|
}
|
}
|
|
|
void mon960_exit(int val)
|
void mon960_exit(int val)
|
{
|
{
|
SYSCALL(257);
|
SYSCALL(257);
|
}
|
}
|
|
|
#ifdef CONFIG_PCI
|
#ifdef CONFIG_PCI
|
|
|
int mon960_pcibios_present(void* info)
|
int mon960_pcibios_present(void* info)
|
{ SYSCALL(100); }
|
{ SYSCALL(100); }
|
int mon960_pcibios_find_device(int vnd, int dev, int idx, void* loc)
|
int mon960_pcibios_find_device(int vnd, int dev, int idx, void* loc)
|
{ SYSCALL(101); }
|
{ SYSCALL(101); }
|
int mon960_pcibios_find_class(int class, int idx, void* dev)
|
int mon960_pcibios_find_class(int class, int idx, void* dev)
|
{ SYSCALL(102); }
|
{ SYSCALL(102); }
|
|
|
#define BIOS_OP(op,sz,type,nr) \
|
#define BIOS_OP(op,sz,type,nr) \
|
int \
|
int \
|
mon960_pcibios_ ## op ## _config_ ##sz(unsigned short vec, \
|
mon960_pcibios_ ## op ## _config_ ##sz(unsigned short vec, \
|
unsigned short dev, \
|
unsigned short dev, \
|
unsigned short func, \
|
unsigned short func, \
|
unsigned char off, \
|
unsigned char off, \
|
type val) \
|
type val) \
|
{ SYSCALL(nr); }
|
{ SYSCALL(nr); }
|
|
|
BIOS_OP(read,byte,unsigned char*,104)
|
BIOS_OP(read,byte,unsigned char*,104)
|
BIOS_OP(read,word,unsigned short*,105)
|
BIOS_OP(read,word,unsigned short*,105)
|
BIOS_OP(read,dword,unsigned int*,106)
|
BIOS_OP(read,dword,unsigned int*,106)
|
BIOS_OP(write,byte,unsigned char,107)
|
BIOS_OP(write,byte,unsigned char,107)
|
BIOS_OP(write,word,unsigned short,108)
|
BIOS_OP(write,word,unsigned short,108)
|
BIOS_OP(write,dword,unsigned int,109)
|
BIOS_OP(write,dword,unsigned int,109)
|
|
|
#endif
|
#endif
|
|
|