linux/drivers/video/fbdev/controlfb.c

/*
 *  controlfb.c -- frame buffer device for the PowerMac 'control' display
 *
 *  Created 12 July 1998 by Dan Jacobowitz <[email protected]>
 *  Copyright (C) 1998 Dan Jacobowitz
 *  Copyright (C) 2001 Takashi Oe
 *
 *  Mmap code by Michel Lanners <[email protected]>
 *
 *  Frame buffer structure from:
 *    drivers/video/chipsfb.c -- frame buffer device for
 *    Chips & Technologies 65550 chip.
 *
 *    Copyright (C) 1998 Paul Mackerras
 *
 *    This file is derived from the Powermac "chips" driver:
 *    Copyright (C) 1997 Fabio Riccardi.
 *    And from the frame buffer device for Open Firmware-initialized devices:
 *    Copyright (C) 1997 Geert Uytterhoeven.
 *
 *  Hardware information from:
 *    control.c: Console support for PowerMac "control" display adaptor.
 *    Copyright (C) 1996 Paul Mackerras
 *
 *  Updated to 2.5 framebuffer API by Ben Herrenschmidt
 *  <[email protected]>, Paul Mackerras <[email protected]>,
 *  and James Simmons <[email protected]>.
 *
 *  This file is subject to the terms and conditions of the GNU General Public
 *  License. See the file COPYING in the main directory of this archive for
 *  more details.
 */

#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 {};

/* control register access macro */
#define CNTRL_REG(INFO,REG)


/************************** Internal variables *******************************/

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)
{}


/********************  End of controlfb_ops implementation  ******************/



static void set_control_clock(unsigned char *params)
{}

/*
 * Set screen start address according to var offset values
 */
static inline void set_screen_start(int xoffset, int yoffset,
	struct fb_info_control *p)
{}

#define RADACAL_WRITE(a,d)

/* Now how about actually saying, Make it so! */
/* Some things in here probably don't need to be done each time. */
static void control_set_hardware(struct fb_info_control *p, struct fb_par_control *par)
{}

/* Work out which banks of VRAM we have installed. */
/* danj: I guess the card just ignores writes to nonexistant VRAM... */

static void __init find_vram_size(struct fb_info_control *p)
{}

/*
 * Get the monitor sense value.
 * Note that this can be called before calibrate_delay,
 * so we can't use udelay.
 */
static int read_control_sense(struct fb_info_control *p)
{}

/**********************  Various translation functions  **********************/

#define CONTROL_PIXCLOCK_BASE
#define CONTROL_PIXCLOCK_MIN

/*
 * calculate the clock parameters to be sent to CUDA according to given
 * pixclock in pico second.
 */
static int calc_clock_params(unsigned long clk, unsigned char *param)
{}


/*
 * This routine takes a user-supplied var, and picks the best vmode/cmode
 * from it.
 */

static int control_var_to_par(struct fb_var_screeninfo *var,
	struct fb_par_control *par, const struct fb_info *fb_info)
{}


/*
 * Convert hardware data in par to an fb_var_screeninfo
 */

static void control_par_to_var(struct fb_par_control *par, struct fb_var_screeninfo *var)
{}

/********************  The functions for controlfb_ops ********************/

/*
 * Checks a var structure
 */
static int controlfb_check_var (struct fb_var_screeninfo *var, struct fb_info *info)
{}

/*
 * Applies current var to display
 */
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)
{}

/*
 * Private mmap since we want to have a different caching on the framebuffer
 * for controlfb.
 * Note there's no locking in here; it's done in fb_mmap() in fbmem.c.
 */
static int controlfb_mmap(struct fb_info *info,
                       struct vm_area_struct *vma)
{}

static const struct fb_ops controlfb_ops =;

/*
 * Set misc info vars for this driver
 */
static void __init control_init_info(struct fb_info *info, struct fb_info_control *p)
{}

/*
 * Parse user specified options (`video=controlfb:')
 */
static void __init control_setup(char *options)
{}

/*
 * finish off the driver initialization and register
 */
static int __init init_control(struct fb_info_control *p)
{}

static void control_cleanup(void)
{}

/*
 * find "control" and initialize
 */
static int __init control_of_init(struct device_node *dp)
{}

static int __init control_init(void)
{}

device_initcall(control_init);