From patchwork Thu May 1 09:56:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 29490 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f70.google.com (mail-qg0-f70.google.com [209.85.192.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6FD6220B8D for ; Thu, 1 May 2014 09:58:41 +0000 (UTC) Received: by mail-qg0-f70.google.com with SMTP id z60sf5076097qgd.9 for ; Thu, 01 May 2014 02:58:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=QuWxb18kOCPcu5pekQs0blNnX/LXWn9sl/ZV9F8oM2E=; b=AITxKkmYCK1m3TrDASHgEBHmS9DpZdDIkxERgyktK0dfqdpiMyaYTCyhf8UCpA0cp6 9f0c43OQ4mb7rjMLgPzOjWrNy4Bov2uJpzV3kO1A12f9yXqdv5u1BkJtTXOXkSTPSQI4 Thg3uXN/uBVRsntmNSK+or47agMvtk3VLSg4ZHoHJ0Wyq1Aw6EWNr0irag2pL0YKsQl7 LJA1Nm+ngM80HoV1vuadtrzWUA5bF+HMMVvRhWWJ77XfdX3GFJbLpJnpArWmWYQ/+Pk1 Nosz3Q+XzWfv8GJAsxJ42j0Njk96QvG+D8dACs+TrJS2PE7EylpKLt+zO1STp041GXjH z6WQ== X-Gm-Message-State: ALoCoQnQW4+F4OJ1LADNRaKuh13rGoSnWVHyy+/Jy7Mcow/9qFVT8mHN9orgqAg3WrDnpAtID6zj X-Received: by 10.58.82.193 with SMTP id k1mr830107vey.41.1398938321212; Thu, 01 May 2014 02:58:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.100.164 with SMTP id s33ls1017459qge.57.gmail; Thu, 01 May 2014 02:58:41 -0700 (PDT) X-Received: by 10.58.122.164 with SMTP id lt4mr8242984veb.2.1398938321146; Thu, 01 May 2014 02:58:41 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id ej2si5969572veb.149.2014.05.01.02.58.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 May 2014 02:58:41 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id id10so3666904vcb.17 for ; Thu, 01 May 2014 02:58:41 -0700 (PDT) X-Received: by 10.52.249.105 with SMTP id yt9mr587229vdc.34.1398938321075; Thu, 01 May 2014 02:58:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp12995vcb; Thu, 1 May 2014 02:58:40 -0700 (PDT) X-Received: by 10.194.63.196 with SMTP id i4mr1410921wjs.50.1398938320304; Thu, 01 May 2014 02:58:40 -0700 (PDT) Received: from mail-we0-f175.google.com (mail-we0-f175.google.com [74.125.82.175]) by mx.google.com with ESMTPS id 1si10553150wjp.7.2014.05.01.02.58.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 May 2014 02:58:40 -0700 (PDT) Received-SPF: none (google.com: lee.jones@linaro.org does not designate permitted sender hosts) client-ip=74.125.82.175; Received: by mail-we0-f175.google.com with SMTP id q58so2837075wes.20 for ; Thu, 01 May 2014 02:58:39 -0700 (PDT) X-Received: by 10.194.60.114 with SMTP id g18mr407187wjr.61.1398938319684; Thu, 01 May 2014 02:58:39 -0700 (PDT) Received: from lee--X1.home (host109-148-238-223.range109-148.btcentralplus.com. [109.148.238.223]) by mx.google.com with ESMTPSA id bj5sm2696494wib.3.2014.05.01.02.58.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 May 2014 02:58:38 -0700 (PDT) From: Lee Jones To: linux-kernel@vger.kernel.org Cc: computersforpeace@gmail.com, linux-mtd@lists.infradead.org, kernel@stlinux.com, Lee Jones Subject: [PATCH 47/47] mtd: nand: catch unsupported framework call-backs Date: Thu, 1 May 2014 10:56:54 +0100 Message-Id: <1398938214-17847-48-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1398938214-17847-1-git-send-email-lee.jones@linaro.org> References: <1398938214-17847-1-git-send-email-lee.jones@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Display a BUG() message and return appropriate/expected value. Signed-off-by: Lee Jones --- drivers/mtd/nand/stm_nand_bch.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/drivers/mtd/nand/stm_nand_bch.c b/drivers/mtd/nand/stm_nand_bch.c index e7a4bed..2ba1d05 100644 --- a/drivers/mtd/nand/stm_nand_bch.c +++ b/drivers/mtd/nand/stm_nand_bch.c @@ -1455,6 +1455,39 @@ static int bch_mtd_write_oob(struct mtd_info *mtd, return 0; } +static int bch_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, + uint8_t *buf, int oob_required, int page) +{ + BUG(); + return 0; +} + +static int bch_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, + const uint8_t *buf, int oob_required) +{ + BUG(); + return 0; +} + +static void bch_hwctl(struct mtd_info *mtd, int mode) +{ + BUG(); +} + +static int bch_calculate(struct mtd_info *mtd, const uint8_t *dat, + uint8_t *ecc_code) +{ + BUG(); + return 0; +} + +static int bch_correct(struct mtd_info *mtd, uint8_t *dat, uint8_t *read_ecc, + uint8_t *calc_ecc) +{ + BUG(); + return 0; +} + static int bch_block_isbad(struct mtd_info *mtd, loff_t offs, int getchip) { struct nand_chip *chip = mtd->priv; @@ -1612,10 +1645,16 @@ static void nandi_set_mtd_defaults(struct nandi_controller *nandi, mtd->ecclayout = &info->ecclayout; mtd->subpage_sft = 0; + chip->ecc.hwctl = bch_hwctl; + chip->ecc.calculate = bch_calculate; + chip->ecc.correct = bch_correct; + chip->ecc.read_oob = bch_mtd_read_oob; chip->ecc.write_oob = bch_mtd_write_oob; chip->ecc.read_page = bch_read; + chip->ecc.read_page_raw = bch_read_page_raw; + chip->ecc.write_page_raw = bch_write_page_raw; chip->write_page = bch_write; chip->erase = bch_erase;