bus: ti-sysc: Make omap_hwmod_sysc_fields into sysc_regbits platform data
We want to be able to configure hwmod sysc data from ti-sysc driver using platform data callbacks. So let's make struct omap_hwmod_sysc_fields into struct sysc_data and have it available for both ti-sysc driver and hwmod code. Note that we can make it use s8 instead of u8 as the hwmod code uses the feature flags to check for this field. However, for ti-sysc we can use -ENODEV to indicate a feature is not supported in the hardware and can simplify the code that way. And let's add also emufree_shift as the dts files will be describing the hardware for the SYSCONFIG register capbilities mask. Cc: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
29
include/linux/platform_data/ti-sysc.h
Normal file
29
include/linux/platform_data/ti-sysc.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef __TI_SYSC_DATA_H__
|
||||
#define __TI_SYSC_DATA_H__
|
||||
|
||||
/**
|
||||
* struct sysc_regbits - TI OCP_SYSCONFIG register field offsets
|
||||
* @midle_shift: Offset of the midle bit
|
||||
* @clkact_shift: Offset of the clockactivity bit
|
||||
* @sidle_shift: Offset of the sidle bit
|
||||
* @enwkup_shift: Offset of the enawakeup bit
|
||||
* @srst_shift: Offset of the softreset bit
|
||||
* @autoidle_shift: Offset of the autoidle bit
|
||||
* @dmadisable_shift: Offset of the dmadisable bit
|
||||
* @emufree_shift; Offset of the emufree bit
|
||||
*
|
||||
* Note that 0 is a valid shift, and for ti-sysc.c -ENODEV can be used if a
|
||||
* feature is not available.
|
||||
*/
|
||||
struct sysc_regbits {
|
||||
s8 midle_shift;
|
||||
s8 clkact_shift;
|
||||
s8 sidle_shift;
|
||||
s8 enwkup_shift;
|
||||
s8 srst_shift;
|
||||
s8 autoidle_shift;
|
||||
s8 dmadisable_shift;
|
||||
s8 emufree_shift;
|
||||
};
|
||||
|
||||
#endif /* __TI_SYSC_DATA_H__ */
|
Reference in New Issue
Block a user