/* * CCU Divider private clock IDs * @CCU_SYS_SATA_CLK: CCU SATA internal clock * @CCU_SYS_XGMAC_CLK: CCU XGMAC internal clock
*/ #define CCU_SYS_SATA_CLK -1 #define CCU_SYS_XGMAC_CLK -2
/* * CCU Divider private flags * @CCU_DIV_BASIC: Basic divider clock required by the kernel as early as * possible. * @CCU_DIV_SKIP_ONE: Due to some reason divider can't be set to 1. * It can be 0 though, which is functionally the same. * @CCU_DIV_SKIP_ONE_TO_THREE: For some reason divider can't be within [1,3]. * It can be either 0 or greater than 3. * @CCU_DIV_LOCK_SHIFTED: Find lock-bit at non-standard position. * @CCU_DIV_RESET_DOMAIN: There is a clock domain reset handle.
*/ #define CCU_DIV_BASIC BIT(0) #define CCU_DIV_SKIP_ONE BIT(1) #define CCU_DIV_SKIP_ONE_TO_THREE BIT(2) #define CCU_DIV_LOCK_SHIFTED BIT(3) #define CCU_DIV_RESET_DOMAIN BIT(4)
/* * enum ccu_div_type - CCU Divider types * @CCU_DIV_VAR: Clocks gate with variable divider. * @CCU_DIV_GATE: Clocks gate with fixed divider. * @CCU_DIV_BUF: Clock gate with no divider. * @CCU_DIV_FIXED: Ungateable clock with fixed divider.
*/ enum ccu_div_type {
CCU_DIV_VAR,
CCU_DIV_GATE,
CCU_DIV_BUF,
CCU_DIV_FIXED
};
/* * struct ccu_div_init_data - CCU Divider initialization data * @id: Clocks private identifier. * @name: Clocks name. * @parent_name: Parent clocks name in a fw node. * @base: Divider register base address with respect to the sys_regs base. * @sys_regs: Baikal-T1 System Controller registers map. * @np: Pointer to the node describing the CCU Dividers. * @type: CCU divider type (variable, fixed with and without gate). * @width: Divider width if it's variable. * @divider: Divider fixed value. * @flags: CCU Divider clock flags. * @features: CCU Divider private features.
*/ struct ccu_div_init_data { unsignedint id; constchar *name; constchar *parent_name; unsignedint base; struct regmap *sys_regs; struct device_node *np; enum ccu_div_type type; union { unsignedint width; unsignedint divider;
}; unsignedlong flags; unsignedlong features;
};
/* * struct ccu_div - CCU Divider descriptor * @hw: clk_hw of the divider. * @id: Clock private identifier. * @reg_ctl: Divider control register base address. * @sys_regs: Baikal-T1 System Controller registers map. * @lock: Divider state change spin-lock. * @mask: Divider field mask. * @divider: Divider fixed value. * @flags: Divider clock flags. * @features: CCU Divider private features.
*/ struct ccu_div { struct clk_hw hw; unsignedint id; unsignedint reg_ctl; struct regmap *sys_regs;
spinlock_t lock; union {
u32 mask; unsignedint divider;
}; unsignedlong flags; unsignedlong features;
}; #define to_ccu_div(_hw) container_of(_hw, struct ccu_div, hw)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.