[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH V2 09/33] xen/arm: Add helpers to retrieve an address from the device tree



On 05/08/2013 02:23 PM, Ian Campbell wrote:

> On Wed, 2013-05-08 at 03:33 +0100, Julien Grall wrote:
>> Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
>> ---
>>  xen/common/device_tree.c      |  343 
>> +++++++++++++++++++++++++++++++++++++++++
>>  xen/include/xen/device_tree.h |   22 +++
>>  2 files changed, 365 insertions(+)
>>
>> diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
>> index 449c332..8d37018 100644
>> --- a/xen/common/device_tree.c
>> +++ b/xen/common/device_tree.c
>> @@ -62,10 +62,38 @@ static void (*dt_printk)(const char *fmt, ...) = 
>> early_printk;
>>
>>  #ifdef DEBUG_DT
>>  # define dt_dprintk(fmt, args...) dt_printk(XENLOG_DEBUG fmt, ##args)
>> +static void dt_dump_addr(const char *s, const __be32 *addr, int na)
>> +{
>> +    dt_dprintk("%s", s);
>> +    while ( na-- )
>> +        dt_dprintk(" %08x", be32_to_cpu(*(addr++)));
>> +    dt_dprintk("\n");
>> +}
>>  #else
>>  # define dt_dprintk(fmt, args...) do {} while ( 0 )
>> +static void dt_dump_addr(const char *s, const __be32 *addr, int na) { }
>>  #endif
>>
>> +#define DT_BAD_ADDR ((u64)-1)
>> +
>> +/* Max address size we deal with */
>> +#define DT_MAX_ADDR_CELLS 4
>> +#define DT_CHECK_ADDR_COUNT(na) ((na) > 0 && (na) <= DT_MAX_ADDR_CELLS)
>> +#define DT_CHECK_COUNTS(na, ns) (DT_CHECK_ADDR_COUNT(na) && (ns) > 0)
>> +
>> +/* Callbacks for bus specific translators */
>> +struct dt_bus
>> +{
>> +    const char *name;
>> +    const char *addresses;
>> +    int (*match)(const struct dt_device_node *parent);
>> +    void (*count_cells)(const struct dt_device_node *child,
>> +                        int *addrc, int *sizec);
>> +    u64        (*map)(__be32 *addr, const __be32 *range, int na, int ns, 
>> int pna);
>> +       int (*translate)(__be32 *addr, u64 offset, int na);
>> +       unsigned int (*get_flags)(const __be32 *addr);
> 
> Spacing is weird here. Hard tabs perhaps?


Right. I will fix all the errors on the next patch series.

-- 
Julien

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.