[PATCH v3 32/71] ARC: [DeviceTree] Basic support

Vineet Gupta Vineet.Gupta1 at synopsys.com
Wed Jan 30 00:39:16 EST 2013


On Tuesday 29 January 2013 06:55 PM, Rob Herring wrote:
> On 01/24/2013 04:50 AM, Vineet Gupta wrote:
>> This is minimal infrastructure needed for devicetree work.
>> It uses an a sample "skeleton" devicetree - embedded in kernel image -
>> to print the board, manufacturer by parsing the top-level "compatible"
>> string.
>>
>> As of now we don't need any additional "board" specific "machine_desc".
>>
>> TODO: support interpreting the command line as boot-loader passed dtb
>>
>> Signed-off-by: Vineet Gupta <vgupta at synopsys.com>
>> Cc: Arnd Bergmann <arnd at arndb.de>
>> Cc: Grant Likely <grant.likely at secretlab.ca>
>> Cc: devicetree-discuss at lists.ozlabs.org
>> Cc: Rob Herring <rob.herring at calxeda.com>
> One minor thing below, otherwise:
>
> Reviewed-by: Rob Herring <rob.herring at calxeda.com>
>
>
>> diff --git a/arch/arc/kernel/devtree.c b/arch/arc/kernel/devtree.c
>> new file mode 100644
>> index 0000000..229f78e
>> --- /dev/null
>> +++ b/arch/arc/kernel/devtree.c
>> @@ -0,0 +1,69 @@
>> +/*
>> + * Copyright (C) 2012 Synopsys, Inc. (www.synopsys.com)
>> + *
>> + * Based on highly stipped down version of METAG
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + */
>> +
>> +
>> +#include <linux/init.h>
>> +#include <linux/export.h>
>> +#include <linux/errno.h>
> Is this include needed?

Nope - removed.

>
>> +#include <linux/types.h>
>> +#include <linux/reboot.h>
> And this?

reboot.h is needed for the machine_halt() prototype.

>
>> +#include <linux/memblock.h>
>> +#include <linux/of.h>
>> +#include <linux/of_fdt.h>
>> +#include <linux/of_irq.h>
> And this?
>
>> +#include <linux/of_platform.h>
> And this?

Both of the above removed.

I'll send a revised patch which also addresses James' review comments as well -
(namely broken dtbs rule, adding dependency on scripts ...)
See https://lkml.org/lkml/2013/1/28/138 for reference.



More information about the devicetree-discuss mailing list