Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 08/16] ARM: bL_platsmp.c: make sure the GIC interface of a dying CPU is disabled
From: Santosh Shilimkar @ 2013-01-13  4:37 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <alpine.LFD.2.02.1301121134390.6300@xanadu.home>

On Saturday 12 January 2013 10:17 PM, Nicolas Pitre wrote:
> On Sat, 12 Jan 2013, Santosh Shilimkar wrote:
>
>> On Saturday 12 January 2013 12:37 AM, Nicolas Pitre wrote:
>>> On Fri, 11 Jan 2013, Santosh Shilimkar wrote:
>>>
>>>> On Thursday 10 January 2013 05:50 AM, Nicolas Pitre wrote:
>>>>> Otherwise there might be some interrupts or IPIs becoming pending and
>>>>> the
>>>>> CPU will not enter low power mode when doing a WFI.  The effect of this
>>>>> is a CPU that loops back into the kernel, go through the first man
>>>>> election, signals itself as alive,  and prevent the cluster from being
>>>>> shut down.
>>>>>
>>>>> This could benefit from a better solution.
>>>>>
>>>>> Signed-off-by: Nicolas Pitre <nico@linaro.org>
>>>>> ---
>>>>>     arch/arm/common/bL_platsmp.c        | 1 +
>>>>>     arch/arm/common/gic.c               | 6 ++++++
>>>>>     arch/arm/include/asm/hardware/gic.h | 2 ++
>>>>>     3 files changed, 9 insertions(+)
>>>>>
>>>>> diff --git a/arch/arm/common/bL_platsmp.c b/arch/arm/common/bL_platsmp.c
>>>>> index 0ae44123bf..6a3b251b97 100644
>>>>> --- a/arch/arm/common/bL_platsmp.c
>>>>> +++ b/arch/arm/common/bL_platsmp.c
>>>>> @@ -68,6 +68,7 @@ static void __ref bL_cpu_die(unsigned int cpu)
>>>>>     	pcpu = mpidr & 0xff;
>>>>>     	pcluster = (mpidr >> 8) & 0xff;
>>>>>     	bL_set_entry_vector(pcpu, pcluster, NULL);
>>>>> +	gic_cpu_if_down();
>>>>
>>>> So for a case where CPU still don't power down for some reason even
>>>> after CPU interface is disabled, can not listen to and SGI or PPI.
>>>> Not sure if this happens on big.LITTLE but i have seen one such issue
>>>> on Cortex-A9 based SOC.
>>>
>>> Here the problem was the reverse i.e. a CPU wouldn't go down because
>>> some pending SGIs prevented that.
>>>
>> I understood that part. What I was saying is, with CPU IF disabled and
>> if CPU doesn't enter into the intended low power state and if the wakeup
>> mechanism on that CPU is SGI/SPI, CPU may never wakeup and can lead to
>> dead lock. I have seen this scenario on OMAP especially in CPUidle path.
>
> Obviously, on the CPU idle path, you should not turn off the GIC
> interface as this might lose the ability to wake the CPU up with a
> pending interrupt, if your system is so configured.
>
> Here this is the CPU hot unplug path and we don't want the CPU to be
> awaken at all until we explicitly do something to wake it back up.
>
I see.

> However, in theory, all interrupts should have been migrated away from
> this CPU, so there shouldn't be any need for this.  I should revisit the
> test that led me to create this patch.
>
Thats right from hot-plug path and SPI are concerned. But SGI/PPI can
still wakeup CPU and there is no migration as such since they are local
to that

>> It may not be relevant for switcher considering, you almost force CPU to
>> enter to low power state :-)
>
> The switcher doesn't use cpu_die() but calls into bL_cpu_power_down()
> directly.
>
Good to know that.

Regards,
Santosh

^ permalink raw reply

* [PATCH 1/2 V4] iio: mxs: Implement support for touchscreen
From: Dmitry Torokhov @ 2013-01-13  3:09 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1357947308-11226-1-git-send-email-marex@denx.de>

On Sat, Jan 12, 2013 at 12:35:07AM +0100, Marek Vasut wrote:
> This patch implements support for sampling of a touchscreen into
> the MXS LRADC driver. The LRADC block allows configuring some of
> it's channels into special mode where they either output the drive
> voltage or sample it, allowing it to operate a 4-wire or 5-wire
> resistive touchscreen.
> 
> In case the touchscreen mode is enabled, the LRADC slot #7 is
> reserved for touchscreen only, therefore it is not possible to
> sample 8 LRADC channels at time, but only 7 channels.
> 
> The touchscreen controller is configured such that the PENDOWN event
> disables touchscreen interrupts and triggers execution of worker
> thread, which then polls the touchscreen controller for X, Y and
> Pressure values. This reduces the overhead of interrupt-driven
> operation. Upon the PENUP event, the worker thread re-enables the
> PENDOWN detection interrupt and exits.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> ---
>  .../bindings/staging/iio/adc/mxs-lradc.txt         |    6 +
>  drivers/staging/iio/adc/mxs-lradc.c                |  472 +++++++++++++++++++-
>  2 files changed, 454 insertions(+), 24 deletions(-)
> 
> V2: - Replace the use_touchscreen* with enum mxs_lradc_ts, which now tracks
>       touchscreen state (OFF, 4-wire, 5-wire)
>     - Add "stop_touchscreen" bit, which indicates the touchscreen is going down
>       and makes the driver not re-enable touchscreen interrupts and start any
>       new touchscreen works.
>     - Make all bitfields "unsigned int" instead of plain "int"
>     - Use switch(plate) in mxs_lradc_ts_sample()
>     - Cancel touchscreen thread in mxs_lradc_ts_close(), do this only after
>       we are sure touchscreen interrupt is off and will never be re-enabled.
>       This avoids serious race condition.
>     - Call input_free_device() if input_register_device() fails to avoid memory
>       leak.
>     - Do not call input_free_device() after input_unregister_device() in
>       mxs_lradc_ts_unregister() to avoid double-free
> 
> V3: - Replace bitfields with bools
>     - Make sure touchscreen workQ doesn't cause race condition upon closing
>       the input device
>     - Make touchscreen allocation failure fatal
>     - Remove redundant check for lradc->ts_input in mxs_lradc_ts_unregister()
>     - Drop __devinit and __devexit
> 
> V4: - Do not unconfigure lradc->use_touchscreen in mxs_lradc_ts_register()
>       when the probe fails
>     - Return true/false from mxs_lradc_validate_scan_mask() instead of 1/0
> 
> diff --git a/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt b/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt
> index 801d58c..4688205 100644
> --- a/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt
> +++ b/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt
> @@ -5,6 +5,12 @@ Required properties:
>  - reg: Address and length of the register set for the device
>  - interrupts: Should contain the LRADC interrupts
>  
> +Optional properties:
> +- fsl,lradc-touchscreen-wires: Number of wires used to connect the touchscreen
> +                               to LRADC. Valid value is either 4 or 5. If this
> +                               property is not present, then the touchscreen is
> +                               disabled.
> +
>  Examples:
>  
>  	lradc at 80050000 {
> diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
> index 6249957..5a544d4 100644
> --- a/drivers/staging/iio/adc/mxs-lradc.c
> +++ b/drivers/staging/iio/adc/mxs-lradc.c
> @@ -32,6 +32,8 @@
>  #include <linux/stmp_device.h>
>  #include <linux/bitops.h>
>  #include <linux/completion.h>
> +#include <linux/delay.h>
> +#include <linux/input.h>
>  
>  #include <mach/mxs.h>
>  #include <mach/common.h>
> @@ -59,6 +61,21 @@
>  #define LRADC_DELAY_TIMER_PER	200
>  #define LRADC_DELAY_TIMER_LOOP	5
>  
> +/*
> + * Once the pen touches the touchscreen, the touchscreen switches from
> + * IRQ-driven mode to polling mode to prevent interrupt storm. The polling
> + * is realized by worker thread, which is called every 20 or so milliseconds.
> + * This gives the touchscreen enough fluence and does not strain the system
> + * too much.
> + */
> +#define LRADC_TS_SAMPLE_DELAY_MS	5
> +
> +/*
> + * The LRADC reads the following amount of samples from each touchscreen
> + * channel and the driver then computes avarage of these.
> + */
> +#define LRADC_TS_SAMPLE_AMOUNT		4
> +
>  static const char * const mxs_lradc_irq_name[] = {
>  	"mxs-lradc-touchscreen",
>  	"mxs-lradc-thresh0",
> @@ -75,6 +92,12 @@ static const char * const mxs_lradc_irq_name[] = {
>  	"mxs-lradc-button1",
>  };
>  
> +enum mxs_lradc_ts {
> +	MXS_LRADC_TOUCHSCREEN_NONE = 0,
> +	MXS_LRADC_TOUCHSCREEN_4WIRE,
> +	MXS_LRADC_TOUCHSCREEN_5WIRE,
> +};
> +
>  struct mxs_lradc {
>  	struct device		*dev;
>  	void __iomem		*base;
> @@ -86,21 +109,69 @@ struct mxs_lradc {
>  	struct mutex		lock;
>  
>  	struct completion	completion;
> +
> +	/*
> +	 * Touchscreen LRADC channels receives a private slot in the CTRL4
> +	 * register, the slot #7. Therefore only 7 slots instead of 8 in the
> +	 * CTRL4 register can be mapped to LRADC channels when using the
> +	 * touchscreen.
> +	 *
> +	 * Furthermore, certain LRADC channels are shared between touchscreen
> +	 * and/or touch-buttons and generic LRADC block. Therefore when using
> +	 * either of these, these channels are not available for the regular
> +	 * sampling. The shared channels are as follows:
> +	 *
> +	 * CH0 -- Touch button #0
> +	 * CH1 -- Touch button #1
> +	 * CH2 -- Touch screen XPUL
> +	 * CH3 -- Touch screen YPLL
> +	 * CH4 -- Touch screen XNUL
> +	 * CH5 -- Touch screen YNLR
> +	 * CH6 -- Touch screen WIPER (5-wire only)
> +	 *
> +	 * The bitfields below represents which parts of the LRADC block are
> +	 * switched into special mode of operation. These channels can not
> +	 * be sampled as regular LRADC channels. The driver will refuse any
> +	 * attempt to sample these channels.
> +	 */
> +#define CHAN_MASK_TOUCHBUTTON		(0x3 << 0)
> +#define CHAN_MASK_TOUCHSCREEN_4WIRE	(0xf << 2)
> +#define CHAN_MASK_TOUCHSCREEN_5WIRE	(0x1f << 2)
> +	enum mxs_lradc_ts	use_touchscreen;
> +	bool			stop_touchscreen;
> +	bool			use_touchbutton;
> +
> +	struct input_dev	*ts_input;
> +	struct work_struct	ts_work;
>  };
>  
>  #define	LRADC_CTRL0				0x00
> -#define LRADC_CTRL0_TOUCH_DETECT_ENABLE		(1 << 23)
> -#define LRADC_CTRL0_TOUCH_SCREEN_TYPE		(1 << 22)
> +#define	LRADC_CTRL0_TOUCH_DETECT_ENABLE		(1 << 23)
> +#define	LRADC_CTRL0_TOUCH_SCREEN_TYPE		(1 << 22)
> +#define	LRADC_CTRL0_YNNSW	/* YM */	(1 << 21)
> +#define	LRADC_CTRL0_YPNSW	/* YP */	(1 << 20)
> +#define	LRADC_CTRL0_YPPSW	/* YP */	(1 << 19)
> +#define	LRADC_CTRL0_XNNSW	/* XM */	(1 << 18)
> +#define	LRADC_CTRL0_XNPSW	/* XM */	(1 << 17)
> +#define	LRADC_CTRL0_XPPSW	/* XP */	(1 << 16)
> +#define	LRADC_CTRL0_PLATE_MASK			(0x3f << 16)
>  
>  #define	LRADC_CTRL1				0x10
> -#define	LRADC_CTRL1_LRADC_IRQ(n)		(1 << (n))
> -#define	LRADC_CTRL1_LRADC_IRQ_MASK		0x1fff
> +#define	LRADC_CTRL1_TOUCH_DETECT_IRQ_EN		(1 << 24)
>  #define	LRADC_CTRL1_LRADC_IRQ_EN(n)		(1 << ((n) + 16))
>  #define	LRADC_CTRL1_LRADC_IRQ_EN_MASK		(0x1fff << 16)
> +#define	LRADC_CTRL1_LRADC_IRQ_EN_OFFSET		16
> +#define	LRADC_CTRL1_TOUCH_DETECT_IRQ		(1 << 8)
> +#define	LRADC_CTRL1_LRADC_IRQ(n)		(1 << (n))
> +#define	LRADC_CTRL1_LRADC_IRQ_MASK		0x1fff
> +#define	LRADC_CTRL1_LRADC_IRQ_OFFSET		0
>  
>  #define	LRADC_CTRL2				0x20
>  #define	LRADC_CTRL2_TEMPSENSE_PWD		(1 << 15)
>  
> +#define	LRADC_STATUS				0x40
> +#define	LRADC_STATUS_TOUCH_DETECT_RAW		(1 << 0)
> +
>  #define	LRADC_CH(n)				(0x50 + (0x10 * (n)))
>  #define	LRADC_CH_ACCUMULATE			(1 << 29)
>  #define	LRADC_CH_NUM_SAMPLES_MASK		(0x1f << 24)
> @@ -132,6 +203,7 @@ static int mxs_lradc_read_raw(struct iio_dev *iio_dev,
>  {
>  	struct mxs_lradc *lradc = iio_priv(iio_dev);
>  	int ret;
> +	unsigned long mask;
>  
>  	if (m != IIO_CHAN_INFO_RAW)
>  		return -EINVAL;
> @@ -140,6 +212,12 @@ static int mxs_lradc_read_raw(struct iio_dev *iio_dev,
>  	if (chan->channel > LRADC_MAX_TOTAL_CHANS)
>  		return -EINVAL;
>  
> +	/* Validate the channel if it doesn't intersect with reserved chans. */
> +	bitmap_set(&mask, chan->channel, 1);
> +	ret = iio_validate_scan_mask_onehot(iio_dev, &mask);
> +	if (ret)
> +		return -EINVAL;
> +
>  	/*
>  	 * See if there is no buffered operation in progess. If there is, simply
>  	 * bail out. This can be improved to support both buffered and raw IO at
> @@ -161,7 +239,11 @@ static int mxs_lradc_read_raw(struct iio_dev *iio_dev,
>  		lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
>  	writel(0xff, lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR);
>  
> -	writel(chan->channel, lradc->base + LRADC_CTRL4);
> +	/* Clean the slot's previous content, then set new one. */
> +	writel(LRADC_CTRL4_LRADCSELECT_MASK(0),
> +		lradc->base + LRADC_CTRL4 + STMP_OFFSET_REG_CLR);
> +	writel(chan->channel, lradc->base + LRADC_CTRL4 + STMP_OFFSET_REG_SET);
> +
>  	writel(0, lradc->base + LRADC_CH(0));
>  
>  	/* Enable the IRQ and start sampling the channel. */
> @@ -195,6 +277,269 @@ static const struct iio_info mxs_lradc_iio_info = {
>  };
>  
>  /*
> + * Touchscreen handling
> + */
> +enum lradc_ts_plate {
> +	LRADC_SAMPLE_X,
> +	LRADC_SAMPLE_Y,
> +	LRADC_SAMPLE_PRESSURE,
> +};
> +
> +static int mxs_lradc_ts_touched(struct mxs_lradc *lradc)
> +{
> +	uint32_t reg;
> +
> +	/* Enable touch detection. */
> +	writel(LRADC_CTRL0_PLATE_MASK,
> +		lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR);
> +	writel(LRADC_CTRL0_TOUCH_DETECT_ENABLE,
> +		lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_SET);
> +
> +	msleep(LRADC_TS_SAMPLE_DELAY_MS);
> +
> +	reg = readl(lradc->base + LRADC_STATUS);
> +
> +	return reg & LRADC_STATUS_TOUCH_DETECT_RAW;
> +}
> +
> +static int32_t mxs_lradc_ts_sample(struct mxs_lradc *lradc,
> +				enum lradc_ts_plate plate, int change)
> +{
> +	unsigned long delay, jiff;
> +	uint32_t reg, ctrl0 = 0, chan = 0;
> +	/* The touchscreen always uses CTRL4 slot #7. */
> +	const uint8_t slot = 7;
> +	uint32_t val;
> +
> +	/*
> +	 * There are three correct configurations of the controller sampling
> +	 * the touchscreen, each of these configuration provides different
> +	 * information from the touchscreen.
> +	 *
> +	 * The following table describes the sampling configurations:
> +	 * +-------------+-------+-------+-------+
> +	 * | Wire \ Axis |   X   |   Y   |   Z   |
> +	 * +---------------------+-------+-------+
> +	 * |   X+ (CH2)  |   HI  |   TS  |   TS  |
> +	 * +-------------+-------+-------+-------+
> +	 * |   X- (CH4)  |   LO  |   SH  |   HI  |
> +	 * +-------------+-------+-------+-------+
> +	 * |   Y+ (CH3)  |   SH  |   HI  |   HI  |
> +	 * +-------------+-------+-------+-------+
> +	 * |   Y- (CH5)  |   TS  |   LO  |   SH  |
> +	 * +-------------+-------+-------+-------+
> +	 *
> +	 * HI ... strong '1'  ; LO ... strong '0'
> +	 * SH ... sample here ; TS ... tri-state
> +	 *
> +	 * There are a few other ways of obtaining the Z coordinate
> +	 * (aka. pressure), but the one in the table seems to be the
> +	 * most reliable one.
> +	 */
> +	switch (plate) {
> +	case LRADC_SAMPLE_X:
> +		ctrl0 = LRADC_CTRL0_XPPSW | LRADC_CTRL0_XNNSW;
> +		chan = 3;
> +		break;
> +	case LRADC_SAMPLE_Y:
> +		ctrl0 = LRADC_CTRL0_YPPSW | LRADC_CTRL0_YNNSW;
> +		chan = 4;
> +		break;
> +	case LRADC_SAMPLE_PRESSURE:
> +		ctrl0 = LRADC_CTRL0_YPPSW | LRADC_CTRL0_XNNSW;
> +		chan = 5;
> +		break;
> +	}
> +
> +	if (change) {
> +		writel(LRADC_CTRL0_PLATE_MASK,
> +			lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR);
> +		writel(ctrl0, lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_SET);
> +
> +		writel(LRADC_CTRL4_LRADCSELECT_MASK(slot),
> +			lradc->base + LRADC_CTRL4 + STMP_OFFSET_REG_CLR);
> +		writel(chan << LRADC_CTRL4_LRADCSELECT_OFFSET(slot),
> +			lradc->base + LRADC_CTRL4 + STMP_OFFSET_REG_SET);
> +	}
> +
> +	writel(0xffffffff, lradc->base + LRADC_CH(slot) + STMP_OFFSET_REG_CLR);
> +	writel(1 << slot, lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_SET);
> +
> +	delay = jiffies + msecs_to_jiffies(LRADC_TS_SAMPLE_DELAY_MS);
> +	do {
> +		jiff = jiffies;
> +		reg = readl_relaxed(lradc->base + LRADC_CTRL1);
> +		if (reg & LRADC_CTRL1_LRADC_IRQ(slot))
> +			break;
> +	} while (time_before(jiff, delay));
> +
> +	writel(LRADC_CTRL1_LRADC_IRQ(slot),
> +		lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
> +
> +	if (time_after_eq(jiff, delay))
> +		return -ETIMEDOUT;
> +
> +	val = readl(lradc->base + LRADC_CH(slot));
> +	val &= LRADC_CH_VALUE_MASK;
> +
> +	return val;
> +}
> +
> +static int32_t mxs_lradc_ts_sample_filter(struct mxs_lradc *lradc,
> +				enum lradc_ts_plate plate)
> +{
> +	int32_t val, tot = 0;
> +	int i;
> +
> +	val = mxs_lradc_ts_sample(lradc, plate, 1);
> +
> +	/* Delay a bit so the touchscreen is stable. */
> +	mdelay(2);
> +
> +	for (i = 0; i < LRADC_TS_SAMPLE_AMOUNT; i++) {
> +		val = mxs_lradc_ts_sample(lradc, plate, 0);
> +		tot += val;
> +	}
> +
> +	return tot / LRADC_TS_SAMPLE_AMOUNT;
> +}
> +
> +static void mxs_lradc_ts_work(struct work_struct *ts_work)
> +{
> +	struct mxs_lradc *lradc = container_of(ts_work,
> +				struct mxs_lradc, ts_work);
> +	int val_x, val_y, val_p;
> +	bool valid = false;
> +
> +	while (mxs_lradc_ts_touched(lradc)) {
> +		/* Disable touch detector so we can sample the touchscreen. */
> +		writel(LRADC_CTRL0_TOUCH_DETECT_ENABLE,
> +			lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR);
> +
> +		if (likely(valid)) {
> +			input_report_abs(lradc->ts_input, ABS_X, val_x);
> +			input_report_abs(lradc->ts_input, ABS_Y, val_y);
> +			input_report_abs(lradc->ts_input, ABS_PRESSURE, val_p);
> +			input_report_key(lradc->ts_input, BTN_TOUCH, 1);
> +			input_sync(lradc->ts_input);
> +		}
> +
> +		valid = false;
> +
> +		val_x = mxs_lradc_ts_sample_filter(lradc, LRADC_SAMPLE_X);
> +		if (val_x < 0)
> +			continue;
> +		val_y = mxs_lradc_ts_sample_filter(lradc, LRADC_SAMPLE_Y);
> +		if (val_y < 0)
> +			continue;
> +		val_p = mxs_lradc_ts_sample_filter(lradc, LRADC_SAMPLE_PRESSURE);
> +		if (val_p < 0)
> +			continue;
> +
> +		valid = true;
> +	}
> +
> +	input_report_abs(lradc->ts_input, ABS_PRESSURE, 0);
> +	input_report_key(lradc->ts_input, BTN_TOUCH, 0);
> +	input_sync(lradc->ts_input);
> +
> +	/* Do not restart the TS IRQ if the driver is shutting down. */
> +	if (lradc->stop_touchscreen)
> +		return;
> +
> +	/* Restart the touchscreen interrupts. */
> +	writel(LRADC_CTRL1_TOUCH_DETECT_IRQ,
> +		lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
> +	writel(LRADC_CTRL1_TOUCH_DETECT_IRQ_EN,
> +		lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_SET);
> +}
> +
> +static int mxs_lradc_ts_open(struct input_dev *dev)
> +{
> +	struct mxs_lradc *lradc = input_get_drvdata(dev);
> +
> +	/* The touchscreen is starting. */
> +	lradc->stop_touchscreen = false;
> +
> +	/* Enable the touch-detect circuitry. */
> +	writel(LRADC_CTRL0_TOUCH_DETECT_ENABLE,
> +		lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_SET);
> +
> +	/* Enable the touch-detect IRQ. */
> +	writel(LRADC_CTRL1_TOUCH_DETECT_IRQ_EN,
> +		lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_SET);
> +
> +	return 0;
> +}
> +
> +static void mxs_lradc_ts_close(struct input_dev *dev)
> +{
> +	struct mxs_lradc *lradc = input_get_drvdata(dev);
> +
> +	/* Indicate the touchscreen is stopping. */
> +	lradc->stop_touchscreen = true;
> +	mb();
> +
> +	/* Wait until touchscreen thread finishes any possible remnants. */
> +	cancel_work_sync(&lradc->ts_work);
> +
> +	/* Disable touchscreen touch-detect IRQ. */
> +	writel(LRADC_CTRL1_TOUCH_DETECT_IRQ_EN,
> +		lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
> +
> +	/* Power-down touchscreen touch-detect circuitry. */
> +	writel(LRADC_CTRL0_TOUCH_DETECT_ENABLE,
> +		lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR);
> +}
> +
> +static int mxs_lradc_ts_register(struct mxs_lradc *lradc)
> +{
> +	struct input_dev *input;
> +	struct device *dev = lradc->dev;
> +	int ret;
> +
> +	if (!lradc->use_touchscreen)
> +		return 0;
> +
> +	input = input_allocate_device();
> +	if (!input) {
> +		dev_err(dev, "Failed to allocate TS device!\n");
> +		return -ENOMEM;
> +	}
> +
> +	input->name = DRIVER_NAME;
> +	input->id.bustype = BUS_HOST;
> +	input->dev.parent = dev;
> +	input->open = mxs_lradc_ts_open;
> +	input->close = mxs_lradc_ts_close;
> +
> +	__set_bit(EV_ABS, input->evbit);
> +	__set_bit(EV_KEY, input->evbit);
> +	__set_bit(BTN_TOUCH, input->keybit);
> +	input_set_abs_params(input, ABS_X, 0, LRADC_CH_VALUE_MASK, 0, 0);
> +	input_set_abs_params(input, ABS_Y, 0, LRADC_CH_VALUE_MASK, 0, 0);
> +	input_set_abs_params(input, ABS_PRESSURE, 0, LRADC_CH_VALUE_MASK, 0, 0);
> +
> +	lradc->ts_input = input;
> +	input_set_drvdata(input, lradc);
> +	ret = input_register_device(input);
> +	if (ret)
> +		input_free_device(lradc->ts_input);
> +
> +	return ret;
> +}
> +
> +static void mxs_lradc_ts_unregister(struct mxs_lradc *lradc)
> +{
> +	if (!lradc->use_touchscreen)
> +		return;
> +
> +	cancel_work_sync(&lradc->ts_work);
> +
> +	input_unregister_device(lradc->ts_input);
> +}
> +
> +/*
>   * IRQ Handling
>   */
>  static irqreturn_t mxs_lradc_handle_irq(int irq, void *data)
> @@ -202,14 +547,24 @@ static irqreturn_t mxs_lradc_handle_irq(int irq, void *data)
>  	struct iio_dev *iio = data;
>  	struct mxs_lradc *lradc = iio_priv(iio);
>  	unsigned long reg = readl(lradc->base + LRADC_CTRL1);
> +	const uint32_t ts_irq_mask =
> +		LRADC_CTRL1_TOUCH_DETECT_IRQ_EN |
> +		LRADC_CTRL1_TOUCH_DETECT_IRQ;
>  
>  	if (!(reg & LRADC_CTRL1_LRADC_IRQ_MASK))
>  		return IRQ_NONE;
>  
>  	/*
> -	 * Touchscreen IRQ handling code shall probably have priority
> -	 * and therefore shall be placed here.
> +	 * Touchscreen IRQ handling code has priority and therefore
> +	 * is placed here. In case touchscreen IRQ arrives, disable
> +	 * it ASAP
>  	 */
> +	if (reg & LRADC_CTRL1_TOUCH_DETECT_IRQ) {
> +		writel(ts_irq_mask,
> +			lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
> +		if (!lradc->stop_touchscreen)
> +			schedule_work(&lradc->ts_work);
> +	}
>  
>  	if (iio_buffer_enabled(iio))
>  		iio_trigger_poll(iio->trig, iio_get_time_ns());
> @@ -306,8 +661,10 @@ static int mxs_lradc_buffer_preenable(struct iio_dev *iio)
>  {
>  	struct mxs_lradc *lradc = iio_priv(iio);
>  	struct iio_buffer *buffer = iio->buffer;
> -	int ret = 0, chan, ofs = 0, enable = 0;
> -	uint32_t ctrl4 = 0;
> +	int ret = 0, chan, ofs = 0;
> +	unsigned long enable = 0;
> +	uint32_t ctrl4_set = 0;
> +	uint32_t ctrl4_clr = 0;
>  	uint32_t ctrl1_irq = 0;
>  	const uint32_t chan_value = LRADC_CH_ACCUMULATE |
>  		((LRADC_DELAY_TIMER_LOOP - 1) << LRADC_CH_NUM_SAMPLES_OFFSET);
> @@ -339,17 +696,20 @@ static int mxs_lradc_buffer_preenable(struct iio_dev *iio)
>  	writel(0xff, lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR);
>  
>  	for_each_set_bit(chan, buffer->scan_mask, LRADC_MAX_TOTAL_CHANS) {
> -		ctrl4 |= chan << LRADC_CTRL4_LRADCSELECT_OFFSET(ofs);
> +		ctrl4_set |= chan << LRADC_CTRL4_LRADCSELECT_OFFSET(ofs);
> +		ctrl4_clr |= LRADC_CTRL4_LRADCSELECT_MASK(ofs);
>  		ctrl1_irq |= LRADC_CTRL1_LRADC_IRQ_EN(ofs);
>  		writel(chan_value, lradc->base + LRADC_CH(ofs));
> -		enable |= 1 << ofs;
> +		bitmap_set(&enable, ofs, 1);
>  		ofs++;
>  	};
>  
>  	writel(LRADC_DELAY_TRIGGER_LRADCS_MASK | LRADC_DELAY_KICK,
>  		lradc->base + LRADC_DELAY(0) + STMP_OFFSET_REG_CLR);
>  
> -	writel(ctrl4, lradc->base + LRADC_CTRL4);
> +	writel(ctrl4_clr, lradc->base + LRADC_CTRL4 + STMP_OFFSET_REG_CLR);
> +	writel(ctrl4_set, lradc->base + LRADC_CTRL4 + STMP_OFFSET_REG_SET);
> +
>  	writel(ctrl1_irq, lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_SET);
>  
>  	writel(enable << LRADC_DELAY_TRIGGER_LRADCS_OFFSET,
> @@ -384,9 +744,33 @@ static int mxs_lradc_buffer_postdisable(struct iio_dev *iio)
>  static bool mxs_lradc_validate_scan_mask(struct iio_dev *iio,
>  					const unsigned long *mask)
>  {
> -	const int mw = bitmap_weight(mask, iio->masklength);
> -
> -	return mw <= LRADC_MAX_MAPPED_CHANS;
> +	struct mxs_lradc *lradc = iio_priv(iio);
> +	const int len = iio->masklength;
> +	const int map_chans = bitmap_weight(mask, len);
> +	int rsvd_chans = 0;
> +	unsigned long rsvd_mask = 0;
> +
> +	if (lradc->use_touchbutton)
> +		rsvd_mask |= CHAN_MASK_TOUCHBUTTON;
> +	if (lradc->use_touchscreen == MXS_LRADC_TOUCHSCREEN_4WIRE)
> +		rsvd_mask |= CHAN_MASK_TOUCHSCREEN_4WIRE;
> +	if (lradc->use_touchscreen == MXS_LRADC_TOUCHSCREEN_5WIRE)
> +		rsvd_mask |= CHAN_MASK_TOUCHSCREEN_5WIRE;
> +
> +	if (lradc->use_touchbutton)
> +		rsvd_chans++;
> +	if (lradc->use_touchscreen)
> +		rsvd_chans++;
> +
> +	/* Test for attempts to map channels with special mode of operation. */
> +	if (bitmap_intersects(mask, &rsvd_mask, len))
> +		return false;
> +
> +	/* Test for attempts to map more channels then available slots. */
> +	if (map_chans + rsvd_chans > LRADC_MAX_MAPPED_CHANS)
> +		return false;
> +
> +	return true;
>  }
>  
>  static const struct iio_buffer_setup_ops mxs_lradc_buffer_ops = {
> @@ -435,15 +819,29 @@ static const struct iio_chan_spec mxs_lradc_chan_spec[] = {
>  
>  static void mxs_lradc_hw_init(struct mxs_lradc *lradc)
>  {
> -	int i;
> -	const uint32_t cfg =
> +	/* The ADC always uses DELAY CHANNEL 0. */
> +	const uint32_t adc_cfg =
> +		(1 << (LRADC_DELAY_TRIGGER_DELAYS_OFFSET + 0)) |
>  		(LRADC_DELAY_TIMER_PER << LRADC_DELAY_DELAY_OFFSET);
>  
>  	stmp_reset_block(lradc->base);
>  
> -	for (i = 0; i < LRADC_MAX_DELAY_CHANS; i++)
> -		writel(cfg | (1 << (LRADC_DELAY_TRIGGER_DELAYS_OFFSET + i)),
> -			lradc->base + LRADC_DELAY(i));
> +	/* Configure DELAY CHANNEL 0 for generic ADC sampling. */
> +	writel(adc_cfg, lradc->base + LRADC_DELAY(0));
> +
> +	/* Disable remaining DELAY CHANNELs */
> +	writel(0, lradc->base + LRADC_DELAY(1));
> +	writel(0, lradc->base + LRADC_DELAY(2));
> +	writel(0, lradc->base + LRADC_DELAY(3));
> +
> +	/* Configure the touchscreen type */
> +	writel(LRADC_CTRL0_TOUCH_SCREEN_TYPE,
> +		lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR);
> +
> +	if (lradc->use_touchscreen == MXS_LRADC_TOUCHSCREEN_5WIRE) {
> +		writel(LRADC_CTRL0_TOUCH_SCREEN_TYPE,
> +			lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_SET);
> +	}
>  
>  	/* Start internal temperature sensing. */
>  	writel(0, lradc->base + LRADC_CTRL2);
> @@ -460,12 +858,14 @@ static void mxs_lradc_hw_stop(struct mxs_lradc *lradc)
>  		writel(0, lradc->base + LRADC_DELAY(i));
>  }
>  
> -static int __devinit mxs_lradc_probe(struct platform_device *pdev)
> +static int mxs_lradc_probe(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
> +	struct device_node *node = dev->of_node;
>  	struct mxs_lradc *lradc;
>  	struct iio_dev *iio;
>  	struct resource *iores;
> +	uint32_t ts_wires = 0;
>  	int ret = 0;
>  	int i;
>  
> @@ -487,6 +887,21 @@ static int __devinit mxs_lradc_probe(struct platform_device *pdev)
>  		goto err_addr;
>  	}
>  
> +	INIT_WORK(&lradc->ts_work, mxs_lradc_ts_work);
> +
> +	/* Check if touchscreen is enabled in DT. */
> +	ret = of_property_read_u32(node, "fsl,lradc-touchscreen-wires",
> +				&ts_wires);
> +	if (ret)
> +		dev_info(dev, "Touchscreen not enabled.\n");
> +	else if (ts_wires == 4)
> +		lradc->use_touchscreen = MXS_LRADC_TOUCHSCREEN_4WIRE;
> +	else if (ts_wires == 5)
> +		lradc->use_touchscreen = MXS_LRADC_TOUCHSCREEN_5WIRE;
> +	else
> +		dev_warn(dev, "Unsupported number of touchscreen wires (%d)\n",
> +				ts_wires);
> +
>  	/* Grab all IRQ sources */
>  	for (i = 0; i < 13; i++) {
>  		lradc->irq[i] = platform_get_irq(pdev, i);
> @@ -524,11 +939,16 @@ static int __devinit mxs_lradc_probe(struct platform_device *pdev)
>  	if (ret)
>  		goto err_trig;
>  
> +	/* Register the touchscreen input device. */
> +	ret = mxs_lradc_ts_register(lradc);
> +	if (ret)
> +		goto err_dev;
> +
>  	/* Register IIO device. */
>  	ret = iio_device_register(iio);
>  	if (ret) {
>  		dev_err(dev, "Failed to register IIO device\n");
> -		goto err_dev;
> +		goto err_ts;
>  	}
>  
>  	/* Configure the hardware. */
> @@ -536,6 +956,8 @@ static int __devinit mxs_lradc_probe(struct platform_device *pdev)
>  
>  	return 0;
>  
> +err_ts:
> +	mxs_lradc_ts_unregister(lradc);
>  err_dev:
>  	mxs_lradc_trigger_remove(iio);
>  err_trig:
> @@ -545,11 +967,13 @@ err_addr:
>  	return ret;
>  }
>  
> -static int __devexit mxs_lradc_remove(struct platform_device *pdev)
> +static int mxs_lradc_remove(struct platform_device *pdev)
>  {
>  	struct iio_dev *iio = platform_get_drvdata(pdev);
>  	struct mxs_lradc *lradc = iio_priv(iio);
>  
> +	mxs_lradc_ts_unregister(lradc);
> +
>  	mxs_lradc_hw_stop(lradc);
>  
>  	iio_device_unregister(iio);
> @@ -573,7 +997,7 @@ static struct platform_driver mxs_lradc_driver = {
>  		.of_match_table = mxs_lradc_dt_ids,
>  	},
>  	.probe	= mxs_lradc_probe,
> -	.remove	= __devexit_p(mxs_lradc_remove),
> +	.remove	= mxs_lradc_remove,
>  };
>  
>  module_platform_driver(mxs_lradc_driver);
> -- 
> 1.7.10.4
> 

-- 
Dmitry

^ permalink raw reply

* [GIT PULL 4/4] ARM: mvebu: dt for v3.9
From: Jason Cooper @ 2013-01-13  1:30 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20130113010658.GT23505@n2100.arm.linux.org.uk>

On Sun, Jan 13, 2013 at 01:06:58AM +0000, Russell King - ARM Linux wrote:
> On Sat, Jan 12, 2013 at 11:29:24PM +0000, Jason Cooper wrote:
> > The following changes since commit d1c3ed669a2d452cacfb48c2d171a1f364dae2ed:
> > 
> >   Linux 3.8-rc2 (2013-01-02 18:13:21 -0800)
> > 
> > are available in the git repository at:
> > 
> >   git://git.infradead.org/users/jcooper/linux.git tags/dt_for_v3.9
> > 
> > for you to fetch changes up to 877ddfac50bfeabc4729d0b8ac41989d226148b9:
> > 
> >   ARM: Dove: add fixed regulator for CuBox USB power (2013-01-12 22:35:56 +0000)
> > 
> > ----------------------------------------------------------------
> > mvebu dt changes for v3.9
> >  - mvebu
> >    - add rtc support
> >    - add sdio support
> >  - kirkwood
> >    - add sdio support
> >    - add twsi1 and nand to 88f6282
> >    - convert openblocks A6 to pinctrl
> >  - dove
> >    - move led pinctrl to gpio-leds node
> >    - use fixed regulator for usb power
> 
> And a note specified dependency on previous pull requests...

oops, you're right.  I'll update them in V2 after we get the mvsdio
driver in better shape.

thx,

Jason.

^ permalink raw reply

* [GIT PULL 2/4] ARM: mvebu: drivers for v3.9
From: Jason Cooper @ 2013-01-13  1:28 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20130113010535.GR23505@n2100.arm.linux.org.uk>

On Sun, Jan 13, 2013 at 01:05:35AM +0000, Russell King - ARM Linux wrote:
> On Sat, Jan 12, 2013 at 11:29:16PM +0000, Jason Cooper wrote:
> > Thomas Petazzoni (4):
> >       mmc: mvsdio: use slot-gpio infrastructure for write protect gpio
> >       mmc: mvsdio: use slot-gpio for card detect gpio
> >       mmc: mvsdio: implement a Device Tree binding
> >       mmc: mvsdio: add pinctrl integration
> 
> Does this include the fixes for the really broken stuff in that driver?
> If not, hold off on this until it's fixed.  The current state of the
> driver is rather BROKEN and it needs fixing in -rc.  It would be best
> to get it fixed there _then_ base development on top of that to avoid
> conflicts.

Ahh, I found the thread you were referring to.  I'll take a look at it
tonight or tomorrow.

thx,

Jason.

^ permalink raw reply

* [PATCH 6/6] ARM: dts: Add dts file for S3C6410-based Mini6410 board
From: Tomasz Figa @ 2013-01-13  1:10 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1358039458-31960-1-git-send-email-tomasz.figa@gmail.com>

This patch adds basic device tree sources for FriendlyARM Mini6410 board
based on Samsung S3C6410 SoC.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
 arch/arm/boot/dts/Makefile             |  1 +
 arch/arm/boot/dts/s3c6410-mini6410.dts | 50 ++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+)
 create mode 100644 arch/arm/boot/dts/s3c6410-mini6410.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e44da40..9ca30ea 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -120,6 +120,7 @@ dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \
 	hrefprev60.dtb \
 	hrefv60plus.dtb \
 	ccu9540.dtb
+dtb-$(CONFIG_ARCH_S3C64XX) += s3c6410-mini6410.dtb
 dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
 	r8a7740-armadillo800eva.dtb \
 	sh73a0-kzm9g.dtb \
diff --git a/arch/arm/boot/dts/s3c6410-mini6410.dts b/arch/arm/boot/dts/s3c6410-mini6410.dts
new file mode 100644
index 0000000..9ac82c2
--- /dev/null
+++ b/arch/arm/boot/dts/s3c6410-mini6410.dts
@@ -0,0 +1,50 @@
+/*
+ * Samsung's S3C6410 based Mini6410 board device tree source
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Device tree source file for FriendlyARM Mini6410 board which is based on
+ * Samsung's S3C6410 SoC.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+/dts-v1/;
+/include/ "s3c6410.dtsi"
+
+/ {
+	model = "FriendlyARM Mini6410 board based on S3C6410";
+	compatible = "friendlyarm,mini6410", "samsung,s3c6410";
+
+	memory {
+		reg = <0x50000000 0x10000000>;
+	};
+
+	chosen {
+		bootargs = "console=ttySAC0,115200n8 earlyprintk rootwait root=/dev/mmcblk0p1";
+	};
+
+	serial at 7f005000 {
+		status = "okay";
+	};
+
+	serial at 7f005400 {
+		status = "okay";
+	};
+
+	serial at 7f005800 {
+		status = "okay";
+	};
+
+	serial at 7f005c00 {
+		status = "okay";
+	};
+
+	sdhci at 7c200000 {
+		bus-width = <4>;
+		non-removable;
+		status = "okay";
+	};
+};
-- 
1.8.1

^ permalink raw reply related

* [PATCH 5/6] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs
From: Tomasz Figa @ 2013-01-13  1:10 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1358039458-31960-1-git-send-email-tomasz.figa@gmail.com>

This patch adds basic device tree definitions for Samsung S3C64xx SoCs.

Since all the SoCs in the series are very similar, the files are created
hierarchically - one file for the whole series and then separate files
for particular SoCs including the common one.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
 arch/arm/boot/dts/s3c6400.dtsi | 33 ++++++++++++++
 arch/arm/boot/dts/s3c6410.dtsi | 33 ++++++++++++++
 arch/arm/boot/dts/s3c64xx.dtsi | 97 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 163 insertions(+)
 create mode 100644 arch/arm/boot/dts/s3c6400.dtsi
 create mode 100644 arch/arm/boot/dts/s3c6410.dtsi
 create mode 100644 arch/arm/boot/dts/s3c64xx.dtsi

diff --git a/arch/arm/boot/dts/s3c6400.dtsi b/arch/arm/boot/dts/s3c6400.dtsi
new file mode 100644
index 0000000..76106b8
--- /dev/null
+++ b/arch/arm/boot/dts/s3c6400.dtsi
@@ -0,0 +1,33 @@
+/*
+ * Samsung's S3C6400 SoC device tree source
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Samsung's S3C6400 SoC device nodes are listed in this file. S3C6400
+ * based board files can include this file and provide values for board specfic
+ * bindings.
+ *
+ * Note: This file does not include device nodes for all the controllers in
+ * S3C6400 SoC. As device tree coverage for S3C6400 increases, additional
+ * nodes can be added to this file.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+/include/ "s3c64xx.dtsi"
+
+/ {
+	compatible = "samsung,s3c6400";
+
+	vic0: interrupt-controller at 71200000 {
+		interrupt-mask = <0xfffffe1f>;
+		wakeup-mask = <0x00200004>;
+	};
+
+	vic1: interrupt-controller at 71300000 {
+		interrupt-mask = <0xffffffff>;
+		wakeup-mask = <0x53020000>;
+	};
+};
diff --git a/arch/arm/boot/dts/s3c6410.dtsi b/arch/arm/boot/dts/s3c6410.dtsi
new file mode 100644
index 0000000..4a74df9
--- /dev/null
+++ b/arch/arm/boot/dts/s3c6410.dtsi
@@ -0,0 +1,33 @@
+/*
+ * Samsung's S3C6410 SoC device tree source
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Samsung's S3C6410 SoC device nodes are listed in this file. S3C6410
+ * based board files can include this file and provide values for board specfic
+ * bindings.
+ *
+ * Note: This file does not include device nodes for all the controllers in
+ * S3C6410 SoC. As device tree coverage for S3C6410 increases, additional
+ * nodes can be added to this file.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+/include/ "s3c64xx.dtsi"
+
+/ {
+	compatible = "samsung,s3c6410";
+
+	vic0: interrupt-controller at 71200000 {
+		interrupt-mask = <0xffffff7f>;
+		wakeup-mask = <0x00200004>;
+	};
+
+	vic1: interrupt-controller at 71300000 {
+		interrupt-mask = <0xffffffff>;
+		wakeup-mask = <0x53020000>;
+	};
+};
diff --git a/arch/arm/boot/dts/s3c64xx.dtsi b/arch/arm/boot/dts/s3c64xx.dtsi
new file mode 100644
index 0000000..55d6e08
--- /dev/null
+++ b/arch/arm/boot/dts/s3c64xx.dtsi
@@ -0,0 +1,97 @@
+/*
+ * Samsung's S3C64xx SoC series common device tree source
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Samsung's S3C64xx SoC series device nodes are listed in this file.
+ * Particular SoCs from S3C64xx series can include this file and provide
+ * values for SoCs specfic bindings.
+ *
+ * Note: This file does not include device nodes for all the controllers in
+ * S3C64xx SoCs. As device tree coverage for S3C64xx increases, additional
+ * nodes can be added to this file.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+	cpus {
+		cpu at 0 {
+			compatible = "arm,arm1176jzf-s";
+		};
+	};
+
+	vic0: interrupt-controller at 71200000 {
+		compatible = "arm,pl192-vic";
+		interrupt-controller;
+		reg = <0x71200000 0x1000>;
+		#interrupt-cells = <1>;
+	};
+
+	vic1: interrupt-controller at 71300000 {
+		compatible = "arm,pl192-vic";
+		interrupt-controller;
+		reg = <0x71300000 0x1000>;
+		#interrupt-cells = <1>;
+	};
+
+	serial at 7f005000 {
+		compatible = "samsung,s3c6400-uart";
+		reg = <0x7f005000 0x100>;
+		interrupt-parent = <&vic1>;
+		interrupts = <5 0>;
+		status = "disabled";
+	};
+
+	serial at 7f005400 {
+		compatible = "samsung,s3c6400-uart";
+		reg = <0x7f005400 0x100>;
+		interrupt-parent = <&vic1>;
+		interrupts = <6 0>;
+		status = "disabled";
+	};
+
+	serial at 7f005800 {
+		compatible = "samsung,s3c6400-uart";
+		reg = <0x7f005800 0x100>;
+		interrupt-parent = <&vic1>;
+		interrupts = <7 0>;
+		status = "disabled";
+	};
+
+	serial at 7f005c00 {
+		compatible = "samsung,s3c6400-uart";
+		reg = <0x7f005c00 0x100>;
+		interrupt-parent = <&vic1>;
+		interrupts = <8 0>;
+		status = "disabled";
+	};
+
+	sdhci at 7c200000 {
+		compatible = "samsung,s3c6410-sdhci";
+		reg = <0x7c200000 0x100>;
+		interrupt-parent = <&vic1>;
+		interrupts = <24 0>;
+		status = "disabled";
+	};
+
+	sdhci at 7c300000 {
+		compatible = "samsung,s3c6410-sdhci";
+		reg = <0x7c300000 0x100>;
+		interrupt-parent = <&vic1>;
+		interrupts = <25 0>;
+		status = "disabled";
+	};
+
+	sdhci at 7c400000 {
+		compatible = "samsung,s3c6410-sdhci";
+		reg = <0x7c400000 0x100>;
+		interrupt-parent = <&vic1>;
+		interrupts = <17 0>;
+		status = "disabled";
+	};
+};
-- 
1.8.1

^ permalink raw reply related

* [PATCH 4/6] ARM: s3c64xx: Add board file for boot using Device Tree
From: Tomasz Figa @ 2013-01-13  1:10 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1358039458-31960-1-git-send-email-tomasz.figa@gmail.com>

This patch adds board file that will be used to boot S3C64xx-based boards
using Device Tree.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
 arch/arm/mach-s3c64xx/Kconfig           | 13 +++++
 arch/arm/mach-s3c64xx/Makefile          |  1 +
 arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c | 84 +++++++++++++++++++++++++++++++++
 3 files changed, 98 insertions(+)
 create mode 100644 arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c

diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index 283cb77..b1c7106 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -311,3 +311,16 @@ config MACH_WLF_CRAGG_6410
 	select SAMSUNG_GPIO_EXTRA128
 	help
 	  Machine support for the Wolfson Cragganmore S3C6410 variant.
+
+config MACH_S3C64XX_DT
+	bool "Samsung S3C6400/S3C6410 machine using Device Tree"
+	select CPU_S3C6400
+	select CPU_S3C6410
+	select USE_OF
+	help
+	  Machine support for Samsung S3C6400/S3C6410 machines with Device Tree
+	  enabled.
+	  Select this if a fdt blob is available for your S3C64XX SoC based
+	  board.
+	  Note: This is under development and not all peripherals can be
+	  supported with this machine file.
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile
index f9ce1dc..59b3d06 100644
--- a/arch/arm/mach-s3c64xx/Makefile
+++ b/arch/arm/mach-s3c64xx/Makefile
@@ -58,3 +58,4 @@ obj-$(CONFIG_MACH_SMARTQ7)		+= mach-smartq7.o
 obj-$(CONFIG_MACH_SMDK6400)		+= mach-smdk6400.o
 obj-$(CONFIG_MACH_SMDK6410)		+= mach-smdk6410.o
 obj-$(CONFIG_MACH_WLF_CRAGG_6410)	+= mach-crag6410.o mach-crag6410-module.o
+obj-$(CONFIG_MACH_S3C64XX_DT)		+= mach-s3c64xx-dt.o
diff --git a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
new file mode 100644
index 0000000..974af2a
--- /dev/null
+++ b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
@@ -0,0 +1,84 @@
+/*
+ * Samsung's S3C64XX flattened device tree enabled machine
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/of_platform.h>
+#include <linux/serial_core.h>
+
+#include <asm/mach/arch.h>
+#include <asm/hardware/vic.h>
+#include <mach/map.h>
+
+#include <plat/cpu.h>
+#include <plat/regs-serial.h>
+#include <plat/samsung-time.h>
+
+#include "common.h"
+
+/*
+ * The following lookup table is used to override device names when devices
+ * are registered from device tree. This is temporarily added to enable
+ * device tree support addition for the S3C64xx architecture.
+ *
+ * For drivers that require platform data to be provided from the machine
+ * file, a platform data pointer can also be supplied along with the
+ * devices names. Usually, the platform data elements that cannot be parsed
+ * from the device tree by the drivers (example: function pointers) are
+ * supplied. But it should be noted that this is a temporary mechanism and
+ * at some point, the drivers should be capable of parsing all the platform
+ * data from the device tree.
+ */
+static const struct of_dev_auxdata s3c64xx_auxdata_lookup[] __initconst = {
+	OF_DEV_AUXDATA("samsung,s3c6400-uart", 0x7f005000,
+				"s3c6400-uart.0", NULL),
+	OF_DEV_AUXDATA("samsung,s3c6400-uart", 0x7f005400,
+				"s3c6400-uart.1", NULL),
+	OF_DEV_AUXDATA("samsung,s3c6400-uart", 0x7f005800,
+				"s3c6400-uart.2", NULL),
+	OF_DEV_AUXDATA("samsung,s3c6400-uart", 0x7f005c00,
+				"s3c6400-uart.3", NULL),
+	OF_DEV_AUXDATA("samsung,s3c6410-sdhci", 0x7c200000,
+				"s3c-sdhci.0", NULL),
+	OF_DEV_AUXDATA("samsung,s3c6410-sdhci", 0x7c300000,
+				"s3c-sdhci.1", NULL),
+	OF_DEV_AUXDATA("samsung,s3c6410-sdhci", 0x7c400000,
+				"s3c-sdhci.2", NULL),
+	{},
+};
+
+static void __init s3c64xx_dt_map_io(void)
+{
+	s3c64xx_init_io(NULL, 0);
+	s3c24xx_init_clocks(12000000);
+	samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
+}
+
+static void __init s3c64xx_dt_machine_init(void)
+{
+	of_platform_populate(NULL, of_default_bus_match_table,
+				s3c64xx_auxdata_lookup, NULL);
+}
+
+static char const *s3c64xx_dt_compat[] __initdata = {
+	"samsung,s3c6400",
+	"samsung,s3c6410",
+	NULL
+};
+
+DT_MACHINE_START(S3C6400_DT, "Samsung S3C64xx (Flattened Device Tree)")
+	/* Maintainer: Tomasz Figa <tomasz.figa@gmail.com> */
+	.init_irq	= s3c64xx_of_init_irq,
+	.map_io		= s3c64xx_dt_map_io,
+	.handle_irq	= vic_handle_irq,
+	.init_machine	= s3c64xx_dt_machine_init,
+	.init_late	= s3c64xx_init_late,
+	.timer		= &samsung_timer,
+	.dt_compat	= s3c64xx_dt_compat,
+	.restart        = s3c64xx_restart,
+MACHINE_END
-- 
1.8.1

^ permalink raw reply related

* [PATCH 3/6] ARM: s3c64xx: Add support for OF-based VIC initialization
From: Tomasz Figa @ 2013-01-13  1:10 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1358039458-31960-1-git-send-email-tomasz.figa@gmail.com>

This patch modifies IRQ initialization code of S3C64xx to support
Device Tree-based initialization of VICs.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
 arch/arm/mach-s3c64xx/common.c | 16 ++++++++++++++++
 arch/arm/mach-s3c64xx/common.h |  4 ++++
 2 files changed, 20 insertions(+)

diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c
index aef303b..b9c5bec 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c64xx/common.c
@@ -19,6 +19,7 @@
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
+#include <linux/of_irq.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
@@ -181,6 +182,21 @@ core_initcall(s3c64xx_dev_init);
 			 1 << (IRQ_HSMMC1 - IRQ_VIC1_BASE) |	\
 			 1 << (IRQ_HSMMC2 - IRQ_VIC1_BASE))
 
+#ifdef CONFIG_OF
+static const struct of_device_id s3c64xx_dt_irq_match[] = {
+	{ .compatible = "arm,pl192-vic", .data = vic_of_init, },
+	{},
+};
+
+void __init s3c64xx_of_init_irq(void)
+{
+	of_irq_init(s3c64xx_dt_irq_match);
+
+	/* FIXME: add the timer sub-irqs */
+	s3c_init_vic_timer_irq(5, IRQ_TIMER0);
+}
+#endif
+
 void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid)
 {
 	printk(KERN_DEBUG "%s: initialising interrupts\n", __func__);
diff --git a/arch/arm/mach-s3c64xx/common.h b/arch/arm/mach-s3c64xx/common.h
index 6cfc99b..711f3e0 100644
--- a/arch/arm/mach-s3c64xx/common.h
+++ b/arch/arm/mach-s3c64xx/common.h
@@ -58,4 +58,8 @@ int __init s3c64xx_pm_late_initcall(void);
 static inline int s3c64xx_pm_late_initcall(void) { return 0; }
 #endif
 
+#ifdef CONFIG_OF
+extern void s3c64xx_of_init_irq(void);
+#endif
+
 #endif /* __ARCH_ARM_MACH_S3C64XX_COMMON_H */
-- 
1.8.1

^ permalink raw reply related

* [PATCH 2/6] ARM: common: vic: Fix invalid first IRQ number in OF-based registration
From: Tomasz Figa @ 2013-01-13  1:10 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1358039458-31960-1-git-send-email-tomasz.figa@gmail.com>

Without this patch, vic_of_init passed -1 as first IRQ number to
__vic_init (as signed int), then to vic_register (now as unsigned int
equals to 0xffffffff) and finally to irq_domain_add_simple (again as
unsigned 0xffffffff), which tries to allocate irq descriptors starting
from IRQ 0xffffffff, which obviously is bound to fail.

This patch corrects OF-based VIC registration by locating VICs in IRQ
address space starting from IRQ 32 and then placing one VIC after
another. This is similar to the solution used with GIC and allows to
maintain compatibility with legacy code using static IRQ numbers.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
 arch/arm/common/vic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c
index c2889da..8001994 100644
--- a/arch/arm/common/vic.c
+++ b/arch/arm/common/vic.c
@@ -421,9 +421,9 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent)
 	of_property_read_u32(node, "wakeup-mask", &wakeup_mask);
 
 	/*
-	 * Passing -1 as first IRQ makes the simple domain allocate descriptors
+	 * Use IRQ numbers starting from 32 and placing each VIC after another
 	 */
-	__vic_init(regs, -1, interrupt_mask, wakeup_mask, node);
+	__vic_init(regs, 32 + (32 * vic_id), interrupt_mask, wakeup_mask, node);
 
 	return 0;
 }
-- 
1.8.1

^ permalink raw reply related

* [PATCH 1/6] ARM: common: vic: Parse interrupt and resume masks from device tree
From: Tomasz Figa @ 2013-01-13  1:10 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1358039458-31960-1-git-send-email-tomasz.figa@gmail.com>

This patch extends vic_of_init to parse valid interrupt sources
and resume sources masks from device tree.

If mask values are not specified in device tree, all sources
are assumed to be valid, as before this patch.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
 Documentation/devicetree/bindings/arm/vic.txt | 6 ++++++
 arch/arm/common/vic.c                         | 7 ++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/arm/vic.txt b/Documentation/devicetree/bindings/arm/vic.txt
index 266716b..bb7137c 100644
--- a/Documentation/devicetree/bindings/arm/vic.txt
+++ b/Documentation/devicetree/bindings/arm/vic.txt
@@ -18,6 +18,9 @@ Required properties:
 Optional properties:
 
 - interrupts : Interrupt source for parent controllers if the VIC is nested.
+- interrupt-mask : Bit mask of valid interrupt sources (defaults to all valid)
+- wakeup-mask : Bit mask of interrupt sources that can wake up the system
+  (defaults to all allowed)
 
 Example:
 
@@ -26,4 +29,7 @@ Example:
 		interrupt-controller;
 		#interrupt-cells = <1>;
 		reg = <0x60000 0x1000>;
+
+		interrupt-mask = <0xffffff7f>;
+		wakeup-mask = <0x0000ff7f>;
 	};
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c
index e4df17c..c2889da 100644
--- a/arch/arm/common/vic.c
+++ b/arch/arm/common/vic.c
@@ -407,6 +407,8 @@ void __init vic_init(void __iomem *base, unsigned int irq_start,
 int __init vic_of_init(struct device_node *node, struct device_node *parent)
 {
 	void __iomem *regs;
+	u32 interrupt_mask = ~0;
+	u32 wakeup_mask = ~0;
 
 	if (WARN(parent, "non-root VICs are not supported"))
 		return -EINVAL;
@@ -415,10 +417,13 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent)
 	if (WARN_ON(!regs))
 		return -EIO;
 
+	of_property_read_u32(node, "interrupt-mask", &interrupt_mask);
+	of_property_read_u32(node, "wakeup-mask", &wakeup_mask);
+
 	/*
 	 * Passing -1 as first IRQ makes the simple domain allocate descriptors
 	 */
-	__vic_init(regs, -1, ~0, ~0, node);
+	__vic_init(regs, -1, interrupt_mask, wakeup_mask, node);
 
 	return 0;
 }
-- 
1.8.1

^ permalink raw reply related

* [PATCH 0/6] Initial Device Tree support for S3C64xx
From: Tomasz Figa @ 2013-01-13  1:10 UTC (permalink / raw)
  To: linux-arm-kernel

This series is adds Device Tree support for Samsung S3C64xx SoC series.

It fixes several problems preventing from booting an S3C64xx-based system
using Device Tree, adds all the infrastructure for Device Tree-based board
support, including mach-s3c64xx-dt and dts include files for S3C64xx SoCs, and
(very) basic device tree source for FriendlyARM Mini6410 board.

Current support is very limited and allows only basic bootup with UART and
SDHCI, but should be fine as a start and will be extended in future, hopefully
with help of S3C64xx board maintainers.

Tomasz Figa (6):
  ARM: common: vic: Parse interrupt and resume masks from device tree
  ARM: common: vic: Fix invalid first IRQ number in OF-based
    registration
  ARM: s3c64xx: Add support for OF-based VIC initialization
  ARM: s3c64xx: Add board file for boot using Device Tree
  ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs
  ARM: dts: Add dts file for S3C6410-based Mini6410 board

 Documentation/devicetree/bindings/arm/vic.txt |  6 ++
 arch/arm/boot/dts/Makefile                    |  1 +
 arch/arm/boot/dts/s3c6400.dtsi                | 33 +++++++++
 arch/arm/boot/dts/s3c6410-mini6410.dts        | 50 ++++++++++++++
 arch/arm/boot/dts/s3c6410.dtsi                | 33 +++++++++
 arch/arm/boot/dts/s3c64xx.dtsi                | 97 +++++++++++++++++++++++++++
 arch/arm/common/vic.c                         |  9 ++-
 arch/arm/mach-s3c64xx/Kconfig                 | 13 ++++
 arch/arm/mach-s3c64xx/Makefile                |  1 +
 arch/arm/mach-s3c64xx/common.c                | 16 +++++
 arch/arm/mach-s3c64xx/common.h                |  4 ++
 arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c       | 84 +++++++++++++++++++++++
 12 files changed, 345 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/boot/dts/s3c6400.dtsi
 create mode 100644 arch/arm/boot/dts/s3c6410-mini6410.dts
 create mode 100644 arch/arm/boot/dts/s3c6410.dtsi
 create mode 100644 arch/arm/boot/dts/s3c64xx.dtsi
 create mode 100644 arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c

-- 
1.8.1

^ permalink raw reply

* [GIT PULL 4/4] ARM: mvebu: dt for v3.9
From: Russell King - ARM Linux @ 2013-01-13  1:06 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <E1TuAWi-0004H4-K6@merlin.infradead.org>

On Sat, Jan 12, 2013 at 11:29:24PM +0000, Jason Cooper wrote:
> The following changes since commit d1c3ed669a2d452cacfb48c2d171a1f364dae2ed:
> 
>   Linux 3.8-rc2 (2013-01-02 18:13:21 -0800)
> 
> are available in the git repository at:
> 
>   git://git.infradead.org/users/jcooper/linux.git tags/dt_for_v3.9
> 
> for you to fetch changes up to 877ddfac50bfeabc4729d0b8ac41989d226148b9:
> 
>   ARM: Dove: add fixed regulator for CuBox USB power (2013-01-12 22:35:56 +0000)
> 
> ----------------------------------------------------------------
> mvebu dt changes for v3.9
>  - mvebu
>    - add rtc support
>    - add sdio support
>  - kirkwood
>    - add sdio support
>    - add twsi1 and nand to 88f6282
>    - convert openblocks A6 to pinctrl
>  - dove
>    - move led pinctrl to gpio-leds node
>    - use fixed regulator for usb power

And a note specified dependency on previous pull requests...

^ permalink raw reply

* [GIT PULL 3/4] ARM: mvebu: boards for v3.9
From: Russell King - ARM Linux @ 2013-01-13  1:06 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <E1TuAWD-0004Ec-1G@merlin.infradead.org>

On Sat, Jan 12, 2013 at 11:29:20PM +0000, Jason Cooper wrote:
> ----------------------------------------------------------------
> mvebu boards for v3.9
>  - Guruplug Server Plus DT board
>  - mvebu improved SMP support in interrupt controller
>  - update mvebu_defconfig

And a not specified dependency on pull request 2.

^ permalink raw reply

* [GIT PULL 2/4] ARM: mvebu: drivers for v3.9
From: Russell King - ARM Linux @ 2013-01-13  1:05 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <E1TuAWu-0004Jx-Hn@merlin.infradead.org>

On Sat, Jan 12, 2013 at 11:29:16PM +0000, Jason Cooper wrote:
> Thomas Petazzoni (4):
>       mmc: mvsdio: use slot-gpio infrastructure for write protect gpio
>       mmc: mvsdio: use slot-gpio for card detect gpio
>       mmc: mvsdio: implement a Device Tree binding
>       mmc: mvsdio: add pinctrl integration

Does this include the fixes for the really broken stuff in that driver?
If not, hold off on this until it's fixed.  The current state of the
driver is rather BROKEN and it needs fixing in -rc.  It would be best
to get it fixed there _then_ base development on top of that to avoid
conflicts.

^ permalink raw reply

* [GIT PULL 4/4] ARM: mvebu: dt for v3.9
From: Jason Cooper @ 2013-01-12 23:29 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <pull-1358033364-983365>

The following changes since commit d1c3ed669a2d452cacfb48c2d171a1f364dae2ed:

  Linux 3.8-rc2 (2013-01-02 18:13:21 -0800)

are available in the git repository at:

  git://git.infradead.org/users/jcooper/linux.git tags/dt_for_v3.9

for you to fetch changes up to 877ddfac50bfeabc4729d0b8ac41989d226148b9:

  ARM: Dove: add fixed regulator for CuBox USB power (2013-01-12 22:35:56 +0000)

----------------------------------------------------------------
mvebu dt changes for v3.9
 - mvebu
   - add rtc support
   - add sdio support
 - kirkwood
   - add sdio support
   - add twsi1 and nand to 88f6282
   - convert openblocks A6 to pinctrl
 - dove
   - move led pinctrl to gpio-leds node
   - use fixed regulator for usb power

----------------------------------------------------------------
Andrew Lunn (5):
      ARM: Kirkwood: Fix missing clk for USB device.
      Power: gpio-poweroff: Fix documentation and gpio_is_valid
      ARM: Kirkwood: Fix missing sdio clock
      ARM: Kirkwood: Use fixed-regulator instead of board gpio call
      arm: mvebu: Add missing ; for cpu node.

Gregory CLEMENT (7):
      arm: mvebu: Use dw-apb-uart instead of ns16650 as UART driver
      arm: mvebu: Improve the SMP support of the interrupt controller
      ARM: mvebu: Fix interrupt handling in SMP mode
      rtc: Add support of rtc-mv for MVEBU SoCs
      arm: mvebu: Update defconfig with Marvell RTC support
      arm: mvebu: Add RTC support for Armada 370 and Armada XP
      arm: mvebu: Fix memory size for Armada 370 DB

Jason Cooper (4):
      Merge branch 'mvebu/drivers' into mvebu/boards
      Merge branch 'mvebu/drivers' into mvebu/boards
      Merge branch 'mvebu/boards' into mvebu/dt
      Merge branch 'mvebu/fixes' into mvebu/dt

Jason Gunthorpe (1):
      ARM: Kirkwood: Support basic hotplug for PCI-E

Joshua Coombs (1):
      clk: mvebu: Remove inappropriate __init tagging

Nobuhiro Iwamatsu (4):
      ARM: Kirkwood: Switch TWSI1 of 88f6282 to DT clock providers
      ARM: Kirkwood: Add pinctrl of TWSI1 to 88f6282
      ARM: Kirkwood: Add pinctrl of NAND to 88f6282
      ARM: Kirkwood: Convert openblocks A6 board to pinctrl

Sebastian Hesselbarth (5):
      ARM: Dove: Add pinctrl clock to DT
      pinctrl: mvebu: make pdma clock on dove mandatory
      ARM: Dove: add Cubox sdhci card detect gpio
      ARM: Dove: move CuBox led pinctrl to gpio-leds node
      ARM: Dove: add fixed regulator for CuBox USB power

Simon Guinot (1):
      ARM: Kirkwood: fix ns2 gpios by converting to pinctrl

Thomas Petazzoni (22):
      arm: mvebu: Armada XP MV78230 has two cores, not one
      arm: mvebu: Armada XP MV78230 has only three Ethernet interfaces
      dma: mv_xor: fix error handling of mv_xor_channel_add()
      dma: mv_xor: fix error handling for clocks
      arm: mvebu: use global interrupts for GPIOs on Armada XP
      mmc: mvsdio: use slot-gpio infrastructure for write protect gpio
      mmc: mvsdio: use slot-gpio for card detect gpio
      mmc: mvsdio: implement a Device Tree binding
      mmc: mvsdio: add pinctrl integration
      arm: mvebu: enable SDIO support in mvebu_defconfig
      arm: mvebu: enable mwifiex driver in mvebu_defconfig
      arm: mvebu: enable btmrvl driver in mvebu_defconfig
      arm: mvebu: add DT information for the SDIO interface of Armada 370/XP
      arm: mvebu: add pin muxing options for the SDIO interface on Armada 370
      arm: mvebu: add pin muxing options for the SDIO interface on Armada XP
      arm: mvebu: enable the SD card slot on Armada XP DB board
      arm: mvebu: enable the SD card slot on Armada 370 DB board
      arm: mvebu: enable the SDIO interface on the Globalscale Mirabox
      arm: kirkwood: add Device Tree informations for the SDIO controller
      arm: kirkwood: dreamplug: use Device Tree to probe SDIO
      arm: kirkwood: mplcec4: use Device Tree to probe SDIO
      arm: kirkwood: add pinmux option for the SDIO interface on 88F6282

Willy Tarreau (1):
      ARM: kirkwood: convert Guruplug Server Plus to use the device tree

 .../devicetree/bindings/gpio/gpio-poweroff.txt     |  20 ++-
 .../devicetree/bindings/mmc/orion-sdio.txt         |  17 +++
 arch/arm/boot/dts/Makefile                         |   1 +
 arch/arm/boot/dts/armada-370-db.dts                |  17 ++-
 arch/arm/boot/dts/armada-370-mirabox.dts           |  10 ++
 arch/arm/boot/dts/armada-370-xp.dtsi               |  20 ++-
 arch/arm/boot/dts/armada-370.dtsi                  |  12 ++
 arch/arm/boot/dts/armada-xp-db.dts                 |   7 ++
 arch/arm/boot/dts/armada-xp-mv78230.dtsi           |  29 +++--
 arch/arm/boot/dts/armada-xp-mv78260.dtsi           |  35 ++++--
 arch/arm/boot/dts/armada-xp-mv78460.dtsi           |  35 ++++--
 arch/arm/boot/dts/armada-xp.dtsi                   |  16 +--
 arch/arm/boot/dts/dove-cubox.dts                   |  40 +++++-
 arch/arm/boot/dts/dove.dtsi                        |   1 +
 arch/arm/boot/dts/kirkwood-6282.dtsi               |  18 +++
 arch/arm/boot/dts/kirkwood-dreamplug.dts           |   7 ++
 .../arm/boot/dts/kirkwood-guruplug-server-plus.dts |  94 ++++++++++++++
 arch/arm/boot/dts/kirkwood-mplcec4.dts             |  11 +-
 arch/arm/boot/dts/kirkwood-ns2-common.dtsi         |  16 +++
 arch/arm/boot/dts/kirkwood-openblocks_a6.dts       | 116 ++++++++++++++++++
 arch/arm/boot/dts/kirkwood-topkick.dts             |  17 +++
 arch/arm/boot/dts/kirkwood.dtsi                    |   9 ++
 arch/arm/configs/mvebu_defconfig                   |  13 +-
 arch/arm/mach-dove/Kconfig                         |   2 +
 arch/arm/mach-kirkwood/Kconfig                     |   7 ++
 arch/arm/mach-kirkwood/Makefile                    |   1 +
 arch/arm/mach-kirkwood/board-dreamplug.c           |   6 -
 arch/arm/mach-kirkwood/board-dt.c                  |   8 ++
 arch/arm/mach-kirkwood/board-guruplug.c            |  39 ++++++
 arch/arm/mach-kirkwood/board-mplcec4.c             |   7 --
 arch/arm/mach-kirkwood/board-ns2.c                 |  38 ------
 arch/arm/mach-kirkwood/board-openblocks_a6.c       |  44 -------
 arch/arm/mach-kirkwood/board-usi_topkick.c         |   4 -
 arch/arm/mach-kirkwood/common.h                    |   5 +
 arch/arm/mach-kirkwood/pcie.c                      |  10 +-
 arch/arm/mach-mvebu/irq-armada-370-xp.c            |  72 +++++++++++
 drivers/clk/mvebu/clk-gating-ctrl.c                |   2 +-
 drivers/dma/mv_xor.c                               |   9 +-
 drivers/mmc/host/mvsdio.c                          | 136 +++++++++------------
 drivers/pinctrl/mvebu/pinctrl-dove.c               |   7 +-
 drivers/power/reset/gpio-poweroff.c                |  33 +++--
 drivers/rtc/Kconfig                                |   2 +-
 42 files changed, 730 insertions(+), 263 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mmc/orion-sdio.txt
 create mode 100644 arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
 create mode 100644 arch/arm/mach-kirkwood/board-guruplug.c

^ permalink raw reply

* [GIT PULL 3/4] ARM: mvebu: boards for v3.9
From: Jason Cooper @ 2013-01-12 23:29 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <pull-1358033364-983365>

The following changes since commit d1c3ed669a2d452cacfb48c2d171a1f364dae2ed:

  Linux 3.8-rc2 (2013-01-02 18:13:21 -0800)

are available in the git repository at:

  git://git.infradead.org/users/jcooper/linux.git tags/boards_for_v3.9

for you to fetch changes up to 3db7063cd2f8284190ef81e9dd0e9b902c73c5e9:

  arm: mvebu: enable btmrvl driver in mvebu_defconfig (2013-01-10 02:49:23 +0000)

----------------------------------------------------------------
mvebu boards for v3.9
 - Guruplug Server Plus DT board
 - mvebu improved SMP support in interrupt controller
 - update mvebu_defconfig

----------------------------------------------------------------
Gregory CLEMENT (4):
      arm: mvebu: Improve the SMP support of the interrupt controller
      ARM: mvebu: Fix interrupt handling in SMP mode
      rtc: Add support of rtc-mv for MVEBU SoCs
      arm: mvebu: Update defconfig with Marvell RTC support

Jason Cooper (2):
      Merge branch 'mvebu/drivers' into mvebu/boards
      Merge branch 'mvebu/drivers' into mvebu/boards

Jason Gunthorpe (1):
      ARM: Kirkwood: Support basic hotplug for PCI-E

Thomas Petazzoni (7):
      mmc: mvsdio: use slot-gpio infrastructure for write protect gpio
      mmc: mvsdio: use slot-gpio for card detect gpio
      mmc: mvsdio: implement a Device Tree binding
      mmc: mvsdio: add pinctrl integration
      arm: mvebu: enable SDIO support in mvebu_defconfig
      arm: mvebu: enable mwifiex driver in mvebu_defconfig
      arm: mvebu: enable btmrvl driver in mvebu_defconfig

Willy Tarreau (1):
      ARM: kirkwood: convert Guruplug Server Plus to use the device tree

 .../devicetree/bindings/mmc/orion-sdio.txt         |  17 +++
 arch/arm/boot/dts/Makefile                         |   1 +
 arch/arm/boot/dts/armada-xp.dtsi                   |   2 +-
 .../arm/boot/dts/kirkwood-guruplug-server-plus.dts |  94 ++++++++++++++
 arch/arm/configs/mvebu_defconfig                   |   9 ++
 arch/arm/mach-kirkwood/Kconfig                     |   7 ++
 arch/arm/mach-kirkwood/Makefile                    |   1 +
 arch/arm/mach-kirkwood/board-dt.c                  |   4 +
 arch/arm/mach-kirkwood/board-guruplug.c            |  39 ++++++
 arch/arm/mach-kirkwood/common.h                    |   5 +
 arch/arm/mach-kirkwood/pcie.c                      |  10 +-
 arch/arm/mach-mvebu/irq-armada-370-xp.c            |  72 +++++++++++
 drivers/mmc/host/mvsdio.c                          | 136 +++++++++------------
 drivers/rtc/Kconfig                                |   2 +-
 14 files changed, 315 insertions(+), 84 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mmc/orion-sdio.txt
 create mode 100644 arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
 create mode 100644 arch/arm/mach-kirkwood/board-guruplug.c

^ permalink raw reply

* [GIT PULL 2/4] ARM: mvebu: drivers for v3.9
From: Jason Cooper @ 2013-01-12 23:29 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <pull-1358033364-983365>

The following changes since commit d1c3ed669a2d452cacfb48c2d171a1f364dae2ed:

  Linux 3.8-rc2 (2013-01-02 18:13:21 -0800)

are available in the git repository at:

  git://git.infradead.org/users/jcooper/linux.git tags/drivers_for_v3.9

for you to fetch changes up to a6ae83d745063fee77648afc95de58d7a82d4df5:

  mmc: mvsdio: add pinctrl integration (2013-01-10 02:46:59 +0000)

----------------------------------------------------------------
mvebu drivers for v3.9
 - mvsdio
   - use slot-gpio for card detect and write protect
   - add DT binding
   - add pinctrl integration
 - use rtc-mv in mvebu armv7 SoCs
 - add pci-e hotplug for kirkwood

----------------------------------------------------------------
Gregory CLEMENT (1):
      rtc: Add support of rtc-mv for MVEBU SoCs

Jason Gunthorpe (1):
      ARM: Kirkwood: Support basic hotplug for PCI-E

Thomas Petazzoni (4):
      mmc: mvsdio: use slot-gpio infrastructure for write protect gpio
      mmc: mvsdio: use slot-gpio for card detect gpio
      mmc: mvsdio: implement a Device Tree binding
      mmc: mvsdio: add pinctrl integration

 .../devicetree/bindings/mmc/orion-sdio.txt         |  17 +++
 arch/arm/mach-kirkwood/pcie.c                      |  10 +-
 drivers/mmc/host/mvsdio.c                          | 136 +++++++++------------
 drivers/rtc/Kconfig                                |   2 +-
 4 files changed, 82 insertions(+), 83 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mmc/orion-sdio.txt

^ permalink raw reply

* [GIT PULL 1/4] ARM: mvebu: cleanup for v3.9
From: Jason Cooper @ 2013-01-12 23:29 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <pull-1358033364-983365>

The following changes since commit d1c3ed669a2d452cacfb48c2d171a1f364dae2ed:

  Linux 3.8-rc2 (2013-01-02 18:13:21 -0800)

are available in the git repository at:

  git://git.infradead.org/users/jcooper/linux.git tags/cleanup_for_v3.9

for you to fetch changes up to b96e1b1c3c5319294edb0970b6d5bf099c0e85eb:

  ARM: Kirkwood: Cleanup unneeded include files (2013-01-12 21:50:10 +0000)

----------------------------------------------------------------
mvebu cleanup for v3.9
 - remove unneeded includes due to DT conversion

----------------------------------------------------------------
Andrew Lunn (1):
      ARM: Kirkwood: Cleanup unneeded include files

Thomas Petazzoni (1):
      arm: kirkwood: dockstar: remove useless include of SDIO header

 arch/arm/mach-kirkwood/board-ib62x0.c   | 1 -
 arch/arm/mach-kirkwood/board-mplcec4.c  | 1 -
 arch/arm/mach-kirkwood/dockstar-setup.c | 1 -
 3 files changed, 3 deletions(-)

^ permalink raw reply

* [GIT PULL 0/4] ARM: mvebu: changes for v3.9
From: Jason Cooper @ 2013-01-12 23:29 UTC (permalink / raw)
  To: linux-arm-kernel

The following changes since commit 417f2732930e5c5544ef3a3a0141d44b2639e8e8:

  Merge branch 'next/drivers' into for-next (2013-01-08 15:09:33 -0800)

are available in the git repository at:


  git://git.infradead.org/users/jcooper/linux.git mvebu/for-next

for you to fetch changes up to 9e896ba256a01808f2804944f258b0ac578d9c2e:

  Merge branch 'mvebu/dt' into mvebu/for-next (2013-01-12 22:39:17 +0000)

----------------------------------------------------------------

Andrew Lunn (1):
      ARM: Kirkwood: Cleanup unneeded include files

Gregory CLEMENT (6):
      arm: mvebu: Improve the SMP support of the interrupt controller
      ARM: mvebu: Fix interrupt handling in SMP mode
      rtc: Add support of rtc-mv for MVEBU SoCs
      arm: mvebu: Update defconfig with Marvell RTC support
      arm: mvebu: Add RTC support for Armada 370 and Armada XP
      arm: mvebu: Fix memory size for Armada 370 DB

Jason Cooper (9):
      Merge branch 'mvebu/drivers' into mvebu/boards
      Merge branch 'mvebu/drivers' into mvebu/boards
      Merge branch 'mvebu/boards' into mvebu/dt
      Merge branch 'mvebu/fixes' into mvebu/dt
      Merge branch 'mvebu/fixes' into mvebu/for-next
      Merge branch 'mvebu/cleanup' into mvebu/for-next
      Merge branch 'mvebu/drivers' into mvebu/for-next
      Merge branch 'mvebu/boards' into mvebu/for-next
      Merge branch 'mvebu/dt' into mvebu/for-next

Jason Gunthorpe (1):
      ARM: Kirkwood: Support basic hotplug for PCI-E

Nobuhiro Iwamatsu (3):
      ARM: Kirkwood: Add pinctrl of TWSI1 to 88f6282
      ARM: Kirkwood: Add pinctrl of NAND to 88f6282
      ARM: Kirkwood: Convert openblocks A6 board to pinctrl

Sebastian Hesselbarth (3):
      ARM: Dove: add Cubox sdhci card detect gpio
      ARM: Dove: move CuBox led pinctrl to gpio-leds node
      ARM: Dove: add fixed regulator for CuBox USB power

Simon Guinot (1):
      ARM: Kirkwood: fix ns2 gpios by converting to pinctrl

Thomas Petazzoni (19):
      arm: mvebu: use global interrupts for GPIOs on Armada XP
      arm: kirkwood: dockstar: remove useless include of SDIO header
      mmc: mvsdio: use slot-gpio infrastructure for write protect gpio
      mmc: mvsdio: use slot-gpio for card detect gpio
      mmc: mvsdio: implement a Device Tree binding
      mmc: mvsdio: add pinctrl integration
      arm: mvebu: enable SDIO support in mvebu_defconfig
      arm: mvebu: enable mwifiex driver in mvebu_defconfig
      arm: mvebu: enable btmrvl driver in mvebu_defconfig
      arm: mvebu: add DT information for the SDIO interface of Armada 370/XP
      arm: mvebu: add pin muxing options for the SDIO interface on Armada 370
      arm: mvebu: add pin muxing options for the SDIO interface on Armada XP
      arm: mvebu: enable the SD card slot on Armada XP DB board
      arm: mvebu: enable the SD card slot on Armada 370 DB board
      arm: mvebu: enable the SDIO interface on the Globalscale Mirabox
      arm: kirkwood: add Device Tree informations for the SDIO controller
      arm: kirkwood: dreamplug: use Device Tree to probe SDIO
      arm: kirkwood: mplcec4: use Device Tree to probe SDIO
      arm: kirkwood: add pinmux option for the SDIO interface on 88F6282

Willy Tarreau (1):
      ARM: kirkwood: convert Guruplug Server Plus to use the device tree

 .../devicetree/bindings/mmc/orion-sdio.txt         |  17 +++
 arch/arm/boot/dts/Makefile                         |   1 +
 arch/arm/boot/dts/armada-370-db.dts                |  17 ++-
 arch/arm/boot/dts/armada-370-mirabox.dts           |  10 ++
 arch/arm/boot/dts/armada-370-xp.dtsi               |  14 +++
 arch/arm/boot/dts/armada-370.dtsi                  |  12 ++
 arch/arm/boot/dts/armada-xp-db.dts                 |   7 ++
 arch/arm/boot/dts/armada-xp-mv78230.dtsi           |  20 +--
 arch/arm/boot/dts/armada-xp-mv78260.dtsi           |  27 ++--
 arch/arm/boot/dts/armada-xp-mv78460.dtsi           |  27 ++--
 arch/arm/boot/dts/armada-xp.dtsi                   |   2 +-
 arch/arm/boot/dts/dove-cubox.dts                   |  40 +++++-
 arch/arm/boot/dts/kirkwood-6282.dtsi               |  17 +++
 arch/arm/boot/dts/kirkwood-dreamplug.dts           |   7 ++
 .../arm/boot/dts/kirkwood-guruplug-server-plus.dts |  94 ++++++++++++++
 arch/arm/boot/dts/kirkwood-mplcec4.dts             |  11 +-
 arch/arm/boot/dts/kirkwood-ns2-common.dtsi         |  16 +++
 arch/arm/boot/dts/kirkwood-openblocks_a6.dts       | 116 ++++++++++++++++++
 arch/arm/boot/dts/kirkwood.dtsi                    |   8 ++
 arch/arm/configs/mvebu_defconfig                   |   9 ++
 arch/arm/mach-dove/Kconfig                         |   2 +
 arch/arm/mach-kirkwood/Kconfig                     |   7 ++
 arch/arm/mach-kirkwood/Makefile                    |   1 +
 arch/arm/mach-kirkwood/board-dreamplug.c           |   6 -
 arch/arm/mach-kirkwood/board-dt.c                  |   4 +
 arch/arm/mach-kirkwood/board-guruplug.c            |  39 ++++++
 arch/arm/mach-kirkwood/board-ib62x0.c              |   1 -
 arch/arm/mach-kirkwood/board-mplcec4.c             |   8 --
 arch/arm/mach-kirkwood/board-ns2.c                 |  38 ------
 arch/arm/mach-kirkwood/board-openblocks_a6.c       |  44 -------
 arch/arm/mach-kirkwood/common.h                    |   5 +
 arch/arm/mach-kirkwood/dockstar-setup.c            |   1 -
 arch/arm/mach-kirkwood/pcie.c                      |  10 +-
 arch/arm/mach-mvebu/irq-armada-370-xp.c            |  72 +++++++++++
 drivers/mmc/host/mvsdio.c                          | 136 +++++++++------------
 drivers/rtc/Kconfig                                |   2 +-
 36 files changed, 629 insertions(+), 219 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mmc/orion-sdio.txt
 create mode 100644 arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
 create mode 100644 arch/arm/mach-kirkwood/board-guruplug.c

^ permalink raw reply

* [PATCH] ARM: Dove: move CuBox led pinctrl to gpio-leds node
From: Jason Cooper @ 2013-01-12 22:37 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1356646870-2903-1-git-send-email-sebastian.hesselbarth@gmail.com>

On Thu, Dec 27, 2012 at 11:21:10PM +0100, Sebastian Hesselbarth wrote:
> gpio-leds has support for pinctrl allocation, make use of it.
> 
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> ---
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-kernel at vger.kernel.org
> ---
>  arch/arm/boot/dts/dove-cubox.dts |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Applied to mvebu/dt

thx,

Jason.

^ permalink raw reply

* [PATCH] ARM: Dove: add fixed regulator for CuBox USB power
From: Jason Cooper @ 2013-01-12 22:36 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1356646919-2974-1-git-send-email-sebastian.hesselbarth@gmail.com>

On Thu, Dec 27, 2012 at 11:21:59PM +0100, Sebastian Hesselbarth wrote:
> CuBox needs to enable USB power on a gpio pin. Add a fixed regulator
> to always enable usb power on boot.
> 
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> ---
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-kernel at vger.kernel.org
> ---
>  arch/arm/boot/dts/dove-cubox.dts |   25 ++++++++++++++++++++++++-
>  arch/arm/mach-dove/Kconfig       |    2 ++
>  2 files changed, 26 insertions(+), 1 deletion(-)

Applied to mvebu/dt

thx,

Jason.

^ permalink raw reply

* [PATCH] ARM: Dove: move CuBox led pinctrl to gpio-leds node
From: Jason Cooper @ 2013-01-12 22:30 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <50F1DAE7.4050508@gmail.com>

On Sat, Jan 12, 2013 at 10:51:35PM +0100, Sebastian Hesselbarth wrote:
> On 01/12/2013 10:42 PM, Jason Cooper wrote:
> >On Thu, Dec 27, 2012 at 11:21:10PM +0100, Sebastian Hesselbarth wrote:
> >>gpio-leds has support for pinctrl allocation, make use of it.
> >>
> >>Signed-off-by: Sebastian Hesselbarth<sebastian.hesselbarth@gmail.com>
> >> ...
> >>  &pinctrl {
> >>-	pinctrl-0 =<&pmx_gpio_12&pmx_gpio_18>;
> >>+	pinctrl-0 =<&pmx_gpio_12>;
> >>  	pinctrl-names = "default";
> >>
> >>  	pmx_gpio_12: pmx-gpio-12 {
> >>--
> >>1.7.10.4
> >
> >I'm getting a merge conflict wit hthe above:
> >
> >&pinctrl {
> ><<<<<<<  HEAD
> >         pinctrl-0 =<&pmx_gpio_18>;
> >=======
> >         pinctrl-0 =<&pmx_gpio_12>;
> >>>>>>>>ARM: Dove: move CuBox led pinctrl to gpio-leds node
> >         pinctrl-names = "default";
> >
> >         pmx_gpio_18: pmx-gpio-18 {
> >                 marvell,pins = "mpp18";
> >                 marvell,function = "gpio";
> >         };
> >};
> >
> >Am I missing something?
> 
> Jason,
> 
> it depends on "ARM: Dove: move CuBox led pinctrl to gpio-leds node"
> that you applied to mvebu/fixes two days ago.

Ahhh, ok, I'll include it in this pull.

thx,

Jason.

^ permalink raw reply

* [PATCH] ARM: Dove: move CuBox led pinctrl to gpio-leds node
From: Sebastian Hesselbarth @ 2013-01-12 21:51 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20130112214257.GF13433@titan.lakedaemon.net>

On 01/12/2013 10:42 PM, Jason Cooper wrote:
> On Thu, Dec 27, 2012 at 11:21:10PM +0100, Sebastian Hesselbarth wrote:
>> gpio-leds has support for pinctrl allocation, make use of it.
>>
>> Signed-off-by: Sebastian Hesselbarth<sebastian.hesselbarth@gmail.com>
>>  ...
>>   &pinctrl {
>> -	pinctrl-0 =<&pmx_gpio_12&pmx_gpio_18>;
>> +	pinctrl-0 =<&pmx_gpio_12>;
>>   	pinctrl-names = "default";
>>
>>   	pmx_gpio_12: pmx-gpio-12 {
>> --
>> 1.7.10.4
>
> I'm getting a merge conflict wit hthe above:
>
> &pinctrl {
> <<<<<<<  HEAD
>          pinctrl-0 =<&pmx_gpio_18>;
> =======
>          pinctrl-0 =<&pmx_gpio_12>;
>>>>>>>> ARM: Dove: move CuBox led pinctrl to gpio-leds node
>          pinctrl-names = "default";
>
>          pmx_gpio_18: pmx-gpio-18 {
>                  marvell,pins = "mpp18";
>                  marvell,function = "gpio";
>          };
> };
>
> Am I missing something?

Jason,

it depends on "ARM: Dove: move CuBox led pinctrl to gpio-leds node"
that you applied to mvebu/fixes two days ago.

You can postpone the patch another rc if that helps as it just moves
led pinctrl but still works when on pinctrl hog.

Sebastian

^ permalink raw reply

* [PATCH] ARM: Kirkwood: Cleanup unneeded include files
From: Jason Cooper @ 2013-01-12 21:50 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1356697977-4105-1-git-send-email-andrew@lunn.ch>

On Fri, Dec 28, 2012 at 01:32:57PM +0100, Andrew Lunn wrote:
> Remove include files which are no longer needed after converting
> to device tree.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>  arch/arm/mach-kirkwood/board-ib62x0.c  |    1 -
>  arch/arm/mach-kirkwood/board-mplcec4.c |    1 -
>  2 files changed, 2 deletions(-)

Applied to mvebu/cleanup

thx,

Jason.

^ permalink raw reply

* [PATCH] ARM: Dove: move CuBox led pinctrl to gpio-leds node
From: Jason Cooper @ 2013-01-12 21:42 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1356646870-2903-1-git-send-email-sebastian.hesselbarth@gmail.com>

Sebastian,

On Thu, Dec 27, 2012 at 11:21:10PM +0100, Sebastian Hesselbarth wrote:
> gpio-leds has support for pinctrl allocation, make use of it.
> 
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> ---
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-kernel at vger.kernel.org
> ---
>  arch/arm/boot/dts/dove-cubox.dts |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts
> index cdee96f..bed5b62 100644
> --- a/arch/arm/boot/dts/dove-cubox.dts
> +++ b/arch/arm/boot/dts/dove-cubox.dts
> @@ -17,6 +17,9 @@
>  
>  	leds {
>  		compatible = "gpio-leds";
> +		pinctrl-0 = <&pmx_gpio_18>;
> +		pinctrl-names = "default";
> +
>  		power {
>  			label = "Power";
>  			gpios = <&gpio0 18 1>;
> @@ -47,7 +50,7 @@
>  };
>  
>  &pinctrl {
> -	pinctrl-0 = <&pmx_gpio_12 &pmx_gpio_18>;
> +	pinctrl-0 = <&pmx_gpio_12>;
>  	pinctrl-names = "default";
>  
>  	pmx_gpio_12: pmx-gpio-12 {
> -- 
> 1.7.10.4

I'm getting a merge conflict wit hthe above:

&pinctrl {
<<<<<<< HEAD
        pinctrl-0 = <&pmx_gpio_18>;
======= 
        pinctrl-0 = <&pmx_gpio_12>;
>>>>>>> ARM: Dove: move CuBox led pinctrl to gpio-leds node
        pinctrl-names = "default";

        pmx_gpio_18: pmx-gpio-18 {
                marvell,pins = "mpp18";
                marvell,function = "gpio";
        };
};


Am I missing something?

thx,

Jason.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox