1. 11 Dec, 2008 17 commits
    • David Brownell's avatar
      davinci_mmc platform_data · 8e007b6b
      David Brownell authored
      Inital support for new MMC init logic, where boards can say how
      to initialize what, and also provide functions to sense card
      detect and writeprotect switches.  This also removes some
      static driver configuration forcing it to always use 4-bit
      parallel data channels; boards can now override that.
      
      This patch stubs in support for the two EVM boards with MMC/SD
      support, equivalent to current behavior ... later patches will
      update these.  SFFSDR presumably needs something too.
      
      Note that this doesn't currently handle card detect IRQs.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      8e007b6b
    • David Brownell's avatar
      davinci: create watchdog device node · 69a42b24
      David Brownell authored
      Sure would be nice to have the watchdog device node created, so
      the watchdog driver (already in mainline) binds to something.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      69a42b24
    • David Brownell's avatar
      mmc driver sets up mmc1 too · 245ed17f
      David Brownell authored
      Finish basic updates to let the DaVinci MMC driver talk to
      the second MMC controller on dm355:
      
       - Update the MMC driver to use clk_get() correctly
          * use logical "mmc" clockname
          * fix its error handling logic (!)
      
       - Bugfixes to probe():
          * call mmc_add_host() only *after* everything is set up
          * check for mmc_add_host() errors
          * call request_irq() only after the host was added
          * start timer polling only after the host was added
      
       - And some cosmetic bits:
          * use more modern timer setup calls
          * request_irq() says mmc0 or mmc1, matching custom
      
      So now it comes up on both MMC controllers, and starts collecting
      interrupts on the second ... so there's progress.  But it can't
      see a card in either slot of a dm355 yet.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      245ed17f
    • David Brownell's avatar
      MMC DMA ... not just for MMC0 · 07df8e09
      David Brownell authored
      Update the davinci_mmc driver to stop hard-wiring use of
      mmc0 DMA channels:  look them up during probe, record them,
      and use the recorded values everywhere, not constants.
      Add a previously-missing diagnostic if probe() fails.
      
      Also fix a seeming bug in the rarely-used davinci_abort_dma()
      call.  It was aborting the wrong channel ... the idle one,
      not the active one.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      07df8e09
    • David Brownell's avatar
      mmc device creation updates (MMC1 too) · 70a3a094
      David Brownell authored
      Update MMC/SD device initialization to handle more chips, in
      particular the DM355 with its second MMC/SD controller:
      
       - Chip-specific stuff:
          * dm646x chips have no MMC
          * if this is a dm355, declare the second controller
      
       - Completeness/correctness:
          * use new davinci_clk_associate(), clockname "mmc"
          * provide DMA channel resources
          * provide SDIO IRQ resources
          * device numbering starts from zero, not one
      
       - Claim enough I/O space for all mmc/sd registers ...
         in fact, the whole page that's being ioremapped!
      
      Note that this doesn't address the basic problem that there's no way
      now for board init code to say which controllers to initialize, or
      how to do so.  Seems to not be an issue for any of the boards currently
      in the DaVinci GIT tree.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      70a3a094
    • David Brownell's avatar
      clock updates: support logical clock names · 0f8913ed
      David Brownell authored
      Update the DaVinci clock framework to handle clk_get(dev, name)
      better, adding davinci_clk_associate() method letting logical
      names be associated with devices.  This lets drivers move away
      from using "physical" clock names, which are changed in new chip
      versions and by adding more controller instances.
      
      Plus a few unrelated fixes to the DM355 clock tree:  it doesn't
      have IDE or EMAC, or their clocks, so don't list them.  But it
      does have two more SPI controllers ... list them instead.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      0f8913ed
    • David Brownell's avatar
      ASoC -- EVM driver grows dm355 support (?) · 9a5668e7
      David Brownell authored
      Teach the "davinci-evm" ASoC support to handle both DM6446
      and DM355 EVM boards by recognizing which board they're using,
      then setting up appropropriately.
      
      The only particularly ugly bit here is clock handling, where
      we need to "know" the right clock name to use.  This solution
      is simple, but may not work on some yet-to-be-seen boards
      that would want "McBSPCLK0".
      
      Note that this includes a minor bugfix:  now that DaVinci
      kernels can support multiple boards, board-specific ASoC
      components need to verify they're running on the right
      board before initializing.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      9a5668e7
    • David Brownell's avatar
      psc_mux() -- it's not all about dm6446 · 144f4d82
      David Brownell authored
      Generalize the psc_mux() stuff to stop assuming there are only
      DM6446 chips, and specifically to handle things the DM355 EVM
      will need:  SPI0, MMC0, MMC1, ASP1.
      
      Note that I think the clock framework (PSC) and pinmux framework
      really ought to be properly separated.  The pinmux stuff seems
      like it should fit well into devices-dmXXX.c logic, with boards
      declaring what device they use and how they're configured.  That
      works cleanly on other platforms.
      
      Likewise with muxing IRQ and EDMA channels.  Do it all as part
      of device setup.  (And maybe let it be reconfigured at runtime
      for oddball systems.)
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      144f4d82
    • David Brownell's avatar
      it's ASP, not McBSP · 06d1ea92
      David Brownell authored
      The DaVinci <mach/mcbsp.h> is full of useless stuff:
      
       (a) It's used with chips that don't *have* a McBSP; instead,
           they have an ASP.
      
       (b) Most of the registers and utilities apply to nothing I
           can find.  Not ASP; not the McBSP on chips like dm642.
      
      Replace with <mach/asp.h> since these DaVinci chips *do* have
      one or more ASP modules.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      06d1ea92
    • David Brownell's avatar
      DaVinci ASoC: fix multiboard buglet · da23213c
      David Brownell authored
      Minor bugfix:  now that DaVinci kernels can support multiple
      boards, board-specific ASoC components need to verify they're
      running on the right board before initializing.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      da23213c
    • David Brownell's avatar
      remove ancient/obsolete OSS-ism · 2a899dac
      David Brownell authored
      Remove remnants of an old OSS-audio-for-DaVinci patch, which
      tried to make some OMAP-specific AIC23 code do double duty as
      DaVinci AIC33 codec support.
      
      Nowadays there's sane ASoC support for both AIC23 and AIC33
      codecs, and there seems to be no need for this OSS remnant.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      2a899dac
    • David Brownell's avatar
      dm355 evm ethernet support · a84fe539
      David Brownell authored
      Let the DM355 EVM use its dm9000 ethernet controller; just
      declare it.  Relies on the patch fixing GPIO IRQs.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      a84fe539
    • David Brownell's avatar
      dm355evm input driver · 0180687d
      David Brownell authored
      Simple input driver support for the events reported by the
      MSP430 firmware on the DM355 EVM.  Verified using the remote
      included with the kit; docs weren't quite right.  Some of
      the keycode selections might need improvement; I'm hoping
      I implemented the remapping support right, so there's at
      least a runtime workaround.
      
      Keys on the remote seem to repeat undesirably.  Someone might
      want to see what's up with that, and fix it; it might just
      be an issue of tracking RC5 state and using the toggle.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      0180687d
    • David Brownell's avatar
      dm355evm rtc driver · 55893c82
      David Brownell authored
      Simple RTC driver for the MSP430 firmware on the DM355 EVM board.
      Other than not supporting atomic reads/writes of all four bytes,
      this is quite reasonable as a basic no-alarm RTC.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      55893c82
    • David Brownell's avatar
      dm355 evm i2c config updates · c4437ba6
      David Brownell authored
      Board support for the dm355evm_msp MFD driver.  This provides I2C
      initialization for new-style drivers, as used by that MFD driver
      and by mainline drivers for this board's audio and video codecs.
      
      It also updates the I2C bus to use 400 kHz.  The 20 kHz value was
      leftover from the DM6446 EVM, where the msp430 used an execrable
      bit-banged I2C implementation.  The msp430 on the DM355 EVM uses
      hardware I2C, and appears to have no such problems.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      c4437ba6
    • David Brownell's avatar
      dm355evm msp430 MFD driver · 16dc708f
      David Brownell authored
      Basic MFD framework for the MSP430 microcontroller firmware used
      on the dm355evm board:
      
       - Provides an interface for other drivers: register read/write
         utilities, and register declarations.
      
       - Directly exports:
           * Many signals through the GPIO framework
               + LEDs
               + SW6 through gpio sysfs
      	 + NTSC/nPAL jumper through gpio sysfs
      	 + ... more could be added later, e.g. MMC signals
           * Child devices:
      	+ LEDs, via leds-gpio child (and default triggers)
      	+ RTC, via rtc-dm355evm child device
      	+ Buttons and IR control, via dm355evm_keys
      
       - Supports power-off system call.  Use the reset button to power
         the board back up; the power supply LED will be on, but the
         MSP430 waits to re-activate the regulators.
      
       - On probe() this:
           * Announces firmware revision
           * Turns off the banked LEDs
           * Exports the resources noted above
           * Hooks the power-off support
           * Muxes tvp5146 -or- imager for video input
      
      Unless the new tvp514x driver (tracked for mainline) is configured,
      this assumes that some custom imager driver handles video-in.
      
      This completely ignores the registers reporting the output voltages
      on the various power supplies.  Someone could add a hwmon interface
      if that seems useful.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      16dc708f
    • David Brownell's avatar
      davinci gpio bugfixes · 2f8e9a6e
      David Brownell authored
      Update the DaVinci GPIO code to work better on non-dm6446 parts,
      notably the dm355:
      
       - Only handle the number of GPIOs the chip actually has.  So
         for example on dm6467, GPIO-42 is the last GPIO, and trying
         to use GPIO-43 now fails cleanly; or GPIO-72 on dm6446.
      
       - Enable GPIO interrupts on each 16-bit GPIO-irq bank ...
         previously, only the first five were enabled, so GPIO-80
         and above (on dm355) wouldn't trigger IRQs.
      
       - Use the right IRQ for each GPIO bank.  The wrong values were
         used for dm355 chips, so GPIO IRQs got routed incorrectly.
      
       - Handle up to four pairs of 16-bit GPIO banks ... previously
         only three were handled, so accessing GPIO-96 and up (e.g. on
         dm355) would oops.
      
       - Update several comments that were dm6446-specific.
      
      Verified by receiving GPIO-1 (dm9000) and GPIO-5 (msp430) IRQs
      on the DM355 EVM.
      
      One thing this doesn't do is handle the way some of the GPIO
      numbers on dm6467 are reserved but aren't valid as GPIOs.  Some
      bitmap logic could fix that if needed.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      2f8e9a6e
  2. 22 Nov, 2008 2 commits
  3. 21 Nov, 2008 21 commits