Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: rawnand: ams-delta: Drop board specific partition info

Now as we support fetching partition info from device platform data and
the Amstrad Delta board file provides that info, drop it from the
driver code.

v2: rebase on top of gpio_nand_platdata extension

Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200212003929.6682-5-jmkrzyszt@gmail.com

authored by

Janusz Krzysztofik and committed by
Miquel Raynal
d7ffe387 38c30b3c

+2 -27
+2 -27
drivers/mtd/nand/raw/ams-delta.c
··· 42 42 bool data_in; 43 43 }; 44 44 45 - /* 46 - * Define partitions for flash devices 47 - */ 48 - 49 - static const struct mtd_partition partition_info[] = { 50 - { .name = "Kernel", 51 - .offset = 0, 52 - .size = 3 * SZ_1M + SZ_512K }, 53 - { .name = "u-boot", 54 - .offset = 3 * SZ_1M + SZ_512K, 55 - .size = SZ_256K }, 56 - { .name = "u-boot params", 57 - .offset = 3 * SZ_1M + SZ_512K + SZ_256K, 58 - .size = SZ_256K }, 59 - { .name = "Amstrad LDR", 60 - .offset = 4 * SZ_1M, 61 - .size = SZ_256K }, 62 - { .name = "File system", 63 - .offset = 4 * SZ_1M + 1 * SZ_256K, 64 - .size = 27 * SZ_1M }, 65 - { .name = "PBL reserved", 66 - .offset = 32 * SZ_1M - 3 * SZ_256K, 67 - .size = 3 * SZ_256K }, 68 - }; 69 - 70 45 static void ams_delta_write_commit(struct ams_delta_nand *priv) 71 46 { 72 47 gpiod_set_value(priv->gpiod_nwe, 0); ··· 197 222 static int ams_delta_init(struct platform_device *pdev) 198 223 { 199 224 struct gpio_nand_platdata *pdata = dev_get_platdata(&pdev->dev); 200 - const struct mtd_partition *partitions = partition_info; 201 - int num_partitions = ARRAY_SIZE(partition_info); 225 + const struct mtd_partition *partitions = NULL; 226 + int num_partitions = 0; 202 227 struct ams_delta_nand *priv; 203 228 struct nand_chip *this; 204 229 struct mtd_info *mtd;