1. 19 7月, 2007 1 次提交
    • H
      [AVR32] CPU frequency scaling for AT32AP · 9e58e185
      Hans-Christian Egtvedt 提交于
      This patch enables CPU frequency scaling for AT32AP devices. This will
      enable the CPU to scale between the speed of the high speed bus and
      the master clock and thus save some power.
      
      The patch also adds a parent to cpu_clk and a cpu_clk_set_rate to
      enable changing the CPU clock divider in a sane way.
      
      The driver does not check if the given rate is 0, thus resulting in a
      div by 0.  I think this check should be go into the clk_set_rate
      framework, and not here.
      
      Tested on AT32AP7000/ATSTK1000.
      
      Hardware documentation can be found in the AT32AP7000 datasheet.
      Signed-off-by: NHans-Christian Egtvedt <hcegtvedt@atmel.com>
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      9e58e185
  2. 27 4月, 2007 4 次提交
  3. 05 3月, 2007 1 次提交
    • D
      [PATCH] add CONFIG_GENERIC_GPIO · 0a938b97
      David Brownell 提交于
      Most drivers using GPIOs already know they are running on a system that
      supports the generic GPIO calls, because of other platform dependencies.
      But the generic GPIO-based LED and input button drivers can't know that.
      
      So this patch adds a Kconfig hook, GENERIC_GPIO, to mark the platforms
      where <asm/gpio.h> will do the right thing.  Currently that's a bunch of
      ARMs, and AVR32; more are on the way.
      
      It also fixes a dependency bug for the gpio button input driver; it was
      wrong to start with, now it covers all platforms with GENERIC_GPIO.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Acked-by: NRichard Purdie <rpurdie@rpsys.net>
      Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
      Cc: <raph@8d.com>
      Cc: <msvoboda@ra.rockwell.com>
      Cc: pHilipp Zabel <philipp.zabel@gmail.com>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Dmitry Torokhov <dtor@mail.ru>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0a938b97
  4. 09 12月, 2006 1 次提交
    • D
      [PATCH] LOG2: Implement a general integer log2 facility in the kernel · f0d1b0b3
      David Howells 提交于
      This facility provides three entry points:
      
      	ilog2()		Log base 2 of unsigned long
      	ilog2_u32()	Log base 2 of u32
      	ilog2_u64()	Log base 2 of u64
      
      These facilities can either be used inside functions on dynamic data:
      
      	int do_something(long q)
      	{
      		...;
      		y = ilog2(x)
      		...;
      	}
      
      Or can be used to statically initialise global variables with constant values:
      
      	unsigned n = ilog2(27);
      
      When performing static initialisation, the compiler will report "error:
      initializer element is not constant" if asked to take a log of zero or of
      something not reducible to a constant.  They treat negative numbers as
      unsigned.
      
      When not dealing with a constant, they fall back to using fls() which permits
      them to use arch-specific log calculation instructions - such as BSR on
      x86/x86_64 or SCAN on FRV - if available.
      
      [akpm@osdl.org: MMC fix]
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Wojtek Kaniewski <wojtekka@toxygen.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f0d1b0b3
  5. 26 9月, 2006 1 次提交