Re: [PATCH 22/24] C6X: EMIF - External Memory Interface

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

 



On Monday 22 August 2011 16:09:43 Mark Salter wrote:
> +/*
> + * Parse device tree for existence of an EMIF (External Memory Interface)
> + * and initialize it if found.
> + */
> +static int __init c6x_emifa_init(void)
> +{
> +       struct emifa_regs __iomem *regs;
> +       struct device_node *node;
> +       const __be32 *p;
> +       int i, len;
> +
> +       node = of_find_compatible_node(NULL, NULL, "ti,c64x+emifa");
> +       if (!node)
> +               return 0;
> +
> +       regs = of_iomap(node, 0);
> +       if (!regs)
> +               return 0;
> +
> +       /* emif power/clocks */
> +       soc_dev_enable(SOC_DEV_EMIF, 0);
> +
> +       p = of_get_property(node, "ti,emifa-ce-config", &len);
> +       if (p) {
> +               len /= sizeof(u32);
> +               if (len > NUM_EMIFA_CHIP_ENABLES)
> +                       len = NUM_EMIFA_CHIP_ENABLES;
> +               for (i = 0; i <= len; i++)
> +                       soc_writel(be32_to_cpup(&p[i]), &regs->cecfg[i]);
> +       }
> +
> +       p = of_get_property(node, "ti,emifa-burst-priority", &len);
> +       if (p && len == sizeof(u32))
> +               soc_writel(be32_to_cpup(p), &regs->bprio);
> +
> +       p = of_get_property(node, "ti,emifa-async-wait-control", &len);
> +       if (p && len == sizeof(u32))
> +               soc_writel(be32_to_cpup(p), &regs->awcc);
> +
> +       of_node_put(node);
> +       return 0;
> +}
> +pure_initcall(c6x_emifa_init);

It looks like you are missing an iounmap here. Obviously a nop on nommu, but
it caught my eye anyway and perheps you get an mmu at some point.

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


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux