All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ken Ma <make@marvell.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [EXT] Re: [PATCH 7/7] scsi: dts: a3700: add scsi node
Date: Wed, 5 Apr 2017 09:29:58 +0000	[thread overview]
Message-ID: <9ee29c64ecb14e28836340179962ce12@SC-EXCH04.marvell.com> (raw)
In-Reply-To: <4f915c42-0def-6914-7a9f-45315cf082e4@denx.de>

Hi Stefan, Hi Simon

Please see my inline reply, thanks!

Yours,
Ken

-----Original Message-----
From: Stefan Roese [mailto:sr at denx.de] 
Sent: 2017年4月3日 14:14
To: Simon Glass; Ken Ma
Cc: u-boot at lists.denx.de; Michal Simek; Kostya Porotchkin; Hua Jing; Wilson Ding
Subject: Re: [EXT] Re: [PATCH 7/7] scsi: dts: a3700: add scsi node

Hi Simon, Hi Ken,

On 01.04.2017 06:22, Simon Glass wrote:
> On 27 March 2017 at 02:28, Ken Ma <make@marvell.com> wrote:
>> Hi Stefan
>>
>>
>>
>> Thanks a lot for your kind reply.
>>
>>
>>
>> But I still do not think it's very good to change sata's uclass id 
>> from "UCLASS_AHCI" to "UCLASS_SCSI".
>>
>> If we do such change, UCLASS_AHCI is lost since from the sata.c 
>> codes, it does the AHCI initialization work but not SCSI initialization work.
>>
>> If u-boot supports ISIS scanner which supports SCSI, I think its 
>> uclass id should be like UCLASS_ISIS but not UCLASS_SCSI.
>>
>> And if we set sata's uclass id as "UCLASS_SCSI", it should provide 
>> basic SCSI function, then why can’t we connect a parallel SCSI device 
>> like SCSI scanner or cd-rom to the SATA interface?
>>
>> From https://en.wikipedia.org/wiki/Serial_ATA#SATA_and_SCSI
>>
>> In general, SATA devices link compatibly to SAS enclosures and 
>> adapters, whereas SCSI devices cannot be directly connected to a SATA 
>> bus
>>
>>
>>
>>
>>
>> Actually Marvell’s sata controller is SAS(Serial Attached SCSI 
>> system), it integrates SCSI and SATA(AHCI); SAS provides a SCSI bus 
>> which works only in SAS range(for example, 2 sata ports in SAS), so 
>> actually the SCSI bus controller is not "virtual" controllers but has 
>> the same device base register as SATA.
>>
>>
>>
>> From https://en.wikipedia.org/wiki/Serial_Attached_SCSI
>>
>> A typical Serial Attached SCSI system consists of the following basic
>> components:
>>
>> 1.    An initiator: a device that originates device-service and
>> task-management requests for processing by a target device and 
>> receives responses for the same requests from other target devices. 
>> Initiators may be provided as an on-board component on the 
>> motherboard (as is the case with many server-oriented motherboards) or as an add-on host bus adapter.
>>
>> 2.    A target: …
>>
>> So in my opinion, there are two ways to implement SAS as below
>>
>> A.  If our codes provide SAS controller as an on-board component – 
>> then a uclass id of UCLASS_SAS should be defined and then in 
>> scsi_scan() of scsi_scan.c, both devices of UCLASS_SCSI and UCLASS_SAS should be scanned.
>> In such implementation, UCLASS_SCSI is for parallel SCSI while 
>> UCLASS_SAS is for serial attached SCSI;
>>
>> B.  SAS works as an add-on host bus adapter as above said, SAS’s SCSI 
>> controller and AHCI controller are both itself as below - SCSI 
>> controller is not a virtual device, it exists and only works in SAS 
>> internal range(since there is no UCLASS_SAS, I take this way);
>>
>> Although the SAS’s SCSI controller does not need to any special 
>> hardware configuration; but actually I think there is something to 
>> do, we should bind special scsi_exec() to SCSI devices in SCSI driver 
>> or SAS driver (For different SCSI controls, SAS must have different 
>> implementation of
>> scsi_exec() comparing to SCSI scanner, or other SCSI devices)
>>
>> By the way, I think we should move the work of creating block devices 
>> to scsi-uclass.c
>>
>> scsi: scsi at e0000 {
>>
>>                         compatible = "marvell,mvebu-scsi";
>>
>> reg = <0xe0000 0x2000>;
>>
>>                         sata: sata at e0000 {
>>
>>                               compatible = 
>> "marvell,armada-3700-ahci";
>>
>>                               reg = <0xe0000 0x2000>;
>>
>>                               interrupts = <GIC_SPI 27 
>> IRQ_TYPE_LEVEL_HIGH>;
>>
>>                         };
>
> Does this match the Linux DT?

No, and this is my main concern. This patch series introduces a new "scsi" DT node and moves the controller(s) one level up into this newly created DT node (Ken please correct me if I'm wrong here).
We simply can't make such changes here in U-Boot without this being first discussed and decided on the Linux DT mailing list with the DT maintainers.

Ken, how is this problem solved / handled in Linux without this DT changes up until now?

[Ken] Actually I do not find any SCSI nodes/compatible strings In Linux; if aligned to linux, then we should have no scsi nodes at all in u-boot.
I am not familiar with Linux SCSI implementation, it seems that SCSI bus is implemented as a middle layer in Linux since it has no SCSI fdt nodes.

Thanks,
Stefan

  reply	other threads:[~2017-04-05  9:29 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23  9:29 [U-Boot] [PATCH 0/7] *** SUBJECT HERE *** make at marvell.com
2017-03-23  9:29 ` [U-Boot] [PATCH 1/7] scsi: move base, max_lun and max_id to uclass plat data make at marvell.com
2017-04-01  4:21   ` Simon Glass
2017-04-05  8:38     ` [U-Boot] [EXT] " Ken Ma
2017-04-09 19:27       ` Simon Glass
2017-03-23  9:29 ` [U-Boot] [PATCH 2/7] scsi: add children devices binding make at marvell.com
2017-04-01  4:21   ` Simon Glass
2017-03-23  9:29 ` [U-Boot] [PATCH 3/7] scsi: call children devices' probe functions automatically make at marvell.com
2017-04-01  4:21   ` Simon Glass
2017-04-05  8:47     ` [U-Boot] [EXT] " Ken Ma
2017-04-09 19:27       ` Simon Glass
2017-03-23  9:29 ` [U-Boot] [PATCH 4/7] scsi: dt-bindings: add scsi device tree bindings make at marvell.com
2017-04-01  4:21   ` Simon Glass
2017-03-23  9:29 ` [U-Boot] [PATCH 5/7] scsi: mvebu: add scsi driver make at marvell.com
2017-04-01  4:21   ` Simon Glass
2017-03-23  9:29 ` [U-Boot] [PATCH 6/7] scsi: a3700: enable mvebu " make at marvell.com
2017-04-01  4:21   ` Simon Glass
2017-03-23  9:29 ` [U-Boot] [PATCH 7/7] scsi: dts: a3700: add scsi node make at marvell.com
2017-03-23 14:06   ` Stefan Roese
2017-03-24  3:03     ` [U-Boot] [EXT] " Ken Ma
2017-03-24  4:11     ` Ken Ma
2017-03-24 13:21       ` Stefan Roese
2017-03-24 13:24         ` Stefan Roese
2017-03-27  8:32           ` Ken Ma
2017-03-27  8:28         ` Ken Ma
2017-04-01  4:22           ` Simon Glass
2017-04-03  6:13             ` Stefan Roese
2017-04-05  9:29               ` Ken Ma [this message]
2017-04-05 13:45                 ` Stefan Roese
2017-04-06  1:32                   ` Ken Ma
2017-04-09 19:28                     ` Simon Glass
2017-04-01  4:21 ` [U-Boot] [PATCH 0/7] *** SUBJECT HERE *** Simon Glass

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=9ee29c64ecb14e28836340179962ce12@SC-EXCH04.marvell.com \
    --to=make@marvell.com \
    --cc=u-boot@lists.denx.de \
    /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.