SPI geom_flashmap/fdt_slicer support, FDT 'resets=' support and a move of ohci_fdt.c

Steve Kiernan stevek at juniper.net
Thu Jan 28 02:24:46 UTC 2016


On Wed, 27 Jan 2016 18:11:24 -0700
Warner Losh <imp at bsdimp.com> wrote:

> 
> > On Jan 27, 2016, at 5:20 PM, Steve Kiernan <stevek at juniper.net> wrote:
> > 
> > On Sat, 23 Jan 2016 07:18:04 +0200
> > Stanislav Galabov <sgalabov at gmail.com> wrote:
> > 
> >> It looks like only part of the original patch I submitted made it into head
> >> (only the mx25l part).
> >> We also need to change sys/conf/files as Steve pointed out, as well as
> >> sys/geom/geom_flashmap.c:
> >> https://bz-attachments.freebsd.org/attachment.cgi?id=165546
> > 
> > One other thing that needs to be considered. The nand driver has an ioctl
> > for getting chip parameters (see chip_param_io structure in
> > sys/dev/nand/nand_dev.h) and geom_flashmap only allows for
> > NAND_IO_GET_CHIP_PARAM to be passed to the provider. However, the CFI and
> > SPI devices do not implement this and they probably should not as-is.
> > Something more generic to flash devices that are handled by geom_flashmap
> > is probably in order.
> 
> The different chip parameters shouldn’t be done through an ioctl with geom.
> It should be done with geom attributes. We should implement a sensible set for
> all three and have geom_flashmap use those instead of the ioctl.

geom_flashmap doesn't seem to be using it itself, it's only using the geom
attributes NAND::device, CFI::device, or SPI::device.

It's just filtering the ioctls to only allow NAND_IO_GET_CHIP_PARAM to get
passed up to the provider.

However, I agree that there should be a sensible set to the get the chip
parameters, as the one thing missing from geom_flashmap is properly
restricting the slicing to be aligned to flash block requirements and
ensuring the slice is not larger than the size of the device.

-Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20160127/bd7ed31e/attachment.sig>


More information about the freebsd-arm mailing list