tpm_write_index(NSC_LDC_INDEX, 0x01); tpm_read_index(NSC_LDC_INDEX); 
tpm_write_index(nscAddrBase, NSC_LDC_INDEX, 0x01); 
static int __devinit tpm_nsc_init(struct pci_dev *pci_dev,				  const struct pci_device_id *pci_id){	int rc = 0;	int lo, hi;	hi = tpm_read_index(TPM_NSC_BASE0_HI);	lo = tpm_read_index(TPM_NSC_BASE0_LO);	tpm_nsc.base = (hi<<8) | lo;	if (pci_enable_device(pci_dev))		return -EIO;	/* verify that it is a National part (SID) */	if (tpm_read_index(NSC_SID_INDEX) != 0xEF) {		rc = -ENODEV;		goto out_err;	}	dev_dbg(&pci_dev->dev, "NSC TPM detected\n");	dev_dbg(&pci_dev->dev,		"NSC LDN 0x%x, SID 0x%x, SRID 0x%x\n",		tpm_read_index(0x07), tpm_read_index(0x20),		tpm_read_index(0x27));	dev_dbg(&pci_dev->dev,		"NSC SIOCF1 0x%x SIOCF5 0x%x SIOCF6 0x%x SIOCF8 0x%x\n",		tpm_read_index(0x21), tpm_read_index(0x25),		tpm_read_index(0x26), tpm_read_index(0x28));	dev_dbg(&pci_dev->dev, "NSC IO Base0 0x%x\n",		(tpm_read_index(0x60) << 8) | tpm_read_index(0x61));	dev_dbg(&pci_dev->dev, "NSC IO Base1 0x%x\n",		(tpm_read_index(0x62) << 8) | tpm_read_index(0x63));	dev_dbg(&pci_dev->dev, "NSC Interrupt number and wakeup 0x%x\n",		tpm_read_index(0x70));	dev_dbg(&pci_dev->dev, "NSC IRQ type select 0x%x\n",		tpm_read_index(0x71));	dev_dbg(&pci_dev->dev,		"NSC DMA channel select0 0x%x, select1 0x%x\n",		tpm_read_index(0x74), tpm_read_index(0x75));	dev_dbg(&pci_dev->dev,		"NSC Config "		"0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n",		tpm_read_index(0xF0), tpm_read_index(0xF1),		tpm_read_index(0xF2), tpm_read_index(0xF3),		tpm_read_index(0xF4), tpm_read_index(0xF5),		tpm_read_index(0xF6), tpm_read_index(0xF7),		tpm_read_index(0xF8), tpm_read_index(0xF9));	dev_info(&pci_dev->dev,		 "NSC PC21100 TPM revision %d\n",		 tpm_read_index(0x27) & 0x1F);	if (tpm_read_index(NSC_LDC_INDEX) == 0)		dev_info(&pci_dev->dev, ": NSC TPM not active\n");	/* select PM channel 1 */	tpm_write_index(NSC_LDN_INDEX, 0x12);	tpm_read_index(NSC_LDN_INDEX);	/* disable the DPM module */	tpm_write_index(NSC_LDC_INDEX, 0);	tpm_read_index(NSC_LDC_INDEX);	/* set the data register base addresses */	tpm_write_index(NSC_DIO_INDEX, TPM_NSC_BASE >> 8);	tpm_write_index(NSC_DIO_INDEX + 1, TPM_NSC_BASE);	tpm_read_index(NSC_DIO_INDEX);	tpm_read_index(NSC_DIO_INDEX + 1);	/* set the command register base addresses */	tpm_write_index(NSC_CIO_INDEX, (TPM_NSC_BASE + 1) >> 8);	tpm_write_index(NSC_CIO_INDEX + 1, (TPM_NSC_BASE + 1));	tpm_read_index(NSC_DIO_INDEX);	tpm_read_index(NSC_DIO_INDEX + 1);	/* set the interrupt number to be used for the host interface */	tpm_write_index(NSC_IRQ_INDEX, TPM_NSC_IRQ);	tpm_write_index(NSC_ITS_INDEX, 0x00);	tpm_read_index(NSC_IRQ_INDEX);	/* enable the DPM module */	tpm_write_index(NSC_LDC_INDEX, 0x01);	tpm_read_index(NSC_LDC_INDEX);	if ((rc = tpm_register_hardware(pci_dev, &tpm_nsc)) < 0)		goto out_err;	return 0;out_err:	pci_disable_device(pci_dev);	return rc;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/daacdfa6e7d6e57c5d1b8e72b1c863feb53d8a82/tpm_nsc.c/clean/drivers/char/tpm/tpm_nsc.c