memory: ti-aemif: Export aemif_*_cs_timings()
Export the aemif_set_cs_timing() and aemif_check_cs_timing() symbols so they can be used by other drivers Add a mutex to protect the CS configuration register from concurrent accesses between the AEMIF and its 'children'. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20241204094319.1050826-7-bastien.curutchet@bootlin.com [krzysztof: wrap aemif_set_cs_timings() at 80-char] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
This commit is contained in:
committed by
Krzysztof Kozlowski
parent
a6d60e3376
commit
df8e78607d
32
include/linux/memory/ti-aemif.h
Normal file
32
include/linux/memory/ti-aemif.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
|
||||
#ifndef __MEMORY_TI_AEMIF_H
|
||||
#define __MEMORY_TI_AEMIF_H
|
||||
|
||||
/**
|
||||
* struct aemif_cs_timings: structure to hold CS timing configuration
|
||||
* values are expressed in number of clock cycles - 1
|
||||
* @ta: minimum turn around time
|
||||
* @rhold: read hold width
|
||||
* @rstrobe: read strobe width
|
||||
* @rsetup: read setup width
|
||||
* @whold: write hold width
|
||||
* @wstrobe: write strobe width
|
||||
* @wsetup: write setup width
|
||||
*/
|
||||
struct aemif_cs_timings {
|
||||
u32 ta;
|
||||
u32 rhold;
|
||||
u32 rstrobe;
|
||||
u32 rsetup;
|
||||
u32 whold;
|
||||
u32 wstrobe;
|
||||
u32 wsetup;
|
||||
};
|
||||
|
||||
struct aemif_device;
|
||||
|
||||
int aemif_set_cs_timings(struct aemif_device *aemif, u8 cs, struct aemif_cs_timings *timings);
|
||||
int aemif_check_cs_timings(struct aemif_cs_timings *timings);
|
||||
|
||||
#endif // __MEMORY_TI_AEMIF_H
|
||||
Reference in New Issue
Block a user