From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: <linux-kernel@vger.kernel.org>
Cc: <greg@kroah.com>, <linux-omap@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
Santosh Shilimkar <santosh.shilimkar@ti.com>
Subject: [PATCH v5 0/7] Add TI EMIF SDRAM controller driver
Date: Fri, 27 Apr 2012 17:54:02 +0530 [thread overview]
Message-ID: <1335529449-28046-1-git-send-email-santosh.shilimkar@ti.com> (raw)
In-Reply-To: <y>
Add a driver for the EMIF SDRAM controller used in Texas Instrument SoCs
EMIF is an SDRAM controller that supports, based on its revision,
one or more of LPDDR2/DDR2/DDR3 protocols.This driver adds support
for LPDDR2.
The driver supports the following features:
- Calculates the DDR AC timing parameters to be set in EMIF
registers using data from the device data-sheets and based
on the DDR frequency. If data from data-sheets is not available
default timing values from the JEDEC spec are used. These
will be safe, but not necessarily optimal
- API for changing timings during DVFS or at boot-up
- Temperature alert configuration and handling of temperature
alerts, if any for LPDDR2 devices
* temperature alert is based on periodic polling of MR4 mode
register in DDR devices automatically performed by hardware
* timings are de-rated and brought back to nominal when
temperature raises and falls respectively
- Cache of calculated register values to avoid re-calculating
them
The driver will need some minor updates when it is eventually
integrated with Dynamic Voltage and Frequency Scaling (DVFS).
This can not be done now as DVFS support is not available in
the mainline yet.
Discussions with Santosh Shilimkar <santosh.shilimkar@ti.com>
were immensely helpful in shaping up the interfaces. Vibhore Vardhan
<vvardhan@gmail.com> did the initial code snippet for thermal
handling.
Testing:
- The driver is tested on OMAP4430 SDP.
- The driver in a slightly adapted form is also tested on OMAP5.
- Since mainline kernel doesn't have DVFS support yet,
testing was done using a test module.
- Temperature alert handling was tested with simulated interrupts
and faked temperature values as testing all cases in real-life
scenarios is difficult.
- Tested the driver as a module
Cc: Greg KH <greg@kroah.com>
v5:
- Moved the EMIF driver to drivers/memory as per discussion thread [2]
v4:
- Converted instances of EXPORT_SYMBOL to EXPORT_SYMBOL_GPL
- Removed un-necessary "#ifndef __ASSEMBLY__'
- Minor formatting fix
v2:
- Fixed a bug found in the implementation of errata i728
workaround
- Fixed the value of frequency printed in debugfs
- Dropped the hwmod patch as Paul has already posted a
a hwmod series [1] that adds hwmod for EMIF
- Converted instances of __init to __init_or_module
Regards
Santosh
[1] http://thread.gmane.org/gmane.linux.ports.arm.omap/72855
[2] https://lkml.org/lkml/2012/4/12/173
Aneesh V (7):
ddr: add LPDDR2 data from JESD209-2
memory: emif: add register definitions for EMIF
memory: emif: add basic infrastructure for EMIF driver
memory: emif: handle frequency and voltage change events
memory: emif: add interrupt and temperature handling
memory: emif: add one-time settings
memory: emif: add debugfs entries for emif
Documentation/memory-devices/ti-emif.txt | 57 +
drivers/Kconfig | 4 +
drivers/Makefile | 3 +
drivers/memory/Kconfig | 22 +
drivers/memory/Makefile | 5 +
drivers/memory/emif.c | 1670 ++++++++++++++++++++++++++++++
drivers/memory/emif.h | 589 +++++++++++
include/linux/platform_data/emif_plat.h | 128 +++
include/memory/jedec_ddr.h | 175 ++++
lib/Kconfig | 8 +
lib/Makefile | 2 +
lib/jedec_ddr_data.c | 135 +++
12 files changed, 2798 insertions(+), 0 deletions(-)
create mode 100644 Documentation/memory-devices/ti-emif.txt
create mode 100644 drivers/memory/Kconfig
create mode 100644 drivers/memory/Makefile
create mode 100644 drivers/memory/emif.c
create mode 100644 drivers/memory/emif.h
create mode 100644 include/linux/platform_data/emif_plat.h
create mode 100644 include/memory/jedec_ddr.h
create mode 100644 lib/jedec_ddr_data.c
--
1.7.5.4
next reply other threads:[~2012-04-27 12:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-27 12:24 Santosh Shilimkar [this message]
2012-04-27 12:24 ` [PATCH v5 1/7] ddr: add LPDDR2 data from JESD209-2 Santosh Shilimkar
2012-04-27 12:24 ` [PATCH v5 2/7] memory: emif: add register definitions for EMIF Santosh Shilimkar
2012-04-27 12:24 ` [PATCH v5 3/7] memory: emif: add basic infrastructure for EMIF driver Santosh Shilimkar
2012-04-27 12:24 ` [PATCH v5 4/7] memory: emif: handle frequency and voltage change events Santosh Shilimkar
2012-04-27 12:24 ` [PATCH v5 5/7] memory: emif: add interrupt and temperature handling Santosh Shilimkar
2012-04-27 12:24 ` [PATCH v5 6/7] memory: emif: add one-time settings Santosh Shilimkar
2012-04-27 12:24 ` [PATCH v5 7/7] memory: emif: add debugfs entries for emif Santosh Shilimkar
2012-05-02 5:16 ` [PATCH v5 0/7] Add TI EMIF SDRAM controller driver Greg KH
2012-05-02 6:50 ` Santosh Shilimkar
2012-05-02 18:03 ` Greg KH
2012-05-03 6:15 ` Shilimkar, Santosh
2012-05-03 22:38 ` Paul Gortmaker
2012-05-04 0:03 ` Greg KH
2012-05-04 6:32 ` Santosh Shilimkar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1335529449-28046-1-git-send-email-santosh.shilimkar@ti.com \
--to=santosh.shilimkar@ti.com \
--cc=greg@kroah.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®