1. 05 2月, 2007 16 次提交
  2. 15 1月, 2007 2 次提交
  3. 09 1月, 2007 1 次提交
  4. 04 1月, 2007 2 次提交
  5. 11 12月, 2006 8 次提交
  6. 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
  7. 05 12月, 2006 2 次提交
    • Y
      mmc: fix au1xmmc build error · bf8c80a6
      Yoichi Yuasa 提交于
      This patch has fixed the following build error abou au1xmmc.
      
      drivers/mmc/au1xmmc.c: In function `au1xmmc_poll_event':
      drivers/mmc/au1xmmc.c:835: warning: unused variable `status'
      drivers/mmc/au1xmmc.c: At top level:
      drivers/mmc/au1xmmc.c:878: error: parse error before "const"
      drivers/mmc/au1xmmc.c: In function `au1xmmc_probe':
      drivers/mmc/au1xmmc.c:909: error: `au1xmmc_ops' undeclared (first use in this function)
      drivers/mmc/au1xmmc.c:909: error: (Each undeclared identifier is reported only once
      drivers/mmc/au1xmmc.c:909: error: for each function it appears in.)
      drivers/mmc/au1xmmc.c: At top level:
      drivers/mmc/au1xmmc.c:659: warning: 'au1xmmc_request' defined but not used
      drivers/mmc/au1xmmc.c:719: warning: 'au1xmmc_set_ios' defined but not used
      make[2]: *** [drivers/mmc/au1xmmc.o] Error 1
      make[1]: *** [drivers/mmc] Error 2
      make: *** [drivers] Error 2
      Signed-off-by: NYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      bf8c80a6
    • S
      mmc: pxamci compilation fix · 9e86619b
      Sascha Hauer 提交于
      since commit fcaf71fd
      struct mmc_host does not have a dev field. Retrieve the device with
      mmc_dev() instead.
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      9e86619b
  8. 02 12月, 2006 8 次提交
    • G
      Driver core: convert mmc code to use struct device · fcaf71fd
      Greg Kroah-Hartman 提交于
      Converts from using struct "class_device" to "struct device" making
      everything show up properly in /sys/devices/ with symlinks from the
      /sys/class directory.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fcaf71fd
    • P
      mmc: correct request error handling · 8b7feff8
      Pierre Ossman 提交于
      We need to jump to the part of just flushing the request
      when we cannot claim the bus. Sending commands to a bus
      we do not own will give unpredictable results.
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      8b7feff8
    • P
      mmc: Flush block queue when removing card · 89b4e133
      Pierre Ossman 提交于
      After mmc_block's remove function has exited, we must not
      touch the card structure in any way. This means we not only
      must remove the gendisk, we must also flush out any
      remaning requests already queued up.
      
      We previously removed the disk, but didn't flush it,
      causing oops:es when removing a card in the middle of a
      transfer.
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      89b4e133
    • P
      mmc: sdhci high speed support · 077df884
      Pierre Ossman 提交于
      The SDHCI spec implies that is is incorrect to set a clock
      frequency above 25 MHz without setting the high speed bit.
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      077df884
    • P
      mmc: Support for high speed SD cards · 7ccd266e
      Pierre Ossman 提交于
      Modern SD cards support a clock speed of 50 MHz. Make sure we test for
      this capability and do the song and dance required to activate it.
      
      Activating high speed support actually modifies the TRAN_SPEED field
      of the CSD. But as the spec says that the cards must report 50 MHz,
      we might as well skip re-reading the CSD.
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      7ccd266e
    • P
      mmc: Fix mmc_delay() function · 73778120
      Pierre Ossman 提交于
      Several fixes for mmc_delay():
      
       * Repair if-clause that was supposed to detect sub-hz delays.
       * Change yield() to cond_resched() as yield() no longer has the
         semantics we desire.
       * mmc_delay() is used to guarantee protocol delays, so we cannot
         return early (i.e. use _interruptable).
      
      Based on patch by Amol Lad.
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      73778120
    • P
      mmc: Add support for mmc v4 wide-bus modes · e45a1bd2
      Philip Langdale 提交于
      This change adds support for the mmc4 4-bit wide-bus mode.
      
      The mmc4 spec defines 8-bit and 4-bit transfer modes. As we do not support
      any 8-bit hardware, this patch only adds support for the 4-bit mode, but
      it can easily be built upon when the time comes.
      
      The 4-bit mode is electrically compatible with SD's 4-bit mode but the
      procedure for turning it on is different. This patch implements only
      the essential parts of the procedure as defined by the spec. Two additional
      steps are recommended but not compulsory. I am documenting them here so
      that there's a record.
      
      1) A bus-test mechanism is implemented using dedicated mmc commands which allow
      for testing the functionality of the data bus at the electrical level. This is
      pretty paranoid and they way the commands work is not compatible with the mmc
      subsystem (they don't set valid CRC values).
      
      2) MMC v4 cards can indicate they would like to draw more than the default
      amount of current in wide-bus modes. We currently will never switch the card
      into a higher draw mode. Supposedly, allowing the card to draw more current
      will let it perform better, but the specs seem to indicate that the card will
      function correctly without the mode change. Empirical testing supports this
      interpretation.
      Signed-off-by: NPhilip Langdale <philipl@overt.org>
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      e45a1bd2
    • P
      [PATCH] mmc: Add support for mmc v4 high speed mode · bce40a36
      Philip Langdale 提交于
      This adds support for the high-speed modes defined by mmc v4
      (assuming the host controller is up to it). On a TI sdhci controller,
      it improves read speed from 1.3MBps to 2.3MBps. The TI controller can
      only go up to 24MHz, but everything helps. Another person has taken
      this basic patch and used it on a Nokia 770 to get a bigger boost
      because that controller can run at 48MHZ.
      Signed-off-by: NPhilip Langdale <philipl@overt.org>
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      bce40a36