static void __init lasi_ps2_reset(unsigned long hpa)
{
	u8 control;

	/* reset the interface */
	gsc_writeb(0xff, hpa+LASI_RESET);
	gsc_writeb(0x0 , hpa+LASI_RESET);		

	/* enable it */
	control = read_control(hpa);
	write_control(control | LASI_CTRL_ENBL, hpa);
}
Example #2
0
void __init lasi_led_init(unsigned long lasi_hpa)
{
	unsigned long datareg;

	switch (CPU_HVERSION) {
	/* Gecko machines have only one single LED, which can be permanently 
	   turned on by writing a zero into the power control register. */ 
	case 0x600:		/* Gecko (712/60) */
	case 0x601:		/* Gecko (712/80) */
	case 0x602:		/* Gecko (712/100) */
	case 0x603:		/* Anole 64 (743/64) */
	case 0x604:		/* Anole 100 (743/100) */
	case 0x605:		/* Gecko (712/120) */
		datareg = lasi_hpa + 0x0000C000;
		gsc_writeb(0, datareg);
		return; /* no need to register the LED interrupt-function */  

	/* Mirage and Electra machines need special offsets */
	case 0x60A:		/* Mirage Jr (715/64) */
	case 0x60B:		/* Mirage 100 */
	case 0x60C:		/* Mirage 100+ */
	case 0x60D:		/* Electra 100 */
	case 0x60E:		/* Electra 120 */
		datareg = lasi_hpa - 0x00020000;
		break;

	default:
		datareg = lasi_hpa + 0x0000C000;
		break;
	}

	register_led_driver(DISPLAY_MODEL_LASI, LED_CMD_REG_NONE, datareg);
}
static void __init lasi_led_init(unsigned long lasi_hpa)
{
	unsigned long datareg;

	switch (CPU_HVERSION) {
 
	case 0x600:		
	case 0x601:		
	case 0x602:		
	case 0x603:		
	case 0x604:		
	case 0x605:		
		datareg = lasi_hpa + 0x0000C000;
		gsc_writeb(0, datareg);
		return;   

	
	case 0x60A:		
	case 0x60B:		
	case 0x60C:		
	case 0x60D:		
	case 0x60E:		
		datareg = lasi_hpa - 0x00020000;
		break;

	default:
		datareg = lasi_hpa + 0x0000C000;
		break;
	}

	register_led_driver(DISPLAY_MODEL_LASI, LED_CMD_REG_NONE, datareg);
}
Example #4
0
static inline void hp_sdc_data_out8 (uint8_t val) {
	unsigned long flags;

	write_lock_irqsave(&hp_sdc.ibf_lock, flags);
	hp_sdc.ibf = 1;
	gsc_writeb(val, hp_sdc.data_io);
	write_unlock_irqrestore(&hp_sdc.ibf_lock, flags);
}
Example #5
0
static inline void hp_sdc_status_out8 (uint8_t val) {
	unsigned long flags;

	write_lock_irqsave(&hp_sdc.ibf_lock, flags);
	hp_sdc.ibf = 1;
	if ((val & 0xf0) == 0xe0) hp_sdc.wi = 0xff;
	gsc_writeb(val, hp_sdc.status_io);
	write_unlock_irqrestore(&hp_sdc.ibf_lock, flags);
}
Example #6
0
static void
writeb_hp(u8 b, void *dst)
{
	unsigned long d = ram2log(dst);

	if((d&0xf0000000) != 0xf0000000) {
		printk("writeb_hp %02x %p (%08lx) (%p)\n",
			b, dst, d, __builtin_return_address(0));
		return;
	}

	gsc_writeb(b, d);
}
static int write_output(u8 val, unsigned long hpa)
{
	int wait = 250;

	while (read_status(hpa) & LASI_STAT_TBNE) {
		if (!--wait) {
			return 0;
		}
		mdelay(1);
	}
	gsc_writeb(val, hpa+LASI_XMTDATA);

	return 1;
}
static inline void write_control(u8 val, unsigned long hpa)
{
	gsc_writeb(val, hpa+LASI_CONTROL);
}