1. 05 5月, 2015 1 次提交
  2. 04 5月, 2015 2 次提交
    • H
      sunxi: mmc: Fix card-detect gpio handling to work with the driver-model · 90641f82
      Hans de Goede 提交于
      The driver-model gpio functions may return another value then -1 as error,
      make the sunxi mmc code properly handle this.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Acked-by: NIan Campbell <ijc@hellion.org.uk>
      90641f82
    • H
      sunxi: Introduce a hidden SUNXI_GEN_SUNxI Kconfig bool · 44d8ae5b
      Hans de Goede 提交于
      sun6i and newer (derived) SoCs such as the sun8i-a23, sun8i-a33 and sun9i
      have a various things in common, like having separate ahb reset control
      registers, the SID living inside the pmic, custom pmic busses, new style
      watchdog, etc.
      
      This commit introduces a new hidden SUNXI_GEN_SUN6I Kconfig bool which can be
      used to check for these features avoiding the need for an ever growing list
      of "#if defined CONFIG_MACH_SUN?I" conditionals as we add support for more
      "new style" sunxi SoCs.
      
      Note that this commit changes the behavior of the gmac and hdmi code for
      sun8i and the upcoming sun9i devices. This does not matter as sun8i does
      not have gmac nor hdmi, and sun9i has new hardware-blocks for these so
      the old code will not work there.
      
      Also this is intentional as if a sun8i / sun9i variant which does use the
      old hwblocks shows up then the GEN_SUN6I code paths will be the right ones
      to use.
      
      For completeness this also adds a SUNXI_GEN_SUN4I bool for A10/A13/A20.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: NIan Campbell <ijc@hellion.org.uk>
      44d8ae5b
  3. 24 2月, 2015 1 次提交
  4. 21 2月, 2015 1 次提交
  5. 02 2月, 2015 1 次提交
  6. 22 1月, 2015 2 次提交
  7. 14 1月, 2015 2 次提交
    • A
      mmc: sunxi: Fix misuse of gpio_direction_input() · b0c4ae1a
      Axel Lin 提交于
      It does not make sense to make gpio_direction_input() return the gpio input
      status. The return value of gpio_direction_input() is inconsistent if
      CONFIG_DM_GPIO is defined.
      And we don't need to call gpio_direction_input() int sunxi_mmc_getcd().
      Just init the gpio once in mmc_resource_init() is enough.
      Signed-off-by: NAxel Lin <axel.lin@ingics.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Signed-off-by: NIan Campbell <ijc@hellion.org.uk>
      b0c4ae1a
    • H
      sunxi: mmc: Properly setup mod-clk and clock sampling phases · fc3a8325
      Hans de Goede 提交于
      The sunxi mmc controller has both an internal clock divider, as well as
      the divider in the mod0-clk for the mmc controller.
      
      The internal divider cannot be used, as it conflicts with the setting of
      clock sampling phases which is done in the mod0-clk, so it must be set to
      0 (divide by 1).
      
      For some reason while the kernel has had this correct from day one, the
      u-boot sunxi mmc code has been using a fixed mod0-clk and setting its
      internal divider depending on the desired speed. This is something which
      we've inherited from the original Allwinner u-boot sources, but while this
      has been fixed in Allwinner's own u-boot code at least for the A23 and later
      upstream u-boot was still doing this wrong.
      
      This commit fixes this, thereby also fixing mmc support not working reliable
      on the A23 (which seems more sensitive to this) and possible also fixes some
      other sunxi mmc issues.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: NIan Campbell <ijc@hellion.org.uk>
      fc3a8325
  8. 05 11月, 2014 2 次提交
  9. 24 10月, 2014 5 次提交
  10. 07 7月, 2014 1 次提交
    • H
      sunxi: Remove mmc DMA support · b6ae6765
      Hans de Goede 提交于
      The DMA code in sunxi_mmc.c is broken. mmc_trans_data_by_dma() allocates the
      dma descriptors on the stack, and then exits while the dma transfer is in
      progress, so the dma engine is reading stack memory which at that point may
      be re-used. So far we've gotten away with this by luck, but recent u-boot
      changes have shifted the stack start address by 16 bytes, which combined
      with dma alignment now exposes this problem.
      
      Since we end up just busy waiting for the dma engine anyway, this commit
      fixes things by simply removing the dma code, resulting in smaller bug-free
      code.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: NIan Campbell <ijc@hellion.org.uk>
      b6ae6765
  11. 25 5月, 2014 1 次提交
    • I
      sunxi: mmc support · e24ea55c
      Ian Campbell 提交于
      On Mon, 2014-05-05 at 14:18 +0200, Stefan Roese wrote:
      > > +	case 1:
      > > +#if CONFIG_MMC1_PG
      
      > Are you sure that this is correct and shouldn't be:
      >
      > +#ifdef CONFIG_MMC1_PG
      >
      > ?
      
      It's "correct" in so far as it works (the boards.cfg config stuff
      #defines things to 1), but I think you are right that it isn't the
      preferred style. But...
      
      > A quick scan through this patch series shows that this define
      > is not set at all. Perhaps its outdated? Or is it used to support
      > some other sunxi SoC? Not sure, perhaps it should be removed for
      > now.
      
      ...I had thought that it was to support some other board which wasn't
      being upstreamed right now, so eventually useful and harmless for now,
      but I've just checked and it isn't actually used by any of the boards in
      u-boot-sunxi.git. So rather than fix it to use #ifdef lets drop it.
      Rather than resend the entire series, here is v5.1 of this patch.
      
      > Other than this please add my:
      >
      > Reviewed-by: Stefan Roese <sr@denx.de>
      
      Thanks!
      
      8<---------------------------------
      
      >From 20704e35a41664de5f516ed0e02981ac06085102 Mon Sep 17 00:00:00 2001
      From: Ian Campbell <ijc@hellion.org.uk>
      Date: Fri, 7 Mar 2014 04:29:39 +0000
      Subject: [PATCH v5.1 7/8] sunxi: mmc support
      
      This adds support for the MMC controller on the Allwinner A20 (sun7i)
      processor.
      Signed-off-by: NHenrik Nordstrom <henrik@henriknordstrom.net>
      Signed-off-by: NLuke Leighton <lkcl@lkcl.net>
      Signed-off-by: NOliver Schinagl <oliver@schinagl.nl>
      Signed-off-by: NWills Wang <wills.wang.open@gmail.com>
      Signed-off-by: NIan Campbell <ijc@hellion.org.uk>
      Reviewed-by: NMarek Vasut <marex@denx.de>
      Reviewed-by: NStefan Roese <sr@denx.de>
      Cc: Tom Cubie <Mr.hipboi@gmail.com>
      Cc: Aaron Maoye <leafy.myeh@allwinnertech.com>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      Reviewed-by: NTom Rini <trini@ti.com>
      e24ea55c