Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/207455/?format=api
{ "id": 207455, "url": "http://patchwork.ozlabs.org/api/patches/207455/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1355934463-24319-4-git-send-email-jagannadh.teki@gmail.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": "<1355934463-24319-4-git-send-email-jagannadh.teki@gmail.com>", "list_archive_url": null, "date": "2012-12-19T16:27:41", "name": "[U-Boot,U-Boot,v2,4/6] sf: Add configuration register writing support", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "203c02276742adc541f6a6709bea65ae99a90bca", "submitter": { "id": 20045, "url": "http://patchwork.ozlabs.org/api/people/20045/?format=api", "name": "Jagan Teki", "email": "jagannadh.teki@gmail.com" }, "delegate": { "id": 1714, "url": "http://patchwork.ozlabs.org/api/users/1714/?format=api", "username": "vapier", "first_name": "Mike", "last_name": "Frysinger", "email": "vapier@gentoo.org" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1355934463-24319-4-git-send-email-jagannadh.teki@gmail.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/207455/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/207455/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", "Received": [ "from theia.denx.de (theia.denx.de [85.214.87.163])\n\tby ozlabs.org (Postfix) with ESMTP id 926D42C0089\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 20 Dec 2012 03:35:38 +1100 (EST)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id C1A7B4A04F;\n\tWed, 19 Dec 2012 17:35:36 +0100 (CET)", "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id SXJldHyky+bl; Wed, 19 Dec 2012 17:35:36 +0100 (CET)", "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 8AEB64A032;\n\tWed, 19 Dec 2012 17:35:34 +0100 (CET)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 761274A032\n\tfor <u-boot@lists.denx.de>; Wed, 19 Dec 2012 17:35:32 +0100 (CET)", "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id NS574wBdeeKn for <u-boot@lists.denx.de>;\n\tWed, 19 Dec 2012 17:35:30 +0100 (CET)", "from mail-pb0-f45.google.com (mail-pb0-f45.google.com\n\t[209.85.160.45]) by theia.denx.de (Postfix) with ESMTPS id 212464A027\n\tfor <u-boot@lists.denx.de>; Wed, 19 Dec 2012 17:35:28 +0100 (CET)", "by mail-pb0-f45.google.com with SMTP id mc8so1327585pbc.18\n\tfor <u-boot@lists.denx.de>; Wed, 19 Dec 2012 08:35:26 -0800 (PST)", "from localhost.localdomain ([123.237.83.48])\n\tby mx.google.com with ESMTPS id z5sm3683430pax.9.2012.12.19.08.28.15\n\t(version=TLSv1/SSLv3 cipher=OTHER);\n\tWed, 19 Dec 2012 08:28:17 -0800 (PST)" ], "X-Virus-Scanned": [ "Debian amavisd-new at theia.denx.de", "Debian amavisd-new at theia.denx.de" ], "X-Greylist": "delayed 433 seconds by postgrey-1.27 at theia;\n\tWed, 19 Dec 2012 17:35:28 CET", "X-policyd-weight": "NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5\n\tNOT_IN_BL_NJABL=-1.5 (only DNSBL check requested)", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\n\th=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to\n\t:references; bh=5Yqnn7LFzGfPGBEFZoV9idnEw8RfjNy98uRIo0d+8vk=;\n\tb=Klr+L3HqC3Ai3PEZKc51H5rJBye0eS/PVP9f11ySLtezHOXVRaTwXmawGJSLf9hU7S\n\tx8aKmurYEm2cigRjK/fCzIt3Om0JyJ4NBY3MrJGvQNGl+lLqectlUYXtJ9FWWmCwPGHI\n\tAx5cixOJpTb0PaXac56WYdIBNIXrc7+oyIZFYO1SIRfviH+Ty7bav1D97G7dXkWTCbeI\n\tWgkiLu6rzfP0Q/GlCcp6B870jjWYCnrRZrXznQfbgVxdbfs25v3kVTg17l0SWMlqgOuM\n\tSy+o8DSkSi65xrvvoNVp8t6hbNzVlq7CbWUMCZw+N4oHaCh6AF64NfS+WQ4nBNaNYIQY\n\ta1Jw==", "X-Received": "by 10.68.242.38 with SMTP id wn6mr20241560pbc.28.1355934497433; \n\tWed, 19 Dec 2012 08:28:17 -0800 (PST)", "From": "Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>", "To": "u-boot@lists.denx.de", "Date": "Wed, 19 Dec 2012 21:57:41 +0530", "Message-Id": "<1355934463-24319-4-git-send-email-jagannadh.teki@gmail.com>", "X-Mailer": "git-send-email 1.7.0.4", "In-Reply-To": "<1355934463-24319-1-git-send-email-jagannadh.teki@gmail.com>", "References": "<1355934463-24319-1-git-send-email-jagannadh.teki@gmail.com>", "Subject": "[U-Boot] [U-Boot,\n\tv2 4/6] sf: Add configuration register writing support", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.11", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<http://lists.denx.de/mailman/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": "<http://lists.denx.de/mailman/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "u-boot-bounces@lists.denx.de", "Errors-To": "u-boot-bounces@lists.denx.de" }, "content": "This patch provides support to program a flash config register.\n\nConfiguration register contains the control bits used to configure\nthe different configurations and security features of a device.\n\nUser need to set these bits through spi_flash_cmd_write_config()\nbased on their usage.\n\nSigned-off-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>\n---\nChanges in v2:\n Improved code logic \n\n drivers/mtd/spi/spi_flash.c | 35 ++++++++++++++++++++++++++++++++++\n drivers/mtd/spi/spi_flash_internal.h | 3 ++\n 2 files changed, 38 insertions(+), 0 deletions(-)", "diff": "diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c\nindex bf5ec4a..cad6c40 100644\n--- a/drivers/mtd/spi/spi_flash.c\n+++ b/drivers/mtd/spi/spi_flash.c\n@@ -279,6 +279,41 @@ int spi_flash_cmd_read_status(struct spi_flash *flash, void *data)\n \treturn 0;\n }\n \n+int spi_flash_cmd_write_config(struct spi_flash *flash, u8 cr)\n+{\n+\tu8 data[2];\n+\tu8 cmd;\n+\tint ret;\n+\n+\tret = spi_flash_cmd_read_status(flash, (void *)&data[0]);\n+\tif (ret < 0) {\n+\t\tdebug(\"SF: fail to read status register\\n\");\n+\t\treturn ret;\n+\t}\n+\n+\tret = spi_flash_cmd_write_enable(flash);\n+\tif (ret < 0) {\n+\t\tdebug(\"SF: enabling write failed\\n\");\n+\t\treturn ret;\n+\t}\n+\n+\tcmd = CMD_WRITE_STATUS;\n+\tdata[1] = cr;\n+\tret = spi_flash_cmd_write(flash->spi, &cmd, 1, &data, 2);\n+\tif (ret) {\n+\t\tdebug(\"SF: fail to write config register\\n\");\n+\t\treturn ret;\n+\t}\n+\n+\tret = spi_flash_cmd_wait_ready(flash, SPI_FLASH_PROG_TIMEOUT);\n+\tif (ret < 0) {\n+\t\tdebug(\"SF: write config register timed out\\n\");\n+\t\treturn ret;\n+\t}\n+\n+\treturn 0;\n+}\n+\n /*\n * The following table holds all device probe functions\n *\ndiff --git a/drivers/mtd/spi/spi_flash_internal.h b/drivers/mtd/spi/spi_flash_internal.h\nindex 8232595..825b398 100644\n--- a/drivers/mtd/spi/spi_flash_internal.h\n+++ b/drivers/mtd/spi/spi_flash_internal.h\n@@ -80,6 +80,9 @@ int spi_flash_cmd_write_status(struct spi_flash *flash, u8 sr);\n /* Read the status register */\n int spi_flash_cmd_read_status(struct spi_flash *flash, void *data);\n \n+/* Program the config register. */\n+int spi_flash_cmd_write_config(struct spi_flash *flash, u8 cr);\n+\n /*\n * Same as spi_flash_cmd_read() except it also claims/releases the SPI\n * bus. Used as common part of the ->read() operation.\n", "prefixes": [ "U-Boot", "U-Boot", "v2", "4/6" ] }