Call for testing: spi-mem driver for Aspeed SMC controllers

Lei Yu yulei.sh at bytedance.com
Tue Mar 8 20:47:24 AEDT 2022


On Tue, Mar 8, 2022 at 5:30 PM Cédric Le Goater <clg at kaod.org> wrote:
>
> Hello Lei,
>
> On 3/8/22 02:53, Lei Yu wrote:
> > On Mon, Mar 7, 2022 at 9:06 PM Cédric Le Goater <clg at kaod.org> wrote:
> >>
> >> Hello,
> >>
> >>    On 3/7/22 10:41, Lei Yu wrote:
> >>> We hit some issues with the new driver, and here is some detailed info.
> >>>
> >>> * Our system (not yet upstreamed) uses `mx66l51235f` as the FMC SPI
> >>> flash, and we created a QEMU model.
> >>>
> >>> * When the dts is like "default":
> >>>    &fmc {
> >>>           pinctrl-names = "default";
> >>>           status = "okay";
> >>>           flash at 0 {
> >>>                   status = "okay";
> >>>                   m25p,fast-read;
> >>>                   label = "bmc";
> >>>                   spi-max-frequency = <50000000>;
> >>>    #include "openbmc-flash-layout-64.dtsi"
> >>>           };
> >>>    };
> >>> 1. Run the image in ast2600-evb QEMU, it boots fine;
> >>> 2. We have a model (g220b) in QEMU that uses mx66l51235f as the fmc
> >>> SPI (`amc->fmc_model = "mx66l51235f";`), it boots with below error:
> >>>    [    1.848286] vmap allocation for size 268439552 failed: use
> >>> vmalloc=<size> to increase size
> >>>    [    1.848774] spi-aspeed-smc 1e620000.spi: ioremap failed for
> >>> resource [mem 0x20000000-0x2fffffff]
> >>>    [    1.849898] spi-aspeed-smc: probe of 1e620000.spi failed with error -12
> >>> 3. If I manually add vmalloc to the kernel command line (setenv
> >>> bootargs 'console=ttyS4,115200n8 root=/dev/ram rw vmalloc=400M'), the
> >>> above QEMU model boots fine.
> >>> 4. On the real system, it behaves the same as QEMU, that I need to add
> >>> `vmalloc=400M` to make it boot OK.
> >>
> >> I don't see why. Is that the same kernel version and config ?
> >>
> >> May be check the allocations in
> >>
> >>     /proc/vmallocinfo
> >
> > It shows a large area as below:
> >
> >   0xc1d30472-0x406b4a0c 268439552 __devm_ioremap_resource+0x178/0x1f0
> > phys=0x20000000 ioremap
>
> Is CONFIG_VMSPLIT_2G set ?

Yes, it's enabled in aspeed-g6/defconfig


More information about the openbmc mailing list