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); }
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(); }
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 */ }