Re: [PATCH v4 02/10] pinctrl: mvebu: dove pinctrl driver

2013-06-18 Thread Russell King - ARM Linux
On Thu, Sep 13, 2012 at 05:41:44PM +0200, Sebastian Hesselbarth wrote: +#define DOVE_GLOBAL_CONFIG_1 (DOVE_SB_REGS_VIRT_BASE | 0xe802C) +#define DOVE_TWSI_ENABLE_OPTION1BIT(7) +#define DOVE_GLOBAL_CONFIG_2 (DOVE_SB_REGS_VIRT_BASE | 0xe8030) +#define

Re: [PATCH v4 02/10] pinctrl: mvebu: dove pinctrl driver

2013-06-18 Thread Sebastian Hesselbarth
On 06/18/13 13:36, Russell King - ARM Linux wrote: On Thu, Sep 13, 2012 at 05:41:44PM +0200, Sebastian Hesselbarth wrote: +#define DOVE_GLOBAL_CONFIG_1 (DOVE_SB_REGS_VIRT_BASE | 0xe802C) +#define DOVE_TWSI_ENABLE_OPTION1 BIT(7) +#define DOVE_GLOBAL_CONFIG_2

Re: [PATCH v4 02/10] pinctrl: mvebu: dove pinctrl driver

2013-06-18 Thread Linus Walleij
On Tue, Jun 18, 2013 at 1:36 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: Maybe what we need is something like this: static DEFINE_SPINLOCK(io_lock); static void modifyl(u32 new, u32 mask, void __iomem *reg) { unsigned long flags; u32 val;

Re: [PATCH v4 02/10] pinctrl: mvebu: dove pinctrl driver

2013-06-18 Thread Linus Walleij
On Tue, Jun 18, 2013 at 5:11 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Tue, Jun 18, 2013 at 05:02:49PM +0200, Linus Walleij wrote: Nowadays I would do the above with regmap_update_bits(). Mutual exclusion for read-modify-write of individual bits in a register is one of

Re: [PATCH v4 02/10] pinctrl: mvebu: dove pinctrl driver

2013-06-18 Thread Russell King - ARM Linux
On Tue, Jun 18, 2013 at 05:02:49PM +0200, Linus Walleij wrote: Nowadays I would do the above with regmap_update_bits(). Mutual exclusion for read-modify-write of individual bits in a register is one of those cases where doing a regmap over a memory-mapped register range makes a lot of sense.

Re: [PATCH v4 02/10] pinctrl: mvebu: dove pinctrl driver

2013-06-18 Thread Mark Brown
On Tue, Jun 18, 2013 at 04:11:16PM +0100, Russell King - ARM Linux wrote: On Tue, Jun 18, 2013 at 05:02:49PM +0200, Linus Walleij wrote: Nowadays I would do the above with regmap_update_bits(). Mutual exclusion for read-modify-write of individual bits in a register is one of those cases