Re: how to allocate an alined address for a device?

2000-01-31 Thread YAMAMOTO Shigeru
"Warner" == Warner Losh Warner writes: : +u_int32_t : +rman_make_alignment_flags(int size) { : + int i; : + : + for (i = 0; i 32 size 0x01; i ++) { : + size = (size 1); : + } : + : + if (i 31) { : + i = 0; : + } : + : +

Re: how to allocate an alined address for a device?

2000-01-29 Thread Doug Rabson
On Fri, 28 Jan 2000, Warner Losh wrote: In message [EMAIL PROTECTED] Doug Rabson writes: : I'm uneasy about using the flags for this since I'm vaguely reserving the : upper 16 bits of flags for bus-specific purposes (although I haven't : formalised this). : : For allocating aligned

Re: how to allocate an alined address for a device?

2000-01-29 Thread Warner Losh
In message [EMAIL PROTECTED] YAMAMOTO Shigeru writes: : + alignment_size = (1u ((flags RF_ALIGNMENT_MASK) :RF_ALIGNMENT_SHIFT)); alignment_size = (1u (RF_ALIGNMENT(flags))); : + aligned_rstart = (rstart (~alignment_size +

Re: how to allocate an alined address for a device?

2000-01-28 Thread Doug Rabson
On Fri, 28 Jan 2000, YAMAMOTO Shigeru wrote: "Warner" == Warner Losh Warner writes: Warner In a cardbus system, one would force the alignment in the card bus Warner bridge. It would reject those things that aren't aligned in a sane Warner manner for cardbus. It would try again to get a

Re: how to allocate an alined address for a device?

2000-01-28 Thread Warner Losh
In message [EMAIL PROTECTED] Doug Rabson writes: : I'm uneasy about using the flags for this since I'm vaguely reserving the : upper 16 bits of flags for bus-specific purposes (although I haven't : formalised this). : : For allocating aligned regions with pnp, I simply looped in the caller :

Re: how to allocate an alined address for a device?

2000-01-18 Thread Warner Losh
In message [EMAIL PROTECTED] YAMAMOTO Shigeru writes: : In a CardBus system, a start address of status register must be aligned on : 4KB boundaries. : Such kind of address alignment is required at mapping meory window, : expansion ROM and etc. True. : I think we use bus_alloc_resource() to map

how to allocate an alined address for a device?

2000-01-17 Thread YAMAMOTO Shigeru
I have a question about a resource allocation for a device. In a CardBus system, a start address of status register must be aligned on 4KB boundaries. Such kind of address alignment is required at mapping meory window, expansion ROM and etc. I think we use bus_alloc_resource() to map a memory