[PATCH 46/51] ARM: mx3: dynamically allocate mxc_rnga devices

Fabio Estevam festevam at gmail.com
Wed Nov 17 18:56:29 EST 2010


Hi Uwe,

2010/11/17 Uwe Kleine-König <u.kleine-koenig at pengutronix.de>:
> +#define imx_mxc_rnga_data_entry_single(soc, _size)                     \
> +       {                                                               \
> +               .iobase = soc ## _RNGA_BASE_ADDR,                       \
> +       }

_size is not used here. I think you should add .iosize = _size

> +#ifdef CONFIG_SOC_IMX31
> +static const struct imx_mxc_rnga_data imx31_mxc_rnga_data __initconst =
> +       imx_mxc_rnga_data_entry_single(MX31, SZ_4K);

This should be SZ_16K,

> +#endif /* ifdef CONFIG_SOC_IMX31 */
> +
> +static struct platform_device *__init imx_add_mxc_rnga(
> +               const struct imx_mxc_rnga_data *data)
> +{
> +       struct resource res[] = {
> +               {
> +                       .start = data->iobase,
> +                       .end = data->iobase + SZ_16K - 1,

Then here you should do:

 .end = data->iobase + data->iosize - 1,

Regards,

Fabio Estevam


More information about the linux-arm-kernel mailing list