All of lore.kernel.org
 help / color / mirror / Atom feed
From: viresh.linux@gmail.com (viresh kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/9] SPEAr13xx: Add source files
Date: Sat, 21 Apr 2012 17:53:00 +0530	[thread overview]
Message-ID: <CAOh2x=mFk4j3+5-gMG1gbpJ6tPMDz1ArYQyL2=cBGfH+B9eLWw@mail.gmail.com> (raw)
In-Reply-To: <201204201815.57556.arnd@arndb.de>

On 4/20/12, Arnd Bergmann <arnd@arndb.de> wrote:
> On Friday 20 April 2012, Viresh Kumar wrote:
>
>> +static struct dw_dma_slave uart1_dma_param[] = {
>> +	{
> Again, I hope that we can remove this eventually when we have the DMA
> bindings, but it's ok for now.

Surely try do later, once those DT bindings are up.

>> +/* SATA device registration */
>> +static int sata_miphy_init(struct device *dev, void __iomem *addr)
>> +{
>> +	writel(SPEAR1340_SATA_CFG_VAL, SPEAR1340_PCIE_SATA_CFG);
>> +	writel(SPEAR1340_PCIE_SATA_MIPHY_CFG_SATA_25M_CRYSTAL_CLK,
>> +			SPEAR1340_PCIE_MIPHY_CFG);
>> +	/* Switch on sata power domain */
>> +	writel((readl(SPEAR1340_PCM_CFG) | (0x800)), SPEAR1340_PCM_CFG);
>> +	msleep(20);
>> +	/* Disable PCIE SATA Controller reset */
>> +	writel((readl(SPEAR1340_PERIP1_SW_RST) & (~0x1000)),
>> +			SPEAR1340_PERIP1_SW_RST);
>> +	msleep(20);
>> +
>> +	return 0;
>> +}
>> +
>> +void sata_miphy_exit(struct device *dev)
>> +{
>> +	writel(0, SPEAR1340_PCIE_SATA_CFG);
>> +	writel(0, SPEAR1340_PCIE_MIPHY_CFG);
>> +
>> +	/* Enable PCIE SATA Controller reset */
>> +	writel((readl(SPEAR1340_PERIP1_SW_RST) | (0x1000)),
>> +			SPEAR1340_PERIP1_SW_RST);
>> +	msleep(20);
>> +	/* Switch off sata power domain */
>> +	writel((readl(SPEAR1340_PCM_CFG) & (~0x800)), SPEAR1340_PCM_CFG);
>> +	msleep(20);
>> +}
>> +
>> +int sata_suspend(struct device *dev)
>> +{
>> +	if (dev->power.power_state.event == PM_EVENT_FREEZE)
>> +		return 0;
>> +
>> +	sata_miphy_exit(dev);
>> +
>> +	return 0;
>> +}
>
> I'd like to see this done differently, with a ahci_spear driver derived from
> ahci_platform that provides these functions in a modular driver that
> registers
> to a spear specific identifier string and is able to do the platform
> specific
> based on information it can find in the device tree. That would however
> require
> changes to the existing ahci_platform code and I'd first like to hear what
> Jeff and others have to say about this.

To get platform data for ahci with DT, we need to do as mentioned by you.
But for now maybe we can accept this approach. Once somebody fix ahci
DT support as you suggested, we could create such drivers.

--
viresh

  reply	other threads:[~2012-04-21 12:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20 17:22 [PATCH 0/9] Add support for SPEAr13xx SoCs Viresh Kumar
2012-04-20 17:22 ` [PATCH 1/9] SPEAr13xx: Add header files Viresh Kumar
2012-04-20 17:52   ` Arnd Bergmann
2012-04-21 12:27     ` viresh kumar
2012-04-21 18:37       ` Arnd Bergmann
2012-04-23 11:47         ` viresh kumar
2012-04-23 12:25           ` viresh kumar
2012-04-20 17:22 ` [PATCH 2/9] SPEAr13xx: Add source files Viresh Kumar
2012-04-20 18:15   ` Arnd Bergmann
2012-04-21 12:23     ` viresh kumar [this message]
2012-04-21 18:31       ` Arnd Bergmann
2012-04-20 17:22 ` [PATCH 3/9] SPEAr13xx: Add common clock framework support Viresh Kumar
2012-04-23 21:43   ` Turquette, Mike
2012-04-24  3:57     ` Viresh Kumar
2012-04-20 17:22 ` [PATCH 4/9] pinctrl: SPEAr: Create macro for declaring GPIO PINS Viresh Kumar
2012-04-20 17:22 ` [PATCH 6/9] SPEAr13xx: Add dts and dtsi files Viresh Kumar
2012-04-20 17:22 ` [PATCH 7/9] SPEAr13xx: Add compilation support Viresh Kumar
2012-04-20 17:22 ` [PATCH 8/9] SPEAr13xx: Add defconfig Viresh Kumar
2012-04-20 17:22 ` [PATCH 9/9] SPEAr: Update MAINTAINERS and Documentation Viresh Kumar
2012-04-20 18:21 ` [PATCH 0/9] Add support for SPEAr13xx SoCs Arnd Bergmann
2012-04-21 12:17   ` viresh kumar
2012-04-21 12:24     ` Arnd Bergmann
2012-04-21 12:29       ` viresh kumar

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='CAOh2x=mFk4j3+5-gMG1gbpJ6tPMDz1ArYQyL2=cBGfH+B9eLWw@mail.gmail.com' \
    --to=viresh.linux@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.