[RFC v2 16/18] ARM: OMAP2+: AM33XX: Basic suspend resume support

Bedia, Vaibhav vaibhav.bedia at ti.com
Mon Jan 21 05:37:06 EST 2013


Hi Peter,

On Thu, Jan 17, 2013 at 19:57:20, Peter Korsgaard wrote:
> >>>>> "V" == Vaibhav Bedia <vaibhav.bedia at ti.com> writes:
> 
> Hi,
> 
>  V> +static void am33xx_pm_firmware_cb(const struct firmware *fw, void *context)
>  V> +{
>  V> +	struct wkup_m3_context *wkup_m3_context = context;
>  V> +	struct platform_device *pdev = to_platform_device(wkup_m3_context->dev);
>  V> +	int ret = 0;
>  V> +
>  V> +	/* no firmware found */
>  V> +	if (!fw) {
>  V> +		dev_err(wkup_m3_context->dev, "request_firmware failed\n");
>  V> +		goto err;
>  V> +	}
>  V> +
>  V> +	memcpy((void *)wkup_m3_context->code, fw->data, fw->size);
> 
> A size check would be good. I don't know much about the finer details
> about the m3 and how it is connected, but don't you need to ensure data
> is flushed before resetting the m3?
> 

Will add the reg property in the next version. The wkup-m3 memory is coming via
ioremap() so AFAIK it should be ok. I realized that I do need to replace the memcpy()
with memcpy_toio() here.

Thanks,
Vaibhav




More information about the linux-arm-kernel mailing list