From: Jeeja KP jeeja.kp@intel.com
Exported azx_enter_link_reset and azx_exit_link_reset functions to be used by the SKL controller driver
Signed-off-by: Jeeja KP jeeja.kp@intel.com Signed-off-by: Subhransu S. Prusty subhransu.s.prusty@intel.com Signed-off-by: Vinod Koul vinod.koul@intel.com --- include/sound/hdaudio.h | 3 +++ sound/hda/hdac_controller.c | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h index bffb2a9..4eebc31 100644 --- a/include/sound/hdaudio.h +++ b/include/sound/hdaudio.h @@ -286,6 +286,8 @@ int snd_hdac_bus_get_response(struct hdac_bus *bus, unsigned int addr,
void snd_hdac_bus_init_chip(struct hdac_bus *bus, bool full_reset); void snd_hdac_bus_stop_chip(struct hdac_bus *bus); +void snd_hdac_bus_enter_link_reset(struct hdac_bus *bus); +void snd_hdac_bus_exit_link_reset(struct hdac_bus *bus);
void snd_hdac_bus_update_rirb(struct hdac_bus *bus); void snd_hdac_bus_handle_stream_irq(struct hdac_bus *bus, unsigned int status, @@ -359,6 +361,7 @@ void snd_hdac_stream_sync(struct hdac_stream *azx_dev, bool start, unsigned int streams); void snd_hdac_stream_timecounter_init(struct hdac_stream *azx_dev, unsigned int streams); + /*DSP loader functions */ int snd_hdac_load_dsp_prepare(struct hdac_stream *azx_dev, unsigned int format, unsigned int byte_size, diff --git a/sound/hda/hdac_controller.c b/sound/hda/hdac_controller.c index 5b1cd94..23aec0e 100644 --- a/sound/hda/hdac_controller.c +++ b/sound/hda/hdac_controller.c @@ -212,7 +212,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_bus_get_response); */
/* enter link reset */ -static void azx_enter_link_reset(struct hdac_bus *bus) +void snd_hdac_bus_enter_link_reset(struct hdac_bus *bus) { unsigned long timeout;
@@ -224,9 +224,10 @@ static void azx_enter_link_reset(struct hdac_bus *bus) time_before(jiffies, timeout)) usleep_range(500, 1000); } +EXPORT_SYMBOL_GPL(snd_hdac_bus_enter_link_reset);
/* exit link reset */ -static void azx_exit_link_reset(struct hdac_bus *bus) +void snd_hdac_bus_exit_link_reset(struct hdac_bus *bus) { unsigned long timeout;
@@ -236,6 +237,7 @@ static void azx_exit_link_reset(struct hdac_bus *bus) while (!azx_readb(bus, GCTL) && time_before(jiffies, timeout)) usleep_range(500, 1000); } +EXPORT_SYMBOL_GPL(snd_hdac_bus_exit_link_reset);
/* reset codec link */ static int azx_reset(struct hdac_bus *bus, bool full_reset) @@ -247,7 +249,7 @@ static int azx_reset(struct hdac_bus *bus, bool full_reset) azx_writew(bus, STATESTS, STATESTS_INT_MASK);
/* reset controller */ - azx_enter_link_reset(bus); + snd_hdac_bus_enter_link_reset(bus);
/* delay for >= 100us for codec PLL to settle per spec * Rev 0.9 section 5.5.1 @@ -255,7 +257,7 @@ static int azx_reset(struct hdac_bus *bus, bool full_reset) usleep_range(500, 1000);
/* Bring controller out of reset */ - azx_exit_link_reset(bus); + snd_hdac_bus_exit_link_reset(bus);
/* Brent Chartrand said to wait >= 540us for codecs to initialize */ usleep_range(1000, 1200);