From patchwork Sat Apr 9 18:04:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mikhail Zhilkin X-Patchwork-Id: 559252 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BD06C433EF for ; Sat, 9 Apr 2022 18:04:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233305AbiDISGS (ORCPT ); Sat, 9 Apr 2022 14:06:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242953AbiDISGR (ORCPT ); Sat, 9 Apr 2022 14:06:17 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E233192B8; Sat, 9 Apr 2022 11:04:10 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id r206-20020a1c44d7000000b0038ccb70e239so2039050wma.3; Sat, 09 Apr 2022 11:04:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=x+ZHRh6e82n5qKqvhVpyoJ5hZgFMYZM/zhsoK6Nbo1Q=; b=YKOP6jVnRkzeNqGA3VvHJwzmjyDK08GWK/YjBh5+xYw1W4RUHgOuaZJpf6wWfZbmwX UnS1BuFb+tfQ/sRE1kJdPw23yE9cepOTX12r+AXiVyTszFDEozTaL7SrgMHi+EyS0izg zq3+87+Kl8eGRCbCwdSeW1JXQ5R/VEg1MEeRrdoy5pyNAgP2Tr82+UVwvFHDA2WU1SJT R9SFIeBollfKOJiRQiY74UvCDqlOHd57iqXVJ2LfY2YhWhkOyc+1wL3OzXwEw+0QOE4w G3CLiYfPmFEVtwmzmv4OQBY12+MYpEOQoWC3OIfpyBnNKji7gDbyoVRVkMW3SdTtB/PS ABVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=x+ZHRh6e82n5qKqvhVpyoJ5hZgFMYZM/zhsoK6Nbo1Q=; b=vjezQHPn8IWt5fK8Inpufx9nedPvEpnSYySuBYbtiwTOQ5GqVOVsKPRNeKzaqyeC87 29Jc5RE2b2L9EgRv+zR4qIsIZfO50xjkGomtdAw0/5TIX0S2YXY2nLHkht6YpLocZFGC 16/hjDp+k/Itp6EbwLohS//g2RtibILNagFYs405D9T0SwAcBF+c7TzkVeWkSmPtLkQr zM0qX6VGBMSuf6WQos1NLM+kKY7bME/ujH4vN+Cuc62qmKyTVZsUjj3NwNH0Yyi/fqFr Ape0K4bq5Wc8G0jwNcgnkBY/k1I4Xrk4gIhD/OaYvF1e0UbkdyuMQoGb1UvuU0xhvksz 1MGw== X-Gm-Message-State: AOAM533EUIY8F6DoOCrlwWDhAHJ4rMmLIpO2oJyrbAvfBFqZKYeGL/gS x/SZfHaLSleGstU0hfR6C8g= X-Google-Smtp-Source: ABdhPJwLn4H230P5wbpYMvAJbu0DCavPV2PqvXJ+80n8Ppagqwl4TVLKYE2L9RCL3YmS05IwqaKrDA== X-Received: by 2002:a05:600c:213:b0:38e:6379:af70 with SMTP id 19-20020a05600c021300b0038e6379af70mr21401923wmi.157.1649527448742; Sat, 09 Apr 2022 11:04:08 -0700 (PDT) Received: from ?IPV6:2001:470:9898:9eac:f1cb:6e16:4fc0:c830? ([2a09:bac0:79::82a:3425]) by smtp.gmail.com with ESMTPSA id 2-20020a1c1902000000b00380d3873d6asm13715098wmz.43.2022.04.09.11.04.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 09 Apr 2022 11:04:08 -0700 (PDT) Message-ID: <1b391399-984b-7a63-3265-62ef09caec39@gmail.com> Date: Sat, 9 Apr 2022 21:04:05 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: [PATCH v2 1/2] dt-bindings: mtd: partitions: Add binding for Sercomm parser Content-Language: en-US To: Krzysztof Kozlowski , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski Cc: NOGUCHI Hiroshi , Karim , M , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20220406195557.1956-1-csharper2005@gmail.com> <20220406195946.2019-1-csharper2005@gmail.com> <8d0d8b27-35ff-3693-cf80-897b80c26b4e@linaro.org> <57bebf2f-af4c-b2d9-10e5-19e5104946fb@gmail.com> <29cfa017-bbaf-3aba-fe1d-06771957dbaa@linaro.org> From: Mikhail Zhilkin In-Reply-To: <29cfa017-bbaf-3aba-fe1d-06771957dbaa@linaro.org> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 4/9/2022 3:43 PM, Krzysztof Kozlowski wrote: >> I'm not sure that "scpart-id" is necessary here. "sercomm,sc-partitions" >> is necessary. I'm going to add vendor prefix in a separate patch. Is this >> ok? > Yes. Thanks! >>>> +required: >>>> + - compatible >>> Missing reg. >> reg isn't required. Parser can read partition offsets and sizes from >> SC PART MAP table. Or do you mean something else?  All is ok >> without reg definition in "Example" (except the warns that reg property >> is missing). > reg might not be required for current implementation but it is required > by devicetree for every node with unit address. Do you expect here nodes > without unit addresses? Only "partitions" node has no unit address. All subnodes  have unit addresses and therefore have to have reg property. I've just realized that "fixed-partitions.yaml" is almost my case. It looks like I can copy'n'paste  "required" and "*properties". Do you mind if I don't reinvent the wheel and reuse this good practice? Here's what I got (no any warnings appears): ---  .../mtd/partitions/sercomm,sc-partitions.yaml | 70 +++++++++++++++++++  1 file changed, 70 insertions(+)  create mode 100644 Documentation/devicetree/bindings/mtd/partitions/sercomm,sc-partitions.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/sercomm,sc-partitions.yaml @@ -0,0 +1,70 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/partitions/sercomm,sc-partitions.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sercomm Partitions + +description: | +  Sercomm is one of hardware manufacturers providing SoCs used in home routers. +  The Sercomm partition map table contains information about non-standard +  partition offsets and sizes (depending on the bad blocks presence and their +  locations). Partition map is used by many Sercomm-based Ralink devices +  (e.g. Beeline, Netgear). + +maintainers: +  - Mikhail Zhilkin + +properties: +  compatible: +    const: sercomm,sc-partitions + +  "#address-cells": true + +  "#size-cells": true + +required: +  - "#address-cells" +  - "#size-cells" + +additionalProperties: true + +examples: +  - | +    partitions { +        compatible = "sercomm,sc-partitions"; +        #address-cells = <1>; +        #size-cells = <1>; + +        partition@0 { +            label = "u-boot"; +            reg = <0x0 0x100000>; +            scpart-id = <0>; +            read-only; +        }; + +        partition@100000 { +            label = "dynamic partition map"; +            reg = <0x100000 0x100000>; +            scpart-id = <1>; +        }; + +        factory: partition@200000 { +            label = "Factory"; +            reg = <0x200000 0x100000>; +            scpart-id = <2>; +            read-only; + +            compatible = "nvmem-cells"; +            #address-cells = <1>; +            #size-cells = <1>; + +            macaddr_factory_21000: macaddr@21000 { +                reg = <0x21000 0x6>; +            }; +        }; + +        /* ... */ + +    }; diff --git a/Documentation/devicetree/bindings/mtd/partitions/sercomm,sc-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/sercomm,sc-partitions.yaml new file mode 100644 index 000000000000..cb171a0383aa --- /dev/null From patchwork Wed Apr 6 20:00:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Zhilkin X-Patchwork-Id: 558371 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C4A1C433EF for ; Wed, 6 Apr 2022 21:14:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235514AbiDFVQV (ORCPT ); Wed, 6 Apr 2022 17:16:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234801AbiDFVP4 (ORCPT ); Wed, 6 Apr 2022 17:15:56 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FF63247C24; Wed, 6 Apr 2022 13:00:16 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id t25so5962364lfg.7; Wed, 06 Apr 2022 13:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=w6E35KyoZj97uqlX2tyinbVgyFyBsaXQS+Q1PQsp+C0=; b=mjqarkR2GJlJNxDGI+Mv0cfaTIO53GT34QL66zV5TI8ID02jEzGzLPBeNOebSld4gb KBVTcE5PvOAhNcB1gzmEWThBpfEfY3d0QYLVXXx4Piot3M380m/5BxL+ezS/Azs0RDuG abtgfz/xVrtgdiJuJCS598w9CqrHB0va6LI/sswk/lutWbVjpa4qhwS9gPJPKd3/i9WC xlbAgFkN+04UnJI76hr1wICW0oYqTPgmvCmfu0BupDhKJn87ng77wZPuZutZqltDfg/z zCWl8d5vZz2pUJuwjaA1uFgAHoEnSHMu48nL86fL5jsryEXpSQF1ouI43Thw0BDUHQaN PuBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=w6E35KyoZj97uqlX2tyinbVgyFyBsaXQS+Q1PQsp+C0=; b=bkfggJCZHyxxPqwm5CIDSxnzOHK4o+q0A9jcLeB6JJ33860DEmO8he8iPo2WQw9bsc n9CdgWMcBuGs+47v3eGP3DwljgO8iEBEB3w0EJuGe1xbs0AskvxomLH3pzket4b3vl2R Iro7z5JaojB5xVIAQDongUiyLdS5swO6fjIxnxc6B7EyCJgGk5uSY4YnQRw4fEJYgpi7 ny9KpYrVvh3T74WwrLcTNlWPGHsRqvJEcsrGfDWk64DDNq7LcKMs/j4pr010WIFa53Yj vJOGSRetO6WOSPZIrsc5l0R4kTX4KSn+KZcY06+DOnfADFTkUoyT0MGuVmkJ7eKCQm3e Nm1w== X-Gm-Message-State: AOAM532y31TJ9YTMZCvbg3JUDO6+iYQuFNc+piForoTAxZu9mFFpPPin 9N5RRu3X9znvX9t16zGPFCQ= X-Google-Smtp-Source: ABdhPJzmfV8jLmUGtTVJ6ITWQuMVzcyF5eyUktQWdhdWf2jjK05r5ESSLYih34HLOVXIuVeBxc0vxA== X-Received: by 2002:a05:6512:3fa6:b0:44a:cc1f:4a52 with SMTP id x38-20020a0565123fa600b0044acc1f4a52mr6952922lfa.456.1649275212747; Wed, 06 Apr 2022 13:00:12 -0700 (PDT) Received: from vmu1804.lan ([2a09:bac0:79::82a:3427]) by smtp.googlemail.com with ESMTPSA id n1-20020a2e9041000000b0024ad80f0b6asm1684866ljg.69.2022.04.06.13.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 13:00:12 -0700 (PDT) From: Mikhail Zhilkin To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski Cc: NOGUCHI Hiroshi , Karim , M , Mikhail Zhilkin , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 2/2] mtd: parsers: add support for Sercomm partitions Date: Wed, 6 Apr 2022 20:00:07 +0000 Message-Id: <20220406200007.2070-1-csharper2005@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220406195557.1956-1-csharper2005@gmail.com> References: <20220406195557.1956-1-csharper2005@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds an MTD partition parser for the Sercomm partition table that is used in some Beeline, Netgear and Sercomm routers. The Sercomm partition map table contains real partition offsets, which may differ from device to device depending on the number and location of bad blocks on NAND. This is essentially the same code as proposed by NOGUCHI Hiroshi: Link: https://github.com/openwrt/openwrt/pull/1318#issuecomment-420607394 Signed-off-by: NOGUCHI Hiroshi Signed-off-by: Mikhail Zhilkin --- drivers/mtd/parsers/Kconfig | 9 ++ drivers/mtd/parsers/Makefile | 1 + drivers/mtd/parsers/scpart.c | 240 +++++++++++++++++++++++++++++++++++ 3 files changed, 250 insertions(+) create mode 100644 drivers/mtd/parsers/scpart.c diff --git a/drivers/mtd/parsers/Kconfig b/drivers/mtd/parsers/Kconfig index 23763d16e4f9..fea0b9f70e04 100644 --- a/drivers/mtd/parsers/Kconfig +++ b/drivers/mtd/parsers/Kconfig @@ -180,6 +180,15 @@ config MTD_REDBOOT_PARTS_READONLY endif # MTD_REDBOOT_PARTS +config MTD_SERCOMM_PARTS + tristate "Sercomm partition table parser" + depends on MTD + help + This provides partitions table parser for devices with Sercomm + partition map. This partition table contains real partition + offsets, which may differ from device to device depending on the + number and location of bad blocks on NAND. + config MTD_QCOMSMEM_PARTS tristate "Qualcomm SMEM flash partition parser" depends on QCOM_SMEM diff --git a/drivers/mtd/parsers/Makefile b/drivers/mtd/parsers/Makefile index 2e98aa048278..2fcf0ab9e7da 100644 --- a/drivers/mtd/parsers/Makefile +++ b/drivers/mtd/parsers/Makefile @@ -10,6 +10,7 @@ ofpart-$(CONFIG_MTD_OF_PARTS_LINKSYS_NS)+= ofpart_linksys_ns.o obj-$(CONFIG_MTD_PARSER_IMAGETAG) += parser_imagetag.o obj-$(CONFIG_MTD_AFS_PARTS) += afs.o obj-$(CONFIG_MTD_PARSER_TRX) += parser_trx.o +obj-$(CONFIG_MTD_SERCOMM_PARTS) += scpart.o obj-$(CONFIG_MTD_SHARPSL_PARTS) += sharpslpart.o obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o obj-$(CONFIG_MTD_QCOMSMEM_PARTS) += qcomsmempart.o diff --git a/drivers/mtd/parsers/scpart.c b/drivers/mtd/parsers/scpart.c new file mode 100644 index 000000000000..620a465cf808 --- /dev/null +++ b/drivers/mtd/parsers/scpart.c @@ -0,0 +1,240 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * drivers/mtd/scpart.c: Sercomm Partition Parser + * + * Copyright (C) 2018 NOGUCHI Hiroshi + * Copyright (C) 2022 Mikhail Zhilkin + */ + +#include +#include +#include +#include +#include + +#define MOD_NAME "scpart" + +#ifdef pr_fmt +#undef pr_fmt +#endif + +#define pr_fmt(fmt) MOD_NAME ": " fmt + +static const char sc_part_magic[] = { + 'S', 'C', 'F', 'L', 'M', 'A', 'P', 'O', 'K', '\0', +}; +#define PART_MAGIC_LEN sizeof(sc_part_magic) + +/* assumes that all fields are set by CPU native endian */ +struct sc_part_desc { + uint32_t part_id; + uint32_t part_offs; + uint32_t part_bytes; +}; +#define ID_ALREADY_FOUND 0xFFFFFFFFUL + +#define MAP_OFFS_IN_BLK 0x800 + +#define MAP_MIRROR_NUM 2 + +static int scpart_desc_is_valid(struct sc_part_desc *pdesc) +{ + return ((pdesc->part_id != 0xFFFFFFFFUL) && + (pdesc->part_offs != 0xFFFFFFFFUL) && + (pdesc->part_bytes != 0xFFFFFFFFUL)); +} + +static int scpart_scan_partmap(struct mtd_info *master, loff_t partmap_offs, + struct sc_part_desc **ppdesc) +{ + uint8_t *buf; + loff_t offs; + size_t retlen; + struct sc_part_desc *pdesc = NULL; + struct sc_part_desc *tmpdesc; + int cnt = 0; + int res2; + int res = 0; + + buf = kzalloc(master->erasesize, GFP_KERNEL); + if (!buf) { + res = -ENOMEM; + goto out; + } + + res2 = mtd_read(master, partmap_offs, master->erasesize, &retlen, buf); + if (res2 || retlen != master->erasesize) { + res = -EIO; + goto free; + } + + offs = MAP_OFFS_IN_BLK; + while (offs < (master->erasesize - sizeof(*tmpdesc))) { + tmpdesc = (struct sc_part_desc *)&(buf[offs]); + if (!scpart_desc_is_valid(tmpdesc)) + break; + cnt++; + offs += sizeof(*tmpdesc); + } + + if (cnt > 0) { + int bytes = cnt * sizeof(*pdesc); + + pdesc = kcalloc(cnt, sizeof(*pdesc), GFP_KERNEL); + if (!pdesc) { + res = -ENOMEM; + goto free; + } + memcpy(pdesc, &(buf[MAP_OFFS_IN_BLK]), bytes); + + *ppdesc = pdesc; + res = cnt; + } + +free: + kfree(buf); + +out: + return res; +} + +static int scpart_find_partmap(struct mtd_info *master, + struct sc_part_desc **ppdesc) +{ + loff_t offs; + uint8_t rdbuf[PART_MAGIC_LEN]; + size_t retlen; + int magic_found = 0; + int res2; + int res = 0; + + offs = 0; + while ((magic_found < MAP_MIRROR_NUM) && + (offs < master->size) && !mtd_block_isbad(master, offs)) { + res2 = mtd_read(master, offs, PART_MAGIC_LEN, &retlen, rdbuf); + if (res2 || (retlen != PART_MAGIC_LEN)) { + res = -EIO; + goto out; + } + if (!memcmp(rdbuf, sc_part_magic, PART_MAGIC_LEN)) { + pr_debug("Signature found at 0x%llx\n", offs); + magic_found++; + res = scpart_scan_partmap(master, offs, ppdesc); + if (res > 0) + goto out; + } + offs += master->erasesize; + } + +out: + if (res > 0) + pr_info("Valid 'SC PART MAP' (%d partitions) found at 0x%llx\n", res, offs); + else + pr_info("No valid 'SC PART MAP'\n"); + + return res; +} + +static int scpart_parse(struct mtd_info *master, + const struct mtd_partition **pparts, + struct mtd_part_parser_data *data) +{ + struct sc_part_desc *scpart_map = NULL; + struct mtd_partition *parts = NULL; + struct device_node *mtd_node; + struct device_node *ofpart_node; + struct device_node *pp; + const char *partname; + int nr_scparts; + int nr_parts = 0; + int n; + int res = 0; + + mtd_node = mtd_get_of_node(master); + if (!mtd_node) + goto out; + + ofpart_node = of_get_child_by_name(mtd_node, "partitions"); + if (!ofpart_node) + goto out; + + nr_scparts = scpart_find_partmap(master, &scpart_map); + if (nr_scparts <= 0) { + res = nr_scparts; + goto free; + } + + parts = kcalloc(of_get_child_count(ofpart_node), sizeof(*parts), + GFP_KERNEL); + if (!parts) { + res = -ENOMEM; + goto out; + } + + for_each_child_of_node(ofpart_node, pp) { + u32 scpart_id; + + if (of_property_read_u32(pp, "scpart-id", &scpart_id)) + continue; + + for (n = 0 ; n < nr_scparts ; n++) + if ((scpart_map[n].part_id != ID_ALREADY_FOUND) && + (scpart_id == scpart_map[n].part_id)) + break; + if (n >= nr_scparts) + /* not match */ + continue; + + /* add the partition found in OF into MTD partition array */ + parts[nr_parts].offset = scpart_map[n].part_offs; + parts[nr_parts].size = scpart_map[n].part_bytes; + parts[nr_parts].of_node = pp; + + if (!of_property_read_string(pp, "label", &partname)) + parts[nr_parts].name = partname; + if (of_property_read_bool(pp, "read-only")) + parts[nr_parts].mask_flags |= MTD_WRITEABLE; + if (of_property_read_bool(pp, "lock")) + parts[nr_parts].mask_flags |= MTD_POWERUP_LOCK; + + /* mark as 'done' */ + scpart_map[n].part_id = ID_ALREADY_FOUND; + + nr_parts++; + } + + if (nr_parts > 0) { + *pparts = parts; + res = nr_parts; + } else + pr_info("No partition in OF matches partition ID with 'SC PART MAP'.\n"); + + of_node_put(pp); + +free: + kfree(scpart_map); + if (res <= 0) + kfree(parts); + +out: + return res; +} + +static const struct of_device_id scpart_parser_of_match_table[] = { + { .compatible = "sercomm,sc-partitions" }, + {}, +}; +MODULE_DEVICE_TABLE(of, scpart_parser_of_match_table); + +static struct mtd_part_parser scpart_parser = { + .parse_fn = scpart_parse, + .name = "scpart", + .of_match_table = scpart_parser_of_match_table, +}; +module_mtd_part_parser(scpart_parser); + +/* mtd parsers will request the module by parser name */ +MODULE_ALIAS("scpart"); +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("NOGUCHI Hiroshi "); +MODULE_DESCRIPTION("Sercomm partition parser");