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

Merge tag 'omap-for-v3.9/gpmc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/drivers

From Tony Lindgren:
OMAP GPMC (General Purpose Memory Controller) changes to add
device tree bindings.

* tag 'omap-for-v3.9/gpmc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: OMAP2+: gpmc: Add device tree documentation for elm handle
ARM: OMAP2+: gpmc: add DT bindings for OneNAND
ARM: OMAP2+: gpmc-onenand: drop __init annotation
mtd: omap-onenand: pass device_node in platform data
ARM: OMAP2+: Prevent potential crash if GPMC probe fails
ARM: OMAP2+: gpmc: Remove unneeded of_node_put()
ARM: OMAP: gpmc: add DT bindings for GPMC timings and NAND
ARM: OMAP: gpmc: enable hwecc for AM33xx SoCs
ARM: OMAP: gpmc-nand: drop __init annotation
mtd: omap-nand: pass device_node in platform data
ARM: OMAP: gpmc: don't create devices from initcall on DT

Signed-off-by: Olof Johansson <olof@lixom.net>

+459 -12
+84
Documentation/devicetree/bindings/bus/ti-gpmc.txt
··· 1 + Device tree bindings for OMAP general purpose memory controllers (GPMC) 2 + 3 + The actual devices are instantiated from the child nodes of a GPMC node. 4 + 5 + Required properties: 6 + 7 + - compatible: Should be set to one of the following: 8 + 9 + ti,omap2420-gpmc (omap2420) 10 + ti,omap2430-gpmc (omap2430) 11 + ti,omap3430-gpmc (omap3430 & omap3630) 12 + ti,omap4430-gpmc (omap4430 & omap4460 & omap543x) 13 + ti,am3352-gpmc (am335x devices) 14 + 15 + - reg: A resource specifier for the register space 16 + (see the example below) 17 + - ti,hwmods: Should be set to "ti,gpmc" until the DT transition is 18 + completed. 19 + - #address-cells: Must be set to 2 to allow memory address translation 20 + - #size-cells: Must be set to 1 to allow CS address passing 21 + - gpmc,num-cs: The maximum number of chip-select lines that controller 22 + can support. 23 + - gpmc,num-waitpins: The maximum number of wait pins that controller can 24 + support. 25 + - ranges: Must be set up to reflect the memory layout with four 26 + integer values for each chip-select line in use: 27 + 28 + <cs-number> 0 <physical address of mapping> <size> 29 + 30 + Currently, calculated values derived from the contents 31 + of the per-CS register GPMC_CONFIG7 (as set up by the 32 + bootloader) are used for the physical address decoding. 33 + As this will change in the future, filling correct 34 + values here is a requirement. 35 + 36 + Timing properties for child nodes. All are optional and default to 0. 37 + 38 + - gpmc,sync-clk: Minimum clock period for synchronous mode, in picoseconds 39 + 40 + Chip-select signal timings corresponding to GPMC_CONFIG2: 41 + - gpmc,cs-on: Assertion time 42 + - gpmc,cs-rd-off: Read deassertion time 43 + - gpmc,cs-wr-off: Write deassertion time 44 + 45 + ADV signal timings corresponding to GPMC_CONFIG3: 46 + - gpmc,adv-on: Assertion time 47 + - gpmc,adv-rd-off: Read deassertion time 48 + - gpmc,adv-wr-off: Write deassertion time 49 + 50 + WE signals timings corresponding to GPMC_CONFIG4: 51 + - gpmc,we-on: Assertion time 52 + - gpmc,we-off: Deassertion time 53 + 54 + OE signals timings corresponding to GPMC_CONFIG4: 55 + - gpmc,oe-on: Assertion time 56 + - gpmc,oe-off: Deassertion time 57 + 58 + Access time and cycle time timings corresponding to GPMC_CONFIG5: 59 + - gpmc,page-burst-access: Multiple access word delay 60 + - gpmc,access: Start-cycle to first data valid delay 61 + - gpmc,rd-cycle: Total read cycle time 62 + - gpmc,wr-cycle: Total write cycle time 63 + 64 + The following are only applicable to OMAP3+ and AM335x: 65 + - gpmc,wr-access 66 + - gpmc,wr-data-mux-bus 67 + 68 + 69 + Example for an AM33xx board: 70 + 71 + gpmc: gpmc@50000000 { 72 + compatible = "ti,am3352-gpmc"; 73 + ti,hwmods = "gpmc"; 74 + reg = <0x50000000 0x2000>; 75 + interrupts = <100>; 76 + 77 + gpmc,num-cs = <8>; 78 + gpmc,num-waitpins = <2>; 79 + #address-cells = <2>; 80 + #size-cells = <1>; 81 + ranges = <0 0 0x08000000 0x10000000>; /* CS0 @addr 0x8000000, size 0x10000000 */ 82 + 83 + /* child nodes go here */ 84 + };
+80
Documentation/devicetree/bindings/mtd/gpmc-nand.txt
··· 1 + Device tree bindings for GPMC connected NANDs 2 + 3 + GPMC connected NAND (found on OMAP boards) are represented as child nodes of 4 + the GPMC controller with a name of "nand". 5 + 6 + All timing relevant properties as well as generic gpmc child properties are 7 + explained in a separate documents - please refer to 8 + Documentation/devicetree/bindings/bus/ti-gpmc.txt 9 + 10 + For NAND specific properties such as ECC modes or bus width, please refer to 11 + Documentation/devicetree/bindings/mtd/nand.txt 12 + 13 + 14 + Required properties: 15 + 16 + - reg: The CS line the peripheral is connected to 17 + 18 + Optional properties: 19 + 20 + - nand-bus-width: Set this numeric value to 16 if the hardware 21 + is wired that way. If not specified, a bus 22 + width of 8 is assumed. 23 + 24 + - ti,nand-ecc-opt: A string setting the ECC layout to use. One of: 25 + 26 + "sw" Software method (default) 27 + "hw" Hardware method 28 + "hw-romcode" gpmc hamming mode method & romcode layout 29 + "bch4" 4-bit BCH ecc code 30 + "bch8" 8-bit BCH ecc code 31 + 32 + - elm_id: Specifies elm device node. This is required to support BCH 33 + error correction using ELM module. 34 + 35 + For inline partiton table parsing (optional): 36 + 37 + - #address-cells: should be set to 1 38 + - #size-cells: should be set to 1 39 + 40 + Example for an AM33xx board: 41 + 42 + gpmc: gpmc@50000000 { 43 + compatible = "ti,am3352-gpmc"; 44 + ti,hwmods = "gpmc"; 45 + reg = <0x50000000 0x1000000>; 46 + interrupts = <100>; 47 + gpmc,num-cs = <8>; 48 + gpmc,num-waitpins = <2>; 49 + #address-cells = <2>; 50 + #size-cells = <1>; 51 + ranges = <0 0 0x08000000 0x2000>; /* CS0: NAND */ 52 + elm_id = <&elm>; 53 + 54 + nand@0,0 { 55 + reg = <0 0 0>; /* CS0, offset 0 */ 56 + nand-bus-width = <16>; 57 + ti,nand-ecc-opt = "bch8"; 58 + 59 + gpmc,sync-clk = <0>; 60 + gpmc,cs-on = <0>; 61 + gpmc,cs-rd-off = <44>; 62 + gpmc,cs-wr-off = <44>; 63 + gpmc,adv-on = <6>; 64 + gpmc,adv-rd-off = <34>; 65 + gpmc,adv-wr-off = <44>; 66 + gpmc,we-off = <40>; 67 + gpmc,oe-off = <54>; 68 + gpmc,access = <64>; 69 + gpmc,rd-cycle = <82>; 70 + gpmc,wr-cycle = <82>; 71 + gpmc,wr-access = <40>; 72 + gpmc,wr-data-mux-bus = <0>; 73 + 74 + #address-cells = <1>; 75 + #size-cells = <1>; 76 + 77 + /* partitions go here */ 78 + }; 79 + }; 80 +
+43
Documentation/devicetree/bindings/mtd/gpmc-onenand.txt
··· 1 + Device tree bindings for GPMC connected OneNANDs 2 + 3 + GPMC connected OneNAND (found on OMAP boards) are represented as child nodes of 4 + the GPMC controller with a name of "onenand". 5 + 6 + All timing relevant properties as well as generic gpmc child properties are 7 + explained in a separate documents - please refer to 8 + Documentation/devicetree/bindings/bus/ti-gpmc.txt 9 + 10 + Required properties: 11 + 12 + - reg: The CS line the peripheral is connected to 13 + 14 + Optional properties: 15 + 16 + - dma-channel: DMA Channel index 17 + 18 + For inline partiton table parsing (optional): 19 + 20 + - #address-cells: should be set to 1 21 + - #size-cells: should be set to 1 22 + 23 + Example for an OMAP3430 board: 24 + 25 + gpmc: gpmc@6e000000 { 26 + compatible = "ti,omap3430-gpmc"; 27 + ti,hwmods = "gpmc"; 28 + reg = <0x6e000000 0x1000000>; 29 + interrupts = <20>; 30 + gpmc,num-cs = <8>; 31 + gpmc,num-waitpins = <4>; 32 + #address-cells = <2>; 33 + #size-cells = <1>; 34 + 35 + onenand@0 { 36 + reg = <0 0 0>; /* CS0, offset 0 */ 37 + 38 + #address-cells = <1>; 39 + #size-cells = <1>; 40 + 41 + /* partitions go here */ 42 + }; 43 + };
+8 -7
arch/arm/mach-omap2/gpmc-nand.c
··· 89 89 return 0; 90 90 } 91 91 92 - static bool __init gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt) 92 + static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt) 93 93 { 94 94 /* support only OMAP3 class */ 95 - if (!cpu_is_omap34xx()) { 95 + if (!cpu_is_omap34xx() && !soc_is_am33xx()) { 96 96 pr_err("BCH ecc is not supported on this CPU\n"); 97 97 return 0; 98 98 } 99 99 100 100 /* 101 - * For now, assume 4-bit mode is only supported on OMAP3630 ES1.x, x>=1. 102 - * Other chips may be added if confirmed to work. 101 + * For now, assume 4-bit mode is only supported on OMAP3630 ES1.x, x>=1 102 + * and AM33xx derivates. Other chips may be added if confirmed to work. 103 103 */ 104 104 if ((ecc_opt == OMAP_ECC_BCH4_CODE_HW) && 105 - (!cpu_is_omap3630() || (GET_OMAP_REVISION() == 0))) { 105 + (!cpu_is_omap3630() || (GET_OMAP_REVISION() == 0)) && 106 + (!soc_is_am33xx())) { 106 107 pr_err("BCH 4-bit mode is not supported on this CPU\n"); 107 108 return 0; 108 109 } ··· 111 110 return 1; 112 111 } 113 112 114 - int __init gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data, 115 - struct gpmc_timings *gpmc_t) 113 + int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data, 114 + struct gpmc_timings *gpmc_t) 116 115 { 117 116 int err = 0; 118 117 struct device *dev = &gpmc_nand_device.dev;
+1 -1
arch/arm/mach-omap2/gpmc-onenand.c
··· 356 356 return ret; 357 357 } 358 358 359 - void __init gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data) 359 + void gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data) 360 360 { 361 361 int err; 362 362
+231 -1
arch/arm/mach-omap2/gpmc.c
··· 25 25 #include <linux/module.h> 26 26 #include <linux/interrupt.h> 27 27 #include <linux/platform_device.h> 28 + #include <linux/of.h> 29 + #include <linux/of_mtd.h> 30 + #include <linux/of_device.h> 31 + #include <linux/mtd/nand.h> 28 32 29 33 #include <linux/platform_data/mtd-nand-omap2.h> 30 34 ··· 38 34 #include "common.h" 39 35 #include "omap_device.h" 40 36 #include "gpmc.h" 37 + #include "gpmc-nand.h" 38 + #include "gpmc-onenand.h" 41 39 42 40 #define DEVICE_NAME "omap-gpmc" 43 41 ··· 151 145 static struct resource gpmc_mem_root; 152 146 static struct resource gpmc_cs_mem[GPMC_CS_NUM]; 153 147 static DEFINE_SPINLOCK(gpmc_mem_lock); 154 - static unsigned int gpmc_cs_map; /* flag for cs which are initialized */ 148 + /* Define chip-selects as reserved by default until probe completes */ 149 + static unsigned int gpmc_cs_map = ((1 << GPMC_CS_NUM) - 1); 155 150 static struct device *gpmc_dev; 156 151 static int gpmc_irq; 157 152 static resource_size_t phys_base, mem_size; ··· 1125 1118 /* TODO: remove, see function definition */ 1126 1119 gpmc_convert_ps_to_ns(gpmc_t); 1127 1120 1121 + /* Now the GPMC is initialised, unreserve the chip-selects */ 1122 + gpmc_cs_map = 0; 1123 + 1128 1124 return 0; 1129 1125 } 1126 + 1127 + #ifdef CONFIG_OF 1128 + static struct of_device_id gpmc_dt_ids[] = { 1129 + { .compatible = "ti,omap2420-gpmc" }, 1130 + { .compatible = "ti,omap2430-gpmc" }, 1131 + { .compatible = "ti,omap3430-gpmc" }, /* omap3430 & omap3630 */ 1132 + { .compatible = "ti,omap4430-gpmc" }, /* omap4430 & omap4460 & omap543x */ 1133 + { .compatible = "ti,am3352-gpmc" }, /* am335x devices */ 1134 + { } 1135 + }; 1136 + MODULE_DEVICE_TABLE(of, gpmc_dt_ids); 1137 + 1138 + static void __maybe_unused gpmc_read_timings_dt(struct device_node *np, 1139 + struct gpmc_timings *gpmc_t) 1140 + { 1141 + u32 val; 1142 + 1143 + memset(gpmc_t, 0, sizeof(*gpmc_t)); 1144 + 1145 + /* minimum clock period for syncronous mode */ 1146 + if (!of_property_read_u32(np, "gpmc,sync-clk", &val)) 1147 + gpmc_t->sync_clk = val; 1148 + 1149 + /* chip select timtings */ 1150 + if (!of_property_read_u32(np, "gpmc,cs-on", &val)) 1151 + gpmc_t->cs_on = val; 1152 + 1153 + if (!of_property_read_u32(np, "gpmc,cs-rd-off", &val)) 1154 + gpmc_t->cs_rd_off = val; 1155 + 1156 + if (!of_property_read_u32(np, "gpmc,cs-wr-off", &val)) 1157 + gpmc_t->cs_wr_off = val; 1158 + 1159 + /* ADV signal timings */ 1160 + if (!of_property_read_u32(np, "gpmc,adv-on", &val)) 1161 + gpmc_t->adv_on = val; 1162 + 1163 + if (!of_property_read_u32(np, "gpmc,adv-rd-off", &val)) 1164 + gpmc_t->adv_rd_off = val; 1165 + 1166 + if (!of_property_read_u32(np, "gpmc,adv-wr-off", &val)) 1167 + gpmc_t->adv_wr_off = val; 1168 + 1169 + /* WE signal timings */ 1170 + if (!of_property_read_u32(np, "gpmc,we-on", &val)) 1171 + gpmc_t->we_on = val; 1172 + 1173 + if (!of_property_read_u32(np, "gpmc,we-off", &val)) 1174 + gpmc_t->we_off = val; 1175 + 1176 + /* OE signal timings */ 1177 + if (!of_property_read_u32(np, "gpmc,oe-on", &val)) 1178 + gpmc_t->oe_on = val; 1179 + 1180 + if (!of_property_read_u32(np, "gpmc,oe-off", &val)) 1181 + gpmc_t->oe_off = val; 1182 + 1183 + /* access and cycle timings */ 1184 + if (!of_property_read_u32(np, "gpmc,page-burst-access", &val)) 1185 + gpmc_t->page_burst_access = val; 1186 + 1187 + if (!of_property_read_u32(np, "gpmc,access", &val)) 1188 + gpmc_t->access = val; 1189 + 1190 + if (!of_property_read_u32(np, "gpmc,rd-cycle", &val)) 1191 + gpmc_t->rd_cycle = val; 1192 + 1193 + if (!of_property_read_u32(np, "gpmc,wr-cycle", &val)) 1194 + gpmc_t->wr_cycle = val; 1195 + 1196 + /* only for OMAP3430 */ 1197 + if (!of_property_read_u32(np, "gpmc,wr-access", &val)) 1198 + gpmc_t->wr_access = val; 1199 + 1200 + if (!of_property_read_u32(np, "gpmc,wr-data-mux-bus", &val)) 1201 + gpmc_t->wr_data_mux_bus = val; 1202 + } 1203 + 1204 + #ifdef CONFIG_MTD_NAND 1205 + 1206 + static const char * const nand_ecc_opts[] = { 1207 + [OMAP_ECC_HAMMING_CODE_DEFAULT] = "sw", 1208 + [OMAP_ECC_HAMMING_CODE_HW] = "hw", 1209 + [OMAP_ECC_HAMMING_CODE_HW_ROMCODE] = "hw-romcode", 1210 + [OMAP_ECC_BCH4_CODE_HW] = "bch4", 1211 + [OMAP_ECC_BCH8_CODE_HW] = "bch8", 1212 + }; 1213 + 1214 + static int gpmc_probe_nand_child(struct platform_device *pdev, 1215 + struct device_node *child) 1216 + { 1217 + u32 val; 1218 + const char *s; 1219 + struct gpmc_timings gpmc_t; 1220 + struct omap_nand_platform_data *gpmc_nand_data; 1221 + 1222 + if (of_property_read_u32(child, "reg", &val) < 0) { 1223 + dev_err(&pdev->dev, "%s has no 'reg' property\n", 1224 + child->full_name); 1225 + return -ENODEV; 1226 + } 1227 + 1228 + gpmc_nand_data = devm_kzalloc(&pdev->dev, sizeof(*gpmc_nand_data), 1229 + GFP_KERNEL); 1230 + if (!gpmc_nand_data) 1231 + return -ENOMEM; 1232 + 1233 + gpmc_nand_data->cs = val; 1234 + gpmc_nand_data->of_node = child; 1235 + 1236 + if (!of_property_read_string(child, "ti,nand-ecc-opt", &s)) 1237 + for (val = 0; val < ARRAY_SIZE(nand_ecc_opts); val++) 1238 + if (!strcasecmp(s, nand_ecc_opts[val])) { 1239 + gpmc_nand_data->ecc_opt = val; 1240 + break; 1241 + } 1242 + 1243 + val = of_get_nand_bus_width(child); 1244 + if (val == 16) 1245 + gpmc_nand_data->devsize = NAND_BUSWIDTH_16; 1246 + 1247 + gpmc_read_timings_dt(child, &gpmc_t); 1248 + gpmc_nand_init(gpmc_nand_data, &gpmc_t); 1249 + 1250 + return 0; 1251 + } 1252 + #else 1253 + static int gpmc_probe_nand_child(struct platform_device *pdev, 1254 + struct device_node *child) 1255 + { 1256 + return 0; 1257 + } 1258 + #endif 1259 + 1260 + #ifdef CONFIG_MTD_ONENAND 1261 + static int gpmc_probe_onenand_child(struct platform_device *pdev, 1262 + struct device_node *child) 1263 + { 1264 + u32 val; 1265 + struct omap_onenand_platform_data *gpmc_onenand_data; 1266 + 1267 + if (of_property_read_u32(child, "reg", &val) < 0) { 1268 + dev_err(&pdev->dev, "%s has no 'reg' property\n", 1269 + child->full_name); 1270 + return -ENODEV; 1271 + } 1272 + 1273 + gpmc_onenand_data = devm_kzalloc(&pdev->dev, sizeof(*gpmc_onenand_data), 1274 + GFP_KERNEL); 1275 + if (!gpmc_onenand_data) 1276 + return -ENOMEM; 1277 + 1278 + gpmc_onenand_data->cs = val; 1279 + gpmc_onenand_data->of_node = child; 1280 + gpmc_onenand_data->dma_channel = -1; 1281 + 1282 + if (!of_property_read_u32(child, "dma-channel", &val)) 1283 + gpmc_onenand_data->dma_channel = val; 1284 + 1285 + gpmc_onenand_init(gpmc_onenand_data); 1286 + 1287 + return 0; 1288 + } 1289 + #else 1290 + static int gpmc_probe_onenand_child(struct platform_device *pdev, 1291 + struct device_node *child) 1292 + { 1293 + return 0; 1294 + } 1295 + #endif 1296 + 1297 + static int gpmc_probe_dt(struct platform_device *pdev) 1298 + { 1299 + int ret; 1300 + struct device_node *child; 1301 + const struct of_device_id *of_id = 1302 + of_match_device(gpmc_dt_ids, &pdev->dev); 1303 + 1304 + if (!of_id) 1305 + return 0; 1306 + 1307 + for_each_node_by_name(child, "nand") { 1308 + ret = gpmc_probe_nand_child(pdev, child); 1309 + if (ret < 0) { 1310 + of_node_put(child); 1311 + return ret; 1312 + } 1313 + } 1314 + 1315 + for_each_node_by_name(child, "onenand") { 1316 + ret = gpmc_probe_onenand_child(pdev, child); 1317 + if (ret < 0) { 1318 + of_node_put(child); 1319 + return ret; 1320 + } 1321 + } 1322 + return 0; 1323 + } 1324 + #else 1325 + static int gpmc_probe_dt(struct platform_device *pdev) 1326 + { 1327 + return 0; 1328 + } 1329 + #endif 1130 1330 1131 1331 static int gpmc_probe(struct platform_device *pdev) 1132 1332 { ··· 1388 1174 if (IS_ERR_VALUE(gpmc_setup_irq())) 1389 1175 dev_warn(gpmc_dev, "gpmc_setup_irq failed\n"); 1390 1176 1177 + rc = gpmc_probe_dt(pdev); 1178 + if (rc < 0) { 1179 + clk_disable_unprepare(gpmc_l3_clk); 1180 + clk_put(gpmc_l3_clk); 1181 + dev_err(gpmc_dev, "failed to probe DT parameters\n"); 1182 + return rc; 1183 + } 1184 + 1391 1185 return 0; 1392 1186 } 1393 1187 ··· 1413 1191 .driver = { 1414 1192 .name = DEVICE_NAME, 1415 1193 .owner = THIS_MODULE, 1194 + .of_match_table = of_match_ptr(gpmc_dt_ids), 1416 1195 }, 1417 1196 }; 1418 1197 ··· 1436 1213 struct omap_hwmod *oh; 1437 1214 struct platform_device *pdev; 1438 1215 char *oh_name = "gpmc"; 1216 + 1217 + /* 1218 + * if the board boots up with a populated DT, do not 1219 + * manually add the device from this initcall 1220 + */ 1221 + if (of_have_populated_dt()) 1222 + return -ENODEV; 1439 1223 1440 1224 oh = omap_hwmod_lookup(oh_name); 1441 1225 if (!oh) {
+3 -1
drivers/mtd/nand/omap2.c
··· 1332 1332 dma_cap_mask_t mask; 1333 1333 unsigned sig; 1334 1334 struct resource *res; 1335 + struct mtd_part_parser_data ppdata = {}; 1335 1336 1336 1337 pdata = pdev->dev.platform_data; 1337 1338 if (pdata == NULL) { ··· 1558 1557 goto out_release_mem_region; 1559 1558 } 1560 1559 1561 - mtd_device_parse_register(&info->mtd, NULL, NULL, pdata->parts, 1560 + ppdata.of_node = pdata->of_node; 1561 + mtd_device_parse_register(&info->mtd, NULL, &ppdata, pdata->parts, 1562 1562 pdata->nr_parts); 1563 1563 1564 1564 platform_set_drvdata(pdev, &info->mtd);
+3 -1
drivers/mtd/onenand/omap2.c
··· 637 637 struct onenand_chip *this; 638 638 int r; 639 639 struct resource *res; 640 + struct mtd_part_parser_data ppdata = {}; 640 641 641 642 pdata = pdev->dev.platform_data; 642 643 if (pdata == NULL) { ··· 768 767 if ((r = onenand_scan(&c->mtd, 1)) < 0) 769 768 goto err_release_regulator; 770 769 771 - r = mtd_device_parse_register(&c->mtd, NULL, NULL, 770 + ppdata.of_node = pdata->of_node; 771 + r = mtd_device_parse_register(&c->mtd, NULL, &ppdata, 772 772 pdata ? pdata->parts : NULL, 773 773 pdata ? pdata->nr_parts : 0); 774 774 if (r)
+3 -1
include/linux/platform_data/mtd-nand-omap2.h
··· 60 60 int devsize; 61 61 enum omap_ecc ecc_opt; 62 62 struct gpmc_nand_regs reg; 63 - }; 64 63 64 + /* for passing the partitions */ 65 + struct device_node *of_node; 66 + }; 65 67 #endif
+3
include/linux/platform_data/mtd-onenand-omap2.h
··· 29 29 u8 flags; 30 30 u8 regulator_can_sleep; 31 31 u8 skip_initial_unlocking; 32 + 33 + /* for passing the partitions */ 34 + struct device_node *of_node; 32 35 }; 33 36 #endif