#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/fb.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/nvram.h>
#include <linux/adb.h>
#include <linux/cuda.h>
#ifdef CONFIG_BOOTX_TEXT
#include <asm/btext.h>
#endif
#include "macmodes.h"
#include "controlfb.h"
#if !defined(CONFIG_PPC_PMAC) || !defined(CONFIG_PPC32)
#define invalid_vram_cache(addr) …
#undef in_8
#undef out_8
#undef in_le32
#undef out_le32
#define in_8(addr) …
#define out_8(addr, val) …
#define in_le32(addr) …
#define out_le32(addr, val) …
#ifndef pgprot_cached_wthru
#define pgprot_cached_wthru(prot) …
#endif
#else
static void invalid_vram_cache(void __force *addr)
{
eieio();
dcbf(addr);
mb();
eieio();
dcbf(addr);
mb();
}
#endif
struct fb_par_control { … };
#define DIRTY(z) …
#define DIRTY_CMAP(z) …
static inline int PAR_EQUAL(struct fb_par_control *x, struct fb_par_control *y)
{ … }
struct fb_info_control { … };
#define CNTRL_REG(INFO,REG) …
static struct fb_info_control *control_fb;
static int default_vmode __initdata = …;
static int default_cmode __initdata = …;
static int controlfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
u_int transp, struct fb_info *info)
{ … }
static void set_control_clock(unsigned char *params)
{ … }
static inline void set_screen_start(int xoffset, int yoffset,
struct fb_info_control *p)
{ … }
#define RADACAL_WRITE(a,d) …
static void control_set_hardware(struct fb_info_control *p, struct fb_par_control *par)
{ … }
static void __init find_vram_size(struct fb_info_control *p)
{ … }
static int read_control_sense(struct fb_info_control *p)
{ … }
#define CONTROL_PIXCLOCK_BASE …
#define CONTROL_PIXCLOCK_MIN …
static int calc_clock_params(unsigned long clk, unsigned char *param)
{ … }
static int control_var_to_par(struct fb_var_screeninfo *var,
struct fb_par_control *par, const struct fb_info *fb_info)
{ … }
static void control_par_to_var(struct fb_par_control *par, struct fb_var_screeninfo *var)
{ … }
static int controlfb_check_var (struct fb_var_screeninfo *var, struct fb_info *info)
{ … }
static int controlfb_set_par (struct fb_info *info)
{ … }
static int controlfb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
{ … }
static int controlfb_blank(int blank_mode, struct fb_info *info)
{ … }
static int controlfb_mmap(struct fb_info *info,
struct vm_area_struct *vma)
{ … }
static const struct fb_ops controlfb_ops = …;
static void __init control_init_info(struct fb_info *info, struct fb_info_control *p)
{ … }
static void __init control_setup(char *options)
{ … }
static int __init init_control(struct fb_info_control *p)
{ … }
static void control_cleanup(void)
{ … }
static int __init control_of_init(struct device_node *dp)
{ … }
static int __init control_init(void)
{ … }
device_initcall(control_init);