* Marvel PMP SATA controller
@ 2010-09-29 6:56 Richard
2010-09-29 19:56 ` Mark Lord
0 siblings, 1 reply; 8+ messages in thread
From: Richard @ 2010-09-29 6:56 UTC (permalink / raw)
To: linux-ide
Morning all,
Using the Marvel Port Multiplier I am stuck trying to get it working
with some Hard drives.. I am stuck trying to figure out how to write the
command to the SCR register on the device as there seems to be multiple
methods used in the code I dont understand.
the procedure I need to follow is - Init_SATA, classify_device, if
(special PMP) set mode to SATA-GEN1, then only can it continue.
using a ata_taskfile this early in the init causes a major explosion so
my next option is to use writel/b() to the SCR registers.. this is the
piece I dont understand is how the bytes are structured in the writel
command. I need to write 0xe80211 (Write value 0x11 to position 2) to
force the chip to go in to Gen1 mode so that it can work with some older
Maxtor Hard drives
Is there any HOWTO on the structure of the commands (target,port,c,h,s
etc etc)
Thanks in Advance
Richard
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Marvel PMP SATA controller
2010-09-29 6:56 Marvel PMP SATA controller Richard
@ 2010-09-29 19:56 ` Mark Lord
2010-09-29 20:32 ` Richard
0 siblings, 1 reply; 8+ messages in thread
From: Mark Lord @ 2010-09-29 19:56 UTC (permalink / raw)
To: Richard; +Cc: linux-ide
On 10-09-29 02:56 AM, Richard wrote:
> Morning all,
>
> Using the Marvel Port Multiplier I am stuck trying to get it working with some Hard drives.
Err.. just plug some drives into it, and then plug it (the PMP) into
a SATA controller that supports PMP (eg. the Marvell ones, newer AHCI, some Sil ones, etc..).
What are you trying to do?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Marvel PMP SATA controller
2010-09-29 19:56 ` Mark Lord
@ 2010-09-29 20:32 ` Richard
2010-09-30 13:39 ` Mark Lord
0 siblings, 1 reply; 8+ messages in thread
From: Richard @ 2010-09-29 20:32 UTC (permalink / raw)
To: Mark Lord; +Cc: linux-ide
On 29/09/10 20:56, Mark Lord wrote:
> On 10-09-29 02:56 AM, Richard wrote:
>> Morning all,
>>
>> Using the Marvel Port Multiplier I am stuck trying to get it working
>> with some Hard drives.
>
>
> Err.. just plug some drives into it, and then plug it (the PMP) into
> a SATA controller that supports PMP (eg. the Marvell ones, newer AHCI,
> some Sil ones, etc..).
>
> What are you trying to do?
Hi Mark,
Its an embedded device whereby the one HDD I have does not work with the
Marvel PMP. I have the command to send to the PMP controller but I am
not an officianado with linux SATA(the code I have is from VxWorks) The
drive is confirmed working, but the PMP chip does not default to SATA
Generation 1, and this HDD is a bit dumb to figure it out :) - so I have
to force the PMP controller to Gen1 mode.
(I have tons of drives that work just fine, its just this ONE Maxtor
drive that is being a pain)
The short - I need to write a command to the SATA controller before this
HDD can be recognised.
Much appreciated,
Richard
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Marvel PMP SATA controller
2010-09-29 20:32 ` Richard
@ 2010-09-30 13:39 ` Mark Lord
2010-09-30 14:03 ` Richard
0 siblings, 1 reply; 8+ messages in thread
From: Mark Lord @ 2010-09-30 13:39 UTC (permalink / raw)
To: Richard; +Cc: linux-ide
On 10-09-29 04:32 PM, Richard wrote:
> On 29/09/10 20:56, Mark Lord wrote:
>> What are you trying to do?
> Hi Mark,
>
> Its an embedded device whereby the one HDD I have does not work with the Marvel PMP. I have the command to send to the PMP controller but I am not an officianado with linux SATA(the code I have is from VxWorks) The drive is confirmed working, but the PMP chip does not default to SATA Generation 1, and this HDD is a bit dumb to figure it out :) - so I have to force the PMP controller to Gen1 mode.
> (I have tons of drives that work just fine, its just this ONE Maxtor drive that is being a pain)
>
> The short - I need to write a command to the SATA controller before this HDD can be recognised.
..
Does the existing libata parameter take care of it for you?
linux/Documentation/kernel-parameters.txt:
eg. libata.force=[ID:]1.5" ## replace [ID:] with port[.device] for the PMP and/or HD
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Marvel PMP SATA controller
2010-09-30 13:39 ` Mark Lord
@ 2010-09-30 14:03 ` Richard
2010-10-01 0:24 ` Robert Hancock
2010-10-01 13:46 ` Mark Lord
0 siblings, 2 replies; 8+ messages in thread
From: Richard @ 2010-09-30 14:03 UTC (permalink / raw)
To: Mark Lord; +Cc: linux-ide
On 30/09/10 14:39, Mark Lord wrote:
> On 10-09-29 04:32 PM, Richard wrote:
>> On 29/09/10 20:56, Mark Lord wrote:
>
>>> What are you trying to do?
>> Hi Mark,
>>
>> Its an embedded device whereby the one HDD I have does not work with
>> the Marvel PMP. I have the command to send to the PMP controller but
>> I am not an officianado with linux SATA(the code I have is from
>> VxWorks) The drive is confirmed working, but the PMP chip does not
>> default to SATA Generation 1, and this HDD is a bit dumb to figure it
>> out :) - so I have to force the PMP controller to Gen1 mode.
>> (I have tons of drives that work just fine, its just this ONE Maxtor
>> drive that is being a pain)
>>
>> The short - I need to write a command to the SATA controller before
>> this HDD can be recognised.
> ..
>
> Does the existing libata parameter take care of it for you?
>
> linux/Documentation/kernel-parameters.txt:
> eg. libata.force=[ID:]1.5" ## replace [ID:] with port[.device] for
> the PMP and/or HD
>
Unfortunately not.. which is why I asked how to write commands directly
on to the SATA bus from kernel space.
Richard
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Marvel PMP SATA controller
2010-09-30 14:03 ` Richard
@ 2010-10-01 0:24 ` Robert Hancock
2010-10-01 6:33 ` Richard
2010-10-01 13:46 ` Mark Lord
1 sibling, 1 reply; 8+ messages in thread
From: Robert Hancock @ 2010-10-01 0:24 UTC (permalink / raw)
To: Richard; +Cc: Mark Lord, linux-ide
On 09/30/2010 08:03 AM, Richard wrote:
> On 30/09/10 14:39, Mark Lord wrote:
>> On 10-09-29 04:32 PM, Richard wrote:
>>> On 29/09/10 20:56, Mark Lord wrote:
>>
>>>> What are you trying to do?
>>> Hi Mark,
>>>
>>> Its an embedded device whereby the one HDD I have does not work with
>>> the Marvel PMP. I have the command to send to the PMP controller but
>>> I am not an officianado with linux SATA(the code I have is from
>>> VxWorks) The drive is confirmed working, but the PMP chip does not
>>> default to SATA Generation 1, and this HDD is a bit dumb to figure it
>>> out :) - so I have to force the PMP controller to Gen1 mode.
>>> (I have tons of drives that work just fine, its just this ONE Maxtor
>>> drive that is being a pain)
>>>
>>> The short - I need to write a command to the SATA controller before
>>> this HDD can be recognised.
>> ..
>>
>> Does the existing libata parameter take care of it for you?
>>
>> linux/Documentation/kernel-parameters.txt:
>> eg. libata.force=[ID:]1.5" ## replace [ID:] with port[.device] for the
>> PMP and/or HD
>>
> Unfortunately not.. which is why I asked how to write commands directly
> on to the SATA bus from kernel space.
Looking at the code it seems like it should.. what kernel version are
you using? See sata_set_spd in libata-core.c, which calls
sata_scr_write, which calls sata_pmp_scr_write if it's not a host link..
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Marvel PMP SATA controller
2010-10-01 0:24 ` Robert Hancock
@ 2010-10-01 6:33 ` Richard
0 siblings, 0 replies; 8+ messages in thread
From: Richard @ 2010-10-01 6:33 UTC (permalink / raw)
To: Robert Hancock; +Cc: Mark Lord, linux-ide
On 01/10/10 01:24, Robert Hancock wrote:
> On 09/30/2010 08:03 AM, Richard wrote:
>> On 30/09/10 14:39, Mark Lord wrote:
>>> On 10-09-29 04:32 PM, Richard wrote:
>>>> On 29/09/10 20:56, Mark Lord wrote:
>>>
>>>>> What are you trying to do?
>>>> Hi Mark,
>>>>
>>>> Its an embedded device whereby the one HDD I have does not work with
>>>> the Marvel PMP. I have the command to send to the PMP controller but
>>>> I am not an officianado with linux SATA(the code I have is from
>>>> VxWorks) The drive is confirmed working, but the PMP chip does not
>>>> default to SATA Generation 1, and this HDD is a bit dumb to figure it
>>>> out :) - so I have to force the PMP controller to Gen1 mode.
>>>> (I have tons of drives that work just fine, its just this ONE Maxtor
>>>> drive that is being a pain)
>>>>
>>>> The short - I need to write a command to the SATA controller before
>>>> this HDD can be recognised.
>>> ..
>>>
>>> Does the existing libata parameter take care of it for you?
>>>
>>> linux/Documentation/kernel-parameters.txt:
>>> eg. libata.force=[ID:]1.5" ## replace [ID:] with port[.device] for the
>>> PMP and/or HD
>>>
>> Unfortunately not.. which is why I asked how to write commands directly
>> on to the SATA bus from kernel space.
>
> Looking at the code it seems like it should.. what kernel version are
> you using? See sata_set_spd in libata-core.c, which calls
> sata_scr_write, which calls sata_pmp_scr_write if it's not a host link..
Its a bit more than 'Put it in to 1.5Gbps speed' - Even when selecting
this speed nothing happens. When I write to the PMP controller using a
Finisar SATA analyser (Write 0xE8 Register 0x02 Value 0x11) which
according to the Marvel specifications is 'Set to SATA Generation 1 and
Reset Drive' things start to happen. Unfortunately the kernel is a
2.6.18 one and there is no hope of updating it in the short term as its
used across many projects.
Richard
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Marvel PMP SATA controller
2010-09-30 14:03 ` Richard
2010-10-01 0:24 ` Robert Hancock
@ 2010-10-01 13:46 ` Mark Lord
1 sibling, 0 replies; 8+ messages in thread
From: Mark Lord @ 2010-10-01 13:46 UTC (permalink / raw)
To: Richard; +Cc: linux-ide
On 10-09-30 10:03 AM, Richard wrote:
> On 30/09/10 14:39, Mark Lord wrote:
..
>> Does the existing libata parameter take care of it for you?
>>
>> linux/Documentation/kernel-parameters.txt:
>> eg. libata.force=[ID:]1.5" ## replace [ID:] with port[.device] for the PMP and/or HD
>>
> Unfortunately not.. which is why I asked how to write commands directly on to the SATA bus from kernel space.
Right. Well, just keep plunking away at it in that ancient kernel, then.
The two modern routines to study/backport are sata_pmp_read() and sata_pmp_write(),
which are used by most controllers to perform PMP register accesses.
However, the host controller may require additional tweaks,
especially if it is a Marvell host controller (sata_mv),
or something that doesn't normally "do" PMP, like ata_piix.
Cheers
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-10-01 13:46 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-29 6:56 Marvel PMP SATA controller Richard
2010-09-29 19:56 ` Mark Lord
2010-09-29 20:32 ` Richard
2010-09-30 13:39 ` Mark Lord
2010-09-30 14:03 ` Richard
2010-10-01 0:24 ` Robert Hancock
2010-10-01 6:33 ` Richard
2010-10-01 13:46 ` Mark Lord
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).