get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/1645395/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 1645395,
    "url": "http://patchwork.ozlabs.org/api/patches/1645395/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20220620105426.23665-1-pali@kernel.org/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20220620105426.23665-1-pali@kernel.org>",
    "list_archive_url": null,
    "date": "2022-06-20T10:54:26",
    "name": "[v2] mmc: fsl_esdhc_spl: Add support for loading proper U-Boot from unaligned location",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "3d5659bc6d759b8a4c84974911f45e427f049f8b",
    "submitter": {
        "id": 78810,
        "url": "http://patchwork.ozlabs.org/api/people/78810/?format=api",
        "name": "Pali Rohár",
        "email": "pali@kernel.org"
    },
    "delegate": {
        "id": 111897,
        "url": "http://patchwork.ozlabs.org/api/users/111897/?format=api",
        "username": "kabel",
        "first_name": "Marek",
        "last_name": "Behun",
        "email": "marek.behun@nic.cz"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20220620105426.23665-1-pali@kernel.org/mbox/",
    "series": [
        {
            "id": 305548,
            "url": "http://patchwork.ozlabs.org/api/series/305548/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=305548",
            "date": "2022-06-20T10:54:26",
            "name": "[v2] mmc: fsl_esdhc_spl: Add support for loading proper U-Boot from unaligned location",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/305548/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1645395/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1645395/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "bilbo.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=O/W5Nr7g;\n\tdkim-atps=neutral",
            "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>)",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=kernel.org",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.b=\"O/W5Nr7g\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=kernel.org",
            "phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby bilbo.ozlabs.org (Postfix) with ESMTPS id 4LRRPL3Wkfz9sFx\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Jun 2022 20:55:02 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id F08D380584;\n\tMon, 20 Jun 2022 12:54:55 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 586D8805F4; Mon, 20 Jun 2022 12:54:55 +0200 (CEST)",
            "from ams.source.kernel.org (ams.source.kernel.org\n [IPv6:2604:1380:4601:e00::1])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 36F5F803DF\n for <u-boot@lists.denx.de>; Mon, 20 Jun 2022 12:54:53 +0200 (CEST)",
            "from smtp.kernel.org (relay.kernel.org [52.25.139.140])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by ams.source.kernel.org (Postfix) with ESMTPS id C4545B8101F;\n Mon, 20 Jun 2022 10:54:52 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 53D77C3411B;\n Mon, 20 Jun 2022 10:54:51 +0000 (UTC)",
            "by pali.im (Postfix)\n id 2FD90F8F; Mon, 20 Jun 2022 12:54:48 +0200 (CEST)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,\n SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no\n version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1655722491;\n bh=deKKv6vs33fYWu5UXad+PnrgSNRVUGj6oM+lXiyzV4s=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=O/W5Nr7gXCJYM2bHU6Ok8BmOwdVrvE3P1SvTVzv+ted0H6wVAHQqCc6TqErMMVDyw\n BkMWrt8R/iVOkjXyE+qY9Yfk7jyzbw0VYQ9IYRXGDVLS9gj+Z3kwESymWChfRC59F/\n J0Z8/9fRP1y9bb6VOsmIkEyqYhxQdKRqXxtR8ubF621CZ36OvnK7I/mK/YSx6L9REd\n nZHi5ftR5VivRatLpHaP+RCFrD+ZLL8gWh+z/5xm7dQrBpFUJe4ERvwHfhMsjzaE9P\n OCuB+1ORcAdE5s58S6H4yYZGF2ZSv2BQhgVa3vcFJtUehNtwJ5GPCib5buGUJKKwBI\n z++auSz8uq2RQ==",
        "From": "=?utf-8?q?Pali_Roh=C3=A1r?= <pali@kernel.org>",
        "To": "\"Peng Fan (OSS)\" <peng.fan@oss.nxp.com>",
        "Cc": "Jaehoon Chung <jh80.chung@samsung.com>,\n Priyanka Jain <priyanka.jain@nxp.com>, Sinan Akman <sinan@writeme.com>,\n u-boot@lists.denx.de",
        "Subject": "[PATCH v2] mmc: fsl_esdhc_spl: Add support for loading proper U-Boot\n from unaligned location",
        "Date": "Mon, 20 Jun 2022 12:54:26 +0200",
        "Message-Id": "<20220620105426.23665-1-pali@kernel.org>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<129747c1-2218-f319-9e30-528fb9adbb31@oss.nxp.com>",
        "References": "<129747c1-2218-f319-9e30-528fb9adbb31@oss.nxp.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.39",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>",
        "X-Virus-Scanned": "clamav-milter 0.103.6 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "This allows to concatenate SPL and proper U-Boot without extra alignment.\n\nSigned-off-by: Pali Rohár <pali@kernel.org>\n---\nChanges in v2:\n* Rebased on top of the U-Boot next branch, commit 98c4828740f4944462b7d9608b95d5b73850c7b0\n---\n drivers/mmc/fsl_esdhc_spl.c | 27 +++++++++++++++++++++++----\n 1 file changed, 23 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/mmc/fsl_esdhc_spl.c b/drivers/mmc/fsl_esdhc_spl.c\nindex 760f13d24018..54bf8152ca7a 100644\n--- a/drivers/mmc/fsl_esdhc_spl.c\n+++ b/drivers/mmc/fsl_esdhc_spl.c\n@@ -58,10 +58,10 @@ void __noreturn mmc_boot(void)\n {\n \t__attribute__((noreturn)) void (*uboot)(void);\n \tuint blk_start, blk_cnt, err;\n+\tu32 blk_off;\n #ifndef CONFIG_FSL_CORENET\n \tuchar *tmp_buf;\n \tu32 blklen;\n-\tu32 blk_off;\n \tuchar val;\n #ifndef CONFIG_SPL_FSL_PBL\n \tu32 val32;\n@@ -155,10 +155,21 @@ again:\n \t* Load U-Boot image from mmc into RAM\n \t*/\n \tcode_len = CONFIG_SYS_MMC_U_BOOT_SIZE;\n-\tblk_start = ALIGN(offset, mmc->read_bl_len) / mmc->read_bl_len;\n-\tblk_cnt = ALIGN(code_len, mmc->read_bl_len) / mmc->read_bl_len;\n+\tblk_start = offset / mmc->read_bl_len;\n+\tblk_off = offset % mmc->read_bl_len;\n+\tblk_cnt = ALIGN(code_len, mmc->read_bl_len) / mmc->read_bl_len + 1;\n+\tif (blk_off) {\n+\t\terr = mmc->block_dev.block_read(&mmc->block_dev,\n+\t\t\t\t\t\tblk_start, 1, tmp_buf);\n+\t\tif (err != 1) {\n+\t\t\tputs(\"spl: mmc read failed!!\\n\");\n+\t\t\thang();\n+\t\t}\n+\t\tblk_start++;\n+\t}\n \terr = mmc->block_dev.block_read(&mmc->block_dev, blk_start, blk_cnt,\n-\t\t\t\t\t(uchar *)CONFIG_SYS_MMC_U_BOOT_DST);\n+\t\t\t\t\t(uchar *)CONFIG_SYS_MMC_U_BOOT_DST +\n+\t\t\t\t\t(blk_off ? (mmc->read_bl_len - blk_off) : 0));\n \tif (err != blk_cnt) {\n \t\tputs(\"spl: mmc read failed!!\\n\");\n #ifndef CONFIG_FSL_CORENET\n@@ -166,6 +177,14 @@ again:\n #endif\n \t\thang();\n \t}\n+\t/*\n+\t * SDHC DMA may erase bytes at dst + bl_len - blk_off - 8\n+\t * due to unaligned access. So copy leading bytes from tmp_buf\n+\t * after SDHC DMA transfer.\n+\t */\n+\tif (blk_off)\n+\t\tmemcpy((uchar *)CONFIG_SYS_MMC_U_BOOT_DST,\n+\t\t       tmp_buf + blk_off, mmc->read_bl_len - blk_off);\n \n \t/*\n \t* Clean d-cache and invalidate i-cache, to\n",
    "prefixes": [
        "v2"
    ]
}