All of lore.kernel.org
 help / color / mirror / Atom feed
* sata AHCI controller over non-PCI bus
@ 2009-08-10  8:18 Subbrathnam, Swaminathan
  2009-08-10  9:03 ` Sergei Shtylyov
  0 siblings, 1 reply; 10+ messages in thread
From: Subbrathnam, Swaminathan @ 2009-08-10  8:18 UTC (permalink / raw)
  To: linux-ide

Hi,

            I would like to post support for OMAPL138 SATA controller that is AHCI 1.1 compliant.  OMAPL138 is an ARM926 based platform.

Current "ahci.c" assumes that AHCI is getting supported over PCI by default, whereas the SATA AHCI controller on OMAPL138 is connected to a non-PCI bus.  Since I am in the process of posting the support I would like to get the  opinion from the community on how to proceed on this front.  I see the following 2 options today

1.       #ifdef the PCI specific code in ahci.c and implement the platform_device based implementation to support non-PCI AHCI controllers.

2.       Re-organize the ahci.c to abstract the AHCI functionalities from PCI, non-PCI bus dependencies.

Currently we have implemented Option 1 in our internal tree to support SATA on OMAPL138 platform and it works well.  Ideally I would want to proceed with Option 2 but would like get feedback from the community before proceeding in this direction.

 

Regards

swami


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

* Re: sata AHCI controller over non-PCI bus
  2009-08-10  8:18 sata AHCI controller over non-PCI bus Subbrathnam, Swaminathan
@ 2009-08-10  9:03 ` Sergei Shtylyov
  2009-08-10  9:20   ` Sergei Shtylyov
  2009-08-10  9:22   ` Subbrathnam, Swaminathan
  0 siblings, 2 replies; 10+ messages in thread
From: Sergei Shtylyov @ 2009-08-10  9:03 UTC (permalink / raw)
  To: Subbrathnam, Swaminathan; +Cc: linux-ide

Hello.

Subbrathnam, Swaminathan wrote:
> Hi,
>
>             I would like to post support for OMAPL138 SATA controller that is AHCI 1.1 compliant.  OMAPL138 is an ARM926 based platform.
>
> Current "ahci.c" assumes that AHCI is getting supported over PCI by default, whereas the SATA AHCI controller on OMAPL138 is connected to a non-PCI bus.  Since I am in the process of posting the support I would like to get the  opinion from the community on how to proceed on this front.

   Well, you're not the first with this problem, Marvell already had it.

>   I see the following 2 options today
>
> 1.       #ifdef the PCI specific code in ahci.c and implement the platform_device based implementation to support non-PCI AHCI controllers.
>   

   I don't think this is a community-acceptable option at all.

> 2.       Re-organize the ahci.c to abstract the AHCI functionalities from PCI, non-PCI bus dependencies.
>
> Currently we have implemented Option 1 in our internal tree to support SATA on OMAPL138 platform and it works well.  Ideally I would want to proceed with Option 2 but would like get feedback from the community before proceeding in this direction.

   See 
http://git.kernel.org/?p=linux/kernel/git/jgarzik/libata-dev.git;a=shortlog;h=libahci 
for Jeff Garzik's work on separating AHCI support from PCI.

MBR, Sergei



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

* Re: sata AHCI controller over non-PCI bus
  2009-08-10  9:03 ` Sergei Shtylyov
@ 2009-08-10  9:20   ` Sergei Shtylyov
  2009-08-10  9:22   ` Subbrathnam, Swaminathan
  1 sibling, 0 replies; 10+ messages in thread
From: Sergei Shtylyov @ 2009-08-10  9:20 UTC (permalink / raw)
  To: Subbrathnam, Swaminathan; +Cc: linux-ide

Hello, I wrote:

>>             I would like to post support for OMAPL138 SATA controller 
>> that is AHCI 1.1 compliant.  OMAPL138 is an ARM926 based platform.
>>
>> Current "ahci.c" assumes that AHCI is getting supported over PCI by 
>> default, whereas the SATA AHCI controller on OMAPL138 is connected to 
>> a non-PCI bus.  Since I am in the process of posting the support I 
>> would like to get the  opinion from the community on how to proceed 
>> on this front.
>
>   Well, you're not the first with this problem, Marvell already had it.

   Er, not Marvell... Synopsis. :-<

>> 2.       Re-organize the ahci.c to abstract the AHCI functionalities 
>> from PCI, non-PCI bus dependencies.
>>
>> Currently we have implemented Option 1 in our internal tree to 
>> support SATA on OMAPL138 platform and it works well.  Ideally I would 
>> want to proceed with Option 2 but would like get feedback from the 
>> community before proceeding in this direction.
>
>   See 
> http://git.kernel.org/?p=linux/kernel/git/jgarzik/libata-dev.git;a=shortlog;h=libahci 
> for Jeff Garzik's work on separating AHCI support from PCI.

   Well, no, it doesn't separate PCI code yet (and the task for this 
patchset was different). Yet it was a step in that direction... I 
suggest that you somehow coordinate with Sagar Borikar, see his initial 
patch here:

http://marc.info/?l=linux-ide&m=123807608819226

MBR, Sergei



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

* RE: sata AHCI controller over non-PCI bus
  2009-08-10  9:03 ` Sergei Shtylyov
  2009-08-10  9:20   ` Sergei Shtylyov
@ 2009-08-10  9:22   ` Subbrathnam, Swaminathan
  2009-08-16 12:53     ` Jeff Garzik
  1 sibling, 1 reply; 10+ messages in thread
From: Subbrathnam, Swaminathan @ 2009-08-10  9:22 UTC (permalink / raw)
  To: Sergei Shtylyov, jeff; +Cc: linux-ide

Jeff,
	From the below link (from Sergei) it seems that you have already re-factored the AHCI implementation dependency on PCI.  I would like to add support for the OMAPL138 SATA on top of your changes.  That would be the ideal way forward for me.

	Have the ahci re-factoring changes queued for mainline merge already?  I just joined the list and hence do not know the status.

Sergei,
	Appreciate the response.

Regards
swami

-----Original Message-----
From: Sergei Shtylyov [mailto:sshtylyov@ru.mvista.com] 
Sent: Monday, August 10, 2009 2:33 PM
To: Subbrathnam, Swaminathan
Cc: linux-ide@vger.kernel.org
Subject: Re: sata AHCI controller over non-PCI bus

Hello.

Subbrathnam, Swaminathan wrote:
> Hi,
>
>             I would like to post support for OMAPL138 SATA controller that is AHCI 1.1 compliant.  OMAPL138 is an ARM926 based platform.
>
> Current "ahci.c" assumes that AHCI is getting supported over PCI by default, whereas the SATA AHCI controller on OMAPL138 is connected to a non-PCI bus.  Since I am in the process of posting the support I would like to get the  opinion from the community on how to proceed on this front.

   Well, you're not the first with this problem, Marvell already had it.

>   I see the following 2 options today
>
> 1.       #ifdef the PCI specific code in ahci.c and implement the platform_device based implementation to support non-PCI AHCI controllers.
>   

   I don't think this is a community-acceptable option at all.

> 2.       Re-organize the ahci.c to abstract the AHCI functionalities from PCI, non-PCI bus dependencies.
>
> Currently we have implemented Option 1 in our internal tree to support SATA on OMAPL138 platform and it works well.  Ideally I would want to proceed with Option 2 but would like get feedback from the community before proceeding in this direction.

   See 
http://git.kernel.org/?p=linux/kernel/git/jgarzik/libata-dev.git;a=shortlog;h=libahci 
for Jeff Garzik's work on separating AHCI support from PCI.

MBR, Sergei




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

* Re: sata AHCI controller over non-PCI bus
  2009-08-10  9:22   ` Subbrathnam, Swaminathan
@ 2009-08-16 12:53     ` Jeff Garzik
       [not found]       ` <4A88014D.9060309-o2qLIJkoznsdnm+yROfE0A@public.gmane.org>
                         ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Jeff Garzik @ 2009-08-16 12:53 UTC (permalink / raw)
  To: Subbrathnam, Swaminathan; +Cc: Sergei Shtylyov, linux-ide, LKML

Subbrathnam, Swaminathan wrote:
> Jeff,
> 	From the below link (from Sergei) it seems that you have already re-factored the AHCI implementation dependency on PCI.  I would like to add support for the OMAPL138 SATA on top of your changes.  That would be the ideal way forward for me.
> 
> 	Have the ahci re-factoring changes queued for mainline merge already?  I just joined the list and hence do not know the status.
> 
> Sergei,
> 	Appreciate the response.

I store the refactoring in git, on the "libahci" branch of
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git

Unfortunately, I am having second thoughts about an element of the 
current design.  With current Linux distributions, they do not appear to 
deal well with the multi-module dependency libata -> libahci -> ahci. 
If I had to guess, I would say that mkinitrd creation tools only look at 
one tree level's worth of kernel module dependencies.

Thus, ahci would wind up -not- in initrd, in a libahci solution.

I am thinking that I will just add Marvell and ATP support to ahci.c, 
and let someone else deal with libahci separation -- which is still needed.

At this point, I would rather get Marvell/ATP support into users' hands, 
rather than wait for distros to catch up to modern technology.

	Jeff





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

* RE: sata AHCI controller over non-PCI bus
  2009-08-16 12:53     ` Jeff Garzik
@ 2009-08-16 14:35           ` Subbrathnam, Swaminathan
  2009-08-16 15:34       ` James Bottomley
  2009-08-16 16:55       ` Robert Hancock
  2 siblings, 0 replies; 10+ messages in thread
From: Subbrathnam, Swaminathan @ 2009-08-16 14:35 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: linux-ide-u79uwXL29TY76Z2rM5mHXA,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
	LKML

Jeff,

I can work on the seperation aspects as I need to get the OMAPL138 SATA solution working.  I will try to provide a basic implementation by end of this week.  Pl. provide your feedback on the same if we need to further refine it to address broad use cases.

Thanks for your response.

regards
swami

________________________________________
From: Jeff Garzik [jeff-o2qLIJkoznsdnm+yROfE0A@public.gmane.org]
Sent: Sunday, August 16, 2009 6:23 PM
To: Subbrathnam, Swaminathan
Cc: Sergei Shtylyov; linux-ide-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; LKML
Subject: Re: sata AHCI controller over non-PCI bus

Subbrathnam, Swaminathan wrote:
> Jeff,
>       From the below link (from Sergei) it seems that you have already re-factored the AHCI implementation dependency on PCI.  I would like to add support for the OMAPL138 SATA on top of your changes.  That would be the ideal way forward for me.
>
>       Have the ahci re-factoring changes queued for mainline merge already?  I just joined the list and hence do not know the status.
>
> Sergei,
>       Appreciate the response.

I store the refactoring in git, on the "libahci" branch of
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git

Unfortunately, I am having second thoughts about an element of the
current design.  With current Linux distributions, they do not appear to
deal well with the multi-module dependency libata -> libahci -> ahci.
If I had to guess, I would say that mkinitrd creation tools only look at
one tree level's worth of kernel module dependencies.

Thus, ahci would wind up -not- in initrd, in a libahci solution.

I am thinking that I will just add Marvell and ATP support to ahci.c,
and let someone else deal with libahci separation -- which is still needed.

At this point, I would rather get Marvell/ATP support into users' hands,
rather than wait for distros to catch up to modern technology.

        Jeff

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

* RE: sata AHCI controller over non-PCI bus
@ 2009-08-16 14:35           ` Subbrathnam, Swaminathan
  0 siblings, 0 replies; 10+ messages in thread
From: Subbrathnam, Swaminathan @ 2009-08-16 14:35 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Sergei Shtylyov, linux-ide, LKML, davinci-linux-open-source

Jeff,

I can work on the seperation aspects as I need to get the OMAPL138 SATA solution working.  I will try to provide a basic implementation by end of this week.  Pl. provide your feedback on the same if we need to further refine it to address broad use cases.

Thanks for your response.

regards
swami

________________________________________
From: Jeff Garzik [jeff@garzik.org]
Sent: Sunday, August 16, 2009 6:23 PM
To: Subbrathnam, Swaminathan
Cc: Sergei Shtylyov; linux-ide@vger.kernel.org; LKML
Subject: Re: sata AHCI controller over non-PCI bus

Subbrathnam, Swaminathan wrote:
> Jeff,
>       From the below link (from Sergei) it seems that you have already re-factored the AHCI implementation dependency on PCI.  I would like to add support for the OMAPL138 SATA on top of your changes.  That would be the ideal way forward for me.
>
>       Have the ahci re-factoring changes queued for mainline merge already?  I just joined the list and hence do not know the status.
>
> Sergei,
>       Appreciate the response.

I store the refactoring in git, on the "libahci" branch of
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git

Unfortunately, I am having second thoughts about an element of the
current design.  With current Linux distributions, they do not appear to
deal well with the multi-module dependency libata -> libahci -> ahci.
If I had to guess, I would say that mkinitrd creation tools only look at
one tree level's worth of kernel module dependencies.

Thus, ahci would wind up -not- in initrd, in a libahci solution.

I am thinking that I will just add Marvell and ATP support to ahci.c,
and let someone else deal with libahci separation -- which is still needed.

At this point, I would rather get Marvell/ATP support into users' hands,
rather than wait for distros to catch up to modern technology.

        Jeff

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

* Re: sata AHCI controller over non-PCI bus
  2009-08-16 12:53     ` Jeff Garzik
       [not found]       ` <4A88014D.9060309-o2qLIJkoznsdnm+yROfE0A@public.gmane.org>
@ 2009-08-16 15:34       ` James Bottomley
  2009-08-16 20:18         ` Jeff Garzik
  2009-08-16 16:55       ` Robert Hancock
  2 siblings, 1 reply; 10+ messages in thread
From: James Bottomley @ 2009-08-16 15:34 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Subbrathnam, Swaminathan, Sergei Shtylyov, linux-ide, LKML

On Sun, 2009-08-16 at 08:53 -0400, Jeff Garzik wrote:
> Subbrathnam, Swaminathan wrote:
> > Jeff,
> > 	From the below link (from Sergei) it seems that you have already re-factored the AHCI implementation dependency on PCI.  I would like to add support for the OMAPL138 SATA on top of your changes.  That would be the ideal way forward for me.
> > 
> > 	Have the ahci re-factoring changes queued for mainline merge already?  I just joined the list and hence do not know the status.
> > 
> > Sergei,
> > 	Appreciate the response.
> 
> I store the refactoring in git, on the "libahci" branch of
> git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
> 
> Unfortunately, I am having second thoughts about an element of the 
> current design.  With current Linux distributions, they do not appear to 
> deal well with the multi-module dependency libata -> libahci -> ahci. 
> If I had to guess, I would say that mkinitrd creation tools only look at 
> one tree level's worth of kernel module dependencies.
> 
> Thus, ahci would wind up -not- in initrd, in a libahci solution.
> 
> I am thinking that I will just add Marvell and ATP support to ahci.c, 
> and let someone else deal with libahci separation -- which is still needed.
> 
> At this point, I would rather get Marvell/ATP support into users' hands, 
> rather than wait for distros to catch up to modern technology.

Can't you get the best of both worlds?  Do the separation but
artificially glue them together again as a module at link time.  This
solves the current distro problem and you can remove the linker hack as
soon as the distros get their act together.

James

---

diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index 9f7b500..10101d7 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -1,8 +1,10 @@
 
 obj-$(CONFIG_ATA)		+= libata.o
 
-obj-$(CONFIG_SATA_AHCI)		+= libahci.o ahci.o
-obj-$(CONFIG_SATA_ACARD_AHCI)	+= libahci.o acard-ahci.o
+obj-$(CONFIG_SATA_AHCI)		+= ahci_mod.o
+obj-ahci_mod-y			+= libahci.o ahci.o
+obj-ahci_mod-$(CONFIG_SATA_ACARD_AHCI)	+= acard-ahci.o
+obj-ahci_mod-$(CONFIG_SATA_MV_AHCI)	+= mv-ahci.o
 obj-$(CONFIG_SATA_SVW)		+= sata_svw.o
 obj-$(CONFIG_ATA_PIIX)		+= ata_piix.o
 obj-$(CONFIG_SATA_PROMISE)	+= sata_promise.o
@@ -15,7 +17,6 @@ obj-$(CONFIG_SATA_SIS)		+= sata_sis.o
 obj-$(CONFIG_SATA_SX4)		+= sata_sx4.o
 obj-$(CONFIG_SATA_NV)		+= sata_nv.o
 obj-$(CONFIG_SATA_ULI)		+= sata_uli.o
-obj-$(CONFIG_SATA_MV_AHCI)	+= libahci.o mv-ahci.o
 obj-$(CONFIG_SATA_MV)		+= sata_mv.o
 obj-$(CONFIG_SATA_INIC162X)	+= sata_inic162x.o
 obj-$(CONFIG_PDC_ADMA)		+= pdc_adma.o



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

* Re: sata AHCI controller over non-PCI bus
  2009-08-16 12:53     ` Jeff Garzik
       [not found]       ` <4A88014D.9060309-o2qLIJkoznsdnm+yROfE0A@public.gmane.org>
  2009-08-16 15:34       ` James Bottomley
@ 2009-08-16 16:55       ` Robert Hancock
  2 siblings, 0 replies; 10+ messages in thread
From: Robert Hancock @ 2009-08-16 16:55 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Subbrathnam, Swaminathan, Sergei Shtylyov, linux-ide, LKML

On 08/16/2009 06:53 AM, Jeff Garzik wrote:
> Subbrathnam, Swaminathan wrote:
>> Jeff,
>> From the below link (from Sergei) it seems that you have already
>> re-factored the AHCI implementation dependency on PCI. I would like to
>> add support for the OMAPL138 SATA on top of your changes. That would
>> be the ideal way forward for me.
>>
>> Have the ahci re-factoring changes queued for mainline merge already?
>> I just joined the list and hence do not know the status.
>>
>> Sergei,
>> Appreciate the response.
>
> I store the refactoring in git, on the "libahci" branch of
> git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
>
> Unfortunately, I am having second thoughts about an element of the
> current design. With current Linux distributions, they do not appear to
> deal well with the multi-module dependency libata -> libahci -> ahci. If
> I had to guess, I would say that mkinitrd creation tools only look at
> one tree level's worth of kernel module dependencies.
>
> Thus, ahci would wind up -not- in initrd, in a libahci solution.
>
> I am thinking that I will just add Marvell and ATP support to ahci.c,
> and let someone else deal with libahci separation -- which is still needed.
>
> At this point, I would rather get Marvell/ATP support into users' hands,
> rather than wait for distros to catch up to modern technology.

If that's the case it seems clearly a mkinitrd bug. What distribution 
were you seeing this behavior on?

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

* Re: sata AHCI controller over non-PCI bus
  2009-08-16 15:34       ` James Bottomley
@ 2009-08-16 20:18         ` Jeff Garzik
  0 siblings, 0 replies; 10+ messages in thread
From: Jeff Garzik @ 2009-08-16 20:18 UTC (permalink / raw)
  To: James Bottomley
  Cc: Subbrathnam, Swaminathan, Sergei Shtylyov, linux-ide, LKML

On 08/16/2009 11:34 AM, James Bottomley wrote:
> Can't you get the best of both worlds?  Do the separation but
> artificially glue them together again as a module at link time.  This
> solves the current distro problem and you can remove the linker hack as
> soon as the distros get their act together.
>
> James
>
> ---
>
> diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
> index 9f7b500..10101d7 100644
> --- a/drivers/ata/Makefile
> +++ b/drivers/ata/Makefile
> @@ -1,8 +1,10 @@
>
>   obj-$(CONFIG_ATA)		+= libata.o
>
> -obj-$(CONFIG_SATA_AHCI)		+= libahci.o ahci.o
> -obj-$(CONFIG_SATA_ACARD_AHCI)	+= libahci.o acard-ahci.o
> +obj-$(CONFIG_SATA_AHCI)		+= ahci_mod.o
> +obj-ahci_mod-y			+= libahci.o ahci.o
> +obj-ahci_mod-$(CONFIG_SATA_ACARD_AHCI)	+= acard-ahci.o
> +obj-ahci_mod-$(CONFIG_SATA_MV_AHCI)	+= mv-ahci.o


Yeah, that could definitely be an option...

	Jeff



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

end of thread, other threads:[~2009-08-16 20:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-10  8:18 sata AHCI controller over non-PCI bus Subbrathnam, Swaminathan
2009-08-10  9:03 ` Sergei Shtylyov
2009-08-10  9:20   ` Sergei Shtylyov
2009-08-10  9:22   ` Subbrathnam, Swaminathan
2009-08-16 12:53     ` Jeff Garzik
     [not found]       ` <4A88014D.9060309-o2qLIJkoznsdnm+yROfE0A@public.gmane.org>
2009-08-16 14:35         ` Subbrathnam, Swaminathan
2009-08-16 14:35           ` Subbrathnam, Swaminathan
2009-08-16 15:34       ` James Bottomley
2009-08-16 20:18         ` Jeff Garzik
2009-08-16 16:55       ` Robert Hancock

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.