On 02/19/2013 04:35 AM, Philipp Zabel wrote:
The SRC has auto-deasserting reset bits that control reset lines to
the GPU, VPU, IPU, and OpenVG IP modules. This patch adds a reset
controller that can be controlled by those devices using the
reset controller API.
quoted hunk
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
+static int imx_src_reset(struct reset_controller_dev *rcdev,
+ unsigned long sw_reset_idx)
...
+ if (sw_reset_idx >= ARRAY_SIZE(sw_reset_bits))
+ return -EINVAL;
If each reset controller were to implement an "of_xlate" function, that
error-checking could be implemented there instead. Although that would
prevent using a common shared of_xlate implementation, unless you also
add a "max reset ID" field to struct reset_controller_dev.