[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F153D39.50206@st.com>
Date: Tue, 17 Jan 2012 14:49:53 +0530
From: Viresh Kumar <viresh.kumar@...com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: "vinod.koul@...el.com" <vinod.koul@...el.com>,
"dan.j.williams@...el.com" <dan.j.williams@...el.com>,
"linux@....linux.org.uk" <linux@....linux.org.uk>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Armando VISCONTI <armando.visconti@...com>,
Shiraz HASHIM <shiraz.hashim@...com>,
Vipin KUMAR <vipin.kumar@...com>,
Rajeev KUMAR <rajeev-dlh.kumar@...com>,
Deepak SIKRI <deepak.sikri@...com>,
Vipul Kumar SAMAR <vipulkumar.samar@...com>,
Amit VIRDI <Amit.VIRDI@...com>,
Pratyush ANAND <pratyush.anand@...com>,
Bhupesh SHARMA <bhupesh.sharma@...com>,
"viresh.linux@...il.com" <viresh.linux@...il.com>,
Bhavna YADAV <bhavna.yadav@...com>,
Vincenzo FRASCINO <Vincenzo.FRASCINO@...com>,
Mirko GARDI <mirko.gardi@...com>
Subject: Re: [PATCH 8/8] dmaengine/dw_dmac: Add support for DMA_SLAVE_CONFIG
On 1/17/2012 2:45 PM, Viresh Kumar wrote:
>>>>>> >>> >> + * Fix sconfig's burst size according to dw_dmac. We need to convert
>>>>>> >>> >> + * them as: 1 -> 0, 2 -> 1, 4 -> 2, 8 -> 3, 16 -> 4.
> I need above conversion. i.e. finding bit no. of first bit set.
Something like:
unsigned int v; // 32-bit word
unsigned int r = 0;
while (v >>= 1)
{
r++;
}
Probably find_first_bit() suits it.
--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists