From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp.reverze.net ([82.161.88.7] helo=fsm.reverze.net) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WSPA2-0000df-7s for barebox@lists.infradead.org; Tue, 25 Mar 2014 11:04:51 +0000 Message-ID: <533162B8.8050300@reverze.net> Date: Tue, 25 Mar 2014 12:04:24 +0100 From: Michel Stam MIME-Version: 1.0 References: <20140325081815.GM17250@pengutronix.de> In-Reply-To: <20140325081815.GM17250@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============6992243546779821904==" Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: Barebox x86 IDE support To: Sascha Hauer Cc: barebox@lists.infradead.org This is a cryptographically signed message in MIME format. --===============6992243546779821904== Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="------------ms000406030607080707060001" This is a cryptographically signed message in MIME format. --------------ms000406030607080707060001 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Hello Sascha, I will repost the patches separately as you requested. With regard to your comment below, this was somewhat intentional, as I=20 understood: > struct resource iomem_resource =3D { > .start =3D 0, > .end =3D 0xffffffff, > .name =3D "iomem", > .children =3D LIST_HEAD_INIT(iomem_resource.children), > }; as "I/O and memory resource". This is also why I check on the resource=20 type in request_region( ): > /* > * We keep the list of child resources ordered which helps > * us searching for conflicts here. > */ > list_for_each_entry(r, &parent->children, sibling) { > if (end < r->start) > goto ok; > if (start > r->end) > continue; > > if (type !=3D resource_type(r->parent)) > continue; I retain one resource tree that way, also for if people decide to add=20 DMA or IRQ's in the future. The iteration function skips the resource if = the types do not match. To me the discussion seems the difference=20 between one linked list for every resource type (=3D=3D more work if a ne= w=20 type is added), or a single linked list with a type field (new resource=20 type =3D=3D new integer constant, no more). I would like to hear your thoughts on that. to be continued after the posting. Cheers, Michel On 03/25/2014 09:18 AM, Sascha Hauer wrote: > Hi Michel, > > On Mon, Mar 24, 2014 at 10:37:48AM +0100, Stam, Michel [FINT] wrote: >> Hello maintainers, >> >> I was wondering if one of you has had time to verify these patches and= apply them to trunk? > Could you send the patches as a series so that it's easier to comment o= n > the patches on the list? > > There are some things to comment on, I think the most important one is > this: > >> +/* >> + * request an io region inside the io space >> + */ >> +struct resource *request_io_region(const char *name, >> + resource_size_t start, resource_size_t end,int type) >> +{ >> + return request_region(&iomem_resource, name, start, end, type); >> +} >> > You request here from the iomem resource, but ioports are a completely > separate resource, so you have to use a new toplevel resource like > this: > > /* The root resource for the whole io space */ > struct resource io_resource =3D { > .start =3D 0, > .end =3D 0xffffffff, > .name =3D "ioport", > .children =3D LIST_HEAD_INIT(io_resource.children), > }; > > /* > * request an io region inside the io space > */ > struct resource *request_io_region(const char *name, > resource_size_t start, resource_size_t end) > { > return request_region(&io_resource, name, start, end, IORESOURCE_IO); > } > > The 'type' argument to request_io_region is unnecessary since the > function name already implies it, right? > > Sascha > --------------ms000406030607080707060001 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIMmzCC BjQwggQcoAMCAQICAR4wDQYJKoZIhvcNAQEFBQAwfTELMAkGA1UEBhMCSUwxFjAUBgNVBAoT DVN0YXJ0Q29tIEx0ZC4xKzApBgNVBAsTIlNlY3VyZSBEaWdpdGFsIENlcnRpZmljYXRlIFNp Z25pbmcxKTAnBgNVBAMTIFN0YXJ0Q29tIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA3 MTAyNDIxMDE1NVoXDTE3MTAyNDIxMDE1NVowgYwxCzAJBgNVBAYTAklMMRYwFAYDVQQKEw1T dGFydENvbSBMdGQuMSswKQYDVQQLEy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6992243546779821904== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox --===============6992243546779821904==--