[U-Boot] [PATCH 5/6] scsi/ahci: add support for non-PCI controllers
Wolfgang Denk
wd at denx.de
Mon Jul 4 12:17:39 CEST 2011
Dear Rob Herring,
In message <1309275583-11763-6-git-send-email-robherring2 at gmail.com> you wrote:
> From: Rob Herring <rob.herring at calxeda.com>
>
> Add support for AHCI controllers that are not PCI based.
>
> Signed-off-by: Rob Herring <rob.herring at calxeda.com>
> Cc: Wolfgang Denk <wd at denx.de>
> ---
> common/cmd_scsi.c | 6 +++-
> drivers/block/ahci.c | 70 +++++++++++++++++++++++++++++++++++++++++++------
> include/ahci.h | 4 +++
> include/scsi.h | 1 +
> 4 files changed, 70 insertions(+), 11 deletions(-)
>
> diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c
> index be4fe74..25a8299 100644
> --- a/common/cmd_scsi.c
> +++ b/common/cmd_scsi.c
> @@ -47,7 +47,8 @@
> #define SCSI_DEV_ID 0x5288
>
> #else
> -#error no scsi device defined
> +#define SCSI_VEND_ID 0
> +#define SCSI_DEV_ID 0
> #endif
I'm not sure if this is a good idea. Please explain.
Also, checkpatch says:
ERROR: trailing whitespace
WARNING: please, no spaces at the start of a line
#287: FILE: include/ahci.h:193:
+ $
> +#ifdef CONFIG_PCI
> pci_read_config_word(pdev, 0x0a, &cc);
> if (cc == 0x0101)
> scc_s = "IDE";
> @@ -222,7 +227,9 @@ static void ahci_print_info(struct ahci_probe_ent *probe_ent)
> scc_s = "RAID";
> else
> scc_s = "unknown";
> -
> +#else
> + scc_s = "SATA";
> +#endif
Is SATA really the only possible option here?
> +int ahci_init(u32 base)
> +{
...
> +}
Should this always be compiled in?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Ill-chosen abstraction is particularly evident in the design of the
ADA runtime system. The interface to the ADA runtime system is so
opaque that it is impossible to model or predict its performance,
making it effectively useless for real-time systems.
- Marc D. Donner and David H. Jameson.
More information about the U-Boot
mailing list