Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/109211/?format=api
{ "id": 109211, "url": "http://patchwork.ozlabs.org/api/patches/109211/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1312893821-29250-3-git-send-email-aneesh@ti.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": "<1312893821-29250-3-git-send-email-aneesh@ti.com>", "list_archive_url": null, "date": "2011-08-09T12:43:40", "name": "[U-Boot,2/3] omap4: make SDRAM init work for ES1.0 silicon", "commit_ref": "025bc4254ba3d501cf2af49ae1d91d5b2e7c529d", "pull_url": null, "state": "superseded", "archived": false, "hash": "ea1532349d2fed999989e203e586589c4f1456dc", "submitter": { "id": 6298, "url": "http://patchwork.ozlabs.org/api/people/6298/?format=api", "name": "Aneesh V", "email": "aneesh@ti.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1312893821-29250-3-git-send-email-aneesh@ti.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/109211/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/109211/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 5B013B6F8C\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 9 Aug 2011 22:49:04 +1000 (EST)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 28DCF2819A;\n\tTue, 9 Aug 2011 14:48:59 +0200 (CEST)", "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 RkAd2stdKGti; Tue, 9 Aug 2011 14:48:58 +0200 (CEST)", "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id E8DCD28164;\n\tTue, 9 Aug 2011 14:48:48 +0200 (CEST)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id C726B28159\n\tfor <u-boot@lists.denx.de>; Tue, 9 Aug 2011 14:48:45 +0200 (CEST)", "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 rzE62k5AjInd for <u-boot@lists.denx.de>;\n\tTue, 9 Aug 2011 14:48:43 +0200 (CEST)", "from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41])\n\tby theia.denx.de (Postfix) with ESMTPS id 8978828151\n\tfor <u-boot@lists.denx.de>; Tue, 9 Aug 2011 14:48:42 +0200 (CEST)", "from dbdp20.itg.ti.com ([172.24.170.38])\n\tby bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id p79CmbD0006010\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)\n\tfor <u-boot@lists.denx.de>; Tue, 9 Aug 2011 07:48:39 -0500", "from dbde70.ent.ti.com (localhost [127.0.0.1])\n\tby dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id p79Cma3X020266\n\tfor <u-boot@lists.denx.de>; Tue, 9 Aug 2011 18:18:36 +0530 (IST)", "from dbdp31.itg.ti.com (172.24.170.98) by DBDE70.ent.ti.com\n\t(172.24.170.148) with Microsoft SMTP Server id 8.3.106.1;\n\tTue, 9 Aug 2011 18:18:36 +0530", "from localhost (a0393566pc.apr.dhcp.ti.com [172.24.137.55])\tby\n\tdbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p79CmZDT001983;\n\tTue, 9 Aug 2011 18:18:35 +0530 (IST)" ], "X-Virus-Scanned": [ "Debian amavisd-new at theia.denx.de", "Debian amavisd-new at theia.denx.de" ], "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)", "From": "Aneesh V <aneesh@ti.com>", "To": "<u-boot@lists.denx.de>", "Date": "Tue, 9 Aug 2011 18:13:40 +0530", "Message-ID": "<1312893821-29250-3-git-send-email-aneesh@ti.com>", "X-Mailer": "git-send-email 1.7.0.4", "In-Reply-To": "<1312893821-29250-1-git-send-email-aneesh@ti.com>", "References": "<1312893821-29250-1-git-send-email-aneesh@ti.com>", "MIME-Version": "1.0", "Cc": "santosh.shilimkar@ti.com", "Subject": "[U-Boot] [PATCH 2/3] omap4: make SDRAM init work for ES1.0 silicon", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.9", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<http://lists.denx.de/mailman/listinfo/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>", "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": "SDRAM init was not working on ES1.0 due to a programming\nerror. A pointer that was passed by value to a function\nwas set in function emif_get_device_details(), but the effect\nwouldn't be seen in the calling function. The issue came\nout while testing for ES1.0 because ES1.0 doesn't have any\nSDRAM chips connected to CS1\n\nSigned-off-by: Aneesh V <aneesh@ti.com>\n---\n arch/arm/cpu/armv7/omap4/emif.c | 47 +++++-------------------------\n arch/arm/cpu/armv7/omap4/sdram_elpida.c | 24 ++++++++--------\n arch/arm/include/asm/arch-omap4/emif.h | 5 +--\n 3 files changed, 22 insertions(+), 54 deletions(-)", "diff": "diff --git a/arch/arm/cpu/armv7/omap4/emif.c b/arch/arm/cpu/armv7/omap4/emif.c\nindex 487ec42..8c46464 100644\n--- a/arch/arm/cpu/armv7/omap4/emif.c\n+++ b/arch/arm/cpu/armv7/omap4/emif.c\n@@ -963,10 +963,11 @@ static u8 is_lpddr2_sdram_present(u32 base, u32 cs,\n \treturn 1;\n }\n \n-static struct lpddr2_device_details *get_lpddr2_details(u32 base, u8 cs,\n+struct lpddr2_device_details *emif_get_device_details(u32 emif_nr, u8 cs,\n \t\t\tstruct lpddr2_device_details *lpddr2_dev_details)\n {\n \tu32 phy;\n+\tu32 base = (emif_nr == 1) ? OMAP44XX_EMIF1 : OMAP44XX_EMIF2;\n \tstruct emif_reg_struct *emif = (struct emif_reg_struct *)base;\n \n \tif (!lpddr2_dev_details)\n@@ -985,40 +986,6 @@ static struct lpddr2_device_details *get_lpddr2_details(u32 base, u8 cs,\n \n \treturn lpddr2_dev_details;\n }\n-\n-void emif_get_device_details(u32 emif_nr,\n-\t\tstruct lpddr2_device_details *cs0_device_details,\n-\t\tstruct lpddr2_device_details *cs1_device_details)\n-{\n-\tu32 base = (emif_nr == 1) ? OMAP44XX_EMIF1 : OMAP44XX_EMIF2;\n-\n-\tif (running_from_sdram()) {\n-\t\t/*\n-\t\t * We can not do automatic discovery running from SDRAM\n-\t\t * Most likely we came here by mistake. Indicate error\n-\t\t * by returning NULL\n-\t\t */\n-\t\tcs0_device_details = NULL;\n-\t\tcs1_device_details = NULL;\n-\t} else {\n-\t\t/*\n-\t\t * Automatically find the device details:\n-\t\t *\n-\t\t * Reset the PHY after each call to get_lpddr2_details().\n-\t\t * If there is nothing connected to a given chip select\n-\t\t * (typically CS1) mode register reads will mess up with\n-\t\t * the PHY state and subsequent initialization won't work.\n-\t\t * PHY reset brings back PHY to a good state.\n-\t\t */\n-\t\tcs0_device_details =\n-\t\t get_lpddr2_details(base, CS0, cs0_device_details);\n-\t\temif_reset_phy(base);\n-\n-\t\tcs1_device_details =\n-\t\t get_lpddr2_details(base, CS1, cs1_device_details);\n-\t\temif_reset_phy(base);\n-\t}\n-}\n #endif /* CONFIG_SYS_AUTOMATIC_SDRAM_DETECTION */\n \n static void do_sdram_init(u32 base)\n@@ -1051,10 +1018,12 @@ static void do_sdram_init(u32 base)\n \t * - Obtained from user otherwise\n \t */\n \tstruct lpddr2_device_details cs0_dev_details, cs1_dev_details;\n-\temif_get_device_details(emif_nr, &cs0_dev_details,\n-\t\t\t\t&cs1_dev_details);\n-\tdev_details.cs0_device_details = &cs0_dev_details;\n-\tdev_details.cs1_device_details = &cs1_dev_details;\n+\temif_reset_phy(base);\n+\tdev_details.cs0_device_details = emif_get_device_details(base, CS0,\n+\t\t\t\t\t\t&cs0_dev_details);\n+\tdev_details.cs1_device_details = emif_get_device_details(base, CS1,\n+\t\t\t\t\t\t&cs1_dev_details);\n+\temif_reset_phy(base);\n \n \t/* Return if no devices on this EMIF */\n \tif (!dev_details.cs0_device_details &&\ndiff --git a/arch/arm/cpu/armv7/omap4/sdram_elpida.c b/arch/arm/cpu/armv7/omap4/sdram_elpida.c\nindex 7757aad..edc5326 100644\n--- a/arch/arm/cpu/armv7/omap4/sdram_elpida.c\n+++ b/arch/arm/cpu/armv7/omap4/sdram_elpida.c\n@@ -141,24 +141,24 @@ static const struct lpddr2_device_details elpida_2G_S4_details = {\n \t.manufacturer\t= LPDDR2_MANUFACTURER_ELPIDA\n };\n \n-static void emif_get_device_details_sdp(u32 emif_nr,\n-\t\tstruct lpddr2_device_details *cs0_device_details,\n-\t\tstruct lpddr2_device_details *cs1_device_details)\n+struct lpddr2_device_details *emif_get_device_details_sdp(u32 emif_nr, u8 cs,\n+\t\t\tstruct lpddr2_device_details *lpddr2_dev_details)\n {\n \tu32 omap_rev = omap_revision();\n \n \t/* EMIF1 & EMIF2 have identical configuration */\n-\t*cs0_device_details = elpida_2G_S4_details;\n-\n-\tif (omap_rev == OMAP4430_ES1_0)\n-\t\tcs1_device_details = NULL;\n-\telse\n-\t\t*cs1_device_details = elpida_2G_S4_details;\n+\tif ((omap_rev == OMAP4430_ES1_0) && (cs == CS1)) {\n+\t\t/* Nothing connected on CS1 for ES1.0 */\n+\t\treturn NULL;\n+\t} else {\n+\t\t/* In all other cases Elpida 2G device */\n+\t\t*lpddr2_dev_details = elpida_2G_S4_details;\n+\t\treturn lpddr2_dev_details;\n+\t}\n }\n \n-void emif_get_device_details(u32 emif_nr,\n-\t\tstruct lpddr2_device_details *cs0_device_details,\n-\t\tstruct lpddr2_device_details *cs1_device_details)\n+struct lpddr2_device_details *emif_get_device_details(u32 emif_nr, u8 cs,\n+\t\t\tstruct lpddr2_device_details *lpddr2_dev_details)\n \t__attribute__((weak, alias(\"emif_get_device_details_sdp\")));\n \n #endif /* CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS */\ndiff --git a/arch/arm/include/asm/arch-omap4/emif.h b/arch/arm/include/asm/arch-omap4/emif.h\nindex 37ad1fd..6845c65 100644\n--- a/arch/arm/include/asm/arch-omap4/emif.h\n+++ b/arch/arm/include/asm/arch-omap4/emif.h\n@@ -1029,9 +1029,8 @@ struct emif_regs {\n void emif_get_reg_dump(u32 emif_nr, const struct emif_regs **regs);\n void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs);\n #else\n-void emif_get_device_details(u32 emif_nr,\n-\t\tstruct lpddr2_device_details *cs0_device_details,\n-\t\tstruct lpddr2_device_details *cs1_device_details);\n+struct lpddr2_device_details *emif_get_device_details(u32 emif_nr, u8 cs,\n+\t\t\tstruct lpddr2_device_details *lpddr2_dev_details);\n void emif_get_device_timings(u32 emif_nr,\n \t\tconst struct lpddr2_device_timings **cs0_device_timings,\n \t\tconst struct lpddr2_device_timings **cs1_device_timings);\n", "prefixes": [ "U-Boot", "2/3" ] }