Title: [9857] trunk: mtd: drop xip patches
- Revision
- 9857
- Author
- vapier
- Date
- 2011-04-15 22:51:23 -0400 (Fri, 15 Apr 2011)
Log Message
mtd: drop xip patches
We've been carrying around these two patches for a while:
mtd: physmap: add physmap_unmapped_area() for no-mmu XIP
mtd: physmap: allow maps to be read-only mapped
They basically force physmap mappings to be read-only mappable.
Upstream wasn't too keen on this for various reasons (see [1]).
However, this isn't too big a deal as ultimately the same thing
can be attained by setting .probe_type in the platform resources
to "map_rom". So punt these two patches.
Tested on bf548-ezkit:
...
physmap platform flash device: 02000000 at 20000000
cmdlinepart partition parsing not available
RedBoot partition parsing not available
Using physmap partition information
Creating 3 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000080000 : "bootloader(nor)"
0x000000080000-0x000000480000 : "linux kernel(nor)"
0x000000480000-0x000002000000 : "file system(nor)"
...
VFS: Mounted root (romfs filesystem) readonly on device 31:2.
...
root:/> grep ^2 /proc/maps
20492310-20494618 r-xs 00000000 1f:02 74480 /bin/inetd
20494ea0-20496000 r-xs 00000000 1f:02 85632 /bin/watchdogd
204968c0-204ebd94 r-xs 00000000 1f:02 92320 /bin/busybox
20540b80-2054eafc r-xs 00000000 1f:02 789344 /lib/libgcc_s.so.1
2054ff50-20586210 r-xs 00000000 1f:02 851760 /lib/libc.so.0
20588160-2058cc40 r-xs 00000000 1f:02 1081664 /lib/ld-uClibc.so.0
...
root:/> cat /proc/cmdline
root=/dev/mtdblock2 panic=3 console=ttyBF1,57600 clkin_hz=25000000 earlyprintk=serial,uart1,57600 ro
...
root:/> cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 02000000 "bootloader(nor)"
mtd1: 00400000 02000000 "linux kernel(nor)"
mtd2: 01b80000 02000000 "file system(nor)"
...
1: http://lists.infradead.org/pipermail/linux-mtd/2010-August/031255.html
Modified Paths
Removed Paths
Diff
Modified: trunk/drivers/mtd/maps/physmap.c (9856 => 9857)
--- trunk/drivers/mtd/maps/physmap.c 2011-04-15 21:28:28 UTC (rev 9856)
+++ trunk/drivers/mtd/maps/physmap.c 2011-04-16 02:51:23 UTC (rev 9857)
@@ -19,7 +19,6 @@
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#include <linux/mtd/concat.h>
-#include <linux/mtd/mtdbdi.h>
#include <linux/io.h>
#define MAX_RESOURCES 4
@@ -73,20 +72,6 @@
return 0;
}
-/*
- * Allow NOMMU mmap() to directly map the device (if not NULL)
- * - return the address to which the offset maps
- * - return -ENOSYS to indicate refusal to do the mapping
- */
-static unsigned long physmap_unmapped_area(struct mtd_info *mtd,
- unsigned long len,
- unsigned long offset,
- unsigned long flags)
-{
- struct map_info *map = mtd->priv;
- return (unsigned long) map->virt + offset;
-}
-
static const char *rom_probe_types[] = {
"cfi_probe",
"jedec_probe",
@@ -164,9 +149,6 @@
} else {
devices_found++;
}
- if (info->mtd[i]->get_unmapped_area == NULL)
- info->mtd[i]->get_unmapped_area = physmap_unmapped_area;
- info->mtd[i]->backing_dev_info = &mtd_bdi_ro_mappable;
info->mtd[i]->owner = THIS_MODULE;
info->mtd[i]->dev.parent = &dev->dev;
}
Modified: trunk/drivers/mtd/mtdcore.c (9856 => 9857)
--- trunk/drivers/mtd/mtdcore.c 2011-04-15 21:28:28 UTC (rev 9856)
+++ trunk/drivers/mtd/mtdcore.c 2011-04-16 02:51:23 UTC (rev 9857)
@@ -37,7 +37,6 @@
#include <linux/gfp.h>
#include <linux/mtd/mtd.h>
-#include <linux/mtd/mtdbdi.h>
#include "mtdcore.h"
/*
@@ -47,7 +46,6 @@
struct backing_dev_info mtd_bdi_unmappable = {
.capabilities = BDI_CAP_MAP_COPY,
};
-EXPORT_SYMBOL(mtd_bdi_unmappable);
/*
* backing device capabilities for R/O mappable devices (such as ROM)
@@ -58,7 +56,6 @@
.capabilities = (BDI_CAP_MAP_COPY | BDI_CAP_MAP_DIRECT |
BDI_CAP_EXEC_MAP | BDI_CAP_READ_MAP),
};
-EXPORT_SYMBOL(mtd_bdi_ro_mappable);
/*
* backing device capabilities for writable mappable devices (such as RAM)
@@ -70,7 +67,6 @@
BDI_CAP_EXEC_MAP | BDI_CAP_READ_MAP |
BDI_CAP_WRITE_MAP),
};
-EXPORT_SYMBOL(mtd_bdi_rw_mappable);
static int mtd_cls_suspend(struct device *dev, pm_message_t state);
static int mtd_cls_resume(struct device *dev);
Deleted: trunk/include/linux/mtd/mtdbdi.h (9856 => 9857)
--- trunk/include/linux/mtd/mtdbdi.h 2011-04-15 21:28:28 UTC (rev 9856)
+++ trunk/include/linux/mtd/mtdbdi.h 2011-04-16 02:51:23 UTC (rev 9857)
@@ -1,17 +0,0 @@
-/* Internal MTD definitions
- *
- * Copyright © 2006 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells ([email protected])
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-/*
- * mtdcore.c
- */
-extern struct backing_dev_info mtd_bdi_unmappable;
-extern struct backing_dev_info mtd_bdi_ro_mappable;
-extern struct backing_dev_info mtd_bdi_rw_mappable;
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits