• Home
  • Raw
  • Download

Lines Matching +full:exported +full:- +full:sram

4     Copyright (C) 1997-2011  AudioScience Inc. <support@audioscience.com>
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 Exported functions:
29 (C) Copyright AudioScience Inc. 1998-2003
89 /* can't access SDRAM - test#1 */
91 /* can't access SDRAM - test#2 */
221 switch (phm->function) { in subsys_message()
226 phr->error = HPI_ERROR_INVALID_FUNC; in subsys_message()
234 struct hpi_hw_obj *phw = pao->priv; in control_message()
236 switch (phm->function) { in control_message()
238 if (pao->has_control_cache) { in control_message()
244 phr->error = in control_message()
246 phr->specific_error = err; in control_message()
248 phr->error = err; in control_message()
253 if (hpi_check_control_cache(phw->p_cache, phm, phr)) in control_message()
260 hpi_cmn_control_cache_sync_to_msg(phw->p_cache, phm, phr); in control_message()
273 switch (phm->function) { in adapter_message()
291 switch (phm->function) { in outstream_message()
299 phr->error = HPI_ERROR_INVALID_FUNC; in outstream_message()
311 switch (phm->function) { in instream_message()
319 phr->error = HPI_ERROR_INVALID_FUNC; in instream_message()
336 if (phm->object != HPI_OBJ_SUBSYSTEM) { in HPI_6000()
337 pao = hpi_find_adapter(phm->adapter_index); in HPI_6000()
339 hpi_init_response(phr, phm->object, phm->function, in HPI_6000()
342 phm->adapter_index); in HPI_6000()
347 if (pao->dsp_crashed >= 10) { in HPI_6000()
348 hpi_init_response(phr, phm->object, phm->function, in HPI_6000()
351 phm->adapter_index); in HPI_6000()
356 if (phm->function != HPI_SUBSYS_CREATE_ADAPTER) in HPI_6000()
357 hpi_init_response(phr, phm->object, phm->function, in HPI_6000()
360 switch (phm->type) { in HPI_6000()
362 switch (phm->object) { in HPI_6000()
368 phr->size = in HPI_6000()
393 phr->error = HPI_ERROR_INVALID_TYPE; in HPI_6000()
403 * NOTE - you cannot use this function AND the FindAdapters function at the
423 phr->error = HPI_ERROR_MEMORY_ALLOC; in subsys_create_adapter()
428 ao.pci = *phm->u.s.resource.r.pci; in subsys_create_adapter()
434 phr->error = HPI_ERROR_DSP_BOOTLOAD; in subsys_create_adapter()
435 phr->specific_error = err; in subsys_create_adapter()
437 phr->error = err; in subsys_create_adapter()
440 phr->u.s.data = os_error_code; in subsys_create_adapter()
448 phr->error = HPI_ERROR_BAD_ADAPTER; in subsys_create_adapter()
453 struct hpi_hw_obj *phw = pao->priv; in subsys_create_adapter()
454 phw->ado[dsp_index].pa_parent_adapter = pao; in subsys_create_adapter()
457 phr->u.s.adapter_type = ao.type; in subsys_create_adapter()
458 phr->u.s.adapter_index = ao.index; in subsys_create_adapter()
459 phr->error = 0; in subsys_create_adapter()
467 phr->error = 0; in adapter_delete()
478 struct hpi_hw_obj *phw = pao->priv; in create_adapter_obj()
481 /* BAR0 - 4K = HPI control and status registers on PCI2040 (HPI CSR) */ in create_adapter_obj()
482 /* BAR1 - 32K = HPI registers on DSP */ in create_adapter_obj()
483 phw->dw2040_HPICSR = pao->pci.ap_mem_base[0]; in create_adapter_obj()
484 phw->dw2040_HPIDSP = pao->pci.ap_mem_base[1]; in create_adapter_obj()
485 HPI_DEBUG_LOG(VERBOSE, "csr %p, dsp %p\n", phw->dw2040_HPICSR, in create_adapter_obj()
486 phw->dw2040_HPIDSP); in create_adapter_obj()
490 phw->ado[dsp_index].prHPI_control = in create_adapter_obj()
491 phw->dw2040_HPIDSP + (CONTROL + in create_adapter_obj()
494 phw->ado[dsp_index].prHPI_address = in create_adapter_obj()
495 phw->dw2040_HPIDSP + (ADDRESS + in create_adapter_obj()
497 phw->ado[dsp_index].prHPI_data = in create_adapter_obj()
498 phw->dw2040_HPIDSP + (DATA + DSP_SPACING * dsp_index); in create_adapter_obj()
500 phw->ado[dsp_index].prHPI_data_auto_inc = in create_adapter_obj()
501 phw->dw2040_HPIDSP + (DATA_AUTOINC + in create_adapter_obj()
505 phw->ado[dsp_index].prHPI_control, in create_adapter_obj()
506 phw->ado[dsp_index].prHPI_address, in create_adapter_obj()
507 phw->ado[dsp_index].prHPI_data, in create_adapter_obj()
508 phw->ado[dsp_index].prHPI_data_auto_inc); in create_adapter_obj()
510 phw->ado[dsp_index].pa_parent_adapter = pao; in create_adapter_obj()
513 phw->pCI2040HPI_error_count = 0; in create_adapter_obj()
514 pao->has_control_cache = 0; in create_adapter_obj()
519 phw->num_dsp = 1; in create_adapter_obj()
527 phw->message_buffer_address_on_dsp = 0L; in create_adapter_obj()
528 phw->response_buffer_address_on_dsp = 0L; in create_adapter_obj()
555 if (phw->num_dsp == 2) { in create_adapter_obj()
561 pao->type = hr0.u.ax.info.adapter_type; in create_adapter_obj()
562 pao->index = hr0.u.ax.info.adapter_index; in create_adapter_obj()
565 memset(&phw->control_cache[0], 0, in create_adapter_obj()
570 hpi_read_word(&phw->ado[0], in create_adapter_obj()
574 hpi_read_word(&phw->ado[0], in create_adapter_obj()
577 phw->p_cache = in create_adapter_obj()
580 &phw->control_cache[0] in create_adapter_obj()
582 if (phw->p_cache) in create_adapter_obj()
583 pao->has_control_cache = 1; in create_adapter_obj()
586 HPI_DEBUG_LOG(DEBUG, "get adapter info ASI%04X index %d\n", pao->type, in create_adapter_obj()
587 pao->index); in create_adapter_obj()
589 if (phw->p_cache) in create_adapter_obj()
590 phw->p_cache->adap_idx = pao->index; in create_adapter_obj()
597 struct hpi_hw_obj *phw = pao->priv; in delete_adapter_obj()
599 if (pao->has_control_cache) in delete_adapter_obj()
600 hpi_free_control_cache(phw->p_cache); in delete_adapter_obj()
603 iowrite32(0x0003000F, phw->dw2040_HPICSR + HPI_RESET); in delete_adapter_obj()
617 phr->u.ax.assert.p1 = in adapter_get_asserts()
619 phr->u.ax.assert.p2 = 0; in adapter_get_asserts()
620 phr->u.ax.assert.count = 1; /* assert count */ in adapter_get_asserts()
621 phr->u.ax.assert.dsp_index = -1; /* "dsp index" */ in adapter_get_asserts()
622 strcpy(phr->u.ax.assert.sz_message, "PCI2040 error"); in adapter_get_asserts()
623 phr->u.ax.assert.dsp_msg_addr = 0; in adapter_get_asserts()
626 phr->error = 0; in adapter_get_asserts()
635 /* LOW-LEVEL */
640 struct hpi_hw_obj *phw = pao->priv; in hpi6000_adapter_boot_load_dsp()
660 switch (pao->pci.pci_dev->subsystem_device) { in hpi6000_adapter_boot_load_dsp()
673 * set RST3-=1 to disconnect HAD8 to set DSP in little endian mode in hpi6000_adapter_boot_load_dsp()
677 iowrite32(dw2040_reset, phw->dw2040_HPICSR + HPI_RESET); in hpi6000_adapter_boot_load_dsp()
680 * note that bits 4..15 are read-only and so should always return zero, in hpi6000_adapter_boot_load_dsp()
684 delay = ioread32(phw->dw2040_HPICSR + HPI_RESET); in hpi6000_adapter_boot_load_dsp()
693 iowrite32(0x00000003, phw->dw2040_HPICSR + HPI_DATA_WIDTH); in hpi6000_adapter_boot_load_dsp()
694 /* set Bit30 and 29 - which will prevent Target aborts from being in hpi6000_adapter_boot_load_dsp()
697 iowrite32(0x60000000, phw->dw2040_HPICSR + INTERRUPT_MASK_SET); in hpi6000_adapter_boot_load_dsp()
703 iowrite32(dw2040_reset, phw->dw2040_HPICSR + HPI_RESET); in hpi6000_adapter_boot_load_dsp()
705 phw->ado[0].c_dsp_rev = 'B'; /* revB */ in hpi6000_adapter_boot_load_dsp()
706 phw->ado[1].c_dsp_rev = 'B'; /* revB */ in hpi6000_adapter_boot_load_dsp()
710 iowrite32(dw2040_reset, phw->dw2040_HPICSR + HPI_RESET); in hpi6000_adapter_boot_load_dsp()
712 iowrite32(dw2040_reset, phw->dw2040_HPICSR + HPI_RESET); in hpi6000_adapter_boot_load_dsp()
716 iowrite32(dw2040_reset, phw->dw2040_HPICSR + HPI_RESET); in hpi6000_adapter_boot_load_dsp()
721 for (dsp_index = 0; dsp_index < phw->num_dsp; dsp_index++) { in hpi6000_adapter_boot_load_dsp()
722 struct dsp_obj *pdo = &phw->ado[dsp_index]; in hpi6000_adapter_boot_load_dsp()
724 /* configure DSP so that we download code into the SRAM */ in hpi6000_adapter_boot_load_dsp()
726 iowrite32(0x00010001, pdo->prHPI_control); in hpi6000_adapter_boot_load_dsp()
731 iowrite32(test_data, pdo->prHPI_address); in hpi6000_adapter_boot_load_dsp()
732 data = ioread32(pdo->prHPI_address); in hpi6000_adapter_boot_load_dsp()
783 * revB - because of bug 3.0.1 last HPI read in hpi6000_adapter_boot_load_dsp()
784 * (before HPI address issued) must be non-autoinc in hpi6000_adapter_boot_load_dsp()
806 00000000-0000FFFF 16Kx32 internal program in hpi6000_adapter_boot_load_dsp()
807 01800000-019FFFFF Internal peripheral in hpi6000_adapter_boot_load_dsp()
808 80000000-807FFFFF CE0 2Mx32 SDRAM running @ 100MHz in hpi6000_adapter_boot_load_dsp()
809 90000000-9000FFFF CE1 Async peripherals: in hpi6000_adapter_boot_load_dsp()
812 ------------ in hpi6000_adapter_boot_load_dsp()
814 0 - in hpi6000_adapter_boot_load_dsp()
815 1 - in hpi6000_adapter_boot_load_dsp()
816 2 - in hpi6000_adapter_boot_load_dsp()
819 5 EKEN = 1 <--!! C6713 specific, enables ECLKOUT in hpi6000_adapter_boot_load_dsp()
820 6 - in hpi6000_adapter_boot_load_dsp()
830 /* EMIF CE0 setup - 2Mx32 Sync DRAM in hpi6000_adapter_boot_load_dsp()
835 15..14 - in hpi6000_adapter_boot_load_dsp()
844 31-21 0 in hpi6000_adapter_boot_load_dsp()
846 19-18 WR2DEAC = 1 in hpi6000_adapter_boot_load_dsp()
848 16-15 R2WDQM = 2 in hpi6000_adapter_boot_load_dsp()
849 14-12 RD2WR = 4 in hpi6000_adapter_boot_load_dsp()
850 11-10 RD2DEAC = 1 in hpi6000_adapter_boot_load_dsp()
852 8-7 THZP = 10b in hpi6000_adapter_boot_load_dsp()
853 6-5 TWR = 2-1 = 01b (tWR = 10ns) in hpi6000_adapter_boot_load_dsp()
855 3-1 TRAS = 5-1 = 100b (Tras=42ns = 5 ECLK) in hpi6000_adapter_boot_load_dsp()
857 (for Micron 2M32-7 operating at 100Mhz) in hpi6000_adapter_boot_load_dsp()
863 /* EMIF SDRAM control - set up for a 2Mx32 SDRAM (512x32x4 bank) in hpi6000_adapter_boot_load_dsp()
864 31 - - in hpi6000_adapter_boot_load_dsp()
873 11..0 - - in hpi6000_adapter_boot_load_dsp()
881 /*MIF CE1 setup - Async peripherals in hpi6000_adapter_boot_load_dsp()
947 error = hpi_dsp_code_open(boot_load_family, pao->pci.pci_dev, in hpi6000_adapter_boot_load_dsp()
1041 iowrite32(0x00030003, pdo->prHPI_control); in hpi6000_adapter_boot_load_dsp()
1044 /* wait for a non-zero value in hostcmd - in hpi6000_adapter_boot_load_dsp()
1056 } while (--timeout in hpi6000_adapter_boot_load_dsp()
1088 phw->num_dsp = 2; in hpi6000_adapter_boot_load_dsp()
1100 if (HPI_ADAPTER_FAMILY_ASI(pao->pci.pci_dev-> in hpi6000_adapter_boot_load_dsp()
1106 if (HPI_ADAPTER_FAMILY_ASI(pao->pci.pci_dev-> in hpi6000_adapter_boot_load_dsp()
1117 /* write to 24 bit Debug register (D31-D8) */ in hpi6000_adapter_boot_load_dsp()
1147 iowrite32(address, pdo->prHPI_address); in hpi_set_address()
1148 } while (hpi6000_check_PCI2040_error_flag(pdo->pa_parent_adapter, in hpi_set_address()
1150 && --timeout); in hpi_set_address()
1163 iowrite32(data, pdo->prHPI_data); in hpi_write_word()
1175 data = ioread32(pdo->prHPI_data); in hpi_read_word()
1179 /* write a block of 32bit words to the DSP HPI port using auto-inc mode */
1183 u16 length16 = length - 1; in hpi_write_block()
1191 iowrite32_rep(pdo->prHPI_data_auto_inc, pdata, length16); in hpi_write_block()
1194 /* must end with non auto-inc */ in hpi_write_block()
1195 iowrite32(*(pdata + length - 1), pdo->prHPI_data); in hpi_write_block()
1198 /** read a block of 32bit words from the DSP HPI port using auto-inc mode
1203 u16 length16 = length - 1; in hpi_read_block()
1211 ioread32_rep(pdo->prHPI_data_auto_inc, pdata, length16); in hpi_read_block()
1214 /* must end with non auto-inc */ in hpi_read_block()
1215 *(pdata + length - 1) = ioread32(pdo->prHPI_data); in hpi_read_block()
1221 struct hpi_hw_obj *phw = pao->priv; in hpi6000_dsp_block_write32()
1222 struct dsp_obj *pdo = &phw->ado[dsp_index]; in hpi6000_dsp_block_write32()
1241 && --time_out); in hpi6000_dsp_block_write32()
1247 local_count -= xfer_size; in hpi6000_dsp_block_write32()
1259 struct hpi_hw_obj *phw = pao->priv; in hpi6000_dsp_block_read32()
1260 struct dsp_obj *pdo = &phw->ado[dsp_index]; in hpi6000_dsp_block_read32()
1280 && --time_out); in hpi6000_dsp_block_read32()
1286 local_count -= xfer_size; in hpi6000_dsp_block_read32()
1299 struct hpi_hw_obj *phw = pao->priv; in hpi6000_message_response_sequence()
1300 struct dsp_obj *pdo = &phw->ado[dsp_index]; in hpi6000_message_response_sequence()
1310 pao->dsp_crashed++; in hpi6000_message_response_sequence()
1313 pao->dsp_crashed = 0; in hpi6000_message_response_sequence()
1316 if (phw->message_buffer_address_on_dsp == 0) { in hpi6000_message_response_sequence()
1322 phw->message_buffer_address_on_dsp = address; in hpi6000_message_response_sequence()
1324 && --timeout); in hpi6000_message_response_sequence()
1328 address = phw->message_buffer_address_on_dsp; in hpi6000_message_response_sequence()
1330 length = phm->size; in hpi6000_message_response_sequence()
1347 if (phw->response_buffer_address_on_dsp == 0) { in hpi6000_message_response_sequence()
1354 && --timeout); in hpi6000_message_response_sequence()
1355 phw->response_buffer_address_on_dsp = address; in hpi6000_message_response_sequence()
1360 address = phw->response_buffer_address_on_dsp; in hpi6000_message_response_sequence()
1366 } while (hpi6000_check_PCI2040_error_flag(pao, H6READ) && --timeout); in hpi6000_message_response_sequence()
1370 if (length > phr->size) in hpi6000_message_response_sequence()
1418 struct hpi_hw_obj *phw = pao->priv; in hpi6000_send_data()
1419 struct dsp_obj *pdo = &phw->ado[dsp_index]; in hpi6000_send_data()
1423 u32 *p_data = (u32 *)phm->u.d.u.data.pb_data; in hpi6000_send_data()
1429 while ((data_sent < (phm->u.d.u.data.data_size & ~3L)) in hpi6000_send_data()
1430 && --time_out) { in hpi6000_send_data()
1472 len -= blk_len; in hpi6000_send_data()
1491 struct hpi_hw_obj *phw = pao->priv; in hpi6000_get_data()
1492 struct dsp_obj *pdo = &phw->ado[dsp_index]; in hpi6000_get_data()
1496 u32 *p_data = (u32 *)phm->u.d.u.data.pb_data; in hpi6000_get_data()
1501 while (data_got < (phm->u.d.u.data.data_size & ~3L)) { in hpi6000_get_data()
1534 len -= blk_len; in hpi6000_get_data()
1549 iowrite32(0x00030003, pdo->prHPI_control); /* DSPINT */ in hpi6000_send_dsp_interrupt()
1555 struct hpi_hw_obj *phw = pao->priv; in hpi6000_send_host_command()
1556 struct dsp_obj *pdo = &phw->ado[dsp_index]; in hpi6000_send_host_command()
1564 } while (hpi6000_check_PCI2040_error_flag(pao, H6WRITE) && --timeout); in hpi6000_send_host_command()
1567 iowrite32(0x00040004, pdo->prHPI_control); in hpi6000_send_host_command()
1581 struct hpi_hw_obj *phw = pao->priv; in hpi6000_check_PCI2040_error_flag()
1584 hPI_error = ioread32(phw->dw2040_HPICSR + HPI_ERROR_REPORT); in hpi6000_check_PCI2040_error_flag()
1587 iowrite32(0L, phw->dw2040_HPICSR + HPI_ERROR_REPORT); in hpi6000_check_PCI2040_error_flag()
1588 phw->pCI2040HPI_error_count++; in hpi6000_check_PCI2040_error_flag()
1601 struct hpi_hw_obj *phw = pao->priv; in hpi6000_wait_dsp_ack()
1602 struct dsp_obj *pdo = &phw->ado[dsp_index]; in hpi6000_wait_dsp_ack()
1609 while (--timeout) { in hpi6000_wait_dsp_ack()
1610 hPIC = ioread32(pdo->prHPI_control); in hpi6000_wait_dsp_ack()
1619 while (--timeout) { in hpi6000_wait_dsp_ack()
1631 /* indicates bad read from DSP - in hpi6000_wait_dsp_ack()
1644 struct hpi_hw_obj *phw = pao->priv; in hpi6000_update_control_cache()
1645 struct dsp_obj *pdo = &phw->ado[dsp_index]; in hpi6000_update_control_cache()
1657 } while (hpi6000_check_PCI2040_error_flag(pao, H6READ) && --timeout); in hpi6000_update_control_cache()
1669 if (pdo->control_cache_address_on_dsp == 0) { in hpi6000_update_control_cache()
1679 && --timeout); in hpi6000_update_control_cache()
1684 pdo->control_cache_address_on_dsp = address; in hpi6000_update_control_cache()
1685 pdo->control_cache_length_on_dsp = length; in hpi6000_update_control_cache()
1687 address = pdo->control_cache_address_on_dsp; in hpi6000_update_control_cache()
1688 length = pdo->control_cache_length_on_dsp; in hpi6000_update_control_cache()
1692 (u32 *)&phw->control_cache[0], in hpi6000_update_control_cache()
1703 && --timeout); in hpi6000_update_control_cache()
1721 switch (phm->object) { in get_dsp_index()
1723 if (phm->obj_index < 2) in get_dsp_index()
1727 ret = phm->obj_index; in get_dsp_index()
1744 struct hpi_hw_obj *phw = pao->priv; in hw_message()
1745 u16 num_dsp = phw->num_dsp; in hw_message()
1753 if ((phm->function == HPI_ISTREAM_GROUP_ADD) in hw_message()
1754 || (phm->function == HPI_OSTREAM_GROUP_ADD)) { in hw_message()
1757 hm.obj_index = phm->u.d.u.stream.stream_index; in hw_message()
1758 hm.object = phm->u.d.u.stream.object_type; in hw_message()
1761 phr->error = HPI_ERROR_NO_INTERDSP_GROUPS; in hw_message()
1773 if (phr->error) /* something failed in the DSP */ in hw_message()
1776 switch (phm->function) { in hw_message()
1786 phr->u.ax.assert.dsp_index = 0; /* dsp 0 default */ in hw_message()
1788 if (!phr->u.ax.assert.count) { in hw_message()
1792 phr->u.ax.assert.dsp_index = 1; in hw_message()
1800 phr->error = HPI_ERROR_DSP_COMMUNICATION; in hw_message()
1801 phr->specific_error = error; in hw_message()
1803 phr->error = error; in hw_message()
1807 phr->size = sizeof(struct hpi_response_header); in hw_message()