Cyril Chemparathy <[email protected]> writes:

> This patch replaces the jtag id base info in davinci_soc_info with a physical
> address which is then ioremap()ed within common code.
>
> This patch (in combination with a similar change for PSC) will allow us to
> eliminate the SYSCFG nastiness in DA8xx code.
>
> Signed-off-by: Cyril Chemparathy <[email protected]>
> ---
> v2: fixed return value on ioremap failure

one other minor comment/question:

>  arch/arm/mach-davinci/common.c              |   49 +++++++++++++++-----------
>  arch/arm/mach-davinci/da830.c               |    3 +-
>  arch/arm/mach-davinci/da850.c               |    3 +-
>  arch/arm/mach-davinci/dm355.c               |    2 +-
>  arch/arm/mach-davinci/dm365.c               |    2 +-
>  arch/arm/mach-davinci/dm644x.c              |    2 +-
>  arch/arm/mach-davinci/dm646x.c              |    2 +-
>  arch/arm/mach-davinci/include/mach/common.h |    2 +-
>  8 files changed, 35 insertions(+), 30 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/common.c b/arch/arm/mach-davinci/common.c
> index f8221c5..ddbd57b 100644
> --- a/arch/arm/mach-davinci/common.c
> +++ b/arch/arm/mach-davinci/common.c
> @@ -37,26 +37,42 @@ void davinci_get_mac_addr(struct memory_accessor 
> *mem_acc, void *context)
>               pr_info("Read MAC addr from EEPROM: %pM\n", mac_addr);
>  }
>  
> -static struct davinci_id * __init davinci_get_id(u32 jtag_id)
> +static int __init davinci_init_id(struct davinci_soc_info *soc_info)
>  {
> -     int i;
> -     struct davinci_id *dip;
> -     u8 variant = (jtag_id & 0xf0000000) >> 28;
> -     u16 part_no = (jtag_id & 0x0ffff000) >> 12;
> +     int                     i;
> +     struct davinci_id       *dip;
> +     u8                      variant;
> +     u16                     part_no;
> +     void __iomem            *base;
> +
> +     base = ioremap(davinci_soc_info.jtag_id_reg, SZ_4K);

not sure that it matters at this point, but should you be using
the soc_info ptr passed in here instead of the global one?

If there's no difference, for readabiliy sake, using the passed in
value would be less confusing.

Kevin
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to