Commit 2c2a5687 authored by Holger Freyther's avatar Holger Freyther Committed by Russell King

[ARM PATCH] 2319/1: SIMpad cill exportation of ChipSelect via ProcFS

Patch from Holger Hans Peter Freyther

Remove the exportation of CS3 via procfs


Signed-off-by: Holger Hans Peter Freyther
Signed-off-by: Russell King
parent d8ed15fb
......@@ -116,82 +116,6 @@ static void __init simpad_map_io(void)
}
#ifdef CONFIG_PROC_FS
static char* name[]={
"VCC_5V_EN",
"VCC_3V_EN",
"EN1",
"EN0",
"DISPLAY_ON",
"PCMCIA_BUFF_DIS",
"MQ_RESET",
"PCMCIA_RESET",
"DECT_POWER_ON",
"IRDA_SD",
"RS232_ON",
"SD_MEDIAQ",
"LED2_ON",
"IRDA_MODE",
"ENABLE_5V",
"RESET_SIMCARD"
};
static int proc_cs3_read(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
char *p = page;
int len, i;
p += sprintf(p, "Chipselect3 : %x\n", (uint)cs3_shadow);
for (i = 0; i <= 15; i++) {
if(cs3_shadow & (1<<i)) {
p += sprintf(p, "%s\t: TRUE \n",name[i]);
} else
p += sprintf(p, "%s\t: FALSE \n",name[i]);
}
len = (p - page) - off;
if (len < 0)
len = 0;
*eof = (len <= count) ? 1 : 0;
*start = page + off;
return len;
}
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);
}
#endif
static int __init cs3_init(void)
{
#ifdef CONFIG_PROC_FS
struct proc_dir_entry *proc_cs3 = create_proc_entry("CS3", 0, 0);
if (proc_cs3)
{
proc_cs3->read_proc = proc_cs3_read;
proc_cs3->write_proc = (void*)proc_cs3_write;
}
#endif
return 0;
}
arch_initcall(cs3_init);
static void simpad_power_off(void)
{
local_irq_disable(); // was cli
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment