All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Hogan <jhogan@kernel.org>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 4/8] MIPS: mscc: Add initial support for Microsemi MIPS SoCs
Date: Wed, 14 Feb 2018 16:51:35 +0000	[thread overview]
Message-ID: <20180214165135.GC3986@saruman> (raw)
In-Reply-To: <20180116101240.5393-5-alexandre.belloni@free-electrons.com>

[-- Attachment #1: Type: text/plain, Size: 2827 bytes --]

On Tue, Jan 16, 2018 at 11:12:36AM +0100, Alexandre Belloni wrote:
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index 350a990fc719..a9db028a0338 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -527,6 +527,30 @@ config MIPS_MALTA
>  	  This enables support for the MIPS Technologies Malta evaluation
>  	  board.
>  
> +config MSCC_OCELOT
> +	bool "Microsemi Ocelot architecture"
> +	select BOOT_RAW
> +	select CEVT_R4K
> +	select CSRC_R4K
> +	select IRQ_MIPS_CPU
> +	select DMA_NONCOHERENT
> +	select SYS_HAS_CPU_MIPS32_R2
> +	select SYS_SUPPORTS_32BIT_KERNEL
> +	select SYS_SUPPORTS_BIG_ENDIAN
> +	select SYS_SUPPORTS_LITTLE_ENDIAN
> +	select SYS_HAS_EARLY_PRINTK
> +	select USE_GENERIC_EARLY_PRINTK_8250
> +	select MSCC_OCELOT_IRQ
> +	select PINCTRL
> +	select GPIOLIB
> +	select COMMON_CLK
> +	select USE_OF
> +	select BUILTIN_DTB
> +	select LIBFDT

Please sort alphanumerically.

> +	help
> +	  This enables support for the Microsemi Ocelot architecture.
> +	  It builds a generic DT-based kernel image.
> +
>  config MACH_PIC32
>  	bool "Microchip PIC32 Family"
>  	help

...

> diff --git a/arch/mips/mscc/Platform b/arch/mips/mscc/Platform
> new file mode 100644
> index 000000000000..9ae874c8f136
> --- /dev/null
> +++ b/arch/mips/mscc/Platform
> @@ -0,0 +1,12 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +#
> +# Microsemi MIPS SoC support
> +#
> +# License: Dual MIT/GPL
> +# Copyright (c) 2017 Microsemi Corporation
> +
> +#
> +# Microsemi Ocelot board(s)
> +#
> +platform-$(CONFIG_MSCC_OCELOT) += mscc/

Please use tabs to align

> +load-$(CONFIG_MSCC_OCELOT)	 += 0x80100000

Please drop the space after the tab.

> diff --git a/arch/mips/mscc/setup.c b/arch/mips/mscc/setup.c
> new file mode 100644
> index 000000000000..77803edd7bfd
> --- /dev/null
> +++ b/arch/mips/mscc/setup.c
> @@ -0,0 +1,106 @@

...

> +
> +#include <asm/time.h>
> +#include <asm/idle.h>
> +#include <asm/prom.h>
> +#include <asm/reboot.h>

Please sort these includes alphanumerically if possible.

> +
> +static void __init ocelot_earlyprintk_init(void)
> +{
> +	void __iomem *uart_base;
> +
> +	uart_base = ioremap_nocache(0x70100000, 0x0f);

Maybe these hex literals (the address at least) can use #defines.

0xf is an odd size when the 2 below indicates 32-bit registers.


> +	setup_8250_early_printk_port((unsigned long)uart_base, 2, 50000);
> +}

...

> +extern void (*late_time_init)(void);

This is already declared in linux/init.h which you include, so I think
you can drop it.

> +void __init device_tree_init(void)
> +{
> +	if (!initial_boot_params)
> +		return;

I think flatten_and_copy_device_tree() already checks this (with a
warning), so this could be dropped.

Cheers
James

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-02-14 16:51 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-16 10:12 [PATCH v3 0/8] MIPS: add support for the Microsemi MIPS SoCs Alexandre Belloni
2018-01-16 10:12 ` Alexandre Belloni
2018-01-16 10:12 ` [PATCH v3 1/8] dt-bindings: mips: Add bindings for Microsemi SoCs Alexandre Belloni
2018-01-19 19:23   ` Rob Herring
2018-01-19 19:23     ` Rob Herring
2018-02-14 16:38   ` James Hogan
2018-01-16 10:12 ` [PATCH v3 2/8] dt-bindings: power: reset: Document ocelot-reset binding Alexandre Belloni
2018-01-20  0:34   ` Rob Herring
2018-01-20  0:34     ` Rob Herring
2018-02-08 22:32   ` Sebastian Reichel
2018-01-16 10:12 ` [PATCH v3 3/8] power: reset: Add a driver for the Microsemi Ocelot reset Alexandre Belloni
2018-02-08 22:32   ` Sebastian Reichel
2018-01-16 10:12 ` [PATCH v3 4/8] MIPS: mscc: Add initial support for Microsemi MIPS SoCs Alexandre Belloni
2018-02-14 16:51   ` James Hogan [this message]
2018-02-14 21:38     ` Philippe Ombredanne
2018-01-16 10:12 ` [PATCH v3 5/8] MIPS: mscc: add ocelot dtsi Alexandre Belloni
2018-02-14 16:57   ` James Hogan
2018-02-27 15:47     ` Alexandre Belloni
2018-02-27 21:01   ` Jonas Gorski
2018-02-28 13:14     ` Alexandre Belloni
2018-01-16 10:12 ` [PATCH v3 6/8] MIPS: mscc: add ocelot PCB123 device tree Alexandre Belloni
2018-02-14 17:00   ` James Hogan
2018-02-27 15:54     ` Alexandre Belloni
2018-02-27 15:57       ` James Hogan
2018-02-27 15:57         ` James Hogan
2018-01-16 10:12 ` [PATCH v3 7/8] MIPS: defconfigs: add a defconfig for Microsemi SoCs Alexandre Belloni
2018-02-14 17:03   ` James Hogan
2018-02-27 16:15     ` Alexandre Belloni
2018-02-27 16:23       ` James Hogan
2018-01-16 10:12 ` [PATCH v3 8/8] MAINTAINERS: Add entry for Microsemi MIPS SoCs Alexandre Belloni
2018-02-14 17:05   ` James Hogan

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=20180214165135.GC3986@saruman \
    --to=jhogan@kernel.org \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /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.