Re: [linux-sunxi] Re: [PATCH 1/6] clk: sunxi: Add support for sun9i a80 usb clocks and resets

2014-11-14 Thread Chen-Yu Tsai
Hi, On Fri, Nov 14, 2014 at 4:39 PM, Maxime Ripard wrote: > Hi, > > Sorry for the belated answer. > > On Thu, Nov 06, 2014 at 05:19:24PM +0800, Chen-Yu Tsai wrote: >> On Thu, Nov 6, 2014 at 4:54 PM, Maxime Ripard >> wrote: >> > On Thu, Nov 06, 2014 at 10:09:27AM +0800, Chen-Yu Tsai wrote: >> >>

Re: [PATCH 1/6] clk: sunxi: Add support for sun9i a80 usb clocks and resets

2014-11-14 Thread Maxime Ripard
Hi, Sorry for the belated answer. On Thu, Nov 06, 2014 at 05:19:24PM +0800, Chen-Yu Tsai wrote: > On Thu, Nov 6, 2014 at 4:54 PM, Maxime Ripard > wrote: > > On Thu, Nov 06, 2014 at 10:09:27AM +0800, Chen-Yu Tsai wrote: > >> >> >> +static void __init sun9i_a80_usb_mod_setup(struct device_node *no

Re: [PATCH 1/6] clk: sunxi: Add support for sun9i a80 usb clocks and resets

2014-11-06 Thread Chen-Yu Tsai
On Thu, Nov 6, 2014 at 4:54 PM, Maxime Ripard wrote: > On Thu, Nov 06, 2014 at 10:09:27AM +0800, Chen-Yu Tsai wrote: >> >> >> +static void __init sun9i_a80_usb_mod_setup(struct device_node *node) >> >> >> +{ >> >> >> + /* AHB1 gate must be enabled to access registers */ >> >> >> + struct c

Re: [PATCH 1/6] clk: sunxi: Add support for sun9i a80 usb clocks and resets

2014-11-06 Thread Maxime Ripard
On Thu, Nov 06, 2014 at 10:09:27AM +0800, Chen-Yu Tsai wrote: > >> >> +static void __init sun9i_a80_usb_mod_setup(struct device_node *node) > >> >> +{ > >> >> + /* AHB1 gate must be enabled to access registers */ > >> >> + struct clk *ahb = of_clk_get(node, 0); > >> >> + > >> >> + WARN_

Re: [PATCH 1/6] clk: sunxi: Add support for sun9i a80 usb clocks and resets

2014-11-05 Thread Chen-Yu Tsai
On Wed, Nov 5, 2014 at 6:09 PM, Maxime Ripard wrote: > On Wed, Nov 05, 2014 at 06:02:35PM +0800, Chen-Yu Tsai wrote: >> >> +static void __init sunxi_usb_clk_setup(struct device_node *node, >> >> +const struct usb_clk_data *data, >> >> +

Re: [PATCH 1/6] clk: sunxi: Add support for sun9i a80 usb clocks and resets

2014-11-05 Thread Maxime Ripard
On Wed, Nov 05, 2014 at 06:02:35PM +0800, Chen-Yu Tsai wrote: > >> +static void __init sunxi_usb_clk_setup(struct device_node *node, > >> +const struct usb_clk_data *data, > >> +spinlock_t *lock) > >> +{ > >> + struct clk_o

Re: [PATCH 1/6] clk: sunxi: Add support for sun9i a80 usb clocks and resets

2014-11-05 Thread Chen-Yu Tsai
Hi, On Wed, Nov 5, 2014 at 12:57 AM, Maxime Ripard wrote: > Hi, > > On Tue, Nov 04, 2014 at 12:07:14PM +0800, Chen-Yu Tsai wrote: >> The USB controller/phy clocks and reset controls are in a separate >> address block, unlike previous SoCs where they were in the clock >> controller. >> >> This pat

Re: [PATCH 1/6] clk: sunxi: Add support for sun9i a80 usb clocks and resets

2014-11-05 Thread Maxime Ripard
Hi Russell, On Tue, Nov 04, 2014 at 06:12:19PM +, Russell King - ARM Linux wrote: > On Tue, Nov 04, 2014 at 12:07:14PM +0800, Chen-Yu Tsai wrote: > > + spin_lock_irqsave(data->lock, flags); > > + > > + reg = readl(data->reg); > > + writel(reg & ~BIT(id), data->reg); > > + > > + spin_un

Re: [PATCH 1/6] clk: sunxi: Add support for sun9i a80 usb clocks and resets

2014-11-04 Thread Russell King - ARM Linux
On Tue, Nov 04, 2014 at 12:07:14PM +0800, Chen-Yu Tsai wrote: > + spin_lock_irqsave(data->lock, flags); > + > + reg = readl(data->reg); > + writel(reg & ~BIT(id), data->reg); > + > + spin_unlock_irqrestore(data->lock, flags); Don't we have generic support for atomic modification of

Re: [PATCH 1/6] clk: sunxi: Add support for sun9i a80 usb clocks and resets

2014-11-04 Thread Maxime Ripard
Hi, On Tue, Nov 04, 2014 at 12:07:14PM +0800, Chen-Yu Tsai wrote: > The USB controller/phy clocks and reset controls are in a separate > address block, unlike previous SoCs where they were in the clock > controller. > > This patch copies the original gates clk functions used for usb > clocks into

[PATCH 1/6] clk: sunxi: Add support for sun9i a80 usb clocks and resets

2014-11-03 Thread Chen-Yu Tsai
The USB controller/phy clocks and reset controls are in a separate address block, unlike previous SoCs where they were in the clock controller. This patch copies the original gates clk functions used for usb clocks into a separate file, and renames them to *_usb_*. Also add a per-gate parent index