lkml.org 
[lkml]   [2015]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 4/5] MIPS: Add support for the IMG Pistachio SoC
Hi Andrew,

On 13/03/15 22:54, Andrew Bresticker wrote:
> diff --git a/arch/mips/Kbuild.platforms b/arch/mips/Kbuild.platforms
> index e5fc463..2298baa 100644
> --- a/arch/mips/Kbuild.platforms
> +++ b/arch/mips/Kbuild.platforms
> @@ -23,6 +23,7 @@ platforms += netlogic
> platforms += paravirt
> platforms += pmcs-msp71xx
> platforms += pnx833x
> +platforms += pistachio

Please keep this sorted alphabetically.

> platforms += ralink
> platforms += rb532
> platforms += sgi-ip22

...

> diff --git a/arch/mips/include/asm/mach-pistachio/gpio.h b/arch/mips/include/asm/mach-pistachio/gpio.h
> new file mode 100644
> index 0000000..6c1649c
> --- /dev/null
> +++ b/arch/mips/include/asm/mach-pistachio/gpio.h
> @@ -0,0 +1,21 @@
> +/*
> + * Pistachio IRQ setup
> + *
> + * Copyright (C) 2014 Google, Inc.
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms and conditions of the GNU General Public License,
> + * version 2, as published by the Free Software Foundation.
> + */
> +
> +#ifndef __ASM_MACH_PISTACHIO_GPIO_H
> +#define __ASM_MACH_PISTACHIO_GPIO_H
> +
> +#include <asm-generic/gpio.h>
> +
> +#define gpio_get_value __gpio_get_value
> +#define gpio_set_value __gpio_set_value
> +#define gpio_cansleep __gpio_cansleep
> +#define gpio_to_irq __gpio_to_irq

Makes me wish ARCH_HAVE_CUSTOM_GPIO_H could be selected on a
per-platform basis :P. Never mind.

> +
> +#endif /* __ASM_MACH_PISTACHIO_GPIO_H */

...

> diff --git a/arch/mips/pistachio/init.c b/arch/mips/pistachio/init.c
> new file mode 100644
> index 0000000..6b297d5
> --- /dev/null
> +++ b/arch/mips/pistachio/init.c
> @@ -0,0 +1,131 @@

...

> +static int __init plat_of_setup(void)
> +{
> + if (!of_have_populated_dt())
> + panic("Device tree not present");
> +
> + if (of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL))
> + panic("Failed to populate DT\n");

No need for newline in panic message.

> +
> + return 0;
> +}
> +arch_initcall(plat_of_setup);

...

Otherwise from what I can tell this patch looks good to me (though I
probably wouldn't know if something important was missing from it).

Thanks!
James

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-03-16 12:21    [W:0.078 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site