mirror of https://github.com/thesofproject/sof.git
clk: add clocks pointer to sof main context
Adds pointer to platforms clock info to sof main context. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
parent
f4af2a6671
commit
452f8ef6d3
|
@ -12,6 +12,7 @@
|
||||||
#include <sof/common.h>
|
#include <sof/common.h>
|
||||||
#include <sof/lib/memory.h>
|
#include <sof/lib/memory.h>
|
||||||
|
|
||||||
|
struct clock_info;
|
||||||
struct dma_trace_data;
|
struct dma_trace_data;
|
||||||
struct ipc;
|
struct ipc;
|
||||||
struct sa;
|
struct sa;
|
||||||
|
@ -41,6 +42,9 @@ struct sof {
|
||||||
/* generic trace structure */
|
/* generic trace structure */
|
||||||
struct trace *trace;
|
struct trace *trace;
|
||||||
|
|
||||||
|
/* platform clock information */
|
||||||
|
struct clock_info *clocks;
|
||||||
|
|
||||||
__aligned(PLATFORM_DCACHE_ALIGN) int alignment[0];
|
__aligned(PLATFORM_DCACHE_ALIGN) int alignment[0];
|
||||||
} __aligned(PLATFORM_DCACHE_ALIGN);
|
} __aligned(PLATFORM_DCACHE_ALIGN);
|
||||||
|
|
||||||
|
|
|
@ -119,4 +119,6 @@ void platform_clock_init(struct sof *sof)
|
||||||
|
|
||||||
for (i = 0; i < NUM_CLOCKS; i++)
|
for (i = 0; i < NUM_CLOCKS; i++)
|
||||||
spinlock_init(&platform_clocks_info[i].lock);
|
spinlock_init(&platform_clocks_info[i].lock);
|
||||||
|
|
||||||
|
sof->clocks = clocks;
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,4 +90,6 @@ void platform_clock_init(struct sof *sof)
|
||||||
|
|
||||||
for (i = 0; i < NUM_CLOCKS; i++)
|
for (i = 0; i < NUM_CLOCKS; i++)
|
||||||
spinlock_init(&platform_clocks_info[i].lock);
|
spinlock_init(&platform_clocks_info[i].lock);
|
||||||
|
|
||||||
|
sof->clocks = clocks;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,4 +39,6 @@ void platform_clock_init(struct sof *sof)
|
||||||
|
|
||||||
spinlock_init(&platform_clocks_info[i].lock);
|
spinlock_init(&platform_clocks_info[i].lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sof->clocks = clocks;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,4 +78,6 @@ void platform_clock_init(struct sof *sof)
|
||||||
};
|
};
|
||||||
|
|
||||||
spinlock_init(&platform_clocks_info[CLK_SSP].lock);
|
spinlock_init(&platform_clocks_info[CLK_SSP].lock);
|
||||||
|
|
||||||
|
sof->clocks = clocks;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue