Dear Ilya Yanok, In message <1242777361-6717-2-git-send-email-ya...@emcraft.com> you wrote: > This patch adds generic code to support Freescale's i.MX27 SoCs. ... > +void imx_gpio_mode(int gpio_mode) > +{ > + struct gpio_regs *regs = (struct gpio_regs *)IMX_GPIO_BASE; > + unsigned int pin = gpio_mode & GPIO_PIN_MASK; > + unsigned int port = (gpio_mode & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT; > + unsigned int ocr = (gpio_mode & GPIO_OCR_MASK) >> GPIO_OCR_SHIFT; > + unsigned int aout = (gpio_mode & GPIO_AOUT_MASK) >> GPIO_AOUT_SHIFT; > + unsigned int bout = (gpio_mode & GPIO_BOUT_MASK) >> GPIO_BOUT_SHIFT; > + unsigned int tmp; > + > + /* Pullup enable */ > + if (gpio_mode & GPIO_PUEN) > + writel(readl(®s->port[port].PUEN) | (1 << pin), > + ®s->port[port].PUEN); > + else > + writel(readl(®s->port[port].PUEN) & ~(1 << pin), > + ®s->port[port].PUEN);
Please use curly braces for multiline if-else statements (2 lines in both the if and the else branch here, and more of these down below in the file). > + if (now >= lastinc) /* normal mode (non roll) */ > + /* move stamp forward with absolut diff ticks */ > + timestamp += (now - lastinc); > + else /* we have rollover of incrementer */ > + timestamp += (0xFFFFFFFF - lastinc) + now; Ditto. Braces, please. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de "In Christianity neither morality nor religion come into contact with reality at any point." - Friedrich Nietzsche _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot