From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 4 Jan 2016 10:51:00 -0500 Subject: [U-Boot] [PATCH 2/4] rapidio: add support for RapidIO boot In-Reply-To: <1447157610-3680-1-git-send-email-jacquiot.aurelien@gmail.com> References: <1447157610-3680-1-git-send-email-jacquiot.aurelien@gmail.com> Message-ID: <20160104155100.GI4093@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Nov 10, 2015 at 01:13:29PM +0100, jacquiot.aurelien at gmail.com wrote: > From: Aurelien Jacquiot > > RapidIO is a high-performance packet-switched interconnect technology > (www.rapidio.org) that can be used for messaging or memory transfers > like Ethernet or PCIe. [snip] > +config CMD_RIO > + bool "rapidio" > + help > + RapidIO support. Please expand this to include what is and is not supported in RapidIO right now with your patches. [snip] > + /* hostid */ > + if (argc >= 2) { > + riohdid = simple_strtol(argv[2], NULL, 10); > + } else { > + s = getenv("riohdid"); > + if (s != NULL) > + riohdid = simple_strtol(s, NULL, 10); > + goto call_init; > + } Here and elsewhere, command inputs are in hex not decimal. 'sleep' is the one and only exception (and causes headaches) to this rule. > + /* dev-id size */ > + if (argc >= 3) { > + riosize = simple_strtol(argv[3], NULL, 10); > + } else { > + s = getenv("riosize"); > + if (s != NULL) > + riosize = simple_strtol(s, NULL, 10); > + goto call_init; > + } > + > + /* port bitmask */ > + if (argc >= 4) { > + rioports = simple_strtoul(argv[4], NULL, 16); > + } else { > + s = getenv("rioports"); > + if (s != NULL) > + rioports = simple_strtoul(s, NULL, 16); > + goto call_init; > + } > + > + /* port path mode */ > + if (argc >= 5) { > + riopmode = simple_strtol(argv[5], NULL, 10); > + } else { > + s = getenv("riopathmode"); > + if (s != NULL) > + riopmode = simple_strtol(s, NULL, 10); > + goto call_init; > + } > + > + /* baudrate */ > + if (argc >= 6) { > + riobaudrate = simple_strtol(argv[6], NULL, 10); > + } else { > + s = getenv("riobaudrate"); > + if (s != NULL) > + riobaudrate = simple_strtol(s, NULL, 10); > + } At first glance this seems broken for the case where one of riopathmode/riobaudrate/etc are neither passed nor in the environment. Or will rio_init handle this case correctly and pass back failure? Also, is there a usecase for having these be set in the environment rather than passed? -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: