kernel: add missing patch
[oweals/openwrt.git] / target / linux / generic / pending-4.9 / 430-mtd-add-myloader-partition-parser.patch
1 From: Florian Fainelli <f.fainelli@gmail.com>
2 Subject: Add myloader partition table parser
3
4 [john@phozen.org: shoud be upstreamable]
5
6 lede-commit: d8bf22859b51faa09d22c056fe221a45d2f7a3b8
7 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
8 ---
9  drivers/mtd/Kconfig  | 16 ++++++++++++++++
10  drivers/mtd/Makefile |  1 +
11  2 files changed, 17 insertions(+)
12
13 diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
14 index 4185e04760dd..cb55144d4db6 100644
15 --- a/drivers/mtd/Kconfig
16 +++ b/drivers/mtd/Kconfig
17 @@ -178,6 +178,22 @@ menu "Partition parsers"
18  source "drivers/mtd/parsers/Kconfig"
19  endmenu
20  
21 +config MTD_MYLOADER_PARTS
22 +       tristate "MyLoader partition parsing"
23 +       depends on ADM5120 || ATH25 || ATH79
24 +       ---help---
25 +         MyLoader is a bootloader which allows the user to define partitions
26 +         in flash devices, by putting a table in the second erase block
27 +         on the device, similar to a partition table. This table gives the 
28 +         offsets and lengths of the user defined partitions.
29 +
30 +         If you need code which can detect and parse these tables, and
31 +         register MTD 'partitions' corresponding to each image detected,
32 +         enable this option.
33 +
34 +         You will still need the parsing functions to be called by the driver
35 +         for your particular device. It won't happen automatically.
36 +
37  comment "User Modules And Translation Layers"
38  
39  #
40 diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
41 index 48fd01e9f6e3..5bca69c63bdc 100644
42 --- a/drivers/mtd/Makefile
43 +++ b/drivers/mtd/Makefile
44 @@ -15,6 +15,7 @@ obj-$(CONFIG_MTD_AFS_PARTS)   += afs.o
45  obj-$(CONFIG_MTD_AR7_PARTS)    += ar7part.o
46  obj-$(CONFIG_MTD_BCM63XX_PARTS)        += bcm63xxpart.o
47  obj-$(CONFIG_MTD_BCM47XX_PARTS)        += bcm47xxpart.o
48 +obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o
49  obj-y                          += parsers/
50  
51  # 'Users' - code which presents functionality to userspace.
52 -- 
53 2.11.0
54