[PATCH 05/12] ARM: mach-s5pv210: Setup consistent dma size at boot time

Tixy tixy at yxit.co.uk
Thu Aug 11 09:08:09 EDT 2011


On Thu, 2011-08-11 at 14:50 +0200, Pavel Machek wrote:
> 
> > -#define CONSISTENT_DMA_SIZE	(SZ_8M + SZ_4M + SZ_2M)
> ...
> > +	init_consistent_dma_size(14 << 20);
> 
> Are you sure that's equivalent?

Yes. From include/asm-generic/sizes.h

#define SZ_2M				0x00200000
#define SZ_4M				0x00400000
#define SZ_8M				0x00800000

The max DMA size seems to be have been defined as 14MB at some point and
several platforms define the size to be this value, but in different
ways:

	SZ_16M - SZ_2M
	SZ_8M + SZ_4M + SZ_2M
	14 << 20

I chose to use just one for consistency, and (14 << 20) seemed clearer
to me.

-- 
Jon (a.k.a. Tixy)




More information about the linux-arm-kernel mailing list