get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1132193,
    "url": "http://patchwork.ozlabs.org/api/patches/1132193/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20190715182856.21688-13-jagan@amarulasolutions.com/",
    "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": "<20190715182856.21688-13-jagan@amarulasolutions.com>",
    "list_archive_url": null,
    "date": "2019-07-15T18:28:50",
    "name": "[U-Boot,v3,12/18] ram: rockchip: debug: Get the cs capacity",
    "commit_ref": "79674a62789c7fcda3dd285c618080bc0bf85189",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "ebc09530187262d3c593faa4199be9513950a6ca",
    "submitter": {
        "id": 69820,
        "url": "http://patchwork.ozlabs.org/api/people/69820/?format=api",
        "name": "Jagan Teki",
        "email": "jagan@amarulasolutions.com"
    },
    "delegate": {
        "id": 93623,
        "url": "http://patchwork.ozlabs.org/api/users/93623/?format=api",
        "username": "kevery",
        "first_name": "Kever",
        "last_name": "Yang",
        "email": "ykai007@gmail.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20190715182856.21688-13-jagan@amarulasolutions.com/mbox/",
    "series": [
        {
            "id": 119574,
            "url": "http://patchwork.ozlabs.org/api/series/119574/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=119574",
            "date": "2019-07-15T18:28:43",
            "name": "ram: rk3399: Add rank detection",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/119574/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1132193/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1132193/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": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=amarulasolutions.com",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=amarulasolutions.com\n\theader.i=@amarulasolutions.com header.b=\"k7wlHWZd\"; \n\tdkim-atps=neutral"
        ],
        "Received": [
            "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 45nXL835hnz9s4Y\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 16 Jul 2019 04:36:32 +1000 (AEST)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 1FB99C21FBF; Mon, 15 Jul 2019 18:32:14 +0000 (UTC)",
            "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id EEE31C21F9B;\n\tMon, 15 Jul 2019 18:30:20 +0000 (UTC)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 093E1C21FC2; Mon, 15 Jul 2019 18:29:56 +0000 (UTC)",
            "from mail-pf1-f193.google.com (mail-pf1-f193.google.com\n\t[209.85.210.193])\n\tby lists.denx.de (Postfix) with ESMTPS id E1B81C21FC9\n\tfor <u-boot@lists.denx.de>; Mon, 15 Jul 2019 18:29:51 +0000 (UTC)",
            "by mail-pf1-f193.google.com with SMTP id p184so7810546pfp.7\n\tfor <u-boot@lists.denx.de>; Mon, 15 Jul 2019 11:29:51 -0700 (PDT)",
            "from localhost.localdomain ([49.206.201.107])\n\tby smtp.gmail.com with ESMTPSA id\n\ty133sm20250075pfb.28.2019.07.15.11.29.47\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 15 Jul 2019 11:29:50 -0700 (PDT)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no\n\tversion=3.4.0",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=amarulasolutions.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=kw/++CuXx6mQuiTZ6aAWPkhA635XZSGQPzWMsqf+2Gk=;\n\tb=k7wlHWZdkoxcCel3F5cqCw7p7xxQ+M/gQVp0KlPMU5aqW/KfGOZzqXaqW5kdS3IZk4\n\tGIpK9VJhcHMxrOZLurRvnSwdmMV6NZELbwqkNQF2fefEMkWijf1ZoOqG8cjHpryEl1HZ\n\tkAHpX8aQc60Ak9jiVCgzHmpr2I5d2HA1PYhtQ=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=kw/++CuXx6mQuiTZ6aAWPkhA635XZSGQPzWMsqf+2Gk=;\n\tb=bKU7J638zudnG5+TXj+Fm6TXnyYngekNcZI2Mw7nDgyXAYzybBzwH9JP+y6rrfbLLX\n\ttjrJ/Fpf8x6/cJO98a36GSuxyOCq9vwsc+hjUY3VNxfv4A/+GhdGVhI8YMbiTWds26H9\n\tc0w3wMPpSthVB8EKxJxzfO7sQIf4LXAwzbQ94eUZhGW1pd01TUqRzu8Zve6cZpreVYvm\n\t9c696m3RV62px/ZO4TTmTefGh61tAXI5GbwjhkQXNpNyGZj3F1Ny9NbVevIA7WlOyOes\n\tliizfY+X9d4Lz2G+QHnWExXZaDmBAD/j/JSWU0nGy1J8pjsaXbWcp1/xNngPd6qJ9YbW\n\tlUPw==",
        "X-Gm-Message-State": "APjAAAVHxWgTfcJ1y9QXbR0l9JFfZ0cOORl1+BvxogxGNkroIhEduTIW\n\tXvgetD0gsvG50njFCFidraMDuQ==",
        "X-Google-Smtp-Source": "APXvYqzjKoy2m05TK9g7ghOrDVYBD2b8wt3KIKbneT3Ym3yt3MijoNWxaSysY2Cngpd1zRJFv5NbMg==",
        "X-Received": "by 2002:a63:1a03:: with SMTP id\n\ta3mr26939638pga.397.1563215390465; \n\tMon, 15 Jul 2019 11:29:50 -0700 (PDT)",
        "From": "Jagan Teki <jagan@amarulasolutions.com>",
        "To": "Simon Glass <sjg@chromium.org>,\n\tPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>,\n\tKever Yang <kever.yang@rock-chips.com>,\n\tYouMin Chen <cym@rock-chips.com>, u-boot@lists.denx.de",
        "Date": "Mon, 15 Jul 2019 23:58:50 +0530",
        "Message-Id": "<20190715182856.21688-13-jagan@amarulasolutions.com>",
        "X-Mailer": "git-send-email 2.18.0.321.gffc6fa0e3",
        "In-Reply-To": "<20190715182856.21688-1-jagan@amarulasolutions.com>",
        "References": "<20190715182856.21688-1-jagan@amarulasolutions.com>",
        "MIME-Version": "1.0",
        "Cc": "linux-rockchip@lists.infradead.org, gajjar04akash@gmail.com,\n\tlinux-amarula@amarulasolutions.com,\n\tManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>",
        "Subject": "[U-Boot] [PATCH v3 12/18] ram: rockchip: debug: Get the cs capacity",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.18",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<http://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\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>"
    },
    "content": "Add code to get the channel capacity, this would help to\nprint the capacity of specific channel.\n\nHere is sample print on LPDDR4, 50MHz channel 0\nBW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB\n\nSigned-off-by: Jagan Teki <jagan@amarulasolutions.com>\nSigned-off-by: YouMin Chen <cym@rock-chips.com>\n---\n drivers/ram/rockchip/sdram_debug.c | 46 +++++++++++++++++++++++++++++-\n 1 file changed, 45 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/ram/rockchip/sdram_debug.c b/drivers/ram/rockchip/sdram_debug.c\nindex 69a6f94a73..19e9225c12 100644\n--- a/drivers/ram/rockchip/sdram_debug.c\n+++ b/drivers/ram/rockchip/sdram_debug.c\n@@ -33,10 +33,46 @@ void sdram_print_dram_type(unsigned char dramtype)\n \t}\n }\n \n+/**\n+ * cs  = 0, cs0\n+ * cs  = 1, cs1\n+ * cs => 2, cs0+cs1\n+ * note: it didn't consider about row_3_4\n+ */\n+u64 sdram_get_cs_cap(struct sdram_cap_info *cap_info, u32 cs, u32 dram_type)\n+{\n+\tu32 bg;\n+\tu64 cap[2];\n+\n+\tif (dram_type == DDR4)\n+\t\t/* DDR4 8bit dram BG = 2(4bank groups),\n+\t\t * 16bit dram BG = 1 (2 bank groups)\n+\t\t */\n+\t\tbg = (cap_info->dbw == 0) ? 2 : 1;\n+\telse\n+\t\tbg = 0;\n+\n+\tcap[0] = 1llu << (cap_info->bw + cap_info->col +\n+\t\t bg + cap_info->bk + cap_info->cs0_row);\n+\n+\tif (cap_info->rank == 2)\n+\t\tcap[1] = 1llu << (cap_info->bw + cap_info->col +\n+\t\t\t bg + cap_info->bk + cap_info->cs1_row);\n+\telse\n+\t\tcap[1] = 0;\n+\n+\tif (cs == 0)\n+\t\treturn cap[0];\n+\telse if (cs == 1)\n+\t\treturn cap[1];\n+\telse\n+\t\treturn (cap[0] + cap[1]);\n+}\n+\n void sdram_print_ddr_info(struct sdram_cap_info *cap_info,\n \t\t\t  struct sdram_base_params *base)\n {\n-\tu32 bg;\n+\tu32 bg, cap;\n \n \tbg = (cap_info->dbw == 0) ? 2 : 1;\n \n@@ -71,4 +107,12 @@ void sdram_print_ddr_info(struct sdram_cap_info *cap_info,\n \n \tprintascii(\" Die BW=\");\n \tprintdec(8 << cap_info->dbw);\n+\n+\tcap = sdram_get_cs_cap(cap_info, 3, base->dramtype);\n+\tif (cap_info->row_3_4)\n+\t\tcap = cap * 3 / 4;\n+\n+\tprintascii(\" Size=\");\n+\tprintdec(cap >> 20);\n+\tprintascii(\"MB\\n\");\n }\n",
    "prefixes": [
        "U-Boot",
        "v3",
        "12/18"
    ]
}