Barebox x86 IDE support

Sascha Hauer s.hauer at pengutronix.de
Tue Mar 25 04:18:15 EDT 2014


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 on
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 = {
	.start = 0,
	.end = 0xffffffff,
	.name = "ioport",
	.children = 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

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list