Marvel PMP SATA controller
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
Quoted 3 lines · Richard
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?
Quoted 10 lines · Mark Lord
Quoted 3 lines · Richard
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
Quoted 9 lines · Richard
Quoted 1 line · Mark Lord
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
Quoted 9 lines · Mark Lord
Quoted 8 lines · Richard
Quoted 1 line · Mark Lord
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)
Quoted 8 lines
Quoted 1 line
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
Quoted 20 lines · Richard
Quoted 19 lines · Mark Lord
Quoted 16 lines · Richard
Quoted 1 line · Mark Lord
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.
..
Quoted 8 lines
Quoted 6 lines
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 HDUnfortunately 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..
Quoted 23 lines · Robert Hancock
Quoted 22 lines · Richard
Quoted 21 lines · Mark Lord
Quoted 14 lines · Richard
Quoted 1 line · Mark Lord
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)
Quoted 2 lines
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?
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
linux/Documentation/kernel-parameters.txt:
eg. libata.force=[ID:]1.5" ## replace [ID:] with port[.device] for the PMP and/or HDUnfortunately 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_spdinlibata-core.c, which callssata_scr_write, which callssata_pmp_scr_writeif 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
Quoted 1 line · Richard
On 30/09/10 14:39, Mark Lord wrote:
..
Quoted 6 lines
Quoted 5 lines
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 HDUnfortunately 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