All pastes #614425 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-07-11 15:21 UTC
rendered paste body
  568 static void add_task_handler(void *data)
  569 {
  570 	struct mmcsd_slot *slot = (struct mmcsd_slot *)data;
  571 	int wp;
  572 
  573 #if defined(CONFIG_MACH_MMSP2_DTK3)
  574 	wp = 0;
  575 #elif defined(CONFIG_MACH_MMSP2_DTK4) || defined(CONFIG_MACH_MMSP2_WDMS)
  576 	wp = read_gpio_bit(GPIO_D2);
  577 #endif
  578 	if (wp) {
  579 		printk("write protected\n");
  580 		slot->readonly = 1;
  581 	}
  582 	else
  583 		slot->readonly = 0;
  584 
  585 #if 0
  586 	add_mmcsd_device(slot);
  587 #else
  588 	if( add_mmcsd_device(slot) < 0) printk("Re instart sdcard\n");
  589 	else sys_mount("/dev/mmcsd/disc0/part1", "/mnt/sd", "vfat", 0xC0ED0000, "iocharset=utf8");
  590 #endif
  591 
  592 }