devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Add support for SD/MMC on SOCFPGA
@ 2013-09-09 15:33 dinguyen
  2013-09-09 15:33 ` [PATCH 1/3] arm: socfpga: Set the SDMMC clock phase in system manager dinguyen
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: dinguyen @ 2013-09-09 15:33 UTC (permalink / raw)
  To: dinh.linux
  Cc: Dinh Nguyen, Pavel Machek, Rob Herring, Pawel Moll, Mark Rutland,
	Stephen Warren, Ian Campbell, Chris Ball, Jaehoon Chung,
	Seungwon Jeon, devicetree, linux-mmc, Arnd Bergmann,
	Olof Johansson, linux-arm-kernel

From: Dinh Nguyen <dinguyen@altera.com>

Hi,

Here is a patch series that enables SD/MMC support for the SOCFPGA platform.
This is the 6th revision of the series. This series is intended for v3.13.

v6:
- Reuse "samsung,dw-mshc-sdr-timing" binding
- Clean up dw_mmc-socfpga.c to have only the necessary functions
	- Remove dw_mci_socfpga_parse_dt(), as we'll let the platform function:
		socfpga_sysmgr_set_dwmmc_drvsel_smpsel() do that work
	- Always use SDMMC_CMD_USE_HOLD_REG
- Add mach-socfpga/system_mgr.c, which contains function that will set the
  SD/MMC SDR values in the System Manager.
- Expose an API function in the mach-socfpga platform code so that the SD/MMC
  driver can use to set the SDR values.

I know that there's a general rule not to have drivers access specific
function(s) in platform code, but for this case I am really unsure of what
would be the best solution. The system manager IP block itself does not warrant
a driver, so a "syscon" driver should suffice. However, there are specific
register offsets that are needed, these can be defined in either in the SD/MMC 
or DTS entry. But in order for the DTS entries to be correct, it would need register 
offset information as well. And I was informed that register offsets were frowned 
upon in the past.
   
So for this go-around, I am exposing an API from the mach-socfpga platform
code that will only be used by a platform-specific implementation of the SD/MMC
driver.

v5:
- Add "altr,ciu-clk-offset" that represents the necessary offset
	and shift values in the sysmgr phandle. This is used to set
	the correct CIU clock values.
    
v4:
- Add a complete binding example in documentations
- Add a phandle entry for "altr,sysmgr" which links the system
	manager to the SD/MMC IP block that controls the SDR timings.
- Split up patches
	1/3 - Add syscon binding to sys-mgr node
	2/3 - DTS bindings and documentation for SD/MMC on SOCFPGA
	3/3 - Driver changes to use the bindings
    
v3:
- Explicitly reference synopsis-dw-mshc.txt for base bindings
- Remove "dw-mshc-ciu-div" as driver can get clock information dts "ciu" entry
- Fixed indentation issue
    
v2:
- Remove bus-width and extra line in documentation
- Merge bindings example into a single node in documentation


Dinh Nguyen (3):
  arm: socfpga: Set the SDMMC clock phase in system manager
  mmc: dw_mmc-socfpga: Clean up SOCFPGA platform specific functionality
  arm: dts: socfpga: Add support for SD/MMC

 .../devicetree/bindings/mmc/socfpga-dw-mshc.txt    |   38 ++++++++++++
 arch/arm/boot/dts/socfpga.dtsi                     |   11 ++++
 arch/arm/boot/dts/socfpga_cyclone5.dts             |   12 ++++
 arch/arm/boot/dts/socfpga_vt.dts                   |   12 ++++
 arch/arm/mach-socfpga/Makefile                     |    2 +-
 arch/arm/mach-socfpga/core.h                       |    6 ++
 arch/arm/mach-socfpga/system_mgr.c                 |   32 ++++++++++
 drivers/mmc/host/dw_mmc-pltfm.h                    |    2 +-
 drivers/mmc/host/dw_mmc-socfpga.c                  |   63 +-------------------
 9 files changed, 115 insertions(+), 63 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mmc/socfpga-dw-mshc.txt
 create mode 100644 arch/arm/mach-socfpga/system_mgr.c

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-09-26  3:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-09 15:33 [PATCH 0/3] Add support for SD/MMC on SOCFPGA dinguyen
2013-09-09 15:33 ` [PATCH 1/3] arm: socfpga: Set the SDMMC clock phase in system manager dinguyen
2013-09-14 11:00   ` Pavel Machek
2013-09-26  1:50     ` Chris Ball
     [not found]       ` <8761to4ai8.fsf-DGHOrqG7t0YzNDMTQreKSUB+6BGkLq7r@public.gmane.org>
2013-09-26  3:00         ` Dinh Nguyen
2013-09-09 15:33 ` [PATCH 2/3] mmc: dw_mmc-socfpga: Clean up SOCFPGA platform specific functionality dinguyen
2013-09-09 15:33 ` [PATCH 3/3] arm: dts: socfpga: Add support for SD/MMC dinguyen
2013-09-09 21:11   ` Stephen Warren
     [not found]     ` <522E398F.3080100-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-14 12:30       ` Tomasz Figa
2013-09-16 16:36         ` Stephen Warren
     [not found]           ` <52373383.7030601-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-09-16 20:29             ` Dinh Nguyen
     [not found]   ` <1378740833-4883-4-git-send-email-dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
2013-09-14 11:02     ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).