Commit c2f90a46 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Sebastian Reichel

HSI: omap-ssi: move omap_ssi_port_update_fclk

After the clk change support, the ssi omap ssi core driver
now calls into the port driver to change fclk. This function
was previously inside of an #ifdef, because it was only used
when CONFIG_PM is enabled. Now it also gets used without
power management support:

drivers/hsi/built-in.o: In function `ssi_clk_event':
omap_ssi_port.c:(.text+0x1bf8): undefined reference to `omap_ssi_port_update_fclk'

This moves the function outside of the CONFIG_PM guard.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Fixes: 4bcf7414 ("HSI: omap-ssi: add clk change support")
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent ac8e3ff3
...@@ -1253,6 +1253,23 @@ static int ssi_port_remove(struct platform_device *pd) ...@@ -1253,6 +1253,23 @@ static int ssi_port_remove(struct platform_device *pd)
return 0; return 0;
} }
static int ssi_restore_divisor(struct omap_ssi_port *omap_port)
{
writel_relaxed(omap_port->sst.divisor,
omap_port->sst_base + SSI_SST_DIVISOR_REG);
return 0;
}
void omap_ssi_port_update_fclk(struct hsi_controller *ssi,
struct omap_ssi_port *omap_port)
{
/* update divisor */
u32 div = ssi_calculate_div(ssi);
omap_port->sst.divisor = div;
ssi_restore_divisor(omap_port);
}
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int ssi_save_port_ctx(struct omap_ssi_port *omap_port) static int ssi_save_port_ctx(struct omap_ssi_port *omap_port)
{ {
...@@ -1305,24 +1322,6 @@ static int ssi_restore_port_mode(struct omap_ssi_port *omap_port) ...@@ -1305,24 +1322,6 @@ static int ssi_restore_port_mode(struct omap_ssi_port *omap_port)
return 0; return 0;
} }
static int ssi_restore_divisor(struct omap_ssi_port *omap_port)
{
writel_relaxed(omap_port->sst.divisor,
omap_port->sst_base + SSI_SST_DIVISOR_REG);
return 0;
}
void omap_ssi_port_update_fclk(struct hsi_controller *ssi,
struct omap_ssi_port *omap_port)
{
/* update divisor */
u32 div = ssi_calculate_div(ssi);
omap_port->sst.divisor = div;
ssi_restore_divisor(omap_port);
}
EXPORT_SYMBOL_GPL(omap_ssi_port_update_fclk);
static int omap_ssi_port_runtime_suspend(struct device *dev) static int omap_ssi_port_runtime_suspend(struct device *dev)
{ {
struct hsi_port *port = dev_get_drvdata(dev); struct hsi_port *port = dev_get_drvdata(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment