Date: Wed, 27 Jan 2016 21:08:51 -0500 From: Steve Kiernan <stevek@juniper.net> To: Warner Losh <imp@bsdimp.com> Cc: Stanislav Galabov <sgalabov@gmail.com>, <freebsd-arm@freebsd.org>, <freebsd-mips@freebsd.org> Subject: Re: SPI geom_flashmap/fdt_slicer support, FDT 'resets=' support and a move of ohci_fdt.c Message-ID: <20160127210851.5c64c580@stevek-ubuntu.jnpr.net> In-Reply-To: <55D21A1C-E1E3-4800-8069-8EA98A8F85A0@bsdimp.com> References: <B4B24B7D-B3EE-4F37-9E89-24FF17294C70@gmail.com> <20160122173906.147bb7c2@stevek-ubuntu.jnpr.net> <CANiSyhR01wY65%2B2Nu%2B3Hucs%2BbDWyKhH_ejujG9CE39SaQQ2Wqg@mail.gmail.com> <20160127192015.64d0ded0@stevek-ubuntu.jnpr.net> <55D21A1C-E1E3-4800-8069-8EA98A8F85A0@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/njIM=mqhvIuzFh.n=y7DiAk Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 27 Jan 2016 18:11:24 -0700 Warner Losh <imp@bsdimp.com> wrote: >=20 > > On Jan 27, 2016, at 5:20 PM, Steve Kiernan <stevek@juniper.net> wrote: > >=20 > > On Sat, 23 Jan 2016 07:18:04 +0200 > > Stanislav Galabov <sgalabov@gmail.com> wrote: > >=20 > >> 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=3D165546 > >=20 > > One other thing that needs to be considered. The nand driver has an ioc= tl > > 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 a= nd > > SPI devices do not implement this and they probably should not as-is. > > Something more generic to flash devices that are handled by geom_flashm= ap > > is probably in order. >=20 > The different chip parameters shouldn=E2=80=99t be done through an ioctl = with geom. > It should be done with geom attributes. We should implement a sensible se= t 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 --Sig_/njIM=mqhvIuzFh.n=y7DiAk Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlapeDMACgkQZSuJlLuTi6iVbgCgsx6eP0hZ/aJD0+zldTDji3+t /1gAoKCpKyG9ydyOTLPHZo8RyMoEO1sQ =yAbi -----END PGP SIGNATURE----- --Sig_/njIM=mqhvIuzFh.n=y7DiAk--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160127210851.5c64c580>