aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorEliot Blennerhassett <eblennerhassett@audioscience.com>2011-02-09 23:26:07 -0500
committerTakashi Iwai <tiwai@suse.de>2011-02-10 12:49:29 -0500
commit4b60221c04c3eab6077b4df27beaa1bb80f740ac (patch)
treef1451361373d50fd5fd53139e1b9b8ad3858d493 /sound
parent4704998e84b03e2d93ef8d4d03eeb7a84c0cb493 (diff)
ALSA: asihpi - Remove int flag polling code preparing for stream interrupts.
Interrupt flag used for message handshake will be required for stream interrupts, so conditionally compiled code without HPI6205_NO_HSR_POLL defined can never be used; removing it. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/asihpi/hpi6205.c101
-rw-r--r--sound/pci/asihpi/hpi6205.h3
2 files changed, 0 insertions, 104 deletions
diff --git a/sound/pci/asihpi/hpi6205.c b/sound/pci/asihpi/hpi6205.c
index 5fe535b1b096..cbf79a99156c 100644
--- a/sound/pci/asihpi/hpi6205.c
+++ b/sound/pci/asihpi/hpi6205.c
@@ -527,10 +527,6 @@ static u16 create_adapter_obj(struct hpi_adapter_obj *pao,
527 struct hpi_hw_obj *phw = pao->priv; 527 struct hpi_hw_obj *phw = pao->priv;
528 struct bus_master_interface *interface; 528 struct bus_master_interface *interface;
529 u32 phys_addr; 529 u32 phys_addr;
530#ifndef HPI6205_NO_HSR_POLL
531 u32 time_out = HPI6205_TIMEOUT;
532 u32 temp1;
533#endif
534 int i; 530 int i;
535 u16 err; 531 u16 err;
536 532
@@ -584,27 +580,6 @@ static u16 create_adapter_obj(struct hpi_adapter_obj *pao,
584 580
585 interface = phw->p_interface_buffer; 581 interface = phw->p_interface_buffer;
586 582
587#ifndef HPI6205_NO_HSR_POLL
588 /* wait for first interrupt indicating the DSP init is done */
589 time_out = HPI6205_TIMEOUT * 10;
590 temp1 = 0;
591 while (((temp1 & C6205_HSR_INTSRC) == 0) && --time_out)
592 temp1 = ioread32(phw->prHSR);
593
594 if (temp1 & C6205_HSR_INTSRC)
595 HPI_DEBUG_LOG(INFO,
596 "Interrupt confirming DSP code running OK\n");
597 else {
598 HPI_DEBUG_LOG(ERROR,
599 "Timed out waiting for interrupt "
600 "confirming DSP code running\n");
601 return HPI6205_ERROR_6205_NO_IRQ;
602 }
603
604 /* reset the interrupt */
605 iowrite32(C6205_HSR_INTSRC, phw->prHSR);
606#endif
607
608 /* make sure the DSP has started ok */ 583 /* make sure the DSP has started ok */
609 if (!wait_dsp_ack(phw, H620_HIF_RESET, HPI6205_TIMEOUT * 10)) { 584 if (!wait_dsp_ack(phw, H620_HIF_RESET, HPI6205_TIMEOUT * 10)) {
610 HPI_DEBUG_LOG(ERROR, "timed out waiting reset state \n"); 585 HPI_DEBUG_LOG(ERROR, "timed out waiting reset state \n");
@@ -1982,9 +1957,6 @@ static short hpi6205_transfer_data(struct hpi_adapter_obj *pao, u8 *p_data,
1982 struct hpi_hw_obj *phw = pao->priv; 1957 struct hpi_hw_obj *phw = pao->priv;
1983 u32 data_transferred = 0; 1958 u32 data_transferred = 0;
1984 u16 err = 0; 1959 u16 err = 0;
1985#ifndef HPI6205_NO_HSR_POLL
1986 u32 time_out;
1987#endif
1988 u32 temp2; 1960 u32 temp2;
1989 struct bus_master_interface *interface = phw->p_interface_buffer; 1961 struct bus_master_interface *interface = phw->p_interface_buffer;
1990 1962
@@ -2009,14 +1981,10 @@ static short hpi6205_transfer_data(struct hpi_adapter_obj *pao, u8 *p_data,
2009 1981
2010 interface->transfer_size_in_bytes = this_copy; 1982 interface->transfer_size_in_bytes = this_copy;
2011 1983
2012#ifdef HPI6205_NO_HSR_POLL
2013 /* DSP must change this back to nOperation */ 1984 /* DSP must change this back to nOperation */
2014 interface->dsp_ack = H620_HIF_IDLE; 1985 interface->dsp_ack = H620_HIF_IDLE;
2015#endif
2016
2017 send_dsp_command(phw, operation); 1986 send_dsp_command(phw, operation);
2018 1987
2019#ifdef HPI6205_NO_HSR_POLL
2020 temp2 = wait_dsp_ack(phw, operation, HPI6205_TIMEOUT); 1988 temp2 = wait_dsp_ack(phw, operation, HPI6205_TIMEOUT);
2021 HPI_DEBUG_LOG(DEBUG, "spun %d times for data xfer of %d\n", 1989 HPI_DEBUG_LOG(DEBUG, "spun %d times for data xfer of %d\n",
2022 HPI6205_TIMEOUT - temp2, this_copy); 1990 HPI6205_TIMEOUT - temp2, this_copy);
@@ -2029,40 +1997,6 @@ static short hpi6205_transfer_data(struct hpi_adapter_obj *pao, u8 *p_data,
2029 1997
2030 break; 1998 break;
2031 } 1999 }
2032#else
2033 /* spin waiting on the result */
2034 time_out = HPI6205_TIMEOUT;
2035 temp2 = 0;
2036 while ((temp2 == 0) && time_out--) {
2037 /* give 16k bus mastering transfer time to happen */
2038 /*(16k / 132Mbytes/s = 122usec) */
2039 hpios_delay_micro_seconds(20);
2040 temp2 = ioread32(phw->prHSR);
2041 temp2 &= C6205_HSR_INTSRC;
2042 }
2043 HPI_DEBUG_LOG(DEBUG, "spun %d times for data xfer of %d\n",
2044 HPI6205_TIMEOUT - time_out, this_copy);
2045 if (temp2 == C6205_HSR_INTSRC) {
2046 HPI_DEBUG_LOG(VERBOSE,
2047 "Interrupt from HIF <data> OK\n");
2048 /*
2049 if(interface->dwDspAck != nOperation) {
2050 HPI_DEBUG_LOG(DEBUG("interface->dwDspAck=%d,
2051 expected %d \n",
2052 interface->dwDspAck,nOperation);
2053 }
2054 */
2055 }
2056/* need to handle this differently... */
2057 else {
2058 HPI_DEBUG_LOG(ERROR,
2059 "Interrupt from HIF <data> BAD\n");
2060 err = HPI_ERROR_DSP_HARDWARE;
2061 }
2062
2063 /* reset the interrupt from the DSP */
2064 iowrite32(C6205_HSR_INTSRC, phw->prHSR);
2065#endif
2066 if (operation == H620_HIF_GET_DATA) 2000 if (operation == H620_HIF_GET_DATA)
2067 memcpy(&p_data[data_transferred], 2001 memcpy(&p_data[data_transferred],
2068 (void *)&interface->u.b_data[0], this_copy); 2002 (void *)&interface->u.b_data[0], this_copy);
@@ -2119,9 +2053,6 @@ static unsigned int message_count;
2119static u16 message_response_sequence(struct hpi_adapter_obj *pao, 2053static u16 message_response_sequence(struct hpi_adapter_obj *pao,
2120 struct hpi_message *phm, struct hpi_response *phr) 2054 struct hpi_message *phm, struct hpi_response *phr)
2121{ 2055{
2122#ifndef HPI6205_NO_HSR_POLL
2123 u32 temp2;
2124#endif
2125 u32 time_out, time_out2; 2056 u32 time_out, time_out2;
2126 struct hpi_hw_obj *phw = pao->priv; 2057 struct hpi_hw_obj *phw = pao->priv;
2127 struct bus_master_interface *interface = phw->p_interface_buffer; 2058 struct bus_master_interface *interface = phw->p_interface_buffer;
@@ -2164,38 +2095,6 @@ static u16 message_response_sequence(struct hpi_adapter_obj *pao,
2164 /* spin waiting on HIF interrupt flag (end of msg process) */ 2095 /* spin waiting on HIF interrupt flag (end of msg process) */
2165 time_out = HPI6205_TIMEOUT; 2096 time_out = HPI6205_TIMEOUT;
2166 2097
2167#ifndef HPI6205_NO_HSR_POLL
2168 temp2 = 0;
2169 while ((temp2 == 0) && --time_out) {
2170 temp2 = ioread32(phw->prHSR);
2171 temp2 &= C6205_HSR_INTSRC;
2172 hpios_delay_micro_seconds(1);
2173 }
2174 if (temp2 == C6205_HSR_INTSRC) {
2175 rmb(); /* ensure we see latest value for dsp_ack */
2176 if ((interface->dsp_ack != H620_HIF_GET_RESP)) {
2177 HPI_DEBUG_LOG(DEBUG,
2178 "(%u)interface->dsp_ack(0x%x) != "
2179 "H620_HIF_GET_RESP, t=%u\n", message_count,
2180 interface->dsp_ack,
2181 HPI6205_TIMEOUT - time_out);
2182 } else {
2183 HPI_DEBUG_LOG(VERBOSE,
2184 "(%u)int with GET_RESP after %u\n",
2185 message_count, HPI6205_TIMEOUT - time_out);
2186 }
2187
2188 } else {
2189 /* can we do anything else in response to the error ? */
2190 HPI_DEBUG_LOG(ERROR,
2191 "Interrupt from HIF module BAD (function %x)\n",
2192 phm->function);
2193 }
2194
2195 /* reset the interrupt from the DSP */
2196 iowrite32(C6205_HSR_INTSRC, phw->prHSR);
2197#endif
2198
2199 /* read the result */ 2098 /* read the result */
2200 if (time_out) { 2099 if (time_out) {
2201 if (interface->u.response_buffer.size <= phr->size) 2100 if (interface->u.response_buffer.size <= phr->size)
diff --git a/sound/pci/asihpi/hpi6205.h b/sound/pci/asihpi/hpi6205.h
index e00edb0cedda..df2f02c0c7b4 100644
--- a/sound/pci/asihpi/hpi6205.h
+++ b/sound/pci/asihpi/hpi6205.h
@@ -25,9 +25,6 @@ Copyright AudioScience, Inc., 2003
25#ifndef _HPI6205_H_ 25#ifndef _HPI6205_H_
26#define _HPI6205_H_ 26#define _HPI6205_H_
27 27
28/* transitional conditional compile shared between host and DSP */
29/* #define HPI6205_NO_HSR_POLL */
30
31#include "hpi_internal.h" 28#include "hpi_internal.h"
32 29
33/*********************************************************** 30/***********************************************************