Re: [RESEND][PATCH] ARM: PL011: add support for extended FIFO-size of PL011-r1p5

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

 



On Mon, Apr 15, 2013 at 7:45 AM, Jongsung Kim <neidhard.kim@xxxxxxx> wrote:

At the risk to re-stating what Russell has already said...

> +
> +       unsigned int (*get_fifosize)(unsigned int periphid);
>  };
>
> +static unsigned int get_fifosize_arm(unsigned int periphid)
> +{
> +       unsigned int rev = (periphid >> 20) & 0xf;
> +       return rev < 3 ? 16 : 32;
> +}

This is a very complicated way to to something very simple.

Keep the .fifosize as part of struct vendor_data, define a
new vendor data cunk for your variant, use .id and .mask
to select your variant.

static struct vendor_data vendor_arm_deepfifo = {
     .fifosize = 32,
     (... the rest is the same)
}

(...)

static struct amba_id pl011_ids[] = {
        {
                .id     = 0x00341011,
                .mask   = 0x00ffffff,
                .data   = &vendor_arm_deepfifo,
        },
(...)
};

As you can see in amba_lookup() in
drivers/amba/bus.c the table is traversed from the top,
so for the new "3" variant this entry will match, while the
next entry will match all older versions.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux