public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Graeme Smecher <graeme.smecher@mail.mcgill.ca>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Adds driver for Xilinx' xps_spi SPI controller.
Date: Wed, 04 Aug 2010 14:01:45 -0700	[thread overview]
Message-ID: <4C59D539.2010101@mail.mcgill.ca> (raw)
In-Reply-To: <201008031359.36294.vapier@gentoo.org>

Hi Mike,

Thanks again for reviewing! Comments in-line; an updated patch will follow.

On 03/08/10 10:59 AM, Mike Frysinger wrote:
> On Tuesday, August 03, 2010 11:47:42 Graeme Smecher wrote:
>    
>> --- a/drivers/spi/Makefile
>> +++ b/drivers/spi/Makefile
>>
>>   COBJS-$(CONFIG_ALTERA_SPI) += altera_spi.o
>> +COBJS-$(CONFIG_XILINX_SPI) += xilinx_spi.o
>>   COBJS-$(CONFIG_ATMEL_DATAFLASH_SPI) += atmel_dataflash_spi.o
>>      
> this is a sorted list.  please keep it that way
>    

Whoops -- OK.

>> --- /dev/null
>> +++ b/drivers/spi/xilinx_spi.c
>>
>> +static ulong xilinx_spi_base_list[] = {
>> +#ifdef XPAR_SPI_0_BASEADDR
>> +	XPAR_SPI_0_BASEADDR,
>> +#endif
>> +#ifdef XPAR_SPI_1_BASEADDR
>> +	XPAR_SPI_1_BASEADDR,
>> +#endif
>> +#ifdef XPAR_SPI_2_BASEADDR
>> +	XPAR_SPI_2_BASEADDR,
>> +#endif
>> +#ifdef XPAR_SPI_3_BASEADDR
>> +	XPAR_SPI_3_BASEADDR,
>> +#endif
>> +};
>>      
> if this is only ever read, you might want to declare it const so it ends up in
> the rodata section.
>    

Done.

> what if someone defines just XPAR_SPI_3_BASEADDR ?  do you want to be
> consistent in bus id 3 always corresponds to XPAR_SPI_3_BASEADDR ?  or are you
> OK with the numbers always being relative ?  doesnt matter to me, just
> highlighting some things that might have been missed.
>    

These numbers come from autogenerated headers and are (as far as I know) 
always numbered from 0. Offhand, the above code seems like the least 
confusing approach. I don't have a particularly strong opinion either.

cheers,
Graeme

  reply	other threads:[~2010-08-04 21:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-03 15:47 [U-Boot] [PATCH] Adds driver for Xilinx' xps_spi SPI controller Graeme Smecher
2010-08-03 17:59 ` Mike Frysinger
2010-08-04 21:01   ` Graeme Smecher [this message]
2010-08-04 21:04   ` [U-Boot] [PATCH V2] " Graeme Smecher
2010-08-17 16:27     ` Graeme Smecher
2010-08-17 17:25       ` Anatolij Gustschin
2010-08-17 17:34         ` Graeme Smecher
2010-09-18 20:02     ` Wolfgang Denk
2010-09-20 14:43       ` Graeme Smecher
2012-03-31 19:42         ` Marek Vasut
2012-04-02 15:56           ` Graeme Smecher
2012-04-02 16:34             ` Marek Vasut
  -- strict thread matches above, loose matches on Subject: below --
2010-07-27 13:56 [U-Boot] " Graeme Smecher
2010-07-27 13:56 ` [U-Boot] [PATCH] " Graeme Smecher
2010-07-27 14:02   ` Graeme Smecher

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=4C59D539.2010101@mail.mcgill.ca \
    --to=graeme.smecher@mail.mcgill.ca \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox