From: Paul Walmsley Date: Tue, 14 Dec 2010 19:42:35 +0000 (-0700) Subject: OMAP2+: hwmod: add support for per-class custom device reset functions X-Git-Tag: v2.6.38-rc1~469^2~15^2~68 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd36179eec2827cd60b4a8c6e180cc030c74a4ec;p=pandora-kernel.git OMAP2+: hwmod: add support for per-class custom device reset functions The standard omap_hwmod.c _reset() code relies on an IP block's OCP_SYSCONFIG.SOFTRESET register bit to reset the IP block. This works for most IP blocks on the chip, but unfortunately not all. For example, initiator-only IP blocks often don't have any MPU-accessible OCP-header registers, and therefore the MPU can't write to any OCP_SYSCONFIG registers in that block. Other IP blocks, such as the IVA and I2C, require a specialized reset sequence. Since we need to be able to reset these IP blocks as well, allow custom IP block reset functions to be passed into the hwmod code via a per-hwmod-class reset function pointer, struct omap_hwmod_class.reset. If .reset is non-null, then the hwmod _reset() code will call the custom function instead of the standard OCP SOFTRESET-based code. As part of this change, rename most of the existing _reset() function code to _ocp_softreset(), to indicate more clearly that it does not work for all cases. Signed-off-by: Paul Walmsley Cc: BenoƮt Cousson Cc: Paul Hunt Cc: Stanley Liu --- Reading git-diff-tree failed