All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v8 1/9] mips: add base support for QCA/Atheros ath79 SOCs
Date: Wed, 16 Mar 2016 22:35:55 +0100	[thread overview]
Message-ID: <56E9D1BB.1070607@denx.de> (raw)
In-Reply-To: <BLU436-SMTP49CD3F6BA2F9A5F0D051C8FF8A0@phx.gbl>

On 03/16/2016 09:59 AM, Wills Wang wrote:
> This patch add some common code for QCA/Atheros ath79 SOCs such as
> DDR tuning, chip reset and CPU detection.
> 
> Signed-off-by: Wills Wang <wills.wang@live.com>
> ---
> 
> Changes in v8:
> - Use setbits_be32
> - Use lookup-table instead of big switch statement for CPU detection
> 

Good stuff, minor nits below.

> +++ b/arch/mips/mach-ath79/cpu.c
> @@ -0,0 +1,142 @@
> +/*
> + * Copyright (C) 2015-2016 Wills Wang <wills.wang@live.com>
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +
> +#include <common.h>
> +#include <asm/io.h>
> +#include <asm/addrspace.h>
> +#include <asm/types.h>
> +#include <mach/ath79.h>
> +#include <mach/ar71xx_regs.h>
> +
> +struct ath79_soc_desc {
> +	enum ath79_soc_type soc;
> +	const char *chip;
> +	int major;
> +	int minor;

All of this stuff can be const, no ?

> +};

[...]

> diff --git a/arch/mips/mach-ath79/dram.c b/arch/mips/mach-ath79/dram.c
> new file mode 100644
> index 0000000..c29e98c
> --- /dev/null
> +++ b/arch/mips/mach-ath79/dram.c
> @@ -0,0 +1,16 @@
> +/*
> + * Copyright (C) 2015-2016 Wills Wang <wills.wang@live.com>
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +
> +#include <common.h>
> +#include <linux/sizes.h>
> +#include <asm/addrspace.h>
> +#include <mach/ddr.h>
> +
> +phys_size_t initdram(int board_type)
> +{
> +	ddr_tap_tuning();

Is the DDR tap tuning needed on all AR7xxx/AR9xxx systems ?

> +	return get_ram_size((void *)KSEG1, SZ_256M);
> +}
> diff --git a/arch/mips/mach-ath79/include/mach/ar71xx_regs.h b/arch/mips/mach-ath79/include/mach/ar71xx_regs.h
> new file mode 100644
> index 0000000..893dedc
> --- /dev/null
> +++ b/arch/mips/mach-ath79/include/mach/ar71xx_regs.h
> @@ -0,0 +1,1184 @@
> +/*
> + * Atheros AR71XX/AR724X/AR913X SoC register definitions
> + *
> + * Copyright (C) 2015-2016 Wills Wang <wills.wang@live.com>
> + * Copyright (C) 2010-2011 Jaiganesh Narayanan <jnarayanan@atheros.com>
> + * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
> + * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
> + *
> + * SPDX-License-Identifier:     GPL-2.0+
> + */
> +
> +#ifndef __ASM_MACH_AR71XX_REGS_H
> +#define __ASM_MACH_AR71XX_REGS_H
> +
> +#ifndef __ASSEMBLY__
> +#include <linux/bitops.h>
> +#else
> +#ifndef BIT
> +#define BIT(nr)                 (1 << (nr))

This should really go into some common header.

> +#endif
> +#endif
> +
> +#define AR71XX_APB_BASE                 0x18000000
> +#define AR71XX_GE0_BASE                 0x19000000
> +#define AR71XX_GE0_SIZE                 0x10000
> +#define AR71XX_GE1_BASE                 0x1a000000
> +#define AR71XX_GE1_SIZE                 0x10000
> +#define AR71XX_EHCI_BASE                0x1b000000
> +#define AR71XX_EHCI_SIZE                0x1000
> +#define AR71XX_OHCI_BASE                0x1c000000
> +#define AR71XX_OHCI_SIZE                0x1000
> +#define AR71XX_SPI_BASE                 0x1f000000
> +#define AR71XX_SPI_SIZE                 0x01000000

Indent the macro value with tabs in this file please.

[...]

-- 
Best regards,
Marek Vasut

  reply	other threads:[~2016-03-16 21:35 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1458118800-23675-1-git-send-email-wills.wang@live.com>
2016-03-16  8:59 ` [U-Boot] [PATCH v8 1/9] mips: add base support for QCA/Atheros ath79 SOCs Wills Wang
2016-03-16 21:35   ` Marek Vasut [this message]
2016-03-17  3:39     ` Wills Wang
2016-03-17  3:44       ` Marek Vasut
2016-03-17  4:02         ` Wills Wang
2016-03-17 12:20           ` Marek Vasut
2016-03-17 12:35             ` Wills Wang
2016-03-17 12:37               ` Marek Vasut
2016-04-02 22:51               ` Marek Vasut
2016-03-17 12:48             ` Daniel Schwierzeck
2016-03-17 12:51               ` Marek Vasut
2016-04-10 18:35   ` Daniel Schwierzeck
2016-03-16  8:59 ` [U-Boot] [PATCH v8 2/9] mips: ath79: add support for AR933x SOCs Wills Wang
2016-03-16 21:38   ` Marek Vasut
2016-03-17  3:14     ` Wills Wang
2016-03-16  8:59 ` [U-Boot] [PATCH v8 3/9] mips: ath79: add support for QCA953x SOCs Wills Wang
2016-03-16 21:39   ` Marek Vasut
2016-03-17  3:14     ` Wills Wang
2016-03-17  3:27       ` Marek Vasut
2016-03-16  8:59 ` [U-Boot] [PATCH v8 4/9] drivers: pinctrl: Add simple pinctrl driver for QCA/Athores ar933x Wills Wang
2016-04-09 18:34   ` Simon Glass
2016-03-16  8:59 ` [U-Boot] [PATCH v8 5/9] drivers: pinctrl: Add simple pinctrl driver for QCA/Athores qca953x Wills Wang
2016-04-09 18:34   ` Simon Glass
2016-03-16  8:59 ` [U-Boot] [PATCH v8 6/9] drivers: serial: add serial driver for ar933x SOC Wills Wang
2016-04-09 18:34   ` Simon Glass
2016-04-11  7:57     ` Wills Wang
2016-04-11 13:41       ` Marek Vasut
2016-03-16  8:59 ` [U-Boot] [PATCH v8 7/9] drivers: spi: add spi support for QCA/Atheros ath79 SOCs Wills Wang
2016-03-16  8:59 ` [U-Boot] [PATCH v8 8/9] mips: ath79: add AP121 reference board Wills Wang
2016-03-16  9:00 ` [U-Boot] [PATCH v8 9/9] mips: ath79: add AP143 " Wills Wang

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=56E9D1BB.1070607@denx.de \
    --to=marex@denx.de \
    --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.