2015-05-15 |
mtd: Fix function prototype
...
mtd_op_protect must return int instead of size_t.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 15 May 2015
|
2015-05-06 |
Merge branch 'for-next/misc'
Sascha Hauer
committed
on 6 May 2015
|
2015-05-01 |
mtd: of_mtd_fixup(): fix given DT not the default one
...
We have to start searching for the mtd node starting in the given root node not
the defaukt (= barebox internal) one. This means the internal DT is always
fixed up. This leads to booting not fixed up DT when using external DTs.
This patch fixes the problem.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Marc Kleine-Budde
authored
on 30 Apr 2015
Sascha Hauer
committed
on 1 May 2015
|
2015-04-28 |
mtd: partition: Fix OF partition fixup
...
To get the number of address cells and size cells we have to use
the newly created partition node, not the parent device node. The
parent device node returns the address/size cells of the controller
node, not the partition node.
On an am335x machine this fixes the device tree passed to Linux.
The situation there is:
...
gpmc@50000000 {
...
#address-cells = <0x2>;
#size-cells = <0x1>;
ranges = <0x0 0x0 0x8000000 0x10000000>;
...
nand@0,0 {
reg = <0x0 0x0 0x0>;
#address-cells = <0x1>;
#size-cells = <0x1>;
...
partition@7 {
label = "system";
reg = <0x220000 0x7de0000>;
};
};
};
and without this patch barebox passes three bytes for
partition@7's reg property instead of only two which naturally
confuses Linux and yields to the system partition to start at 0
with a size of 0x220000.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sascha Hauer
committed
on 28 Apr 2015
|
2015-02-12 |
mtd: fixup device tree partitions
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 12 Feb 2015
|
mtd: Add a partitions parameter to mtd devices
...
The partitions parameter allows to partition a mtd device
using a standard cmdline partition description string. This
way the partitions of a mtd device can be changed at once.
The output of the string can be used to be passed to the kernel
as cmdline partition string. The partitions can also still be
changed with addpart/delpart, the partitions parameter will
be updated accordingly.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 12 Feb 2015
|
mtd: forbid conflicting mtd partitions
...
mtd partitions should not conflict with each other, so forbid this.
Also add the partitions to the partitions list sorted, so that they
can be easier translated into a cmdline partition string.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 12 Feb 2015
|
mtd: nand: remove automatically created bb devices
...
the bb devices which are created in add_mtd_device() must be removed
in del_mtd_device(). Also remove deletion of the bb devices in the
mtdparts-add environment file.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 12 Feb 2015
|
mtd: Add partitions to list
...
So that we can iterate over the existing partitions from the master
mtd device.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 12 Feb 2015
|
mtd: core: add error checks
...
register_device and devfs_create can fail. Add error checks for these.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 12 Feb 2015
|
2015-02-10 |
mtd: Fix allowing to erase bad blocks on partitions
...
Partitions are mtd devices themselves, but the 'erasebad'
parameter is only set to the master mtd device. To allow to
erase bad blocks on partitions test the master device instead
of the partition devices.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 10 Feb 2015
|
2014-06-13 |
mtd: use long long dev param for size
...
Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Herve Codina
authored
on 12 Jun 2014
Sascha Hauer
committed
on 13 Jun 2014
|
2014-06-10 |
mtd: Fix writesize parameter value
...
Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Herve Codina
authored
on 9 Jun 2014
Sascha Hauer
committed
on 10 Jun 2014
|
2014-04-28 |
mtd: nand: create bb devices automatically
...
When a mtd device can have bad blocks we want to create a
bb device, so do this automatically. This allows us to
drop bb device creation from the environment.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 28 Apr 2014
|
2014-03-12 |
mtd: Update internal API to support 64-bit device size
...
MTD internal API presently uses 32-bit values to represent device
size. This patch updates them to 64-bits but leaves the external API
unchanged.
In general, changing from 32-bit to 64-bit values cause little
or no changes to the majority of the code with the following
exceptions:
- printk message formats;
- division and modulus of 64-bit values (mtd_div_by_wb,
mtd_div_by_eb may be used in some of such cases).
Was tested on phyFLEX i.MX6.
Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
Signed-off-by: Grigory Milev <g.milev@sam-solutions.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Dmitry Lavnikevich
authored
on 10 Mar 2014
Sascha Hauer
committed
on 12 Mar 2014
|
2014-02-26 |
mtd: register mtd partitions as real mtd devices
...
So far mtd partitions were mtd devices, but these were not registered.
This patch changes this. mtd partitions are now registered like real
mtd devices. This makes them part of the device hierarchy.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 26 Feb 2014
|
mtd: Only call of_parse_partitions when the mtd has a parent
...
mtd->parent is optional so we can't derefence mtd->parent->device_node
without checking mtd->parent.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 26 Feb 2014
|
mtd: erase_info may be modified in mtd_erase
...
erase_info may be modified by the mtd partition code, so
set the address each time we call mtd_erase.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 26 Feb 2014
|
2013-12-20 |
mtd: Add subpagesize to mtd_info_user
...
ubiformat needs the subpagesize to work correctly. The kernel uses
sysfs to pass the subpagesize, but in barebox we have the possibility
to extend struct mtd_info_user. Add a corresponding field and use it
in ubiformat.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 20 Dec 2013
|
mtd: fix mtd_read return value
...
mtd->read returns the number of bitflips as positive numbers.
Instead of returning these numbers Return -EUCLEAN when the bitflip
threshold has been reached, 0 otherwise.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 20 Dec 2013
|
mtd: fix wrong return values in cdev read
...
mtd->read returns the number of bitflips as positive numbers.
Instead of returning these numbers Return -EUCLEAN when the bitflip
threshold has been reached, 0 otherwise.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 20 Dec 2013
|
2013-11-08 |
treewide: Add missing includes
...
A lot of files rely on include/driver.h including include/of.h (and
this including include/errno.h. include the files explicitly so we can
eventually get rid of including of.h from driver.h
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Nov 2013
|
2013-10-29 |
mtd: Pass device_id to add_mtd_device
...
Right now we do not support persistent names for mtd devices. The
base name can be passed to add_mtd_device, but this is always appended
with a dynamic number. With this patch add_mtd_device takes a device_id
argument which can be used to create a mtd device with an exact name.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 29 Oct 2013
|
2013-08-05 |
Merge branch 'for-next/of'
...
Conflicts:
arch/arm/boards/freescale-mx53-loco/board.c
drivers/of/Makefile
Sascha Hauer
committed
on 5 Aug 2013
|
2013-07-22 |
mtd: introduce mtd_read_oob and mtd_write_oob
...
Directly copied from the Kernel as of 3.11-rc1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 22 Jul 2013
|
2013-07-18 |
mtd: Add devicetree partition parsing
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 18 Jul 2013
|
2013-07-01 |
Merge branch 'for-next/mtd'
Sascha Hauer
committed
on 1 Jul 2013
|
2013-06-21 |
mtd: Fix size_t printf format specifier
...
use 0x%08zx for size_t instead of 0x%08x
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 21 Jun 2013
|
2013-06-06 |
mtd: Align erase_op to eraseblock boundaries
...
Our erase command used to align to eraseblocks when necessary.
This worked well until recently when the m25p80, mtd_dataflash
and cfi flash were added / converted to mtd. This patch aligns
the input to the erase fileoperation to eraseblock boundaries.
Also tested with non uniform flashes with multiple eraseregions.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 6 Jun 2013
|
2013-05-27 |
mtd: call mtd_erase with complete area if possible
...
If a device does not have bad blocks loop over the eraseblocks
in the driver instead of the core. This allows the mtd_dataflash
driver to erase blocks instead of pages to gain more speed during
erasing. Also the mtd_dataflash driver modifies the erase_info
struct which causes the outer loop in the core to never end.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 27 May 2013
|