Messages in this thread | | | Date | Thu, 23 Dec 2010 11:59:38 +1300 | From | Ryan Mallon <> | Subject | Re: [PATCH 1/6 v11] ARM: Add basic architecture support for VIA/WonderMedia 85xx SoC's |
| |
On 12/23/2010 11:25 AM, Alexey Charkov wrote: > This adds support for the family of Systems-on-Chip produced initially > by VIA and now its subsidiary WonderMedia that have recently become > widespread in lower-end Chinese ARM-based tablets and netbooks. > > Support is included for both VT8500 and WM8505, selectable by a > configuration switch at kernel build time. > > Included are basic machine initialization files, register and > interrupt definitions, support for the on-chip interrupt controller, > high-precision OS timer, GPIO lines, necessary macros for early debug, > pulse-width-modulated outputs control, as well as platform device > configurations for the specific drivers implemented elsewhere. > > Signed-off-by: Alexey Charkov <alchark@gmail.com> > --- > > This incorporates latest comments by Ryan regarding helper inlines > in devices-{vt8500,wm8505}.c > > Best regards, > Alexey
One final nitpick :-).
> +static int vt8500_muxed_gpio_direction_input(struct gpio_chip *chip, > + unsigned offset) > +{ > + struct vt8500_gpio_chip *vt8500_chip = to_vt8500(chip); > + unsigned val = readl(regbase + 0x20 + vt8500_chip->regoff); > + > + val &= ~(1 << vt8500_chip->shift << offset); > + writel(val, regbase + 0x20 + vt8500_chip->regoff);
The magic numbers (0x20) in the gpio functions should probably be #defined as register names. I'm guessing this is the input enable register? Often people do helper functions for this, i.e:
static inline void gpio_write_reg(struct vt8500_gpio_chip *chip, unsigned val, unsigned reg) { writel(val, regbase + chip->regoff + reg); }
Other than that, looks good.
Reviewed-by: Ryan Mallon <ryan@bluewatersys.com>
-- Bluewater Systems Ltd - ARM Technology Solution Centre
Ryan Mallon 5 Amuri Park, 404 Barbadoes St ryan@bluewatersys.com PO Box 13 889, Christchurch 8013 http://www.bluewatersys.com New Zealand Phone: +64 3 3779127 Freecall: Australia 1800 148 751 Fax: +64 3 3779135 USA 1800 261 2934
| |