All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wills Wang <wills.wang@live.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v7 3/7] mips: ath79: add support for QCA953x SOCs
Date: Fri, 22 Jan 2016 17:17:25 +0800	[thread overview]
Message-ID: <BLU436-SMTP209879A56924D1FF41A524AFFC40@phx.gbl> (raw)
In-Reply-To: <201601162033.07149.marex@denx.de>



On Sunday, January 17, 2016 03:33 AM, Marek Vasut wrote:
> On Saturday, January 16, 2016 at 07:13:49 PM, Wills Wang wrote:
>> This patch enable work for qca953x SOC.
>>
>> Signed-off-by: Wills Wang <wills.wang@live.com>
>> ---
>>
>> Changes in v7:
>> - Use CKSEGxADDR instead of KSEGxADDR for qca953x
>>
>> Changes in v6: None
>> Changes in v5: None
>> Changes in v4: None
>> Changes in v3: None
>> Changes in v2: None
> [...]
>
>> +int get_serial_clock(void)
>> +{
>> +	return qca953x_get_xtal();
>> +}
>> +
>> +int get_clocks(void)
>> +{
>> +	void __iomem *regs;
>> +	u32 val, ctrl, xtal, pll, div;
> This looks like a copy of the same code in patch 2/7 .
There are different in detail.
>> +	regs = map_physmem(AR71XX_PLL_BASE, AR71XX_PLL_SIZE,
>> +			   MAP_NOCACHE);
>> +
>> +	xtal = qca953x_get_xtal();
>> +	ctrl = readl(regs + QCA953X_PLL_CLK_CTRL_REG);
>> +	val = readl(regs + QCA953X_PLL_CPU_CONFIG_REG);
> [...]
>
>> +void ddr_init(void)
>> +{
>> +	void __iomem *regs;
>> +	u32 val;
> This looks like a copy of the same code in patch 2/7 .
>
There are different in detail, the bit fields of register are not identical
copies of one another. there is no way to extract a common code.
>> +	regs = map_physmem(AR71XX_DDR_CTRL_BASE, AR71XX_DDR_CTRL_SIZE,
>> +			   MAP_NOCACHE);
>> +	val = get_bootstrap();
>> +	if (val & QCA953X_BOOTSTRAP_DDR1) {
>> +		writel(DDR_CTL_CONFIG_VAL, regs + QCA953X_DDR_REG_CTL_CONF);
>> +		udelay(10);
>> +
>> +		/* For 16-bit DDR */
>> +		writel(0xffff, regs + AR71XX_DDR_REG_RD_CYCLE);
>> +		udelay(100);
>> +
>> +		/* Burst size */
>> +		writel(DDR_BURST_VAL, regs + QCA953X_DDR_REG_BURST);
>> +		udelay(100);
>> +		writel(DDR_BURST2_VAL, regs + QCA953X_DDR_REG_BURST2);
>> +		udelay(100);
>> +
>> +		/* AHB maximum timeout */
>> +		writel(0xfffff, regs + QCA953X_DDR_REG_TIMEOUT_MAX);
>> +		udelay(100);
>> +
>> +		/* DRAM timing */
>> +		writel(DDR1_CONF_REG_VAL, regs + AR71XX_DDR_REG_CONFIG);
>> +		udelay(100);
>> +		writel(DDR1_CONF2_REG_VAL, regs + AR71XX_DDR_REG_CONFIG2);
>> +		udelay(100);
>> +		writel(DDR1_CONF3_REG_VAL, regs + QCA953X_DDR_REG_CONFIG3);
>> +		udelay(100);
> [...]

-- 
Best Regards
Wills

  reply	other threads:[~2016-01-22  9:17 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1452968033-4460-1-git-send-email-wills.wang@live.com>
2016-01-16 18:13 ` [U-Boot] [PATCH v7 1/7] mips: add base support for QCA/Atheros ath79 SOCs Wills Wang
2016-01-16 19:19   ` Marek Vasut
2016-01-22  9:02     ` Wills Wang
2016-01-22 14:44       ` Marek Vasut
2016-01-23  1:31         ` Wills Wang
2016-01-23  3:06           ` Marek Vasut
2016-01-23  5:25             ` Wills Wang
2016-02-01 19:19   ` Marek Vasut
2016-01-16 18:13 ` [U-Boot] [PATCH v7 2/7] mips: ath79: add support for AR933x SOCs Wills Wang
2016-01-16 19:31   ` Marek Vasut
2016-01-22  9:10     ` Wills Wang
2016-01-22 14:46       ` Marek Vasut
2016-01-16 18:13 ` [U-Boot] [PATCH v7 3/7] mips: ath79: add support for QCA953x SOCs Wills Wang
2016-01-16 19:33   ` Marek Vasut
2016-01-22  9:17     ` Wills Wang [this message]
2016-01-22 14:49       ` Marek Vasut
2016-01-16 18:13 ` [U-Boot] [PATCH v7 4/7] mips: ath79: add serial driver for ar933x SOC Wills Wang
2016-01-16 19:17   ` Daniel Schwierzeck
2016-01-18  3:58   ` Simon Glass
2016-01-16 18:13 ` [U-Boot] [PATCH v7 5/7] mips: ath79: add spi driver Wills Wang
2016-01-16 19:37   ` Daniel Schwierzeck
2016-01-22  9:24     ` Wills Wang
2016-01-27  1:33   ` Marek Vasut
2016-02-02 15:38     ` Wills Wang
2016-02-02 16:07       ` Marek Vasut
2016-01-16 18:13 ` [U-Boot] [PATCH v7 6/7] mips: ath79: add AP121 reference board Wills Wang
2016-01-16 19:50   ` Daniel Schwierzeck
2016-01-22  9:36     ` Wills Wang
2016-01-16 18:13 ` [U-Boot] [PATCH v7 7/7] mips: ath79: add AP143 " Wills Wang
2016-01-16 19:53   ` Daniel Schwierzeck

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=BLU436-SMTP209879A56924D1FF41A524AFFC40@phx.gbl \
    --to=wills.wang@live.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.