[PATCH 10] ARM: Add support for IXP4xx CPU and for Goramo Multilink router platform.

Sascha Hauer s.hauer at pengutronix.de
Tue Dec 21 03:35:40 EST 2010


Hi Krzysztof,

Nice series! I haven't got much to add.

On Tue, Dec 21, 2010 at 12:06:12AM +0100, Krzysztof Halasa wrote:
> +
> +	devfs_add_partition("nor0", BAREBOX_START, BAREBOX_LENGTH,
> +			    DEVFS_PARTITION_FIXED | DEVFS_PARTITION_READONLY, "barebox");
> +	devfs_add_partition("nor0", NPE_A_START, NPE_A_LENGTH,
> +			    DEVFS_PARTITION_FIXED | DEVFS_PARTITION_READONLY, "NPE-A");
> +	devfs_add_partition("nor0", NPE_B_START, NPE_B_LENGTH,
> +			    DEVFS_PARTITION_FIXED | DEVFS_PARTITION_READONLY, "NPE-B");
> +	devfs_add_partition("nor0", NPE_C_START, NPE_C_LENGTH,
> +			    DEVFS_PARTITION_FIXED | DEVFS_PARTITION_READONLY, "NPE-C");
> +	devfs_add_partition("nor0", NPE_ENV0_START, NPE_ENV0_LENGTH,
> +			    DEVFS_PARTITION_FIXED, "env0");

These partitions are not on eraseblock boundaries, so I assume you use
some script to combine barebox and firmware into a single image. Can we
integrate this into the make system or at least add some instructions
how to generate this image?

> +
> +#ifdef CONFIG_USE_IRQ
> +
> +static void (*irq_handlers[HALF_QUEUES])(void *pdev);
> +static void *irq_pdevs[HALF_QUEUES];
> +
> +#undef fls
> +static inline int fls(int x)
> +{
> +	int ret;
> +	asm("clz\t%0, %1" : "=r" (ret) : "r" (x) : "cc");
> +	ret = 32 - ret;
> +	return ret;
> +}

fls is defined in a similar way in arch/arm/include/asm/bitops.h:

#define fls(x) \
	(__builtin_constant_p(x) ? constant_fls(x) : \
	({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }))

Or am I missing something?

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