Message ID | 1450327385-30229-3-git-send-email-peng.fan@nxp.com |
---|---|
State | Superseded |
Delegated to: | Stefano Babic |
Headers | show
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]) by ozlabs.org (Postfix) with ESMTP id 75D6F1402BD for <incoming@patchwork.ozlabs.org>; Thu, 17 Dec 2015 17:18:56 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 466464BDB4; Thu, 17 Dec 2015 07:17:05 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nbIPZQUlDMwN; Thu, 17 Dec 2015 07:17:05 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6325E4BDAF; Thu, 17 Dec 2015 07:16:53 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D8B754BC42 for <u-boot@lists.denx.de>; Thu, 17 Dec 2015 05:58:55 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fD5fRx7PXWuY for <u-boot@lists.denx.de>; Thu, 17 Dec 2015 05:58:55 +0100 (CET) X-Greylist: delayed 909 seconds by postgrey-1.34 at theia; Thu, 17 Dec 2015 05:58:51 CET X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0087.outbound.protection.outlook.com [157.56.110.87]) by theia.denx.de (Postfix) with ESMTPS id 4ACB34BC3E for <u-boot@lists.denx.de>; Thu, 17 Dec 2015 05:58:51 +0100 (CET) Received: from CH1PR03CA003.namprd03.prod.outlook.com (10.255.156.148) by SN1PR0301MB2127.namprd03.prod.outlook.com (10.163.228.146) with Microsoft SMTP Server (TLS) id 15.1.355.16; Thu, 17 Dec 2015 04:43:39 +0000 Received: from BN1BFFO11FD008.protection.gbl (10.255.156.132) by CH1PR03CA003.outlook.office365.com (10.255.156.148) with Microsoft SMTP Server (TLS) id 15.1.355.16 via Frontend Transport; Thu, 17 Dec 2015 04:43:39 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; denx.de; dkim=none (message not signed) header.d=none;denx.de; dmarc=none action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD008.mail.protection.outlook.com (10.58.144.71) with Microsoft SMTP Server (TLS) id 15.1.355.15 via Frontend Transport; Thu, 17 Dec 2015 04:43:37 +0000 Received: from linux-7smt.suse (b51431-11.ap.freescale.net [10.193.101.66]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id tBH4hFbQ009629; Wed, 16 Dec 2015 21:43:34 -0700 From: Peng Fan <peng.fan@nxp.com> To: <u-boot@lists.denx.de> Date: Thu, 17 Dec 2015 12:43:04 +0800 Message-ID: <1450327385-30229-3-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1450327385-30229-1-git-send-email-peng.fan@nxp.com> References: <1450327385-30229-1-git-send-email-peng.fan@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 130948010186322700; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD008; 1:viShbFJ64jEzYJAG9Hm8v0SIiDgsvR4gwrcCLGjusWL80YHVHeULBwGiyIKOpT/prHJZ6OP6vUO0TpF/g3cly9OxufqmU3f8aYGiM/v3HHgf0QGSG2OPUTEAle8j1esUAutbjOJLnIfSyinvRYlWYXl1hOigUhnUHeWs6UMq8oI+78ndO12AvctAAS9NeYBF6H+H21sKEiefyiwIFQWXjvbnmZ9W8NglazjnO4TgHIDmCmjhO1AmNXz2ssNSOxN519CwJWY/DMHRzM/bKjQedihwVzrtEQFcRX5sFcbMaD8rYV7GUv5XlLjAVzatdOyCy9SUd2eG29Q5ZuPDF3nQa6RuTzPXxhDaUXqjYONOQV5w1MINvstrbskrtbGy8uF1RPIZqpwFtTvNc5CBAYOTNdYa+Wp2n/pTV1LwfKh+p87j6apc9CITwJlOFcNIydfs X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(19580395003)(81156007)(229853001)(586003)(189998001)(105606002)(1096002)(6806005)(104016004)(48376002)(11100500001)(1220700001)(50466002)(36756003)(87936001)(92566002)(5001960100002)(110136002)(97736004)(19580405001)(76176999)(33646002)(2351001)(86362001)(50986999)(5008740100001)(50226001)(77096005)(106466001)(5003940100001)(85426001)(2950100001)(47776003)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0301MB2127; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB2127; 2:7ULNDQ9cwjushtP4liipL0ggOnwBfO6TkGMHAC5AFWu/aMQY84f3NBfgCJigbVzs0tPBCAN3c17XQn2MkSvABKHS7GDHMKolmHfyyqb4Z8D4Dbe5Ntrng0YECnjWLCgvZVLTgetna5goOdQvOH8GzQ==; 3:xLnnpiLoq/NxUxGlL6zfKtBTVBWyidvHtw07QEBB2xsMf+zgLbC2ofbup1apnb9Xkq2ue01TevJaekcfiRphLd2vSBBkcBtR5f9vxcM72z+VqHUJPK43T2pOlOdDzWGo3zkMU7l8eRjTYT5u8L5Q/JeBbfsvBSHet0gx02ZMnA2/SeVsloyofu1KiAFmEheRfWqvM2tRrvQE4V8UG92aNfKCK/KU62E9Tf8k4Wyx/28=; 25:oeoGJGfrl8xm9vV7R2+EVu0+VjvbcciJ8qfUMBFqJcIJephfX7pz0uAsmsqax2Ra28rzxYw1lpg135k8GG+Oea+ZPhmvzK4i3rRzwIzGGqD1gBgcrVNdBqdO05rbi/rD84fKWKdBqk1O1X8kvgMnh4WXH9MQpOLv+3zZ09UKyvxascCLHI0MCCQyT/daAM+Ta5DvTQj0UYr76X7Qa9Wp3sRxIrUbizJuaKxlHtoxPQ/kl0m5izrcuKoE0fndEX9G X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR0301MB2127; X-Microsoft-Antispam-PRVS: <SN1PR0301MB212794E9527C49C53FDBEFD288E00@SN1PR0301MB2127.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(10201501046)(3002001); SRVR:SN1PR0301MB2127; BCL:0; PCL:0; RULEID:(400006); SRVR:SN1PR0301MB2127; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB2127; 4:pPn3VjKJuUkHzWYsaOic4QLWA2zioWPoDRzUeVkS7UtjLqBjVDk6vYIAoxaNZAFiM1ax9g7a6SLr2n0CylPJ0z1lNIulGBCWST4PoBYkkdRV+f+8u4j2z1D+llP6lpj/ebSrWOJG0XVWLRUhz+IHB8qQaEKMzKlUVg3s3ooTiKz/WdYhezm9yO3CI1ICPBGU3YfVZHePzfzGAwz9dH9yjziqIqibF1z5ddMyH2A5JKUFZ3KDg5wY8cuL574eNTDSyPATA+AU50tqHuMv29Y6l73s6Pg5IESOnvrjKRYicbIQXt1hKMBfWJTHTvhmQLUInDlvdQkh35kvrJcBoNzU2w0RkOsgPrIPMGF8mn9QkAxSCV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ii?Q?cY98rg3U7i2JiEsPNC0zCy7cy3jiW6wtwu7CsfsuC8AixtOG7KlU4/1xrwaD?= =?us-ascii?Q?n7IXx2wSOSutXLmhQIJfOjidQhsBSFEVDsBEywF5f6RB2wRM1tCohkODxLtq?= =?us-ascii?Q?LYhruXKAx1j7FMvB5HzixxEIqhFTbY6H8P9It/4UEEUNWG1R84vvt8UG5DoB?= =?us-ascii?Q?hyWVVudv7SiXGPeLdWpaxwS1Nf5v7If3nXzeIYvypXHaqNSao3uej8v5475y?= =?us-ascii?Q?yjpJtFwrMObUaAG0dalWk+TG7goG6GB2KYzYo9JECD0TYh6kaJOgV4yu9PBf?= =?us-ascii?Q?pQMrRqzxOdGqQWQZkTMusCy/MdpS/?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB2127; 5:ItZZOcscImWtZOZu0R1UwRRi1YLp2WGN7dV4O7KTsJiwA2Yn/hbii3Ui3DovEngj/kqVzJHP9CJ7N+T/zpTQdHM9vJLEVcns0qNDd649iZpgwEK9psZoi9jUYjsOZHQxo359xjdsUh1ScBVCURXp/ohIW3d+wuOym9SRfkdYZ+Y=; 24:5T4aAM249u5wRS+/WFq+n5GdBUvheVWLBR9oJ4oLBCszRQ0CIbzlB5xGncRi8spWi2FYfTU4qP34OTdn80eZKPwxWvFxum/tGinZzytyXzg= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2015 04:43:37.0566 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0301MB2127 X-Mailman-Approved-At: Thu, 17 Dec 2015 07:16:46 +0100 Subject: [U-Boot] [PATCH V2 3/4] imx: mx6: implement mmc_get_env_devno X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <http://lists.denx.de/mailman/options/u-boot>, <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>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index bf5ae8c..fd383f2 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -349,6 +349,36 @@ int arch_cpu_init(void) return 0; } +__weak int board_mmc_get_env_devno(int devno) +{ + return CONFIG_SYS_MMC_ENV_DEV; +} + +int mmc_get_env_devno(void) +{ + struct src *src_regs = (struct src *)SRC_BASE_ADDR; + u32 soc_sbmr = readl(&src_regs->sbmr1); + u32 bootsel; + int devno; + + /* + * Refer to + * "i.MX 6Dual/6Quad Applications Processor Reference Manual" + * Chapter "8.5.3.1 Expansion Device eFUSE Configuration" + * i.MX6SL/SX/UL has same layout. + */ + bootsel = (soc_sbmr & 0x000000FF) >> 6; + + /* If not boot from sd/mmc, use default value */ + if (bootsel != 1) + return CONFIG_SYS_MMC_ENV_DEV; + + /* BOOT_CFG2[3] and BOOT_CFG2[4] */ + devno = (soc_sbmr & 0x00001800) >> 11; + + return board_mmc_get_env_devno(devno); +} + int board_postclk_init(void) { set_ldo_voltage(LDO_SOC, 1175); /* Set VDDSOC to 1.175V */
Implement mmc_get_env_devno, devno can be got from smbr1 of SRC. Introduce a weak function board_mmc_get_env_devno, different boards can implement it according to different sdhc controllers that used by the board. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> --- Changes V2: move mmc_get_env_devno into soc.c arch/arm/cpu/armv7/mx6/soc.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)