All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: "Cédric Le Goater" <clg@kaod.org>, linux-mtd@lists.infradead.org
Cc: Cyrille Pitchen <cyrille.pitchen@atmel.com>,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Richard Weinberger <richard@nod.at>,
	Joel Stanley <joel@jms.id.au>
Subject: Re: [PATCH 01/10] mtd: spi-nor: aspeed: fix the AST2400 SMC window size
Date: Tue, 11 Apr 2017 12:42:09 +0200	[thread overview]
Message-ID: <352c3fc5-cdf6-12d6-f263-ddc026bd7f5d@gmail.com> (raw)
In-Reply-To: <b791c4ae-3a12-0c6d-805d-49601a3e72b4@kaod.org>

On 04/11/2017 12:18 PM, Cédric Le Goater wrote:
> On 04/06/2017 09:17 PM, Marek Vasut wrote:
>> On 04/06/2017 06:56 PM, Cédric Le Goater wrote:
>>> The window of the Aspeed AST2400 SMC Controller to map chips on the
>>> AHB Bus has a 256MB size. 64MB is the default size for the first chip
>>> select and not the full window range: [ 0x20000000 - 0x2FFFFFFF ].
>>>
>>> Signed-off-by: Cédric Le Goater <clg@kaod.org>
>>> ---
>>>  drivers/mtd/spi-nor/aspeed-smc.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/mtd/spi-nor/aspeed-smc.c b/drivers/mtd/spi-nor/aspeed-smc.c
>>> index 56051d30f000..aa2c647c8507 100644
>>> --- a/drivers/mtd/spi-nor/aspeed-smc.c
>>> +++ b/drivers/mtd/spi-nor/aspeed-smc.c
>>> @@ -48,7 +48,7 @@ static void aspeed_smc_chip_set_4b_spi_2400(struct aspeed_smc_chip *chip);
>>>  static void aspeed_smc_chip_set_4b(struct aspeed_smc_chip *chip);
>>>  
>>>  static const struct aspeed_smc_info fmc_2400_info = {
>>> -	.maxsize = 64 * 1024 * 1024,
>>> +	.maxsize = 256 * 1024 * 1024,
>>
>> How does the second part of reg property in DT relate to this ?
>> DT binding example has it set to 0x02000000 = 32 MiB ...
> 
> Thanks for pointing this out. There is an inconsistency and
> a redundancy here ... The patch is wrong as I am mixing up 
> different limits. Anyhow, there are some concerns to discuss. 
> 
> The DT binding is the size of the overall AHB window in which 
> a controller can directly memory access the chips bound to 
> itself. This is for the Command mode.
> 
> The .maxsize attribute, not being used until this patchset, 
> holds the size limit of a chip that the controller supports 
> to do direct memory access. This limit is 64MB on the AST2400 
> and 256MB (full window) on the AST2500. 
> 
> I think that this value should be moved in the DT also ? 

No, I don't think so, this is a chip property which can be derived from
the compatible string, right ?

> The second thing to do is to retrieve the size of the overall 
> AHB window from the DT and stop using the .maxsize attribute 
> in the subsequent patches configuring the segment registers 
> and introducing the command mode.
> 
> But the SPI controller window on the AST2400 is :
> 
> 	 [ 0x30000000 - 0x3FFFFFFF ] 
> 
> which is a problem because, if I remember well, it requires us 
> to configure CONFIG_VMSPLIT_2G to reserve space for the iomap.
> I am not sure how to correctly handle that case, today we are 
> just defining a small 32MB window.
> 
> 
> Thanks,
> 
> C. 
> 


-- 
Best regards,
Marek Vasut

  reply	other threads:[~2017-04-11 10:42 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-06 16:56 [PATCH 00/10] mtd: spi-nor: aspeed: support extensions Cédric Le Goater
2017-04-06 16:56 ` [PATCH 01/10] mtd: spi-nor: aspeed: fix the AST2400 SMC window size Cédric Le Goater
2017-04-06 19:17   ` Marek Vasut
2017-04-11 10:18     ` Cédric Le Goater
2017-04-11 10:42       ` Marek Vasut [this message]
2017-04-11 16:10         ` Cédric Le Goater
2017-04-06 16:56 ` [PATCH 02/10] mtd: spi-nor: aspeed: remove dummies from keep mask Cédric Le Goater
2017-04-06 16:56 ` [PATCH 03/10] mtd: spi-nor: aspeed: add DMA support Cédric Le Goater
2017-04-06 19:07   ` Cyrille Pitchen
2017-04-06 19:13     ` Cyrille Pitchen
2017-04-19 14:36     ` Cédric Le Goater
2017-04-06 16:56 ` [PATCH 04/10] mtd: spi-nor: aspeed: add support for SPI dual IO read mode Cédric Le Goater
2017-04-06 19:21   ` Marek Vasut
2017-04-11  8:53     ` Cédric Le Goater
2017-04-11 10:43       ` Marek Vasut
2017-04-06 16:56 ` [PATCH 05/10] mtd: spi-nor: Add support for Macronix mx66l1g45g spi flash Cédric Le Goater
2017-04-06 19:21   ` Marek Vasut
2017-04-06 16:56 ` [PATCH 06/10] mtd: spi-nor: add SPI_NOR_DUAL_READ to some flash devices Cédric Le Goater
2017-04-06 19:22   ` Marek Vasut
2017-04-11  8:15     ` Cédric Le Goater
2017-04-06 16:56 ` [PATCH 07/10] mtd: spi-nor: aspeed: configure chip window on AHB bus Cédric Le Goater
2017-04-06 19:25   ` Marek Vasut
2017-04-11 10:20     ` Cédric Le Goater
2017-04-11 10:44       ` Marek Vasut
2017-04-06 16:56 ` [PATCH 08/10] mtd: spi-nor: aspeed: use command mode for reads Cédric Le Goater
2017-04-06 16:56 ` [PATCH 09/10] mtd: spi-nor: aspeed: link controller with the ahb clock Cédric Le Goater
2017-04-06 16:56 ` [PATCH 10/10] mtd: spi-nor: aspeed: optimize read mode Cédric Le Goater
2017-04-06 19:28   ` Marek Vasut
2017-04-11  8:13     ` Cédric Le Goater
2017-04-11  8:23       ` Benjamin Herrenschmidt
2017-04-14 16:18       ` Marek Vasut
2017-04-14 21:40         ` Benjamin Herrenschmidt
2017-04-14 21:51           ` Marek Vasut
2017-04-14 22:11             ` Benjamin Herrenschmidt
2017-04-14 22:25               ` Marek Vasut
2017-04-14 22:42                 ` Benjamin Herrenschmidt
2017-04-16 18:46                   ` Marek Vasut
2017-04-18 15:46                   ` Cédric Le Goater
2017-04-18 16:51                     ` Marek Vasut
2017-04-18 22:41                     ` Benjamin Herrenschmidt

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=352c3fc5-cdf6-12d6-f263-ddc026bd7f5d@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=clg@kaod.org \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@atmel.com \
    --cc=dwmw2@infradead.org \
    --cc=joel@jms.id.au \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    /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.