Re: [U-Boot] [PATCH v2] dm:gpio:mxc add DT support

2015-01-21 Thread Peng Fan
Hi Igor, On 1/21/2015 5:18 PM, Igor Grinberg wrote: [...] @@ -295,12 +282,77 @@ static int mxc_gpio_probe(struct udevice *dev) return 0; } +#ifdef CONFIG_OF_CONTROL +static struct gpio_regs *mxc_get_gpio_addr(struct udevice *device) +{ +fdt_addr_t addr; +addr = fdtdec_get_

Re: [U-Boot] [PATCH v2] dm:gpio:mxc add DT support

2015-01-21 Thread Igor Grinberg
[...] >>> @@ -295,12 +282,77 @@ static int mxc_gpio_probe(struct udevice *dev) >>> return 0; >>> } >>> +#ifdef CONFIG_OF_CONTROL >>> +static struct gpio_regs *mxc_get_gpio_addr(struct udevice *device) >>> +{ >>> +fdt_addr_t addr; >>> +addr = fdtdec_get_addr(gd->fdt_blob, device-

Re: [U-Boot] [PATCH v2] dm:gpio:mxc add DT support

2015-01-20 Thread Peng Fan
Hi, Igor On 1/20/2015 10:39 PM, Igor Grinberg wrote: On 01/20/15 09:15, Peng Fan wrote: This patch add DT support for mxc gpio driver. Include a bank_index entry in platdata. This can avoid using `plat - mxc_plat` to calculate bank number. Also this can simplify code. Although, I don't insist

Re: [U-Boot] [PATCH v2] dm:gpio:mxc add DT support

2015-01-20 Thread Igor Grinberg
On 01/20/15 09:15, Peng Fan wrote: > This patch add DT support for mxc gpio driver. > > Include a bank_index entry in platdata. This can avoid using > `plat - mxc_plat` to calculate bank number. Also this can simplify code. Although, I don't insist, but I would recommend to split the patch into 2

[U-Boot] [PATCH v2] dm:gpio:mxc add DT support

2015-01-19 Thread Peng Fan
This patch add DT support for mxc gpio driver. Include a bank_index entry in platdata. This can avoid using `plat - mxc_plat` to calculate bank number. Also this can simplify code. There are two places still using CONFIG_OF_CONTROL macro, just to shrink code size if only support DM but not suppor