RE: [EXT] Re: [PATCH 1/3] spi: spi-nxp-fspi: dynamically alloc AHB memory for FSPI

From: Han Xu
Date: Wed Jul 10 2019 - 11:35:52 EST




> -----Original Message-----
> From: Mark Brown <broonie@xxxxxxxxxx>
> Sent: Wednesday, July 10, 2019 10:16 AM
> To: Han Xu <han.xu@xxxxxxx>
> Cc: Ashish Kumar <ashish.kumar@xxxxxxx>; linux-spi@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; dl-linux-imx <linux-imx@xxxxxxx>
> Subject: [EXT] Re: [PATCH 1/3] spi: spi-nxp-fspi: dynamically alloc AHB memory
> for FSPI
>
> On Wed, Jul 10, 2019 at 10:31:26AM +0800, han.xu@xxxxxxx wrote:
> > From: Han Xu <han.xu@xxxxxxx>
> >
> > dynamically alloc AHB memory for FSPI controller
>
> Why? This is currently done at probe which is what you'd expect to happen
> here, there's no explanation as to why this change is being made.

Explained in cover letter, It failed to alloc the whole memory mapping area during
probe on some platforms, since the AHB memory area could be pretty large. The
error may look like:

[ 1.129404] fsl-quadspi 1550000.spi: ioremap failed for resource [mem 0x40000000-0x7fffffff]