From: Konstantin Porotchkin <kostap@marvell.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] arm64: mvebu: a8k: Add support for NAND clock get
Date: Thu, 30 Mar 2017 18:46:11 +0300 [thread overview]
Message-ID: <c928267c-202d-8cfd-bf99-221e6478841f@marvell.com> (raw)
In-Reply-To: <e1f5aa16-816d-9e54-e0f7-84b8d5e984b8@denx.de>
Hi, Stefan,
On 03/30/2017 04:15 PM, Stefan Roese wrote:
> On 28.03.2017 17:16, kostap at marvell.com wrote:
>> From: Konstantin Porotchkin <kostap@marvell.com>
>>
>> Implement mvebu_get_nand_clock call for A8K family.
>> This function is used by PXA3XX NAND driver.
>>
>> Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
>> Cc: Stefan Roese <sr@denx.de>
>> Cc: Igal Liberman <igall@marvell.com>
>> Cc: Nadav Haklai <nadavh@marvell.com>
>> ---
>> arch/arm/mach-mvebu/armada8k/cpu.c | 16 ++++++++++++++++
>> 1 file changed, 16 insertions(+)
>>
>> diff --git a/arch/arm/mach-mvebu/armada8k/cpu.c
>> b/arch/arm/mach-mvebu/armada8k/cpu.c
>> index 2325e9a..e18ca6b 100644
>> --- a/arch/arm/mach-mvebu/armada8k/cpu.c
>> +++ b/arch/arm/mach-mvebu/armada8k/cpu.c
>> @@ -110,3 +110,19 @@ void reset_cpu(ulong ignored)
>> reg &= ~(1 << RFU_SW_RESET_OFFSET);
>> writel(reg, RFU_GLOBAL_SW_RST);
>> }
>> +
>> +#ifdef CONFIG_NAND_PXA3XX
>
> Do we really need to have this code conditionally compiled here?
I can remove it, just wanted not to increase the code size if not
needed. Do you think it is excessive?
>
>> +/* Return NAND clock in Hz */
>> +u32 mvebu_get_nand_clock(void)
>> +{
>> + unsigned long NAND_FLASH_CLK_CTRL = 0xF2440700UL;
>
> I know that some of this code is historically done this way. But
> with DT available now, isn't it possible to at least get the base
> address of such registers from the DT instead of hardcoding it?
I see what you saying and I agree it is not as elegant as it could be.
The only problem is that the NAND clock register is not part of the SoC
NAND unit, so the IO base taken from DTS entry for NAND device is not
really useful here. NAND unit and its clock configuration register are
only sharing the CP0 base - 0xF2000000.
>
> Thanks,
> Stefan
next prev parent reply other threads:[~2017-03-30 15:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-28 15:16 [U-Boot] [PATCH 0/5] Add support for NAND flash to A7K/A8K SoC family kostap at marvell.com
2017-03-28 15:16 ` [U-Boot] [PATCH 1/5] fix: nand: pxa3xx: Remove hardcode values from the driver kostap at marvell.com
2017-05-08 12:28 ` Stefan Roese
2017-05-09 14:40 ` Stefan Roese
2017-03-28 15:16 ` [U-Boot] [PATCH 2/5] arm64: mvebu: a8k: Add support for NAND clock get kostap at marvell.com
2017-03-30 13:15 ` Stefan Roese
2017-03-30 15:46 ` Konstantin Porotchkin [this message]
2017-04-03 8:51 ` Stefan Roese
2017-03-28 15:16 ` [U-Boot] [PATCH 3/5] arm64: mvebu: Fix the bubt comamnd NAND device support kostap at marvell.com
2017-05-08 12:28 ` Stefan Roese
2017-05-09 14:41 ` Stefan Roese
2017-03-28 15:16 ` [U-Boot] [PATCH 4/5] arm64: a8k: dts: Add support for NAND devices on A8K platform kostap at marvell.com
2017-03-30 13:21 ` Stefan Roese
2017-03-28 15:16 ` [U-Boot] [PATCH 5/5] arm64: mvebu: a8k: Add NAND configuration parameters kostap at marvell.com
2017-04-19 8:44 ` Stefan Roese
2017-04-19 8:50 ` [U-Boot] [EXT] " Kostya Porotchkin
2017-04-19 8:55 ` Stefan Roese
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=c928267c-202d-8cfd-bf99-221e6478841f@marvell.com \
--to=kostap@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.