blob: 28e5a61d4abc38efa889bb6b26bf8acb72eccadb [file] [log] [blame]
Tony Lindgren49a0a3d2017-12-15 09:41:05 -08001#ifndef __TI_SYSC_DATA_H__
2#define __TI_SYSC_DATA_H__
3
Tony Lindgren70a65242017-12-15 09:41:09 -08004enum ti_sysc_module_type {
5 TI_SYSC_OMAP2,
6 TI_SYSC_OMAP2_TIMER,
7 TI_SYSC_OMAP3_SHAM,
8 TI_SYSC_OMAP3_AES,
9 TI_SYSC_OMAP4,
10 TI_SYSC_OMAP4_TIMER,
11 TI_SYSC_OMAP4_SIMPLE,
12 TI_SYSC_OMAP34XX_SR,
13 TI_SYSC_OMAP36XX_SR,
14 TI_SYSC_OMAP4_SR,
15 TI_SYSC_OMAP4_MCASP,
16 TI_SYSC_OMAP4_USB_HOST_FS,
17};
18
Tony Lindgren49a0a3d2017-12-15 09:41:05 -080019/**
20 * struct sysc_regbits - TI OCP_SYSCONFIG register field offsets
21 * @midle_shift: Offset of the midle bit
22 * @clkact_shift: Offset of the clockactivity bit
23 * @sidle_shift: Offset of the sidle bit
24 * @enwkup_shift: Offset of the enawakeup bit
25 * @srst_shift: Offset of the softreset bit
26 * @autoidle_shift: Offset of the autoidle bit
27 * @dmadisable_shift: Offset of the dmadisable bit
28 * @emufree_shift; Offset of the emufree bit
29 *
30 * Note that 0 is a valid shift, and for ti-sysc.c -ENODEV can be used if a
31 * feature is not available.
32 */
33struct sysc_regbits {
34 s8 midle_shift;
35 s8 clkact_shift;
36 s8 sidle_shift;
37 s8 enwkup_shift;
38 s8 srst_shift;
39 s8 autoidle_shift;
40 s8 dmadisable_shift;
41 s8 emufree_shift;
42};
43
Tony Lindgren566a9b052017-12-15 09:41:19 -080044#define SYSC_QUIRK_NO_IDLE_ON_INIT BIT(6)
45#define SYSC_QUIRK_NO_RESET_ON_INIT BIT(5)
46#define SYSC_QUIRK_OPT_CLKS_NEEDED BIT(4)
47#define SYSC_QUIRK_OPT_CLKS_IN_RESET BIT(3)
Tony Lindgrena7199e22017-12-15 09:41:14 -080048#define SYSC_QUIRK_16BIT BIT(2)
Tony Lindgren70a65242017-12-15 09:41:09 -080049#define SYSC_QUIRK_UNCACHED BIT(1)
50#define SYSC_QUIRK_USE_CLOCKACT BIT(0)
51
52/**
53 * struct sysc_capabilities - capabilities for an interconnect target module
54 *
55 * @sysc_mask: bitmask of supported SYSCONFIG register bits
56 * @regbits: bitmask of SYSCONFIG register bits
57 * @mod_quirks: bitmask of module specific quirks
58 */
59struct sysc_capabilities {
60 const enum ti_sysc_module_type type;
61 const u32 sysc_mask;
62 const struct sysc_regbits *regbits;
63 const u32 mod_quirks;
64};
65
66/**
67 * struct sysc_config - configuration for an interconnect target module
Tony Lindgren566a9b052017-12-15 09:41:19 -080068 * @srst_udelay: optional delay needed after OCP soft reset
Tony Lindgren70a65242017-12-15 09:41:09 -080069 * @quirks: bitmask of enabled quirks
70 */
71struct sysc_config {
Tony Lindgren566a9b052017-12-15 09:41:19 -080072 u8 srst_udelay;
Tony Lindgren70a65242017-12-15 09:41:09 -080073 u32 quirks;
74};
75
Tony Lindgren49a0a3d2017-12-15 09:41:05 -080076#endif /* __TI_SYSC_DATA_H__ */