/* @regno: boolean, 0 copy local, 1 get_user() function @red: frame buffer colormap structure @green: The green value which can be up to 16 bits wide @blue: The blue value which can be up to 16 bits wide. @transp: If supported the alpha value which can be up to 16 bits wide. @info: frame buffer info structure  */
static int cg6_setcolreg(unsigned, unsigned, unsigned, unsigned, unsigned, struct fb_info *)
/* @regno: boolean, 0 copy local, 1 get_user() function @red: frame buffer colormap structure @green: The green value which can be up to 16 bits wide @blue: The blue value which can be up to 16 bits wide. @transp: If supported the alpha value which can be up to 16 bits wide. @info: frame buffer info structure  */
static int cg6_setcolreg(unsigned, unsigned, unsigned, unsigned, unsigned, struct fb_info *)
{
	struct cg6_par *par = (struct cg6_par *)info->par;
	struct bt_regs __iomem *bt = par->bt;
	unsigned long flags;
	if (regno >= 256)
		return 1;
	red >>= 8;
	green >>= 8;
	blue >>= 8;
	spin_lock_irqsave(&par->lock, flags);
	sbus_writel((u32)regno << 24, &bt->addr);
	sbus_writel((u32)red << 24, &bt->color_map);
	sbus_writel((u32)green << 24, &bt->color_map);
	sbus_writel((u32)blue << 24, &bt->color_map);
	spin_unlock_irqrestore(&par->lock, flags);
	return 0;
}