Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1179 → Rev 1221

/drivers/video/drm/include/drm.h
File deleted
/drivers/video/drm/include/drm_edid.h
File deleted
/drivers/video/drm/include/drm_mm.h
File deleted
/drivers/video/drm/include/linux/firmware.h
0,0 → 1,65
#ifndef _LINUX_FIRMWARE_H
#define _LINUX_FIRMWARE_H
 
#include <linux/module.h>
#include <linux/types.h>
//#include <linux/compiler.h>
 
#define FW_ACTION_NOHOTPLUG 0
#define FW_ACTION_HOTPLUG 1
 
struct firmware {
size_t size;
const u8 *data;
};
 
struct device;
 
struct builtin_fw {
char *name;
void *data;
unsigned long size;
};
 
/* We have to play tricks here much like stringify() to get the
__COUNTER__ macro to be expanded as we want it */
#define __fw_concat1(x, y) x##y
#define __fw_concat(x, y) __fw_concat1(x, y)
 
#define DECLARE_BUILTIN_FIRMWARE(name, blob) \
DECLARE_BUILTIN_FIRMWARE_SIZE(name, &(blob), sizeof(blob))
 
#define DECLARE_BUILTIN_FIRMWARE_SIZE(name, blob, size) \
static const struct builtin_fw __fw_concat(__builtin_fw,__COUNTER__) \
__used __section(.builtin_fw) = { name, blob, size }
 
#if defined(CONFIG_FW_LOADER) || (defined(CONFIG_FW_LOADER_MODULE) && defined(MODULE))
int request_firmware(const struct firmware **fw, const char *name,
struct device *device);
int request_firmware_nowait(
struct module *module, int uevent,
const char *name, struct device *device, void *context,
void (*cont)(const struct firmware *fw, void *context));
 
void release_firmware(const struct firmware *fw);
#else
static inline int request_firmware(const struct firmware **fw,
const char *name,
struct device *device)
{
return -EINVAL;
}
static inline int request_firmware_nowait(
struct module *module, int uevent,
const char *name, struct device *device, void *context,
void (*cont)(const struct firmware *fw, void *context))
{
return -EINVAL;
}
 
static inline void release_firmware(const struct firmware *fw)
{
}
#endif
 
#endif
/drivers/video/drm/include/linux/kernel.h
0,0 → 1,3
 
#include <types.h>
#include <list.h>
/drivers/video/drm/include/linux/module.h
3,3 → 3,4
#include <list.h>
#include <syscall.h>
 
#define MODULE_FIRMWARE(x)
/drivers/video/drm/include/linux/types.h
35,6 → 35,7
typedef signed int __s32;
typedef signed long long __s64;
 
typedef __u32 __be32;
 
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
200,21 → 201,23
(void) (&_x == &_y); \
_x > _y ? _x : _y; })
 
#define do_div(n, base) \
({ \
unsigned long __upper, __low, __high, __mod, __base; \
__base = (base); \
asm("":"=a" (__low), "=d" (__high) : "A" (n)); \
__upper = __high; \
if (__high) { \
__upper = __high % (__base); \
__high = __high / (__base); \
} \
asm("divl %2":"=a" (__low), "=d" (__mod) \
: "rm" (__base), "0" (__low), "1" (__upper)); \
asm("":"=A" (n) : "a" (__low), "d" (__high)); \
__mod; \
})
 
extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
 
# define do_div(n,base) ({ \
uint32_t __base = (base); \
uint32_t __rem; \
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
if (likely(((n) >> 32) == 0)) { \
__rem = (uint32_t)(n) % __base; \
(n) = (uint32_t)(n) / __base; \
} else \
__rem = __div64_32(&(n), __base); \
__rem; \
})
 
#define lower_32_bits(n) ((u32)(n))
 
#define INT_MAX ((int)(~0U>>1))
/drivers/video/drm/include/syscall.h
42,6 → 42,8
#define PG_NOCACHE 0x018
 
void* STDCALL AllocKernelSpace(size_t size)__asm__("AllocKernelSpace");
void STDCALL FreeKernelSpace(void *mem)__asm__("FreeKernelSpace");
addr_t STDCALL MapIoMem(addr_t base, size_t size, u32_t flags)__asm__("MapIoMem");
void* STDCALL KernelAlloc(size_t size)__asm__("KernelAlloc");
void* STDCALL KernelFree(void *mem)__asm__("KernelFree");
void* STDCALL UserAlloc(size_t size)__asm__("UserAlloc");
56,11 → 58,6
int STDCALL AttachIntHandler(int irq, void *handler, u32_t access) __asm__("AttachIntHandler");
 
 
//void *CreateObject(u32 pid, size_t size);
//void *DestroyObject(void *obj);
 
addr_t STDCALL MapIoMem(addr_t base, size_t size, u32_t flags)__asm__("MapIoMem");
 
///////////////////////////////////////////////////////////////////////////////
 
void STDCALL SetMouseData(int btn, int x, int y,
167,26 → 164,30
{
if( !delay )
delay++;
delay*=1000;
delay*= 128;
 
while(delay--)
{
__asm__ __volatile__ (
"xorl %%eax, %%eax \n\t"
"cpuid \n\t"
:::"eax","ebx","ecx","edx");
"xorl %%eax, %%eax"
:::"ebx","ecx","edx");
};
};
 
static inline void udelay(u32_t delay)
{
if(!delay) delay++;
delay*=500;
delay*= 128;
 
while(delay--)
{
__asm__ __volatile__(
"xorl %%eax, %%eax \n\t"
"cpuid"
:::"eax","ebx","ecx","edx" );
"cpuid \n\t"
"xorl %%eax, %%eax"
:::"ebx","ecx","edx" );
}
}
 
204,7 → 205,7
};
 
 
extern inline u32_t __PciApi(int cmd)
static inline u32_t __PciApi(int cmd)
{
u32_t retval;
 
216,7 → 217,7
return retval;
};
 
extern inline void* __CreateObject(u32_t pid, size_t size)
static inline void* __CreateObject(u32_t pid, size_t size)
{
void *retval;
 
228,7 → 229,7
return retval;
}
 
extern inline void *__DestroyObject(void *obj)
static inline void *__DestroyObject(void *obj)
{
__asm__ __volatile__ (
"call *__imp__DestroyObject"
256,7 → 257,7
};
*/
 
extern inline u32_t safe_cli(void)
static inline u32_t safe_cli(void)
{
u32_t ifl;
__asm__ __volatile__ (
267,7 → 268,7
return ifl;
}
 
extern inline void safe_sti(u32_t ifl)
static inline void safe_sti(u32_t ifl)
{
__asm__ __volatile__ (
"pushl %0\n\t"
276,7 → 277,7
);
}
 
extern inline void __clear (void * dst, unsigned len)
static inline void __clear (void * dst, unsigned len)
{
u32_t tmp;
__asm__ __volatile__ (
288,25 → 289,25
__asm__ __volatile__ ("":::"ecx","edi");
};
 
extern inline void out8(const u16_t port, const u8_t val)
static inline void out8(const u16_t port, const u8_t val)
{
__asm__ __volatile__
("outb %1, %0\n" : : "dN"(port), "a"(val));
}
 
extern inline void out16(const u16_t port, const u16_t val)
static inline void out16(const u16_t port, const u16_t val)
{
__asm__ __volatile__
("outw %1, %0\n" : : "dN"(port), "a"(val));
}
 
extern inline void out32(const u16_t port, const u32_t val)
static inline void out32(const u16_t port, const u32_t val)
{
__asm__ __volatile__
("outl %1, %0\n" : : "dN"(port), "a"(val));
}
 
extern inline u8_t in8(const u16_t port)
static inline u8_t in8(const u16_t port)
{
u8_t tmp;
__asm__ __volatile__
314,7 → 315,7
return tmp;
};
 
extern inline u16_t in16(const u16_t port)
static inline u16_t in16(const u16_t port)
{
u16_t tmp;
__asm__ __volatile__
322,7 → 323,7
return tmp;
};
 
extern inline u32_t in32(const u16_t port)
static inline u32_t in32(const u16_t port)
{
u32_t tmp;
__asm__ __volatile__
330,7 → 331,7
return tmp;
};
 
extern inline void delay(int time)
static inline void delay(int time)
{
__asm__ __volatile__ (
"call *__imp__Delay"
340,7 → 341,7
 
}
 
extern inline void change_task()
static inline void change_task()
{
__asm__ __volatile__ (
"call *__imp__ChangeTask");