#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/vmalloc.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/fb.h>
#include <linux/init.h>
#include <linux/arcfb.h>
#include <linux/platform_device.h>
#include <linux/uaccess.h>
#define floor8(a) …
#define floorXres(a,xres) …
#define iceil8(a) …
#define ceil64(a) …
#define ceilXres(a,xres) …
#define KS_SET_DPY_START_LINE …
#define KS_SET_PAGE_NUM …
#define KS_SET_X …
#define KS_CEHI …
#define KS_CELO …
#define KS_SEL_CMD …
#define KS_SEL_DATA …
#define KS_DPY_ON …
#define KS_DPY_OFF …
#define KS_INTACK …
#define KS_CLRINT …
struct arcfb_par { … };
static const struct fb_fix_screeninfo arcfb_fix = …;
static const struct fb_var_screeninfo arcfb_var = …;
static unsigned long num_cols;
static unsigned long num_rows;
static unsigned long dio_addr;
static unsigned long cio_addr;
static unsigned long c2io_addr;
static unsigned long splashval;
static unsigned long tuhold;
static unsigned int nosplash;
static unsigned int arcfb_enable;
static unsigned int irq;
static DECLARE_WAIT_QUEUE_HEAD(arcfb_waitq);
static void ks108_writeb_ctl(struct arcfb_par *par,
unsigned int chipindex, unsigned char value)
{ … }
static void ks108_writeb_mainctl(struct arcfb_par *par, unsigned char value)
{ … }
static unsigned char ks108_readb_ctl2(struct arcfb_par *par)
{ … }
static void ks108_writeb_data(struct arcfb_par *par,
unsigned int chipindex, unsigned char value)
{ … }
static void ks108_set_start_line(struct arcfb_par *par,
unsigned int chipindex, unsigned char y)
{ … }
static void ks108_set_yaddr(struct arcfb_par *par,
unsigned int chipindex, unsigned char y)
{ … }
static void ks108_set_xaddr(struct arcfb_par *par,
unsigned int chipindex, unsigned char x)
{ … }
static void ks108_clear_lcd(struct arcfb_par *par, unsigned int chipindex)
{ … }
static int arcfb_open(struct fb_info *info, int user)
{ … }
static int arcfb_release(struct fb_info *info, int user)
{ … }
static int arcfb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
{ … }
static irqreturn_t arcfb_interrupt(int vec, void *dev_instance)
{ … }
static void arcfb_lcd_update_page(struct arcfb_par *par, unsigned int upper,
unsigned int left, unsigned int right, unsigned int distance)
{ … }
static void arcfb_lcd_update_vert(struct arcfb_par *par, unsigned int top,
unsigned int bottom, unsigned int left, unsigned int right)
{ … }
static void arcfb_lcd_update_horiz(struct arcfb_par *par, unsigned int left,
unsigned int right, unsigned int top, unsigned int h)
{ … }
static void arcfb_lcd_update(struct arcfb_par *par, unsigned int dx,
unsigned int dy, unsigned int w, unsigned int h)
{ … }
static int arcfb_ioctl(struct fb_info *info,
unsigned int cmd, unsigned long arg)
{ … }
static void arcfb_damage_range(struct fb_info *info, off_t off, size_t len)
{ … }
static void arcfb_damage_area(struct fb_info *info, u32 x, u32 y,
u32 width, u32 height)
{ … }
FB_GEN_DEFAULT_DEFERRED_SYSMEM_OPS(arcfb,
arcfb_damage_range,
arcfb_damage_area)
static const struct fb_ops arcfb_ops = …;
static int arcfb_probe(struct platform_device *dev)
{ … }
static void arcfb_remove(struct platform_device *dev)
{ … }
static struct platform_driver arcfb_driver = …;
static struct platform_device *arcfb_device;
static int __init arcfb_init(void)
{ … }
static void __exit arcfb_exit(void)
{ … }
module_param(num_cols, ulong, 0);
MODULE_PARM_DESC(…) …;
module_param(num_rows, ulong, 0);
MODULE_PARM_DESC(…) …;
module_param(nosplash, uint, 0);
MODULE_PARM_DESC(…) …;
module_param(arcfb_enable, uint, 0);
MODULE_PARM_DESC(…) …;
module_param_hw(dio_addr, ulong, ioport, 0);
MODULE_PARM_DESC(…) …;
module_param_hw(cio_addr, ulong, ioport, 0);
MODULE_PARM_DESC(…) …;
module_param_hw(c2io_addr, ulong, ioport, 0);
MODULE_PARM_DESC(…) …;
module_param(splashval, ulong, 0);
MODULE_PARM_DESC(…) …;
module_param(tuhold, ulong, 0);
MODULE_PARM_DESC(…) …;
module_param_hw(irq, uint, irq, 0);
MODULE_PARM_DESC(…) …;
module_init(…) …;
module_exit(arcfb_exit);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;