[Isisalsa-devel] isis sam9707.c,1.7,1.8
Status: Inactive
Brought to you by:
jeanseb
|
From: Jean-Sébastien V. <je...@us...> - 2006-07-24 09:01:25
|
Update of /cvsroot/isisalsa/isis In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv26205 Modified Files: sam9707.c Log Message: change on gpio init Index: sam9707.c =================================================================== RCS file: /cvsroot/isisalsa/isis/sam9707.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sam9707.c 29 Apr 2006 20:07:52 -0000 1.7 --- sam9707.c 24 Jul 2006 09:01:21 -0000 1.8 *************** *** 245,249 **** outw(SAM9707_STATUS, chip->io_port + ISIS_ADDRESS); while(tmploop-- && ( ! (tmp = inw(chip->io_port+ISIS_DATA)) & 0x40)); outw(reg, chip->io_port + ISIS_ADDRESS); outw(data & 0xff, chip->io_port + ISIS_DATA); --- 245,249 ---- outw(SAM9707_STATUS, chip->io_port + ISIS_ADDRESS); while(tmploop-- && ( ! ((tmp = inw(chip->io_port+ISIS_DATA)) & 0x40)!=0x40)); outw(reg, chip->io_port + ISIS_ADDRESS); outw(data & 0xff, chip->io_port + ISIS_DATA); *************** *** 494,509 **** return -ENODEV; } ! // if((err = snd_isis_setup_card(chip))) ! // return err; /* * Reset the sam chip */ ! snd_printk("Resetting the chip\n"); snd_isis_write_control(chip,SAM_CMD_HOT_RES); snd_isis_write_data8(chip,0x11); ! mdelay(50); ! loop = SAM_READ_LOOP_COUNTER; while((snd_isis_read(chip, SAM9707_STATUS) != 0xa0) & --loop) { --- 494,509 ---- return -ENODEV; } ! /*if((err = snd_isis_setup_card(chip))) ! return err;*/ /* * Reset the sam chip */ ! /*snd_printk("Resetting the chip\n"); snd_isis_write_control(chip,SAM_CMD_HOT_RES); snd_isis_write_data8(chip,0x11); ! mdelay(50);*/ ! /*loop = SAM_READ_LOOP_COUNTER; while((snd_isis_read(chip, SAM9707_STATUS) != 0xa0) & --loop) { *************** *** 529,533 **** { snd_printk("read data8 : %2x\n",snd_isis_read(chip, SAM9707_DATA8)); ! } /* * Load bootstrap --- 529,533 ---- { snd_printk("read data8 : %2x\n",snd_isis_read(chip, SAM9707_DATA8)); ! }*/ /* * Load bootstrap *************** *** 537,544 **** mdelay(10); ! while(((snd_isis_read(chip, SAM9707_STATUS) & ( 1 << 7)) == 0) & --loop) { snd_printk("read data8 : %2x\n",snd_isis_read(chip, SAM9707_DATA8)); ! }; snd_isis_write_control(chip, 0x04); --- 537,544 ---- mdelay(10); ! /*while(((snd_isis_read(chip, SAM9707_STATUS) & ( 1 << 7)) == 0) & --loop) { snd_printk("read data8 : %2x\n",snd_isis_read(chip, SAM9707_DATA8)); ! };*/ snd_isis_write_control(chip, 0x04); *************** *** 1118,1122 **** entry->mode = S_IFCHR | S_IWUSR; chip->firm = 1; ! tmp = inw(chip->io_port + 0x18) & ~SAM_INTERRUPT; outw(tmp, chip->io_port + 0x18); --- 1118,1122 ---- entry->mode = S_IFCHR | S_IWUSR; chip->firm = 1; ! /*tmp = inw(chip->io_port + 0x18) & ~SAM_INTERRUPT; outw(tmp, chip->io_port + 0x18); *************** *** 1129,1133 **** printk("Isis detection OK\n"); tmp = inw(chip->io_port + 0x18) | SAM_INTERRUPT; ! outw(tmp, chip->io_port + 0x18); snd_printk("Creating SAM CHIP\n"); --- 1129,1133 ---- printk("Isis detection OK\n"); tmp = inw(chip->io_port + 0x18) | SAM_INTERRUPT; ! outw(tmp, chip->io_port + 0x18);*/ snd_printk("Creating SAM CHIP\n"); *************** *** 1157,1166 **** * Setting up clock source */ ! outw(0x0193, chip->io_port + 0x64); // set GPIO mask outw(0x0e64, chip->io_port + 0x68); // set GPIO dir value = inw(chip->io_port + 0x60); //read the GPIO ! value &= 0xff9f; value |= 0x0024; outw(value, chip->io_port + 0x60); // write new value to GPIO snd_printk("Clock source set\n"); /* --- 1157,1169 ---- * Setting up clock source */ ! outw(0x019B, chip->io_port + 0x64); // set GPIO mask outw(0x0e64, chip->io_port + 0x68); // set GPIO dir value = inw(chip->io_port + 0x60); //read the GPIO ! value &= 0x000f; value |= 0x0024; outw(value, chip->io_port + 0x60); // write new value to GPIO + value = inw(chip->io_port + 0x64); //read the GPIO mask + value |= 0x0fff; + outw(0x019B, chip->io_port + 0x64); // set GPIO mask snd_printk("Clock source set\n"); /* |