Exemplo n.º 1
0
static int proc_cs3_write(struct file * file, const char * buffer,
			  size_t count, loff_t *ppos)
{
        unsigned long newRegValue;
	char *endp;

        newRegValue = simple_strtoul(buffer,&endp,0);
	set_cs3( newRegValue );
        return (count+endp-buffer);
}
Exemplo n.º 2
0
static void simpad_power_off(void)
{
	local_irq_disable(); 
	set_cs3(0x800);        

	
	PCFR = (PCFR_OPDE | PCFR_FP | PCFR_FS);
	
	PWER = GFER = GRER = 1;
	
	PSPR = 0;
	PGSR = 0;
	
	PMCR = PMCR_SF;
	while(1);

	local_irq_enable(); 


}
Exemplo n.º 3
0
static void simpad_power_off(void)
{
	local_irq_disable(); // was cli
	set_cs3(0x800);        /* only SD_MEDIAQ */

	/* disable internal oscillator, float CS lines */
	PCFR = (PCFR_OPDE | PCFR_FP | PCFR_FS);
	/* enable wake-up on GPIO0 (Assabet...) */
	PWER = GFER = GRER = 1;
	/*
	 * set scratchpad to zero, just in case it is used as a
	 * restart address by the bootloader.
	 */
	PSPR = 0;
	PGSR = 0;
	/* enter sleep mode */
	PMCR = PMCR_SF;
	while(1);

	local_irq_enable(); /* we won't ever call it */


}