diff options
author | marius <marius@FreeBSD.org> | 2017-05-10 21:42:12 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2017-05-10 21:42:12 +0000 |
commit | c0ac95fd0ac9f0466a427d868118f4f039cb453c (patch) | |
tree | 76fb82e6dd22147d9bef81c99a08d562618ca34b /sys/powerpc/mikrotik | |
parent | dcde69b03b85cf7ea79958caad181b7dcf93f7b4 (diff) | |
download | FreeBSD-src-c0ac95fd0ac9f0466a427d868118f4f039cb453c.zip FreeBSD-src-c0ac95fd0ac9f0466a427d868118f4f039cb453c.tar.gz |
MFC: r314097
- Allow different slicers for different flash types to be registered
with geom_flashmap(4) and teach it about MMC for slicing enhanced
user data area partitions. The FDT slicer still is the default for
CFI, NAND and SPI flash on FDT-enabled platforms.
- In addition to a device_t, also pass the name of the GEOM provider
in question to the slicers as a single device may provide more than
one provider.
- Build a geom_flashmap.ko.
- Use MODULE_VERSION() so other modules can depend on geom_flashmap(4).
- Remove redundant/superfluous GEOM routines that either do nothing
or provide/just call default GEOM (slice) functionality.
- Trim/adjust includes
Diffstat (limited to 'sys/powerpc/mikrotik')
-rw-r--r-- | sys/powerpc/mikrotik/platform_rb.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/sys/powerpc/mikrotik/platform_rb.c b/sys/powerpc/mikrotik/platform_rb.c index 39de29e..e05c59b 100644 --- a/sys/powerpc/mikrotik/platform_rb.c +++ b/sys/powerpc/mikrotik/platform_rb.c @@ -32,15 +32,12 @@ __FBSDID("$FreeBSD$"); #include <sys/kernel.h> #include <sys/bus.h> #include <sys/malloc.h> -#include <sys/slicer.h> #include <sys/smp.h> #include <machine/platform.h> #include <machine/platformvar.h> -#include <dev/nand/nand.h> #include <dev/ofw/openfirm.h> -#include <geom/geom_disk.h> #include <powerpc/mpc85xx/mpc85xx.h> @@ -59,39 +56,6 @@ DEFINE_CLASS_1(rb, rb_platform, rb_methods, 0, mpc85xx_platform); PLATFORM_DEF(rb_platform); -/* Slicer operates on the NAND controller, so we have to find the chip. */ -static int -rb_nand_slicer(device_t dev, struct flash_slice *slices, int *nslices) -{ - struct nand_chip *chip; - device_t *children; - int n; - - if (device_get_children(dev, &children, &n) != 0) { - panic("Slicer called on controller with no child!"); - } - dev = children[0]; - free(children, M_TEMP); - - if (device_get_children(dev, &children, &n) != 0) { - panic("Slicer called on controller with nandbus but no child!"); - } - dev = children[0]; - free(children, M_TEMP); - - chip = device_get_softc(dev); - *nslices = 2; - slices[0].base = 0; - slices[0].size = 4 * 1024 * 1024; - slices[0].label = "boot"; - - slices[1].base = 4 * 1024 * 1024; - slices[1].size = chip->ndisk->d_mediasize - slices[0].size; - slices[1].label = "rootfs"; - - return (0); -} - static int rb_probe(platform_t plat) { @@ -117,7 +81,5 @@ rb_attach(platform_t plat) if (error) return (error); - flash_register_slicer(rb_nand_slicer); - return (0); } |