* [PATCH v4 01/19] clocksource: sh_tmu: Fix channel IRQ retrieval in legacy case
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 02/19] clocksource: sh_cmt: Drop support for legacy platform data Laurent Pinchart
` (18 subsequent siblings)
19 siblings, 0 replies; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
In the legacy platform data case each TMU platform device handles a
single channel with a single IRQ for the platform device. Retrieve the
IRQ using the logical channel number instead of the hardware channel
number.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
---
drivers/clocksource/sh_tmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
index 4ba2c0f..ec34095 100644
--- a/drivers/clocksource/sh_tmu.c
+++ b/drivers/clocksource/sh_tmu.c
@@ -498,7 +498,7 @@ static int sh_tmu_channel_setup(struct sh_tmu_channel *ch, unsigned int index,
ch->base = tmu->mapbase + 8 + ch->index * 12;
}
- ch->irq = platform_get_irq(tmu->pdev, ch->index);
+ ch->irq = platform_get_irq(tmu->pdev, index);
if (ch->irq < 0) {
dev_err(&tmu->pdev->dev, "ch%u: failed to get irq\n",
ch->index);
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 02/19] clocksource: sh_cmt: Drop support for legacy platform data
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 01/19] clocksource: sh_tmu: Fix channel IRQ retrieval in legacy case Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 03/19] clocksource: sh_cmt: Replace global spinlock with a per-device spinlock Laurent Pinchart
` (17 subsequent siblings)
19 siblings, 0 replies; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
Now that all platforms have switched to the new-style platform data,
drop support for the legacy version.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
---
drivers/clocksource/sh_cmt.c | 172 ++++++++++---------------------------------
1 file changed, 40 insertions(+), 132 deletions(-)
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
index bc8d025..ff1a059 100644
--- a/drivers/clocksource/sh_cmt.c
+++ b/drivers/clocksource/sh_cmt.c
@@ -114,9 +114,7 @@ struct sh_cmt_device {
struct platform_device *pdev;
const struct sh_cmt_info *info;
- bool legacy;
- void __iomem *mapbase_ch;
void __iomem *mapbase;
struct clk *clk;
@@ -792,7 +790,7 @@ static int sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
int irq;
int ret;
- irq = platform_get_irq(ch->cmt->pdev, ch->cmt->legacy ? 0 : ch->index);
+ irq = platform_get_irq(ch->cmt->pdev, ch->index);
if (irq < 0) {
dev_err(&ch->cmt->pdev->dev, "ch%u: failed to get irq\n",
ch->index);
@@ -863,33 +861,26 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index,
* Compute the address of the channel control register block. For the
* timers with a per-channel start/stop register, compute its address
* as well.
- *
- * For legacy configuration the address has been mapped explicitly.
*/
- if (cmt->legacy) {
- ch->ioctrl = cmt->mapbase_ch;
- } else {
- switch (cmt->info->model) {
- case SH_CMT_16BIT:
- ch->ioctrl = cmt->mapbase + 2 + ch->hwidx * 6;
- break;
- case SH_CMT_32BIT:
- case SH_CMT_48BIT:
- ch->ioctrl = cmt->mapbase + 0x10 + ch->hwidx * 0x10;
- break;
- case SH_CMT_32BIT_FAST:
- /*
- * The 32-bit "fast" timer has a single channel at hwidx
- * 5 but is located at offset 0x40 instead of 0x60 for
- * some reason.
- */
- ch->ioctrl = cmt->mapbase + 0x40;
- break;
- case SH_CMT_48BIT_GEN2:
- ch->iostart = cmt->mapbase + ch->hwidx * 0x100;
- ch->ioctrl = ch->iostart + 0x10;
- break;
- }
+ switch (cmt->info->model) {
+ case SH_CMT_16BIT:
+ ch->ioctrl = cmt->mapbase + 2 + ch->hwidx * 6;
+ break;
+ case SH_CMT_32BIT:
+ case SH_CMT_48BIT:
+ ch->ioctrl = cmt->mapbase + 0x10 + ch->hwidx * 0x10;
+ break;
+ case SH_CMT_32BIT_FAST:
+ /*
+ * The 32-bit "fast" timer has a single channel at hwidx 5 but
+ * is located at offset 0x40 instead of 0x60 for some reason.
+ */
+ ch->ioctrl = cmt->mapbase + 0x40;
+ break;
+ case SH_CMT_48BIT_GEN2:
+ ch->iostart = cmt->mapbase + ch->hwidx * 0x100;
+ ch->ioctrl = ch->iostart + 0x10;
+ break;
}
if (cmt->info->width == (sizeof(ch->max_match_value) * 8))
@@ -900,12 +891,7 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index,
ch->match_value = ch->max_match_value;
raw_spin_lock_init(&ch->lock);
- if (cmt->legacy) {
- ch->timer_bit = ch->hwidx;
- } else {
- ch->timer_bit = cmt->info->model == SH_CMT_48BIT_GEN2
- ? 0 : ch->hwidx;
- }
+ ch->timer_bit = cmt->info->model == SH_CMT_48BIT_GEN2 ? 0 : ch->hwidx;
ret = sh_cmt_register(ch, dev_name(&cmt->pdev->dev),
clockevent, clocksource);
@@ -938,60 +924,12 @@ static int sh_cmt_map_memory(struct sh_cmt_device *cmt)
return 0;
}
-static int sh_cmt_map_memory_legacy(struct sh_cmt_device *cmt)
-{
- struct sh_timer_config *cfg = cmt->pdev->dev.platform_data;
- struct resource *res, *res2;
-
- /* map memory, let mapbase_ch point to our channel */
- res = platform_get_resource(cmt->pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&cmt->pdev->dev, "failed to get I/O memory\n");
- return -ENXIO;
- }
-
- cmt->mapbase_ch = ioremap_nocache(res->start, resource_size(res));
- if (cmt->mapbase_ch == NULL) {
- dev_err(&cmt->pdev->dev, "failed to remap I/O memory\n");
- return -ENXIO;
- }
-
- /* optional resource for the shared timer start/stop register */
- res2 = platform_get_resource(cmt->pdev, IORESOURCE_MEM, 1);
-
- /* map second resource for CMSTR */
- cmt->mapbase = ioremap_nocache(res2 ? res2->start :
- res->start - cfg->channel_offset,
- res2 ? resource_size(res2) : 2);
- if (cmt->mapbase == NULL) {
- dev_err(&cmt->pdev->dev, "failed to remap I/O second memory\n");
- iounmap(cmt->mapbase_ch);
- return -ENXIO;
- }
-
- /* identify the model based on the resources */
- if (resource_size(res) == 6)
- cmt->info = &sh_cmt_info[SH_CMT_16BIT];
- else if (res2 && (resource_size(res2) == 4))
- cmt->info = &sh_cmt_info[SH_CMT_48BIT_GEN2];
- else
- cmt->info = &sh_cmt_info[SH_CMT_32BIT];
-
- return 0;
-}
-
-static void sh_cmt_unmap_memory(struct sh_cmt_device *cmt)
-{
- iounmap(cmt->mapbase);
- if (cmt->mapbase_ch)
- iounmap(cmt->mapbase_ch);
-}
-
static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
{
struct sh_timer_config *cfg = pdev->dev.platform_data;
const struct platform_device_id *id = pdev->id_entry;
- unsigned int hw_channels;
+ unsigned int mask;
+ unsigned int i;
int ret;
memset(cmt, 0, sizeof(*cmt));
@@ -1003,10 +941,9 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
}
cmt->info = (const struct sh_cmt_info *)id->driver_data;
- cmt->legacy = cmt->info ? false : true;
/* Get hold of clock. */
- cmt->clk = clk_get(&cmt->pdev->dev, cmt->legacy ? "cmt_fck" : "fck");
+ cmt->clk = clk_get(&cmt->pdev->dev, "fck");
if (IS_ERR(cmt->clk)) {
dev_err(&cmt->pdev->dev, "cannot get clock\n");
return PTR_ERR(cmt->clk);
@@ -1016,27 +953,13 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
if (ret < 0)
goto err_clk_put;
- /*
- * Map the memory resource(s). We need to support both the legacy
- * platform device configuration (with one device per channel) and the
- * new version (with multiple channels per device).
- */
- if (cmt->legacy)
- ret = sh_cmt_map_memory_legacy(cmt);
- else
- ret = sh_cmt_map_memory(cmt);
-
+ /* Map the memory resource(s). */
+ ret = sh_cmt_map_memory(cmt);
if (ret < 0)
goto err_clk_unprepare;
/* Allocate and setup the channels. */
- if (cmt->legacy) {
- cmt->num_channels = 1;
- hw_channels = 0;
- } else {
- cmt->num_channels = hweight8(cfg->channels_mask);
- hw_channels = cfg->channels_mask;
- }
+ cmt->num_channels = hweight8(cfg->channels_mask);
cmt->channels = kzalloc(cmt->num_channels * sizeof(*cmt->channels),
GFP_KERNEL);
@@ -1045,35 +968,21 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
goto err_unmap;
}
- if (cmt->legacy) {
- ret = sh_cmt_setup_channel(&cmt->channels[0],
- cfg->timer_bit, cfg->timer_bit,
- cfg->clockevent_rating != 0,
- cfg->clocksource_rating != 0, cmt);
+ /*
+ * Use the first channel as a clock event device and the second channel
+ * as a clock source. If only one channel is available use it for both.
+ */
+ for (i = 0, mask = cfg->channels_mask; i < cmt->num_channels; ++i) {
+ unsigned int hwidx = ffs(mask) - 1;
+ bool clocksource = i == 1 || cmt->num_channels == 1;
+ bool clockevent = i == 0;
+
+ ret = sh_cmt_setup_channel(&cmt->channels[i], i, hwidx,
+ clockevent, clocksource, cmt);
if (ret < 0)
goto err_unmap;
- } else {
- unsigned int mask = hw_channels;
- unsigned int i;
- /*
- * Use the first channel as a clock event device and the second
- * channel as a clock source. If only one channel is available
- * use it for both.
- */
- for (i = 0; i < cmt->num_channels; ++i) {
- unsigned int hwidx = ffs(mask) - 1;
- bool clocksource = i == 1 || cmt->num_channels == 1;
- bool clockevent = i == 0;
-
- ret = sh_cmt_setup_channel(&cmt->channels[i], i, hwidx,
- clockevent, clocksource,
- cmt);
- if (ret < 0)
- goto err_unmap;
-
- mask &= ~(1 << hwidx);
- }
+ mask &= ~(1 << hwidx);
}
platform_set_drvdata(pdev, cmt);
@@ -1082,7 +991,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
err_unmap:
kfree(cmt->channels);
- sh_cmt_unmap_memory(cmt);
+ iounmap(cmt->mapbase);
err_clk_unprepare:
clk_unprepare(cmt->clk);
err_clk_put:
@@ -1135,7 +1044,6 @@ static int sh_cmt_remove(struct platform_device *pdev)
}
static const struct platform_device_id sh_cmt_id_table[] = {
- { "sh_cmt", 0 },
{ "sh-cmt-16", (kernel_ulong_t)&sh_cmt_info[SH_CMT_16BIT] },
{ "sh-cmt-32", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT] },
{ "sh-cmt-32-fast", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT_FAST] },
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 03/19] clocksource: sh_cmt: Replace global spinlock with a per-device spinlock
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 01/19] clocksource: sh_tmu: Fix channel IRQ retrieval in legacy case Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 02/19] clocksource: sh_cmt: Drop support for legacy platform data Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 04/19] clocksource: sh_tmu: Drop support for legacy platform data Laurent Pinchart
` (16 subsequent siblings)
19 siblings, 0 replies; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
The global spinlock is used to protect the shared start/stop register.
Now that all CMT channels are handled by a single device instance, use a
per-device spinlock.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
---
drivers/clocksource/sh_cmt.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
index ff1a059..4d00e4b 100644
--- a/drivers/clocksource/sh_cmt.c
+++ b/drivers/clocksource/sh_cmt.c
@@ -118,6 +118,8 @@ struct sh_cmt_device {
void __iomem *mapbase;
struct clk *clk;
+ raw_spinlock_t lock; /* Protect the shared start/stop register */
+
struct sh_cmt_channel *channels;
unsigned int num_channels;
@@ -299,14 +301,12 @@ static unsigned long sh_cmt_get_counter(struct sh_cmt_channel *ch,
return v2;
}
-static DEFINE_RAW_SPINLOCK(sh_cmt_lock);
-
static void sh_cmt_start_stop_ch(struct sh_cmt_channel *ch, int start)
{
unsigned long flags, value;
/* start stop register shared by multiple timer channels */
- raw_spin_lock_irqsave(&sh_cmt_lock, flags);
+ raw_spin_lock_irqsave(&ch->cmt->lock, flags);
value = sh_cmt_read_cmstr(ch);
if (start)
@@ -315,7 +315,7 @@ static void sh_cmt_start_stop_ch(struct sh_cmt_channel *ch, int start)
value &= ~(1 << ch->timer_bit);
sh_cmt_write_cmstr(ch, value);
- raw_spin_unlock_irqrestore(&sh_cmt_lock, flags);
+ raw_spin_unlock_irqrestore(&ch->cmt->lock, flags);
}
static int sh_cmt_enable(struct sh_cmt_channel *ch, unsigned long *rate)
@@ -934,6 +934,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
memset(cmt, 0, sizeof(*cmt));
cmt->pdev = pdev;
+ raw_spin_lock_init(&cmt->lock);
if (!cfg) {
dev_err(&cmt->pdev->dev, "missing platform data\n");
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 04/19] clocksource: sh_tmu: Drop support for legacy platform data
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
` (2 preceding siblings ...)
2014-06-16 15:07 ` [PATCH v4 03/19] clocksource: sh_cmt: Replace global spinlock with a per-device spinlock Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 05/19] clocksource: sh_tmu: Replace global spinlock with a per-device spinlock Laurent Pinchart
` (15 subsequent siblings)
19 siblings, 0 replies; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
Now that all platforms have switched to the new-style platform data,
drop support for the legacy version.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
---
drivers/clocksource/sh_tmu.c | 82 ++++++++------------------------------------
1 file changed, 15 insertions(+), 67 deletions(-)
diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
index ec34095..4363eb7 100644
--- a/drivers/clocksource/sh_tmu.c
+++ b/drivers/clocksource/sh_tmu.c
@@ -32,7 +32,6 @@
#include <linux/spinlock.h>
enum sh_tmu_model {
- SH_TMU_LEGACY,
SH_TMU,
SH_TMU_SH3,
};
@@ -91,8 +90,6 @@ static inline unsigned long sh_tmu_read(struct sh_tmu_channel *ch, int reg_nr)
if (reg_nr == TSTR) {
switch (ch->tmu->model) {
- case SH_TMU_LEGACY:
- return ioread8(ch->tmu->mapbase);
case SH_TMU_SH3:
return ioread8(ch->tmu->mapbase + 2);
case SH_TMU:
@@ -115,8 +112,6 @@ static inline void sh_tmu_write(struct sh_tmu_channel *ch, int reg_nr,
if (reg_nr == TSTR) {
switch (ch->tmu->model) {
- case SH_TMU_LEGACY:
- return iowrite8(value, ch->tmu->mapbase);
case SH_TMU_SH3:
return iowrite8(value, ch->tmu->mapbase + 2);
case SH_TMU:
@@ -476,27 +471,12 @@ static int sh_tmu_channel_setup(struct sh_tmu_channel *ch, unsigned int index,
return 0;
ch->tmu = tmu;
+ ch->index = index;
- if (tmu->model == SH_TMU_LEGACY) {
- struct sh_timer_config *cfg = tmu->pdev->dev.platform_data;
-
- /*
- * The SH3 variant (SH770x, SH7705, SH7710 and SH7720) maps
- * channel registers blocks at base + 2 + 12 * index, while all
- * other variants map them at base + 4 + 12 * index. We can
- * compute the index by just dividing by 12, the 2 bytes or 4
- * bytes offset being hidden by the integer division.
- */
- ch->index = cfg->channel_offset / 12;
- ch->base = tmu->mapbase + cfg->channel_offset;
- } else {
- ch->index = index;
-
- if (tmu->model == SH_TMU_SH3)
- ch->base = tmu->mapbase + 4 + ch->index * 12;
- else
- ch->base = tmu->mapbase + 8 + ch->index * 12;
- }
+ if (tmu->model == SH_TMU_SH3)
+ ch->base = tmu->mapbase + 4 + ch->index * 12;
+ else
+ ch->base = tmu->mapbase + 8 + ch->index * 12;
ch->irq = platform_get_irq(tmu->pdev, index);
if (ch->irq < 0) {
@@ -526,28 +506,9 @@ static int sh_tmu_map_memory(struct sh_tmu_device *tmu)
if (tmu->mapbase == NULL)
return -ENXIO;
- /*
- * In legacy platform device configuration (with one device per channel)
- * the resource points to the channel base address.
- */
- if (tmu->model == SH_TMU_LEGACY) {
- struct sh_timer_config *cfg = tmu->pdev->dev.platform_data;
- tmu->mapbase -= cfg->channel_offset;
- }
-
return 0;
}
-static void sh_tmu_unmap_memory(struct sh_tmu_device *tmu)
-{
- if (tmu->model == SH_TMU_LEGACY) {
- struct sh_timer_config *cfg = tmu->pdev->dev.platform_data;
- tmu->mapbase += cfg->channel_offset;
- }
-
- iounmap(tmu->mapbase);
-}
-
static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
{
struct sh_timer_config *cfg = pdev->dev.platform_data;
@@ -564,8 +525,7 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
tmu->model = id->driver_data;
/* Get hold of clock. */
- tmu->clk = clk_get(&tmu->pdev->dev,
- tmu->model == SH_TMU_LEGACY ? "tmu_fck" : "fck");
+ tmu->clk = clk_get(&tmu->pdev->dev, "fck");
if (IS_ERR(tmu->clk)) {
dev_err(&tmu->pdev->dev, "cannot get clock\n");
return PTR_ERR(tmu->clk);
@@ -583,10 +543,7 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
}
/* Allocate and setup the channels. */
- if (tmu->model == SH_TMU_LEGACY)
- tmu->num_channels = 1;
- else
- tmu->num_channels = hweight8(cfg->channels_mask);
+ tmu->num_channels = hweight8(cfg->channels_mask);
tmu->channels = kzalloc(sizeof(*tmu->channels) * tmu->num_channels,
GFP_KERNEL);
@@ -595,23 +552,15 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
goto err_unmap;
}
- if (tmu->model == SH_TMU_LEGACY) {
- ret = sh_tmu_channel_setup(&tmu->channels[0], 0,
- cfg->clockevent_rating != 0,
- cfg->clocksource_rating != 0, tmu);
+ /*
+ * Use the first channel as a clock event device and the second channel
+ * as a clock source.
+ */
+ for (i = 0; i < tmu->num_channels; ++i) {
+ ret = sh_tmu_channel_setup(&tmu->channels[i], i,
+ i == 0, i == 1, tmu);
if (ret < 0)
goto err_unmap;
- } else {
- /*
- * Use the first channel as a clock event device and the second
- * channel as a clock source.
- */
- for (i = 0; i < tmu->num_channels; ++i) {
- ret = sh_tmu_channel_setup(&tmu->channels[i], i,
- i == 0, i == 1, tmu);
- if (ret < 0)
- goto err_unmap;
- }
}
platform_set_drvdata(pdev, tmu);
@@ -620,7 +569,7 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
err_unmap:
kfree(tmu->channels);
- sh_tmu_unmap_memory(tmu);
+ iounmap(tmu->mapbase);
err_clk_unprepare:
clk_unprepare(tmu->clk);
err_clk_put:
@@ -673,7 +622,6 @@ static int sh_tmu_remove(struct platform_device *pdev)
}
static const struct platform_device_id sh_tmu_id_table[] = {
- { "sh_tmu", SH_TMU_LEGACY },
{ "sh-tmu", SH_TMU },
{ "sh-tmu-sh3", SH_TMU_SH3 },
{ }
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 05/19] clocksource: sh_tmu: Replace global spinlock with a per-device spinlock
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
` (3 preceding siblings ...)
2014-06-16 15:07 ` [PATCH v4 04/19] clocksource: sh_tmu: Drop support for legacy platform data Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 06/19] clocksource: sh_mtu2: Drop support for legacy platform data Laurent Pinchart
` (14 subsequent siblings)
19 siblings, 0 replies; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
The global spinlock is used to protect the shared start/stop register.
Now that all TMU channels are handled by a single device instance, use a
per-device spinlock.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
---
drivers/clocksource/sh_tmu.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
index 4363eb7..ef8fb0b 100644
--- a/drivers/clocksource/sh_tmu.c
+++ b/drivers/clocksource/sh_tmu.c
@@ -61,6 +61,8 @@ struct sh_tmu_device {
enum sh_tmu_model model;
+ raw_spinlock_t lock; /* Protect the shared start/stop register */
+
struct sh_tmu_channel *channels;
unsigned int num_channels;
@@ -68,8 +70,6 @@ struct sh_tmu_device {
bool has_clocksource;
};
-static DEFINE_RAW_SPINLOCK(sh_tmu_lock);
-
#define TSTR -1 /* shared register */
#define TCOR 0 /* channel register */
#define TCNT 1 /* channel register */
@@ -132,7 +132,7 @@ static void sh_tmu_start_stop_ch(struct sh_tmu_channel *ch, int start)
unsigned long flags, value;
/* start stop register shared by multiple timer channels */
- raw_spin_lock_irqsave(&sh_tmu_lock, flags);
+ raw_spin_lock_irqsave(&ch->tmu->lock, flags);
value = sh_tmu_read(ch, TSTR);
if (start)
@@ -141,7 +141,7 @@ static void sh_tmu_start_stop_ch(struct sh_tmu_channel *ch, int start)
value &= ~(1 << ch->index);
sh_tmu_write(ch, TSTR, value);
- raw_spin_unlock_irqrestore(&sh_tmu_lock, flags);
+ raw_spin_unlock_irqrestore(&ch->tmu->lock, flags);
}
static int __sh_tmu_enable(struct sh_tmu_channel *ch)
@@ -524,6 +524,8 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
tmu->pdev = pdev;
tmu->model = id->driver_data;
+ raw_spin_lock_init(&tmu->lock);
+
/* Get hold of clock. */
tmu->clk = clk_get(&tmu->pdev->dev, "fck");
if (IS_ERR(tmu->clk)) {
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 06/19] clocksource: sh_mtu2: Drop support for legacy platform data
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
` (4 preceding siblings ...)
2014-06-16 15:07 ` [PATCH v4 05/19] clocksource: sh_tmu: Replace global spinlock with a per-device spinlock Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 07/19] clocksource: sh_mtu2: Replace global spinlock with a per-device spinlock Laurent Pinchart
` (13 subsequent siblings)
19 siblings, 0 replies; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
Now that all platforms have switched to the new-style platform data,
drop support for the legacy version.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
---
drivers/clocksource/sh_mtu2.c | 130 ++++++++++--------------------------------
1 file changed, 31 insertions(+), 99 deletions(-)
diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
index f2c1c36..2931fea 100644
--- a/drivers/clocksource/sh_mtu2.c
+++ b/drivers/clocksource/sh_mtu2.c
@@ -37,7 +37,6 @@ struct sh_mtu2_channel {
unsigned int index;
void __iomem *base;
- int irq;
struct clock_event_device ced;
};
@@ -51,7 +50,6 @@ struct sh_mtu2_device {
struct sh_mtu2_channel *channels;
unsigned int num_channels;
- bool legacy;
bool has_clockevent;
};
@@ -162,12 +160,8 @@ static inline unsigned long sh_mtu2_read(struct sh_mtu2_channel *ch, int reg_nr)
{
unsigned long offs;
- if (reg_nr == TSTR) {
- if (ch->mtu->legacy)
- return ioread8(ch->mtu->mapbase);
- else
- return ioread8(ch->mtu->mapbase + 0x280);
- }
+ if (reg_nr == TSTR)
+ return ioread8(ch->mtu->mapbase + 0x280);
offs = mtu2_reg_offs[reg_nr];
@@ -182,12 +176,8 @@ static inline void sh_mtu2_write(struct sh_mtu2_channel *ch, int reg_nr,
{
unsigned long offs;
- if (reg_nr == TSTR) {
- if (ch->mtu->legacy)
- return iowrite8(value, ch->mtu->mapbase);
- else
- return iowrite8(value, ch->mtu->mapbase + 0x280);
- }
+ if (reg_nr == TSTR)
+ return iowrite8(value, ch->mtu->mapbase + 0x280);
offs = mtu2_reg_offs[reg_nr];
@@ -331,7 +321,6 @@ static void sh_mtu2_register_clockevent(struct sh_mtu2_channel *ch,
const char *name)
{
struct clock_event_device *ced = &ch->ced;
- int ret;
ced->name = name;
ced->features = CLOCK_EVT_FEAT_PERIODIC;
@@ -344,24 +333,12 @@ static void sh_mtu2_register_clockevent(struct sh_mtu2_channel *ch,
dev_info(&ch->mtu->pdev->dev, "ch%u: used for clock events\n",
ch->index);
clockevents_register_device(ced);
-
- ret = request_irq(ch->irq, sh_mtu2_interrupt,
- IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
- dev_name(&ch->mtu->pdev->dev), ch);
- if (ret) {
- dev_err(&ch->mtu->pdev->dev, "ch%u: failed to request irq %d\n",
- ch->index, ch->irq);
- return;
- }
}
-static int sh_mtu2_register(struct sh_mtu2_channel *ch, const char *name,
- bool clockevent)
+static int sh_mtu2_register(struct sh_mtu2_channel *ch, const char *name)
{
- if (clockevent) {
- ch->mtu->has_clockevent = true;
- sh_mtu2_register_clockevent(ch, name);
- }
+ ch->mtu->has_clockevent = true;
+ sh_mtu2_register_clockevent(ch, name);
return 0;
}
@@ -372,40 +349,32 @@ static int sh_mtu2_setup_channel(struct sh_mtu2_channel *ch, unsigned int index,
static const unsigned int channel_offsets[] = {
0x300, 0x380, 0x000,
};
- bool clockevent;
+ char name[6];
+ int irq;
+ int ret;
ch->mtu = mtu;
- if (mtu->legacy) {
- struct sh_timer_config *cfg = mtu->pdev->dev.platform_data;
-
- clockevent = cfg->clockevent_rating != 0;
-
- ch->irq = platform_get_irq(mtu->pdev, 0);
- ch->base = mtu->mapbase - cfg->channel_offset;
- ch->index = cfg->timer_bit;
- } else {
- char name[6];
-
- clockevent = true;
-
- sprintf(name, "tgi%ua", index);
- ch->irq = platform_get_irq_byname(mtu->pdev, name);
- ch->base = mtu->mapbase + channel_offsets[index];
- ch->index = index;
- }
-
- if (ch->irq < 0) {
+ sprintf(name, "tgi%ua", index);
+ irq = platform_get_irq_byname(mtu->pdev, name);
+ if (irq < 0) {
/* Skip channels with no declared interrupt. */
- if (!mtu->legacy)
- return 0;
+ return 0;
+ }
- dev_err(&mtu->pdev->dev, "ch%u: failed to get irq\n",
- ch->index);
- return ch->irq;
+ ret = request_irq(irq, sh_mtu2_interrupt,
+ IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
+ dev_name(&ch->mtu->pdev->dev), ch);
+ if (ret) {
+ dev_err(&ch->mtu->pdev->dev, "ch%u: failed to request irq %d\n",
+ index, irq);
+ return ret;
}
- return sh_mtu2_register(ch, dev_name(&mtu->pdev->dev), clockevent);
+ ch->base = mtu->mapbase + channel_offsets[index];
+ ch->index = index;
+
+ return sh_mtu2_register(ch, dev_name(&mtu->pdev->dev));
}
static int sh_mtu2_map_memory(struct sh_mtu2_device *mtu)
@@ -422,46 +391,19 @@ static int sh_mtu2_map_memory(struct sh_mtu2_device *mtu)
if (mtu->mapbase == NULL)
return -ENXIO;
- /*
- * In legacy platform device configuration (with one device per channel)
- * the resource points to the channel base address.
- */
- if (mtu->legacy) {
- struct sh_timer_config *cfg = mtu->pdev->dev.platform_data;
- mtu->mapbase += cfg->channel_offset;
- }
-
return 0;
}
-static void sh_mtu2_unmap_memory(struct sh_mtu2_device *mtu)
-{
- if (mtu->legacy) {
- struct sh_timer_config *cfg = mtu->pdev->dev.platform_data;
- mtu->mapbase -= cfg->channel_offset;
- }
-
- iounmap(mtu->mapbase);
-}
-
static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
struct platform_device *pdev)
{
- struct sh_timer_config *cfg = pdev->dev.platform_data;
- const struct platform_device_id *id = pdev->id_entry;
unsigned int i;
int ret;
mtu->pdev = pdev;
- mtu->legacy = id->driver_data;
-
- if (mtu->legacy && !cfg) {
- dev_err(&mtu->pdev->dev, "missing platform data\n");
- return -ENXIO;
- }
/* Get hold of clock. */
- mtu->clk = clk_get(&mtu->pdev->dev, mtu->legacy ? "mtu2_fck" : "fck");
+ mtu->clk = clk_get(&mtu->pdev->dev, "fck");
if (IS_ERR(mtu->clk)) {
dev_err(&mtu->pdev->dev, "cannot get clock\n");
return PTR_ERR(mtu->clk);
@@ -479,10 +421,7 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
}
/* Allocate and setup the channels. */
- if (mtu->legacy)
- mtu->num_channels = 1;
- else
- mtu->num_channels = 3;
+ mtu->num_channels = 3;
mtu->channels = kzalloc(sizeof(*mtu->channels) * mtu->num_channels,
GFP_KERNEL);
@@ -491,16 +430,10 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
goto err_unmap;
}
- if (mtu->legacy) {
- ret = sh_mtu2_setup_channel(&mtu->channels[0], 0, mtu);
+ for (i = 0; i < mtu->num_channels; ++i) {
+ ret = sh_mtu2_setup_channel(&mtu->channels[i], i, mtu);
if (ret < 0)
goto err_unmap;
- } else {
- for (i = 0; i < mtu->num_channels; ++i) {
- ret = sh_mtu2_setup_channel(&mtu->channels[i], i, mtu);
- if (ret < 0)
- goto err_unmap;
- }
}
platform_set_drvdata(pdev, mtu);
@@ -509,7 +442,7 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
err_unmap:
kfree(mtu->channels);
- sh_mtu2_unmap_memory(mtu);
+ iounmap(mtu->mapbase);
err_clk_unprepare:
clk_unprepare(mtu->clk);
err_clk_put:
@@ -562,7 +495,6 @@ static int sh_mtu2_remove(struct platform_device *pdev)
}
static const struct platform_device_id sh_mtu2_id_table[] = {
- { "sh_mtu2", 1 },
{ "sh-mtu2", 0 },
{ },
};
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 07/19] clocksource: sh_mtu2: Replace global spinlock with a per-device spinlock
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
` (5 preceding siblings ...)
2014-06-16 15:07 ` [PATCH v4 06/19] clocksource: sh_mtu2: Drop support for legacy platform data Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 08/19] clocksource: shmobile: Remove unused sh_timer_config members Laurent Pinchart
` (12 subsequent siblings)
19 siblings, 0 replies; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
The global spinlock is used to protect the shared start/stop register.
Now that all MTU2 channels are handled by a single device instance, use
a per-device spinlock.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
---
drivers/clocksource/sh_mtu2.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
index 2931fea..ebdf9d1 100644
--- a/drivers/clocksource/sh_mtu2.c
+++ b/drivers/clocksource/sh_mtu2.c
@@ -47,14 +47,14 @@ struct sh_mtu2_device {
void __iomem *mapbase;
struct clk *clk;
+ raw_spinlock_t lock; /* Protect the shared registers */
+
struct sh_mtu2_channel *channels;
unsigned int num_channels;
bool has_clockevent;
};
-static DEFINE_RAW_SPINLOCK(sh_mtu2_lock);
-
#define TSTR -1 /* shared register */
#define TCR 0 /* channel register */
#define TMDR 1 /* channel register */
@@ -192,7 +192,7 @@ static void sh_mtu2_start_stop_ch(struct sh_mtu2_channel *ch, int start)
unsigned long flags, value;
/* start stop register shared by multiple timer channels */
- raw_spin_lock_irqsave(&sh_mtu2_lock, flags);
+ raw_spin_lock_irqsave(&ch->mtu->lock, flags);
value = sh_mtu2_read(ch, TSTR);
if (start)
@@ -201,7 +201,7 @@ static void sh_mtu2_start_stop_ch(struct sh_mtu2_channel *ch, int start)
value &= ~(1 << ch->index);
sh_mtu2_write(ch, TSTR, value);
- raw_spin_unlock_irqrestore(&sh_mtu2_lock, flags);
+ raw_spin_unlock_irqrestore(&ch->mtu->lock, flags);
}
static int sh_mtu2_enable(struct sh_mtu2_channel *ch)
@@ -402,6 +402,8 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
mtu->pdev = pdev;
+ raw_spin_lock_init(&mtu->lock);
+
/* Get hold of clock. */
mtu->clk = clk_get(&mtu->pdev->dev, "fck");
if (IS_ERR(mtu->clk)) {
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 08/19] clocksource: shmobile: Remove unused sh_timer_config members
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
` (6 preceding siblings ...)
2014-06-16 15:07 ` [PATCH v4 07/19] clocksource: sh_mtu2: Replace global spinlock with a per-device spinlock Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 09/19] clocksource: sh_cmt: Add DT support Laurent Pinchart
` (11 subsequent siblings)
19 siblings, 0 replies; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
The name, channel_offset, timer_bit, clockevent_rating and
clocksource_rating members are unused. Remove them.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
---
include/linux/sh_timer.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/include/linux/sh_timer.h b/include/linux/sh_timer.h
index 8e1e036..64638b0 100644
--- a/include/linux/sh_timer.h
+++ b/include/linux/sh_timer.h
@@ -2,11 +2,6 @@
#define __SH_TIMER_H__
struct sh_timer_config {
- char *name;
- long channel_offset;
- int timer_bit;
- unsigned long clockevent_rating;
- unsigned long clocksource_rating;
unsigned int channels_mask;
};
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 09/19] clocksource: sh_cmt: Add DT support
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
` (7 preceding siblings ...)
2014-06-16 15:07 ` [PATCH v4 08/19] clocksource: shmobile: Remove unused sh_timer_config members Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-07-04 13:15 ` Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 10/19] clocksource: sh_tmu: " Laurent Pinchart
` (10 subsequent siblings)
19 siblings, 1 reply; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
Document DT bindings and parse them in the CMT driver.
Cc: devicetree at vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
---
.../devicetree/bindings/timer/renesas,cmt.txt | 47 +++++++++++++++
drivers/clocksource/sh_cmt.c | 66 ++++++++++++++++------
2 files changed, 95 insertions(+), 18 deletions(-)
create mode 100644 Documentation/devicetree/bindings/timer/renesas,cmt.txt
diff --git a/Documentation/devicetree/bindings/timer/renesas,cmt.txt b/Documentation/devicetree/bindings/timer/renesas,cmt.txt
new file mode 100644
index 0000000..643cfff
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/renesas,cmt.txt
@@ -0,0 +1,47 @@
+* Renesas R-Car Compare Match Timer (CMT)
+
+The CMT is a multi-channel 16/32/48-bit timer/counter with configurable clock
+inputs and programmable compare match.
+
+Channels share hardware resources but their counter and compare match value
+are independent. A particular CMT instance can implement only a subset of the
+channels supported by the CMT model. Channel indices represent the hardware
+position of the channel in the CMT and don't match the channel numbers in the
+datasheets.
+
+Required Properties:
+
+ - compatible: must contain one of the following.
+ - "renesas,cmt-32" for the 32-bit CMT
+ (CMT0 on sh7372, sh73a0 and r8a7740)
+ - "renesas,cmt-32-fast" for the 32-bit CMT with fast clock support
+ (CMT[234] on sh7372, sh73a0 and r8a7740)
+ - "renasas,cmt-48" for the 48-bit CMT
+ (CMT1 on sh7372, sh73a0 and r8a7740)
+ - "renesas,cmt-48-gen2" for the second generation 48-bit CMT
+ (CMT[01] on r8a73a4, r8a7790 and r8a7791)
+
+ - reg: base address and length of the registers block for the timer module.
+ - interrupts: interrupt-specifier for the timer, one per channel.
+ - clocks: a list of phandle + clock-specifier pairs, one for each entry
+ in clock-names.
+ - clock-names: must contain "fck" for the functional clock.
+
+ - renesas,channels-mask: bitmask of the available channels.
+
+
+Example: R8A7790 (R-Car H2) CMT0 node
+
+ CMT0 on R8A7790 implements hardware channels 5 and 6 only and names
+ them channels 0 and 1 in the documentation.
+
+ cmt0: timer at ffca0000 {
+ compatible = "renesas,cmt-48-gen2";
+ reg = <0 0xffca0000 0 0x1004>;
+ interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>,
+ <0 142 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp1_clks R8A7790_CLK_CMT0>;
+ clock-names = "fck";
+
+ renesas,channels-mask = <0x60>;
+ };
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
index 4d00e4b..09a93c4 100644
--- a/drivers/clocksource/sh_cmt.c
+++ b/drivers/clocksource/sh_cmt.c
@@ -24,6 +24,7 @@
#include <linux/ioport.h>
#include <linux/irq.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>
@@ -122,6 +123,7 @@ struct sh_cmt_device {
struct sh_cmt_channel *channels;
unsigned int num_channels;
+ unsigned int hw_channels;
bool has_clockevent;
bool has_clocksource;
@@ -924,10 +926,35 @@ static int sh_cmt_map_memory(struct sh_cmt_device *cmt)
return 0;
}
+static const struct platform_device_id sh_cmt_id_table[] = {
+ { "sh-cmt-16", (kernel_ulong_t)&sh_cmt_info[SH_CMT_16BIT] },
+ { "sh-cmt-32", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT] },
+ { "sh-cmt-32-fast", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT_FAST] },
+ { "sh-cmt-48", (kernel_ulong_t)&sh_cmt_info[SH_CMT_48BIT] },
+ { "sh-cmt-48-gen2", (kernel_ulong_t)&sh_cmt_info[SH_CMT_48BIT_GEN2] },
+ { }
+};
+MODULE_DEVICE_TABLE(platform, sh_cmt_id_table);
+
+static const struct of_device_id sh_cmt_of_table[] __maybe_unused = {
+ { .compatible = "renesas,cmt-32", .data = &sh_cmt_info[SH_CMT_32BIT] },
+ { .compatible = "renesas,cmt-32-fast", .data = &sh_cmt_info[SH_CMT_32BIT_FAST] },
+ { .compatible = "renasas,cmt-48", .data = &sh_cmt_info[SH_CMT_48BIT] },
+ { .compatible = "renesas,cmt-48-gen2", .data = &sh_cmt_info[SH_CMT_48BIT_GEN2] },
+ { }
+};
+MODULE_DEVICE_TABLE(of, sh_cmt_of_table);
+
+static int sh_cmt_parse_dt(struct sh_cmt_device *cmt)
+{
+ struct device_node *np = cmt->pdev->dev.of_node;
+
+ return of_property_read_u32(np, "renesas,channels-mask",
+ &cmt->hw_channels);
+}
+
static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
{
- struct sh_timer_config *cfg = pdev->dev.platform_data;
- const struct platform_device_id *id = pdev->id_entry;
unsigned int mask;
unsigned int i;
int ret;
@@ -936,13 +963,26 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
cmt->pdev = pdev;
raw_spin_lock_init(&cmt->lock);
- if (!cfg) {
+ if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) {
+ const struct of_device_id *id;
+
+ id = of_match_node(sh_cmt_of_table, pdev->dev.of_node);
+ cmt->info = id->data;
+
+ ret = sh_cmt_parse_dt(cmt);
+ if (ret < 0)
+ return ret;
+ } else if (pdev->dev.platform_data) {
+ struct sh_timer_config *cfg = pdev->dev.platform_data;
+ const struct platform_device_id *id = pdev->id_entry;
+
+ cmt->info = (const struct sh_cmt_info *)id->driver_data;
+ cmt->hw_channels = cfg->channels_mask;
+ } else {
dev_err(&cmt->pdev->dev, "missing platform data\n");
return -ENXIO;
}
- cmt->info = (const struct sh_cmt_info *)id->driver_data;
-
/* Get hold of clock. */
cmt->clk = clk_get(&cmt->pdev->dev, "fck");
if (IS_ERR(cmt->clk)) {
@@ -960,8 +1000,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
goto err_clk_unprepare;
/* Allocate and setup the channels. */
- cmt->num_channels = hweight8(cfg->channels_mask);
-
+ cmt->num_channels = hweight8(cmt->hw_channels);
cmt->channels = kzalloc(cmt->num_channels * sizeof(*cmt->channels),
GFP_KERNEL);
if (cmt->channels == NULL) {
@@ -973,7 +1012,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
* Use the first channel as a clock event device and the second channel
* as a clock source. If only one channel is available use it for both.
*/
- for (i = 0, mask = cfg->channels_mask; i < cmt->num_channels; ++i) {
+ for (i = 0, mask = cmt->hw_channels; i < cmt->num_channels; ++i) {
unsigned int hwidx = ffs(mask) - 1;
bool clocksource = i == 1 || cmt->num_channels == 1;
bool clockevent = i == 0;
@@ -1044,21 +1083,12 @@ static int sh_cmt_remove(struct platform_device *pdev)
return -EBUSY; /* cannot unregister clockevent and clocksource */
}
-static const struct platform_device_id sh_cmt_id_table[] = {
- { "sh-cmt-16", (kernel_ulong_t)&sh_cmt_info[SH_CMT_16BIT] },
- { "sh-cmt-32", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT] },
- { "sh-cmt-32-fast", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT_FAST] },
- { "sh-cmt-48", (kernel_ulong_t)&sh_cmt_info[SH_CMT_48BIT] },
- { "sh-cmt-48-gen2", (kernel_ulong_t)&sh_cmt_info[SH_CMT_48BIT_GEN2] },
- { }
-};
-MODULE_DEVICE_TABLE(platform, sh_cmt_id_table);
-
static struct platform_driver sh_cmt_device_driver = {
.probe = sh_cmt_probe,
.remove = sh_cmt_remove,
.driver = {
.name = "sh_cmt",
+ .of_match_table = of_match_ptr(sh_cmt_of_table),
},
.id_table = sh_cmt_id_table,
};
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 09/19] clocksource: sh_cmt: Add DT support
2014-06-16 15:07 ` [PATCH v4 09/19] clocksource: sh_cmt: Add DT support Laurent Pinchart
@ 2014-07-04 13:15 ` Laurent Pinchart
0 siblings, 0 replies; 35+ messages in thread
From: Laurent Pinchart @ 2014-07-04 13:15 UTC (permalink / raw)
To: linux-arm-kernel
On Monday 16 June 2014 17:07:21 Laurent Pinchart wrote:
> Document DT bindings and parse them in the CMT driver.
>
> Cc: devicetree at vger.kernel.org
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Tested-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> .../devicetree/bindings/timer/renesas,cmt.txt | 47 +++++++++++++++
> drivers/clocksource/sh_cmt.c | 66 +++++++++++++------
> 2 files changed, 95 insertions(+), 18 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/timer/renesas,cmt.txt
>
> diff --git a/Documentation/devicetree/bindings/timer/renesas,cmt.txt
> b/Documentation/devicetree/bindings/timer/renesas,cmt.txt new file mode
> 100644
> index 0000000..643cfff
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/timer/renesas,cmt.txt
> @@ -0,0 +1,47 @@
> +* Renesas R-Car Compare Match Timer (CMT)
> +
> +The CMT is a multi-channel 16/32/48-bit timer/counter with configurable
> clock
> +inputs and programmable compare match.
> +
> +Channels share hardware resources but their counter and compare match value
> +are independent. A particular CMT instance can implement only a subset of
> the
> +channels supported by the CMT model. Channel indices represent the hardware
> +position of the channel in the CMT and don't match the channel numbers in
> the
> +datasheets.
> +
> +Required Properties:
> +
> + - compatible: must contain one of the following.
> + - "renesas,cmt-32" for the 32-bit CMT
> + (CMT0 on sh7372, sh73a0 and r8a7740)
> + - "renesas,cmt-32-fast" for the 32-bit CMT with fast clock support
> + (CMT[234] on sh7372, sh73a0 and r8a7740)
> + - "renasas,cmt-48" for the 48-bit CMT
Simon has spotted a nasty typo here and below in the OF match table. I'll fix
that and resubmit the pull request.
> + (CMT1 on sh7372, sh73a0 and r8a7740)
> + - "renesas,cmt-48-gen2" for the second generation 48-bit CMT
> + (CMT[01] on r8a73a4, r8a7790 and r8a7791)
> +
> + - reg: base address and length of the registers block for the timer
> module.
> + - interrupts: interrupt-specifier for the timer, one per channel.
> + - clocks: a list of phandle + clock-specifier pairs, one for each entry
> + in clock-names.
> + - clock-names: must contain "fck" for the functional clock.
> +
> + - renesas,channels-mask: bitmask of the available channels.
> +
> +
> +Example: R8A7790 (R-Car H2) CMT0 node
> +
> + CMT0 on R8A7790 implements hardware channels 5 and 6 only and names
> + them channels 0 and 1 in the documentation.
> +
> + cmt0: timer at ffca0000 {
> + compatible = "renesas,cmt-48-gen2";
> + reg = <0 0xffca0000 0 0x1004>;
> + interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>,
> + <0 142 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&mstp1_clks R8A7790_CLK_CMT0>;
> + clock-names = "fck";
> +
> + renesas,channels-mask = <0x60>;
> + };
> diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
> index 4d00e4b..09a93c4 100644
> --- a/drivers/clocksource/sh_cmt.c
> +++ b/drivers/clocksource/sh_cmt.c
> @@ -24,6 +24,7 @@
> #include <linux/ioport.h>
> #include <linux/irq.h>
> #include <linux/module.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/pm_domain.h>
> #include <linux/pm_runtime.h>
> @@ -122,6 +123,7 @@ struct sh_cmt_device {
>
> struct sh_cmt_channel *channels;
> unsigned int num_channels;
> + unsigned int hw_channels;
>
> bool has_clockevent;
> bool has_clocksource;
> @@ -924,10 +926,35 @@ static int sh_cmt_map_memory(struct sh_cmt_device
> *cmt) return 0;
> }
>
> +static const struct platform_device_id sh_cmt_id_table[] = {
> + { "sh-cmt-16", (kernel_ulong_t)&sh_cmt_info[SH_CMT_16BIT] },
> + { "sh-cmt-32", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT] },
> + { "sh-cmt-32-fast", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT_FAST] },
> + { "sh-cmt-48", (kernel_ulong_t)&sh_cmt_info[SH_CMT_48BIT] },
> + { "sh-cmt-48-gen2", (kernel_ulong_t)&sh_cmt_info[SH_CMT_48BIT_GEN2] },
> + { }
> +};
> +MODULE_DEVICE_TABLE(platform, sh_cmt_id_table);
> +
> +static const struct of_device_id sh_cmt_of_table[] __maybe_unused = {
> + { .compatible = "renesas,cmt-32", .data = &sh_cmt_info[SH_CMT_32BIT] },
> + { .compatible = "renesas,cmt-32-fast", .data =
> &sh_cmt_info[SH_CMT_32BIT_FAST] }, + { .compatible = "renasas,cmt-48",
> .data = &sh_cmt_info[SH_CMT_48BIT] }, + { .compatible =
> "renesas,cmt-48-gen2", .data = &sh_cmt_info[SH_CMT_48BIT_GEN2] }, + { }
> +};
> +MODULE_DEVICE_TABLE(of, sh_cmt_of_table);
> +
> +static int sh_cmt_parse_dt(struct sh_cmt_device *cmt)
> +{
> + struct device_node *np = cmt->pdev->dev.of_node;
> +
> + return of_property_read_u32(np, "renesas,channels-mask",
> + &cmt->hw_channels);
> +}
> +
> static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device
> *pdev) {
> - struct sh_timer_config *cfg = pdev->dev.platform_data;
> - const struct platform_device_id *id = pdev->id_entry;
> unsigned int mask;
> unsigned int i;
> int ret;
> @@ -936,13 +963,26 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt,
> struct platform_device *pdev) cmt->pdev = pdev;
> raw_spin_lock_init(&cmt->lock);
>
> - if (!cfg) {
> + if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) {
> + const struct of_device_id *id;
> +
> + id = of_match_node(sh_cmt_of_table, pdev->dev.of_node);
> + cmt->info = id->data;
> +
> + ret = sh_cmt_parse_dt(cmt);
> + if (ret < 0)
> + return ret;
> + } else if (pdev->dev.platform_data) {
> + struct sh_timer_config *cfg = pdev->dev.platform_data;
> + const struct platform_device_id *id = pdev->id_entry;
> +
> + cmt->info = (const struct sh_cmt_info *)id->driver_data;
> + cmt->hw_channels = cfg->channels_mask;
> + } else {
> dev_err(&cmt->pdev->dev, "missing platform data\n");
> return -ENXIO;
> }
>
> - cmt->info = (const struct sh_cmt_info *)id->driver_data;
> -
> /* Get hold of clock. */
> cmt->clk = clk_get(&cmt->pdev->dev, "fck");
> if (IS_ERR(cmt->clk)) {
> @@ -960,8 +1000,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt,
> struct platform_device *pdev) goto err_clk_unprepare;
>
> /* Allocate and setup the channels. */
> - cmt->num_channels = hweight8(cfg->channels_mask);
> -
> + cmt->num_channels = hweight8(cmt->hw_channels);
> cmt->channels = kzalloc(cmt->num_channels * sizeof(*cmt->channels),
> GFP_KERNEL);
> if (cmt->channels == NULL) {
> @@ -973,7 +1012,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt,
> struct platform_device *pdev) * Use the first channel as a clock event
> device and the second channel * as a clock source. If only one channel is
> available use it for both. */
> - for (i = 0, mask = cfg->channels_mask; i < cmt->num_channels; ++i) {
> + for (i = 0, mask = cmt->hw_channels; i < cmt->num_channels; ++i) {
> unsigned int hwidx = ffs(mask) - 1;
> bool clocksource = i == 1 || cmt->num_channels == 1;
> bool clockevent = i == 0;
> @@ -1044,21 +1083,12 @@ static int sh_cmt_remove(struct platform_device
> *pdev) return -EBUSY; /* cannot unregister clockevent and clocksource */ }
>
> -static const struct platform_device_id sh_cmt_id_table[] = {
> - { "sh-cmt-16", (kernel_ulong_t)&sh_cmt_info[SH_CMT_16BIT] },
> - { "sh-cmt-32", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT] },
> - { "sh-cmt-32-fast", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT_FAST] },
> - { "sh-cmt-48", (kernel_ulong_t)&sh_cmt_info[SH_CMT_48BIT] },
> - { "sh-cmt-48-gen2", (kernel_ulong_t)&sh_cmt_info[SH_CMT_48BIT_GEN2] },
> - { }
> -};
> -MODULE_DEVICE_TABLE(platform, sh_cmt_id_table);
> -
> static struct platform_driver sh_cmt_device_driver = {
> .probe = sh_cmt_probe,
> .remove = sh_cmt_remove,
> .driver = {
> .name = "sh_cmt",
> + .of_match_table = of_match_ptr(sh_cmt_of_table),
> },
> .id_table = sh_cmt_id_table,
> };
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH v4 10/19] clocksource: sh_tmu: Add DT support
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
` (8 preceding siblings ...)
2014-06-16 15:07 ` [PATCH v4 09/19] clocksource: sh_cmt: Add DT support Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-06-17 1:11 ` Simon Horman
2014-06-16 15:07 ` [PATCH v4 11/19] clocksource: sh_mtu2: " Laurent Pinchart
` (9 subsequent siblings)
19 siblings, 1 reply; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
Document DT bindings and parse them in the TMU driver.
Cc: devicetree at vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
.../devicetree/bindings/timer/renesas,tmu.txt | 39 +++++++++++++++++
drivers/clocksource/sh_tmu.c | 51 +++++++++++++++++-----
2 files changed, 80 insertions(+), 10 deletions(-)
create mode 100644 Documentation/devicetree/bindings/timer/renesas,tmu.txt
diff --git a/Documentation/devicetree/bindings/timer/renesas,tmu.txt b/Documentation/devicetree/bindings/timer/renesas,tmu.txt
new file mode 100644
index 0000000..425d0c5
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/renesas,tmu.txt
@@ -0,0 +1,39 @@
+* Renesas R-Car Timer Unit (TMU)
+
+The TMU is a 32-bit timer/counter with configurable clock inputs and
+programmable compare match.
+
+Channels share hardware resources but their counter and compare match value
+are independent. The TMU hardware supports up to three channels.
+
+Required Properties:
+
+ - compatible: must contain "renesas,tmu"
+
+ - reg: base address and length of the registers block for the timer module.
+
+ - interrupts: interrupt-specifier for the timer, one per channel.
+
+ - clocks: a list of phandle + clock-specifier pairs, one for each entry
+ in clock-names.
+ - clock-names: must contain "fck" for the functional clock.
+
+Optional Properties:
+
+ - #renesas,channels: number of channels implemented by the timer, must be 2
+ or 3 (if not specified the value defaults to 3).
+
+
+Example: R8A7779 (R-Car H1) TMU0 node
+
+ tmu0: timer at ffd80000 {
+ compatible = "renesas,tmu";
+ reg = <0xffd80000 0x30>;
+ interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>,
+ <0 33 IRQ_TYPE_LEVEL_HIGH>,
+ <0 34 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp0_clks R8A7779_CLK_TMU0>;
+ clock-names = "fck";
+
+ #renesas,channels = <3>;
+ };
diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
index ef8fb0b..ed61ed2 100644
--- a/drivers/clocksource/sh_tmu.c
+++ b/drivers/clocksource/sh_tmu.c
@@ -24,6 +24,7 @@
#include <linux/ioport.h>
#include <linux/irq.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>
@@ -509,23 +510,48 @@ static int sh_tmu_map_memory(struct sh_tmu_device *tmu)
return 0;
}
+static int sh_tmu_parse_dt(struct sh_tmu_device *tmu)
+{
+ struct device_node *np = tmu->pdev->dev.of_node;
+
+ tmu->model = SH_TMU;
+ tmu->num_channels = 3;
+
+ of_property_read_u32(np, "#renesas,channels", &tmu->num_channels);
+
+ if (tmu->num_channels != 2 && tmu->num_channels != 3) {
+ dev_err(&tmu->pdev->dev, "invalid number of channels %u\n",
+ tmu->num_channels);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
{
- struct sh_timer_config *cfg = pdev->dev.platform_data;
- const struct platform_device_id *id = pdev->id_entry;
unsigned int i;
int ret;
- if (!cfg) {
- dev_err(&tmu->pdev->dev, "missing platform data\n");
- return -ENXIO;
- }
-
tmu->pdev = pdev;
- tmu->model = id->driver_data;
raw_spin_lock_init(&tmu->lock);
+ if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) {
+ ret = sh_tmu_parse_dt(tmu);
+ if (ret < 0)
+ return ret;
+ } else if (pdev->dev.platform_data) {
+ const struct platform_device_id *id = pdev->id_entry;
+ struct sh_timer_config *cfg = pdev->dev.platform_data;
+
+ tmu->model = id->driver_data;
+ tmu->num_channels = hweight8(cfg->channels_mask);
+ } else {
+ dev_err(&tmu->pdev->dev, "missing platform data\n");
+ return -ENXIO;
+ }
+
/* Get hold of clock. */
tmu->clk = clk_get(&tmu->pdev->dev, "fck");
if (IS_ERR(tmu->clk)) {
@@ -545,8 +571,6 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
}
/* Allocate and setup the channels. */
- tmu->num_channels = hweight8(cfg->channels_mask);
-
tmu->channels = kzalloc(sizeof(*tmu->channels) * tmu->num_channels,
GFP_KERNEL);
if (tmu->channels == NULL) {
@@ -630,11 +654,18 @@ static const struct platform_device_id sh_tmu_id_table[] = {
};
MODULE_DEVICE_TABLE(platform, sh_tmu_id_table);
+static const struct of_device_id sh_tmu_of_table[] __maybe_unused = {
+ { .compatible = "renesas,tmu" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, sh_tmu_of_table);
+
static struct platform_driver sh_tmu_device_driver = {
.probe = sh_tmu_probe,
.remove = sh_tmu_remove,
.driver = {
.name = "sh_tmu",
+ .of_match_table = of_match_ptr(sh_tmu_of_table),
},
.id_table = sh_tmu_id_table,
};
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 10/19] clocksource: sh_tmu: Add DT support
2014-06-16 15:07 ` [PATCH v4 10/19] clocksource: sh_tmu: " Laurent Pinchart
@ 2014-06-17 1:11 ` Simon Horman
0 siblings, 0 replies; 35+ messages in thread
From: Simon Horman @ 2014-06-17 1:11 UTC (permalink / raw)
To: linux-arm-kernel
Hi Laurent,
This version looks good to me.
On Mon, Jun 16, 2014 at 05:07:22PM +0200, Laurent Pinchart wrote:
> Document DT bindings and parse them in the TMU driver.
>
> Cc: devicetree at vger.kernel.org
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> .../devicetree/bindings/timer/renesas,tmu.txt | 39 +++++++++++++++++
> drivers/clocksource/sh_tmu.c | 51 +++++++++++++++++-----
> 2 files changed, 80 insertions(+), 10 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/timer/renesas,tmu.txt
>
> diff --git a/Documentation/devicetree/bindings/timer/renesas,tmu.txt b/Documentation/devicetree/bindings/timer/renesas,tmu.txt
> new file mode 100644
> index 0000000..425d0c5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/timer/renesas,tmu.txt
> @@ -0,0 +1,39 @@
> +* Renesas R-Car Timer Unit (TMU)
> +
> +The TMU is a 32-bit timer/counter with configurable clock inputs and
> +programmable compare match.
> +
> +Channels share hardware resources but their counter and compare match value
> +are independent. The TMU hardware supports up to three channels.
> +
> +Required Properties:
> +
> + - compatible: must contain "renesas,tmu"
> +
> + - reg: base address and length of the registers block for the timer module.
> +
> + - interrupts: interrupt-specifier for the timer, one per channel.
> +
> + - clocks: a list of phandle + clock-specifier pairs, one for each entry
> + in clock-names.
> + - clock-names: must contain "fck" for the functional clock.
> +
> +Optional Properties:
> +
> + - #renesas,channels: number of channels implemented by the timer, must be 2
> + or 3 (if not specified the value defaults to 3).
> +
> +
> +Example: R8A7779 (R-Car H1) TMU0 node
> +
> + tmu0: timer at ffd80000 {
> + compatible = "renesas,tmu";
> + reg = <0xffd80000 0x30>;
> + interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>,
> + <0 33 IRQ_TYPE_LEVEL_HIGH>,
> + <0 34 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&mstp0_clks R8A7779_CLK_TMU0>;
> + clock-names = "fck";
> +
> + #renesas,channels = <3>;
> + };
> diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
> index ef8fb0b..ed61ed2 100644
> --- a/drivers/clocksource/sh_tmu.c
> +++ b/drivers/clocksource/sh_tmu.c
> @@ -24,6 +24,7 @@
> #include <linux/ioport.h>
> #include <linux/irq.h>
> #include <linux/module.h>
> +#include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/pm_domain.h>
> #include <linux/pm_runtime.h>
> @@ -509,23 +510,48 @@ static int sh_tmu_map_memory(struct sh_tmu_device *tmu)
> return 0;
> }
>
> +static int sh_tmu_parse_dt(struct sh_tmu_device *tmu)
> +{
> + struct device_node *np = tmu->pdev->dev.of_node;
> +
> + tmu->model = SH_TMU;
> + tmu->num_channels = 3;
> +
> + of_property_read_u32(np, "#renesas,channels", &tmu->num_channels);
> +
> + if (tmu->num_channels != 2 && tmu->num_channels != 3) {
> + dev_err(&tmu->pdev->dev, "invalid number of channels %u\n",
> + tmu->num_channels);
> + return -EINVAL;
> + }
> +
> + return 0;
> +}
> +
> static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
> {
> - struct sh_timer_config *cfg = pdev->dev.platform_data;
> - const struct platform_device_id *id = pdev->id_entry;
> unsigned int i;
> int ret;
>
> - if (!cfg) {
> - dev_err(&tmu->pdev->dev, "missing platform data\n");
> - return -ENXIO;
> - }
> -
> tmu->pdev = pdev;
> - tmu->model = id->driver_data;
>
> raw_spin_lock_init(&tmu->lock);
>
> + if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) {
> + ret = sh_tmu_parse_dt(tmu);
> + if (ret < 0)
> + return ret;
> + } else if (pdev->dev.platform_data) {
> + const struct platform_device_id *id = pdev->id_entry;
> + struct sh_timer_config *cfg = pdev->dev.platform_data;
> +
> + tmu->model = id->driver_data;
> + tmu->num_channels = hweight8(cfg->channels_mask);
> + } else {
> + dev_err(&tmu->pdev->dev, "missing platform data\n");
> + return -ENXIO;
> + }
> +
> /* Get hold of clock. */
> tmu->clk = clk_get(&tmu->pdev->dev, "fck");
> if (IS_ERR(tmu->clk)) {
> @@ -545,8 +571,6 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
> }
>
> /* Allocate and setup the channels. */
> - tmu->num_channels = hweight8(cfg->channels_mask);
> -
> tmu->channels = kzalloc(sizeof(*tmu->channels) * tmu->num_channels,
> GFP_KERNEL);
> if (tmu->channels == NULL) {
> @@ -630,11 +654,18 @@ static const struct platform_device_id sh_tmu_id_table[] = {
> };
> MODULE_DEVICE_TABLE(platform, sh_tmu_id_table);
>
> +static const struct of_device_id sh_tmu_of_table[] __maybe_unused = {
> + { .compatible = "renesas,tmu" },
> + { }
> +};
> +MODULE_DEVICE_TABLE(of, sh_tmu_of_table);
> +
> static struct platform_driver sh_tmu_device_driver = {
> .probe = sh_tmu_probe,
> .remove = sh_tmu_remove,
> .driver = {
> .name = "sh_tmu",
> + .of_match_table = of_match_ptr(sh_tmu_of_table),
> },
> .id_table = sh_tmu_id_table,
> };
> --
> 1.8.5.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH v4 11/19] clocksource: sh_mtu2: Add DT support
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
` (9 preceding siblings ...)
2014-06-16 15:07 ` [PATCH v4 10/19] clocksource: sh_tmu: " Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 12/19] ARM: shmobile: r8a7790: Add CMT devices to DT Laurent Pinchart
` (8 subsequent siblings)
19 siblings, 0 replies; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
Document DT bindings and parse them in the MTU2 driver.
Cc: devicetree at vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa@sang-engineering.com>
---
.../devicetree/bindings/timer/renesas,mtu2.txt | 39 ++++++++++++++++++++++
drivers/clocksource/sh_mtu2.c | 8 +++++
2 files changed, 47 insertions(+)
create mode 100644 Documentation/devicetree/bindings/timer/renesas,mtu2.txt
diff --git a/Documentation/devicetree/bindings/timer/renesas,mtu2.txt b/Documentation/devicetree/bindings/timer/renesas,mtu2.txt
new file mode 100644
index 0000000..917453f
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/renesas,mtu2.txt
@@ -0,0 +1,39 @@
+* Renesas R-Car Multi-Function Timer Pulse Unit 2 (MTU2)
+
+The MTU2 is a multi-purpose, multi-channel timer/counter with configurable
+clock inputs and programmable compare match.
+
+Channels share hardware resources but their counter and compare match value
+are independent. The MTU2 hardware supports five channels indexed from 0 to 4.
+
+Required Properties:
+
+ - compatible: must contain "renesas,mtu2"
+
+ - reg: base address and length of the registers block for the timer module.
+
+ - interrupts: interrupt specifiers for the timer, one for each entry in
+ interrupt-names.
+ - interrupt-names: must contain one entry named "tgi?a" for each enabled
+ channel, where "?" is the channel index expressed as one digit from "0" to
+ "4".
+
+ - clocks: a list of phandle + clock-specifier pairs, one for each entry
+ in clock-names.
+ - clock-names: must contain "fck" for the functional clock.
+
+
+Example: R7S72100 (RZ/A1H) MTU2 node
+
+ mtu2: timer at fcff0000 {
+ compatible = "renesas,mtu2";
+ reg = <0xfcff0000 0x400>;
+ interrupts = <0 139 IRQ_TYPE_LEVEL_HIGH>,
+ <0 146 IRQ_TYPE_LEVEL_HIGH>,
+ <0 150 IRQ_TYPE_LEVEL_HIGH>,
+ <0 154 IRQ_TYPE_LEVEL_HIGH>,
+ <0 159 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tgi0a", "tgi1a", "tgi2a", "tgi3a", "tgi4a";
+ clocks = <&mstp3_clks R7S72100_CLK_MTU2>;
+ clock-names = "fck";
+ };
diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
index ebdf9d1..05ae3d9 100644
--- a/drivers/clocksource/sh_mtu2.c
+++ b/drivers/clocksource/sh_mtu2.c
@@ -23,6 +23,7 @@
#include <linux/ioport.h>
#include <linux/irq.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>
@@ -502,11 +503,18 @@ static const struct platform_device_id sh_mtu2_id_table[] = {
};
MODULE_DEVICE_TABLE(platform, sh_mtu2_id_table);
+static const struct of_device_id sh_mtu2_of_table[] __maybe_unused = {
+ { .compatible = "renesas,mtu2" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, sh_mtu2_of_table);
+
static struct platform_driver sh_mtu2_device_driver = {
.probe = sh_mtu2_probe,
.remove = sh_mtu2_remove,
.driver = {
.name = "sh_mtu2",
+ .of_match_table = of_match_ptr(sh_mtu2_of_table),
},
.id_table = sh_mtu2_id_table,
};
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 12/19] ARM: shmobile: r8a7790: Add CMT devices to DT
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
` (10 preceding siblings ...)
2014-06-16 15:07 ` [PATCH v4 11/19] clocksource: sh_mtu2: " Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 13/19] ARM: shmobile: r8a7791: " Laurent Pinchart
` (7 subsequent siblings)
19 siblings, 0 replies; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
Add the CMT0 and CMT1 counters to the r8a7790 device tree and make them
disabled by default.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/r8a7790.dtsi | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 994330e..1a0553a 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -206,6 +206,38 @@
<1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
};
+ cmt0: timer at ffca0000 {
+ compatible = "renesas,cmt-48-gen2";
+ reg = <0 0xffca0000 0 0x1004>;
+ interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>,
+ <0 143 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp1_clks R8A7790_CLK_CMT0>;
+ clock-names = "fck";
+
+ renesas,channels-mask = <0x60>;
+
+ status = "disabled";
+ };
+
+ cmt1: timer at e6130000 {
+ compatible = "renesas,cmt-48-gen2";
+ reg = <0 0xe6130000 0 0x1004>;
+ interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>,
+ <0 121 IRQ_TYPE_LEVEL_HIGH>,
+ <0 122 IRQ_TYPE_LEVEL_HIGH>,
+ <0 123 IRQ_TYPE_LEVEL_HIGH>,
+ <0 124 IRQ_TYPE_LEVEL_HIGH>,
+ <0 125 IRQ_TYPE_LEVEL_HIGH>,
+ <0 126 IRQ_TYPE_LEVEL_HIGH>,
+ <0 127 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp3_clks R8A7790_CLK_CMT1>;
+ clock-names = "fck";
+
+ renesas,channels-mask = <0xff>;
+
+ status = "disabled";
+ };
+
irqc0: interrupt-controller at e61c0000 {
compatible = "renesas,irqc-r8a7790", "renesas,irqc";
#interrupt-cells = <2>;
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 13/19] ARM: shmobile: r8a7791: Add CMT devices to DT
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
` (11 preceding siblings ...)
2014-06-16 15:07 ` [PATCH v4 12/19] ARM: shmobile: r8a7790: Add CMT devices to DT Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 14/19] ARM: shmobile: r8a7779: Add TMU " Laurent Pinchart
` (6 subsequent siblings)
19 siblings, 0 replies; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
Add the CMT0 and CMT1 counters to the r8a7791 device tree and make them
disabled by default.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/r8a7791.dtsi | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index 43d2130..cb8ae40 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -189,6 +189,38 @@
<1 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
};
+ cmt0: timer at ffca0000 {
+ compatible = "renesas,cmt-48-gen2";
+ reg = <0 0xffca0000 0 0x1004>;
+ interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>,
+ <0 143 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp1_clks R8A7791_CLK_CMT0>;
+ clock-names = "fck";
+
+ renesas,channels-mask = <0x60>;
+
+ status = "disabled";
+ };
+
+ cmt1: timer at e6130000 {
+ compatible = "renesas,cmt-48-gen2";
+ reg = <0 0xe6130000 0 0x1004>;
+ interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>,
+ <0 121 IRQ_TYPE_LEVEL_HIGH>,
+ <0 122 IRQ_TYPE_LEVEL_HIGH>,
+ <0 123 IRQ_TYPE_LEVEL_HIGH>,
+ <0 124 IRQ_TYPE_LEVEL_HIGH>,
+ <0 125 IRQ_TYPE_LEVEL_HIGH>,
+ <0 126 IRQ_TYPE_LEVEL_HIGH>,
+ <0 127 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp3_clks R8A7791_CLK_CMT1>;
+ clock-names = "fck";
+
+ renesas,channels-mask = <0xff>;
+
+ status = "disabled";
+ };
+
irqc0: interrupt-controller at e61c0000 {
compatible = "renesas,irqc-r8a7791", "renesas,irqc";
#interrupt-cells = <2>;
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 14/19] ARM: shmobile: r8a7779: Add TMU devices to DT
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
` (12 preceding siblings ...)
2014-06-16 15:07 ` [PATCH v4 13/19] ARM: shmobile: r8a7791: " Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-06-17 1:12 ` Simon Horman
2014-06-16 15:07 ` [PATCH v4 15/19] ARM: shmobile: r7s72100: Add MTU2 device " Laurent Pinchart
` (5 subsequent siblings)
19 siblings, 1 reply; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
Add the TMU0, TMU1 and TMU2 counters to the r8a7779 device tree and make
them disabled by default.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
arch/arm/boot/dts/r8a7779.dtsi | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
index 94e2fc8..671d8e4 100644
--- a/arch/arm/boot/dts/r8a7779.dtsi
+++ b/arch/arm/boot/dts/r8a7779.dtsi
@@ -266,6 +266,48 @@
reg = <0xffc48000 0x38>;
};
+ tmu0: timer at ffd80000 {
+ compatible = "renesas,tmu";
+ reg = <0xffd80000 0x30>;
+ interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>,
+ <0 33 IRQ_TYPE_LEVEL_HIGH>,
+ <0 34 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp0_clks R8A7779_CLK_TMU0>;
+ clock-names = "fck";
+
+ #renesas,channels = <3>;
+
+ status = "disabled";
+ };
+
+ tmu1: timer at ffd81000 {
+ compatible = "renesas,tmu";
+ reg = <0xffd81000 0x30>;
+ interrupts = <0 36 IRQ_TYPE_LEVEL_HIGH>,
+ <0 37 IRQ_TYPE_LEVEL_HIGH>,
+ <0 38 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp0_clks R8A7779_CLK_TMU1>;
+ clock-names = "fck";
+
+ #renesas,channels = <3>;
+
+ status = "disabled";
+ };
+
+ tmu2: timer at ffd82000 {
+ compatible = "renesas,tmu";
+ reg = <0xffd82000 0x30>;
+ interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>,
+ <0 41 IRQ_TYPE_LEVEL_HIGH>,
+ <0 42 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp0_clks R8A7779_CLK_TMU2>;
+ clock-names = "fck";
+
+ #renesas,channels = <3>;
+
+ status = "disabled";
+ };
+
sata: sata at fc600000 {
compatible = "renesas,rcar-sata";
reg = <0xfc600000 0x2000>;
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 14/19] ARM: shmobile: r8a7779: Add TMU devices to DT
2014-06-16 15:07 ` [PATCH v4 14/19] ARM: shmobile: r8a7779: Add TMU " Laurent Pinchart
@ 2014-06-17 1:12 ` Simon Horman
0 siblings, 0 replies; 35+ messages in thread
From: Simon Horman @ 2014-06-17 1:12 UTC (permalink / raw)
To: linux-arm-kernel
Thanks Laurent,
this version seems good to me.
On Mon, Jun 16, 2014 at 05:07:26PM +0200, Laurent Pinchart wrote:
> Add the TMU0, TMU1 and TMU2 counters to the r8a7779 device tree and make
> them disabled by default.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> arch/arm/boot/dts/r8a7779.dtsi | 42 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
> index 94e2fc8..671d8e4 100644
> --- a/arch/arm/boot/dts/r8a7779.dtsi
> +++ b/arch/arm/boot/dts/r8a7779.dtsi
> @@ -266,6 +266,48 @@
> reg = <0xffc48000 0x38>;
> };
>
> + tmu0: timer at ffd80000 {
> + compatible = "renesas,tmu";
> + reg = <0xffd80000 0x30>;
> + interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>,
> + <0 33 IRQ_TYPE_LEVEL_HIGH>,
> + <0 34 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&mstp0_clks R8A7779_CLK_TMU0>;
> + clock-names = "fck";
> +
> + #renesas,channels = <3>;
> +
> + status = "disabled";
> + };
> +
> + tmu1: timer at ffd81000 {
> + compatible = "renesas,tmu";
> + reg = <0xffd81000 0x30>;
> + interrupts = <0 36 IRQ_TYPE_LEVEL_HIGH>,
> + <0 37 IRQ_TYPE_LEVEL_HIGH>,
> + <0 38 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&mstp0_clks R8A7779_CLK_TMU1>;
> + clock-names = "fck";
> +
> + #renesas,channels = <3>;
> +
> + status = "disabled";
> + };
> +
> + tmu2: timer at ffd82000 {
> + compatible = "renesas,tmu";
> + reg = <0xffd82000 0x30>;
> + interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>,
> + <0 41 IRQ_TYPE_LEVEL_HIGH>,
> + <0 42 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&mstp0_clks R8A7779_CLK_TMU2>;
> + clock-names = "fck";
> +
> + #renesas,channels = <3>;
> +
> + status = "disabled";
> + };
> +
> sata: sata at fc600000 {
> compatible = "renesas,rcar-sata";
> reg = <0xfc600000 0x2000>;
> --
> 1.8.5.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH v4 15/19] ARM: shmobile: r7s72100: Add MTU2 device to DT
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
` (13 preceding siblings ...)
2014-06-16 15:07 ` [PATCH v4 14/19] ARM: shmobile: r8a7779: Add TMU " Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 16/19] ARM: shmobile: lager-reference: Enable CMT0 in device tree Laurent Pinchart
` (4 subsequent siblings)
19 siblings, 0 replies; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
Add the MTU2 counter to the r7s72100 device tree and make it disabled by
default.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
arch/arm/boot/dts/r7s72100.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi
index bdee225..c902b0b 100644
--- a/arch/arm/boot/dts/r7s72100.dtsi
+++ b/arch/arm/boot/dts/r7s72100.dtsi
@@ -229,6 +229,16 @@
status = "disabled";
};
+ mtu2: timer at fcff0000 {
+ compatible = "renesas,mtu2";
+ reg = <0xfcff0000 0x400>;
+ interrupts = <0 139 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tgi0a";
+ clocks = <&mstp3_clks R7S72100_CLK_MTU2>;
+ clock-names = "fck";
+ status = "disabled";
+ };
+
scif0: serial at e8007000 {
compatible = "renesas,scif-r7s72100", "renesas,scif";
reg = <0xe8007000 64>;
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 16/19] ARM: shmobile: lager-reference: Enable CMT0 in device tree
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
` (14 preceding siblings ...)
2014-06-16 15:07 ` [PATCH v4 15/19] ARM: shmobile: r7s72100: Add MTU2 device " Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 17/19] ARM: shmobile: koelsch-reference: " Laurent Pinchart
` (3 subsequent siblings)
19 siblings, 0 replies; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
No more device needs to be added from platform code when booting the
reference platform, remove the now empty r8a7790_add_dt_devices()
function completely.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/r8a7790-lager.dts | 4 ++++
arch/arm/mach-shmobile/board-lager-reference.c | 2 --
arch/arm/mach-shmobile/include/mach/r8a7790.h | 1 -
arch/arm/mach-shmobile/setup-r8a7790.c | 7 +------
4 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index 850dff8..32a636f 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -237,6 +237,10 @@
};
};
+&cmt0 {
+ status = "ok";
+};
+
&mmcif1 {
pinctrl-0 = <&mmc1_pins>;
pinctrl-names = "default";
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
index 4393f12..ee6feb9 100644
--- a/arch/arm/mach-shmobile/board-lager-reference.c
+++ b/arch/arm/mach-shmobile/board-lager-reference.c
@@ -90,7 +90,6 @@ static void __init lager_add_du_device(void)
* devices until they get moved to DT.
*/
static const struct clk_name clk_names[] __initconst = {
- { "cmt0", "fck", "sh-cmt-48-gen2.0" },
{ "du0", "du.0", "rcar-du-r8a7790" },
{ "du1", "du.1", "rcar-du-r8a7790" },
{ "du2", "du.2", "rcar-du-r8a7790" },
@@ -101,7 +100,6 @@ static const struct clk_name clk_names[] __initconst = {
static void __init lager_add_standard_devices(void)
{
shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
- r8a7790_add_dt_devices();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
lager_add_du_device();
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h
index 3ebc1f4..9684441 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7790.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h
@@ -29,7 +29,6 @@ enum {
};
void r8a7790_add_standard_devices(void);
-void r8a7790_add_dt_devices(void);
void r8a7790_clock_init(void);
void r8a7790_pinmux_init(void);
void r8a7790_pm_init(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
index 80af1d2..37d6eca 100644
--- a/arch/arm/mach-shmobile/setup-r8a7790.c
+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
@@ -279,11 +279,6 @@ static struct resource cmt0_resources[] = {
&cmt##idx##_platform_data, \
sizeof(struct sh_timer_config))
-void __init r8a7790_add_dt_devices(void)
-{
- r8a7790_register_cmt(0);
-}
-
void __init r8a7790_add_standard_devices(void)
{
r8a7790_register_scif(0);
@@ -296,7 +291,7 @@ void __init r8a7790_add_standard_devices(void)
r8a7790_register_scif(7);
r8a7790_register_scif(8);
r8a7790_register_scif(9);
- r8a7790_add_dt_devices();
+ r8a7790_register_cmt(0);
r8a7790_register_irqc(0);
r8a7790_register_thermal();
r8a7790_register_i2c(0);
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 17/19] ARM: shmobile: koelsch-reference: Enable CMT0 in device tree
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
` (15 preceding siblings ...)
2014-06-16 15:07 ` [PATCH v4 16/19] ARM: shmobile: lager-reference: Enable CMT0 in device tree Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-06-16 15:07 ` [PATCH v4 18/19] ARM: shmobile: marzen-reference: Enable TMU0 " Laurent Pinchart
` (2 subsequent siblings)
19 siblings, 0 replies; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
No more device needs to be added from platform code when booting the
reference platform, remove the now empty r8a7791_add_dt_devices()
function completely.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/r8a7791-koelsch.dts | 4 ++++
arch/arm/mach-shmobile/board-koelsch-reference.c | 2 --
arch/arm/mach-shmobile/include/mach/r8a7791.h | 1 -
arch/arm/mach-shmobile/setup-r8a7791.c | 7 +------
4 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
index 5dac673..7817ca8 100644
--- a/arch/arm/boot/dts/r8a7791-koelsch.dts
+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
@@ -297,6 +297,10 @@
};
};
+&cmt0 {
+ status = "ok";
+};
+
&sata0 {
status = "okay";
};
diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
index 26189e2..1a73200 100644
--- a/arch/arm/mach-shmobile/board-koelsch-reference.c
+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
@@ -86,7 +86,6 @@ static void __init koelsch_add_du_device(void)
* devices until they get moved to DT.
*/
static const struct clk_name clk_names[] __initconst = {
- { "cmt0", "fck", "sh-cmt-48-gen2.0" },
{ "du0", "du.0", "rcar-du-r8a7791" },
{ "du1", "du.1", "rcar-du-r8a7791" },
{ "lvds0", "lvds.0", "rcar-du-r8a7791" },
@@ -95,7 +94,6 @@ static const struct clk_name clk_names[] __initconst = {
static void __init koelsch_add_standard_devices(void)
{
shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
- r8a7791_add_dt_devices();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
koelsch_add_du_device();
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7791.h b/arch/arm/mach-shmobile/include/mach/r8a7791.h
index 86eae7b..c1bf7ab 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7791.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7791.h
@@ -2,7 +2,6 @@
#define __ASM_R8A7791_H__
void r8a7791_add_standard_devices(void);
-void r8a7791_add_dt_devices(void);
void r8a7791_clock_init(void);
void r8a7791_pinmux_init(void);
void r8a7791_pm_init(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
index ddd2fca..a66727e 100644
--- a/arch/arm/mach-shmobile/setup-r8a7791.c
+++ b/arch/arm/mach-shmobile/setup-r8a7791.c
@@ -180,11 +180,6 @@ static const struct resource thermal_resources[] __initconst = {
thermal_resources, \
ARRAY_SIZE(thermal_resources))
-void __init r8a7791_add_dt_devices(void)
-{
- r8a7791_register_cmt(0);
-}
-
void __init r8a7791_add_standard_devices(void)
{
r8a7791_register_scif(0);
@@ -202,7 +197,7 @@ void __init r8a7791_add_standard_devices(void)
r8a7791_register_scif(12);
r8a7791_register_scif(13);
r8a7791_register_scif(14);
- r8a7791_add_dt_devices();
+ r8a7791_register_cmt(0);
r8a7791_register_irqc(0);
r8a7791_register_thermal();
}
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 18/19] ARM: shmobile: marzen-reference: Enable TMU0 in device tree
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
` (16 preceding siblings ...)
2014-06-16 15:07 ` [PATCH v4 17/19] ARM: shmobile: koelsch-reference: " Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-06-17 1:14 ` Simon Horman
2014-06-16 15:07 ` [PATCH v4 19/19] ARM: shmobile: genmai-reference: Enable MTU2 " Laurent Pinchart
2014-07-02 14:23 ` [GIT PULL FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
19 siblings, 1 reply; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
No more device needs to be added from platform code when booting the
reference platform, remove the now empty
r8a7779_add_standard_devices_dt() function completely.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
arch/arm/boot/dts/r8a7779-marzen.dts | 4 ++++
arch/arm/mach-shmobile/board-marzen-reference.c | 10 ----------
arch/arm/mach-shmobile/include/mach/r8a7779.h | 1 -
arch/arm/mach-shmobile/setup-r8a7779.c | 17 +++++------------
4 files changed, 9 insertions(+), 23 deletions(-)
diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts
index 20b1768..6025822 100644
--- a/arch/arm/boot/dts/r8a7779-marzen.dts
+++ b/arch/arm/boot/dts/r8a7779-marzen.dts
@@ -78,6 +78,10 @@
clock-frequency = <31250000>;
};
+&tmu0 {
+ status = "okay";
+};
+
&pfc {
lan0_pins: lan0 {
intc {
diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
index 670e48a..29bd384 100644
--- a/arch/arm/mach-shmobile/board-marzen-reference.c
+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
@@ -35,18 +35,8 @@ static void __init marzen_init_timer(void)
clocksource_of_init();
}
-/*
- * This is a really crude hack to provide clkdev support to platform
- * devices until they get moved to DT.
- */
-static const struct clk_name clk_names[] __initconst = {
- { "tmu0", "fck", "sh-tmu.0" },
-};
-
static void __init marzen_init(void)
{
- shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
- r8a7779_add_standard_devices_dt();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */
}
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h
index e443c54..9e8c68e 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7779.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h
@@ -28,7 +28,6 @@ extern void r8a7779_map_io(void);
extern void r8a7779_earlytimer_init(void);
extern void r8a7779_add_early_devices(void);
extern void r8a7779_add_standard_devices(void);
-extern void r8a7779_add_standard_devices_dt(void);
extern void r8a7779_init_late(void);
extern u32 r8a7779_read_mode_pins(void);
extern void r8a7779_clock_init(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index e0050ab0..dcb8d18 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -639,7 +639,7 @@ static void __init r8a7779_register_hpb_dmae(void)
sizeof(dma_platform_data));
}
-static struct platform_device *r8a7779_devices_dt[] __initdata = {
+static struct platform_device *r8a7779_early_devices[] __initdata = {
&tmu0_device,
};
@@ -667,8 +667,8 @@ void __init r8a7779_add_standard_devices(void)
r8a7779_init_pm_domains();
- platform_add_devices(r8a7779_devices_dt,
- ARRAY_SIZE(r8a7779_devices_dt));
+ platform_add_devices(r8a7779_early_devices,
+ ARRAY_SIZE(r8a7779_early_devices));
platform_add_devices(r8a7779_standard_devices,
ARRAY_SIZE(r8a7779_standard_devices));
r8a7779_register_hpb_dmae();
@@ -676,8 +676,8 @@ void __init r8a7779_add_standard_devices(void)
void __init r8a7779_add_early_devices(void)
{
- early_platform_add_devices(r8a7779_devices_dt,
- ARRAY_SIZE(r8a7779_devices_dt));
+ early_platform_add_devices(r8a7779_early_devices,
+ ARRAY_SIZE(r8a7779_early_devices));
/* Early serial console setup is not included here due to
* memory map collisions. The SCIF serial ports in r8a7779
@@ -737,12 +737,6 @@ void __init r8a7779_init_irq_dt(void)
__raw_writel(0x003fee3f, INT2SMSKCR4);
}
-void __init r8a7779_add_standard_devices_dt(void)
-{
- platform_add_devices(r8a7779_devices_dt,
- ARRAY_SIZE(r8a7779_devices_dt));
-}
-
#define MODEMR 0xffcc0020
u32 __init r8a7779_read_mode_pins(void)
@@ -771,7 +765,6 @@ DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)")
.init_early = shmobile_init_delay,
.nr_irqs = NR_IRQS_LEGACY,
.init_irq = r8a7779_init_irq_dt,
- .init_machine = r8a7779_add_standard_devices_dt,
.init_late = r8a7779_init_late,
.dt_compat = r8a7779_compat_dt,
MACHINE_END
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v4 18/19] ARM: shmobile: marzen-reference: Enable TMU0 in device tree
2014-06-16 15:07 ` [PATCH v4 18/19] ARM: shmobile: marzen-reference: Enable TMU0 " Laurent Pinchart
@ 2014-06-17 1:14 ` Simon Horman
0 siblings, 0 replies; 35+ messages in thread
From: Simon Horman @ 2014-06-17 1:14 UTC (permalink / raw)
To: linux-arm-kernel
Thanks Laurent,
On Mon, Jun 16, 2014 at 05:07:30PM +0200, Laurent Pinchart wrote:
> No more device needs to be added from platform code when booting the
> reference platform, remove the now empty
> r8a7779_add_standard_devices_dt() function completely.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> arch/arm/boot/dts/r8a7779-marzen.dts | 4 ++++
> arch/arm/mach-shmobile/board-marzen-reference.c | 10 ----------
> arch/arm/mach-shmobile/include/mach/r8a7779.h | 1 -
> arch/arm/mach-shmobile/setup-r8a7779.c | 17 +++++------------
> 4 files changed, 9 insertions(+), 23 deletions(-)
>
> diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts
> index 20b1768..6025822 100644
> --- a/arch/arm/boot/dts/r8a7779-marzen.dts
> +++ b/arch/arm/boot/dts/r8a7779-marzen.dts
> @@ -78,6 +78,10 @@
> clock-frequency = <31250000>;
> };
>
> +&tmu0 {
> + status = "okay";
> +};
> +
> &pfc {
> lan0_pins: lan0 {
> intc {
> diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
> index 670e48a..29bd384 100644
> --- a/arch/arm/mach-shmobile/board-marzen-reference.c
> +++ b/arch/arm/mach-shmobile/board-marzen-reference.c
> @@ -35,18 +35,8 @@ static void __init marzen_init_timer(void)
> clocksource_of_init();
> }
>
> -/*
> - * This is a really crude hack to provide clkdev support to platform
> - * devices until they get moved to DT.
> - */
> -static const struct clk_name clk_names[] __initconst = {
> - { "tmu0", "fck", "sh-tmu.0" },
> -};
> -
> static void __init marzen_init(void)
> {
> - shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
> - r8a7779_add_standard_devices_dt();
> of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */
> }
> diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h
> index e443c54..9e8c68e 100644
> --- a/arch/arm/mach-shmobile/include/mach/r8a7779.h
> +++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h
> @@ -28,7 +28,6 @@ extern void r8a7779_map_io(void);
> extern void r8a7779_earlytimer_init(void);
> extern void r8a7779_add_early_devices(void);
> extern void r8a7779_add_standard_devices(void);
> -extern void r8a7779_add_standard_devices_dt(void);
> extern void r8a7779_init_late(void);
> extern u32 r8a7779_read_mode_pins(void);
> extern void r8a7779_clock_init(void);
> diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
> index e0050ab0..dcb8d18 100644
> --- a/arch/arm/mach-shmobile/setup-r8a7779.c
> +++ b/arch/arm/mach-shmobile/setup-r8a7779.c
> @@ -639,7 +639,7 @@ static void __init r8a7779_register_hpb_dmae(void)
> sizeof(dma_platform_data));
> }
>
> -static struct platform_device *r8a7779_devices_dt[] __initdata = {
> +static struct platform_device *r8a7779_early_devices[] __initdata = {
> &tmu0_device,
> };
>
> @@ -667,8 +667,8 @@ void __init r8a7779_add_standard_devices(void)
>
> r8a7779_init_pm_domains();
>
> - platform_add_devices(r8a7779_devices_dt,
> - ARRAY_SIZE(r8a7779_devices_dt));
> + platform_add_devices(r8a7779_early_devices,
> + ARRAY_SIZE(r8a7779_early_devices));
> platform_add_devices(r8a7779_standard_devices,
> ARRAY_SIZE(r8a7779_standard_devices));
> r8a7779_register_hpb_dmae();
> @@ -676,8 +676,8 @@ void __init r8a7779_add_standard_devices(void)
>
> void __init r8a7779_add_early_devices(void)
> {
> - early_platform_add_devices(r8a7779_devices_dt,
> - ARRAY_SIZE(r8a7779_devices_dt));
> + early_platform_add_devices(r8a7779_early_devices,
> + ARRAY_SIZE(r8a7779_early_devices));
>
> /* Early serial console setup is not included here due to
> * memory map collisions. The SCIF serial ports in r8a7779
> @@ -737,12 +737,6 @@ void __init r8a7779_init_irq_dt(void)
> __raw_writel(0x003fee3f, INT2SMSKCR4);
> }
>
> -void __init r8a7779_add_standard_devices_dt(void)
> -{
> - platform_add_devices(r8a7779_devices_dt,
> - ARRAY_SIZE(r8a7779_devices_dt));
> -}
> -
> #define MODEMR 0xffcc0020
>
> u32 __init r8a7779_read_mode_pins(void)
> @@ -771,7 +765,6 @@ DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)")
> .init_early = shmobile_init_delay,
> .nr_irqs = NR_IRQS_LEGACY,
> .init_irq = r8a7779_init_irq_dt,
> - .init_machine = r8a7779_add_standard_devices_dt,
> .init_late = r8a7779_init_late,
> .dt_compat = r8a7779_compat_dt,
> MACHINE_END
> --
> 1.8.5.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH v4 19/19] ARM: shmobile: genmai-reference: Enable MTU2 in device tree
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
` (17 preceding siblings ...)
2014-06-16 15:07 ` [PATCH v4 18/19] ARM: shmobile: marzen-reference: Enable TMU0 " Laurent Pinchart
@ 2014-06-16 15:07 ` Laurent Pinchart
2014-07-02 14:23 ` [GIT PULL FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
19 siblings, 0 replies; 35+ messages in thread
From: Laurent Pinchart @ 2014-06-16 15:07 UTC (permalink / raw)
To: linux-arm-kernel
No more device needs to be added from platform code when booting the
reference platform, move MTU2 registration from setup-r7s72100.c to
board-genmai.c and remove the now empty r7s72100_add_dt_devices()
function.
As the genmai_add_standard_devices() function is now identical to the
default init_machine implementation, remove it as well.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
arch/arm/boot/dts/r7s72100-genmai.dts | 4 ++++
arch/arm/mach-shmobile/board-genmai-reference.c | 16 ----------------
arch/arm/mach-shmobile/board-genmai.c | 14 +++++++++++++-
arch/arm/mach-shmobile/include/mach/r7s72100.h | 1 -
arch/arm/mach-shmobile/setup-r7s72100.c | 21 ---------------------
5 files changed, 17 insertions(+), 39 deletions(-)
diff --git a/arch/arm/boot/dts/r7s72100-genmai.dts b/arch/arm/boot/dts/r7s72100-genmai.dts
index 56849b5..a352734 100644
--- a/arch/arm/boot/dts/r7s72100-genmai.dts
+++ b/arch/arm/boot/dts/r7s72100-genmai.dts
@@ -43,6 +43,10 @@
clock-frequency = <48000000>;
};
+&mtu2 {
+ status = "ok";
+};
+
&i2c2 {
status = "okay";
clock-frequency = <400000>;
diff --git a/arch/arm/mach-shmobile/board-genmai-reference.c b/arch/arm/mach-shmobile/board-genmai-reference.c
index 627539e..a80df03 100644
--- a/arch/arm/mach-shmobile/board-genmai-reference.c
+++ b/arch/arm/mach-shmobile/board-genmai-reference.c
@@ -26,21 +26,6 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
-/*
- * This is a really crude hack to provide clkdev support to platform
- * devices until they get moved to DT.
- */
-static const struct clk_name clk_names[] = {
- { "mtu2", "fck", "sh-mtu2" },
-};
-
-static void __init genmai_add_standard_devices(void)
-{
- shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), true);
- r7s72100_add_dt_devices();
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-}
-
static const char * const genmai_boards_compat_dt[] __initconst = {
"renesas,genmai",
NULL,
@@ -48,6 +33,5 @@ static const char * const genmai_boards_compat_dt[] __initconst = {
DT_MACHINE_START(GENMAI_DT, "genmai")
.init_early = shmobile_init_delay,
- .init_machine = genmai_add_standard_devices,
.dt_compat = genmai_boards_compat_dt,
MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c
index 11f3cd1..bd0785f 100644
--- a/arch/arm/mach-shmobile/board-genmai.c
+++ b/arch/arm/mach-shmobile/board-genmai.c
@@ -23,6 +23,7 @@
#include <linux/platform_device.h>
#include <linux/serial_sci.h>
#include <linux/sh_eth.h>
+#include <linux/sh_timer.h>
#include <linux/spi/rspi.h>
#include <linux/spi/spi.h>
#include <mach/common.h>
@@ -124,10 +125,21 @@ R7S72100_SCIF(7, 0xe800a800, gic_iid(249));
&scif##index##_platform_data, \
sizeof(scif##index##_platform_data))
+static struct resource mtu2_resources[] __initdata = {
+ DEFINE_RES_MEM(0xfcff0000, 0x400),
+ DEFINE_RES_IRQ_NAMED(gic_iid(139), "tgi0a"),
+};
+
+#define r7s72100_register_mtu2() \
+ platform_device_register_resndata(&platform_bus, "sh-mtu2", \
+ -1, mtu2_resources, \
+ ARRAY_SIZE(mtu2_resources), \
+ NULL, 0)
+
static void __init genmai_add_standard_devices(void)
{
r7s72100_clock_init();
- r7s72100_add_dt_devices();
+ r7s72100_register_mtu2();
platform_device_register_full(ðer_info);
diff --git a/arch/arm/mach-shmobile/include/mach/r7s72100.h b/arch/arm/mach-shmobile/include/mach/r7s72100.h
index efb723c..321ae4e 100644
--- a/arch/arm/mach-shmobile/include/mach/r7s72100.h
+++ b/arch/arm/mach-shmobile/include/mach/r7s72100.h
@@ -1,7 +1,6 @@
#ifndef __ASM_R7S72100_H__
#define __ASM_R7S72100_H__
-void r7s72100_add_dt_devices(void);
void r7s72100_clock_init(void);
#endif /* __ASM_R7S72100_H__ */
diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c
index 427ae1c..a55c13b 100644
--- a/arch/arm/mach-shmobile/setup-r7s72100.c
+++ b/arch/arm/mach-shmobile/setup-r7s72100.c
@@ -18,31 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <linux/irq.h>
-#include <linux/kernel.h>
#include <linux/of_platform.h>
-#include <linux/sh_timer.h>
#include <mach/common.h>
-#include <mach/irqs.h>
-#include <mach/r7s72100.h>
#include <asm/mach/arch.h>
-static struct resource mtu2_resources[] __initdata = {
- DEFINE_RES_MEM(0xfcff0000, 0x400),
- DEFINE_RES_IRQ_NAMED(gic_iid(139), "tgi0a"),
-};
-
-#define r7s72100_register_mtu2() \
- platform_device_register_resndata(&platform_bus, "sh-mtu2", \
- -1, mtu2_resources, \
- ARRAY_SIZE(mtu2_resources), \
- NULL, 0)
-
-void __init r7s72100_add_dt_devices(void)
-{
- r7s72100_register_mtu2();
-}
-
#ifdef CONFIG_USE_OF
static const char *r7s72100_boards_compat_dt[] __initdata = {
"renesas,r7s72100",
--
1.8.5.5
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [GIT PULL FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support
2014-06-16 15:07 [PATCH v4 00/19] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
` (18 preceding siblings ...)
2014-06-16 15:07 ` [PATCH v4 19/19] ARM: shmobile: genmai-reference: Enable MTU2 " Laurent Pinchart
@ 2014-07-02 14:23 ` Laurent Pinchart
2014-07-04 13:53 ` [GIT PULL v2 " Laurent Pinchart
19 siblings, 1 reply; 35+ messages in thread
From: Laurent Pinchart @ 2014-07-02 14:23 UTC (permalink / raw)
To: linux-arm-kernel
Hi Daniel,
Could you please merge pull the following changes for v3.17 ? They have
previously been posted as "[PATCH v4] Renesas CMT, MTU2 and TMU timers DT
support". The only change compared to that version is a rebase on top of
v3.16-rc3.
As last time I have board and SoC changes that depend on the driver changes
and that will need to go through Simon's tree. Could you thus please provide a
stable branch based on one of the v3.16-rc tags ?
The following changes since commit 4c834452aad01531db949414f94f817a86348d59:
Linux 3.16-rc3 (2014-06-29 14:11:36 -0700)
are available in the git repository at:
git://linuxtv.org/pinchartl/fbdev.git timers/upstream/drivers
for you to fetch changes up to 64a653a02e47e3cfdab45d0b52c4522a09bed590:
clocksource: sh_mtu2: Add DT support (2014-07-02 16:01:53 +0200)
----------------------------------------------------------------
Laurent Pinchart (10):
clocksource: sh_cmt: Drop support for legacy platform data
clocksource: sh_cmt: Replace global spinlock with a per-device spinlock
clocksource: sh_tmu: Drop support for legacy platform data
clocksource: sh_tmu: Replace global spinlock with a per-device spinlock
clocksource: sh_mtu2: Drop support for legacy platform data
clocksource: sh_mtu2: Replace global spinlock with a per-device spinlock
clocksource: shmobile: Remove unused sh_timer_config members
clocksource: sh_cmt: Add DT support
clocksource: sh_tmu: Add DT support
clocksource: sh_mtu2: Add DT support
Documentation/devicetree/bindings/timer/renesas,cmt.txt | 47 +++++
.../devicetree/bindings/timer/renesas,mtu2.txt | 39 ++++
Documentation/devicetree/bindings/timer/renesas,tmu.txt | 39 ++++
drivers/clocksource/sh_cmt.c | 233 ++++++---------
drivers/clocksource/sh_mtu2.c | 146 +++++----------
drivers/clocksource/sh_tmu.c | 127 ++++++-------
include/linux/sh_timer.h | 5 -
7 files changed, 309 insertions(+), 327 deletions(-)
create mode 100644 Documentation/devicetree/bindings/timer/renesas,cmt.txt
create mode 100644 Documentation/devicetree/bindings/timer/renesas,mtu2.txt
create mode 100644 Documentation/devicetree/bindings/timer/renesas,tmu.txt
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 35+ messages in thread
* [GIT PULL v2 FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support
2014-07-02 14:23 ` [GIT PULL FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support Laurent Pinchart
@ 2014-07-04 13:53 ` Laurent Pinchart
2014-07-09 9:59 ` Laurent Pinchart
0 siblings, 1 reply; 35+ messages in thread
From: Laurent Pinchart @ 2014-07-04 13:53 UTC (permalink / raw)
To: linux-arm-kernel
Hi Daniel,
Could you please pull the following changes and drop the first version of this
pull request ? I've fixed one last typo noticed by Simon in patch 09/19.
As last time I have board and SoC changes that depend on the driver changes
and that will need to go through Simon's tree. Could you thus please provide
a stable branch based on one of the v3.16-rc tags ?
The following changes since commit 4c834452aad01531db949414f94f817a86348d59:
Linux 3.16-rc3 (2014-06-29 14:11:36 -0700)
are available in the git repository at:
git://linuxtv.org/pinchartl/fbdev.git timers/upstream/drivers
for you to fetch changes up to cca8d0596c4c7acb371ea1bc5eee9b404b30516a:
clocksource: sh_mtu2: Add DT support (2014-07-04 15:50:29 +0200)
----------------------------------------------------------------
Laurent Pinchart (10):
clocksource: sh_cmt: Drop support for legacy platform data
clocksource: sh_cmt: Replace global spinlock with a per-device spinlock
clocksource: sh_tmu: Drop support for legacy platform data
clocksource: sh_tmu: Replace global spinlock with a per-device spinlock
clocksource: sh_mtu2: Drop support for legacy platform data
clocksource: sh_mtu2: Replace global spinlock with a per-device spinlock
clocksource: shmobile: Remove unused sh_timer_config members
clocksource: sh_cmt: Add DT support
clocksource: sh_tmu: Add DT support
clocksource: sh_mtu2: Add DT support
Documentation/devicetree/bindings/timer/renesas,cmt.txt | 47 +++++
.../devicetree/bindings/timer/renesas,mtu2.txt | 39 ++++
Documentation/devicetree/bindings/timer/renesas,tmu.txt | 39 ++++
drivers/clocksource/sh_cmt.c | 233 ++++++---------
drivers/clocksource/sh_mtu2.c | 146 +++++----------
drivers/clocksource/sh_tmu.c | 127 ++++++-------
include/linux/sh_timer.h | 5 -
7 files changed, 309 insertions(+), 327 deletions(-)
create mode 100644 Documentation/devicetree/bindings/timer/renesas,cmt.txt
create mode 100644 Documentation/devicetree/bindings/timer/renesas,mtu2.txt
create mode 100644 Documentation/devicetree/bindings/timer/renesas,tmu.txt
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 35+ messages in thread
* [GIT PULL v2 FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support
2014-07-04 13:53 ` [GIT PULL v2 " Laurent Pinchart
@ 2014-07-09 9:59 ` Laurent Pinchart
2014-07-13 9:55 ` Simon Horman
0 siblings, 1 reply; 35+ messages in thread
From: Laurent Pinchart @ 2014-07-09 9:59 UTC (permalink / raw)
To: linux-arm-kernel
Hi Daniel,
On Friday 04 July 2014 15:53:32 Laurent Pinchart wrote:
> Hi Daniel,
>
> Could you please pull the following changes and drop the first version of
> this pull request ? I've fixed one last typo noticed by Simon in patch
> 09/19.
>
> As last time I have board and SoC changes that depend on the driver changes
> and that will need to go through Simon's tree. Could you thus please provide
> a stable branch based on one of the v3.16-rc tags ?
Given that I'd like to get the arch/ part of the change set in v3.17, could I
ask you to fast track this pull request if possible ?
> The following changes since commit 4c834452aad01531db949414f94f817a86348d59:
>
> Linux 3.16-rc3 (2014-06-29 14:11:36 -0700)
>
> are available in the git repository at:
>
> git://linuxtv.org/pinchartl/fbdev.git timers/upstream/drivers
>
> for you to fetch changes up to cca8d0596c4c7acb371ea1bc5eee9b404b30516a:
>
> clocksource: sh_mtu2: Add DT support (2014-07-04 15:50:29 +0200)
>
> ----------------------------------------------------------------
> Laurent Pinchart (10):
> clocksource: sh_cmt: Drop support for legacy platform data
> clocksource: sh_cmt: Replace global spinlock with a per-device
> spinlock clocksource: sh_tmu: Drop support for legacy platform data
> clocksource: sh_tmu: Replace global spinlock with a per-device
> spinlock clocksource: sh_mtu2: Drop support for legacy platform data
> clocksource: sh_mtu2: Replace global spinlock with a per-device
> spinlock clocksource: shmobile: Remove unused sh_timer_config members
> clocksource: sh_cmt: Add DT support
> clocksource: sh_tmu: Add DT support
> clocksource: sh_mtu2: Add DT support
>
> Documentation/devicetree/bindings/timer/renesas,cmt.txt | 47 +++++
> .../devicetree/bindings/timer/renesas,mtu2.txt | 39 ++++
> Documentation/devicetree/bindings/timer/renesas,tmu.txt | 39 ++++
> drivers/clocksource/sh_cmt.c | 233 ++++++-------
> drivers/clocksource/sh_mtu2.c | 146 +++++--------
> drivers/clocksource/sh_tmu.c | 127 ++++++-------
> include/linux/sh_timer.h | 5 -
> 7 files changed, 309 insertions(+), 327 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/timer/renesas,cmt.txt
> create mode 100644 Documentation/devicetree/bindings/timer/renesas,mtu2.txt
> create mode 100644 Documentation/devicetree/bindings/timer/renesas,tmu.txt
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 35+ messages in thread
* [GIT PULL v2 FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support
2014-07-09 9:59 ` Laurent Pinchart
@ 2014-07-13 9:55 ` Simon Horman
2014-07-13 13:00 ` Laurent Pinchart
0 siblings, 1 reply; 35+ messages in thread
From: Simon Horman @ 2014-07-13 9:55 UTC (permalink / raw)
To: linux-arm-kernel
[Cc Olof Johansson, ARM SoC Team]
On Wed, Jul 09, 2014 at 11:59:16AM +0200, Laurent Pinchart wrote:
> Hi Daniel,
>
> On Friday 04 July 2014 15:53:32 Laurent Pinchart wrote:
> > Hi Daniel,
> >
> > Could you please pull the following changes and drop the first version of
> > this pull request ? I've fixed one last typo noticed by Simon in patch
> > 09/19.
> >
> > As last time I have board and SoC changes that depend on the driver changes
> > and that will need to go through Simon's tree. Could you thus please provide
> > a stable branch based on one of the v3.16-rc tags ?
>
> Given that I'd like to get the arch/ part of the change set in v3.17, could I
> ask you to fast track this pull request if possible ?
Hi Laurent, Hi Daniel,
I am wondering what the status of this pull request is. It would be nice
to get the arch/ changes into v3.17 but we are getting closer to v3.16-rc6
and I need to have things queued up before then.
I have also CCed Olof and the ARM SoC team (via arm at kernel.org) as
if Daniel does provide a stable branch that includes this pull request and
I use it as the basis for a branch with the arch changes then the
ARM SoC people would like to know about it before I send a pull request
for the arch/ changes.
>
> > The following changes since commit 4c834452aad01531db949414f94f817a86348d59:
> >
> > Linux 3.16-rc3 (2014-06-29 14:11:36 -0700)
> >
> > are available in the git repository at:
> >
> > git://linuxtv.org/pinchartl/fbdev.git timers/upstream/drivers
> >
> > for you to fetch changes up to cca8d0596c4c7acb371ea1bc5eee9b404b30516a:
> >
> > clocksource: sh_mtu2: Add DT support (2014-07-04 15:50:29 +0200)
> >
> > ----------------------------------------------------------------
> > Laurent Pinchart (10):
> > clocksource: sh_cmt: Drop support for legacy platform data
> > clocksource: sh_cmt: Replace global spinlock with a per-device
> > spinlock clocksource: sh_tmu: Drop support for legacy platform data
> > clocksource: sh_tmu: Replace global spinlock with a per-device
> > spinlock clocksource: sh_mtu2: Drop support for legacy platform data
> > clocksource: sh_mtu2: Replace global spinlock with a per-device
> > spinlock clocksource: shmobile: Remove unused sh_timer_config members
> > clocksource: sh_cmt: Add DT support
> > clocksource: sh_tmu: Add DT support
> > clocksource: sh_mtu2: Add DT support
> >
> > Documentation/devicetree/bindings/timer/renesas,cmt.txt | 47 +++++
> > .../devicetree/bindings/timer/renesas,mtu2.txt | 39 ++++
> > Documentation/devicetree/bindings/timer/renesas,tmu.txt | 39 ++++
> > drivers/clocksource/sh_cmt.c | 233 ++++++-------
> > drivers/clocksource/sh_mtu2.c | 146 +++++--------
> > drivers/clocksource/sh_tmu.c | 127 ++++++-------
> > include/linux/sh_timer.h | 5 -
> > 7 files changed, 309 insertions(+), 327 deletions(-)
> > create mode 100644 Documentation/devicetree/bindings/timer/renesas,cmt.txt
> > create mode 100644 Documentation/devicetree/bindings/timer/renesas,mtu2.txt
> > create mode 100644 Documentation/devicetree/bindings/timer/renesas,tmu.txt
>
> --
> Regards,
>
> Laurent Pinchart
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 35+ messages in thread
* [GIT PULL v2 FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support
2014-07-13 9:55 ` Simon Horman
@ 2014-07-13 13:00 ` Laurent Pinchart
2014-07-13 14:42 ` Daniel Lezcano
0 siblings, 1 reply; 35+ messages in thread
From: Laurent Pinchart @ 2014-07-13 13:00 UTC (permalink / raw)
To: linux-arm-kernel
Hi Simon and Daniel,
On Sunday 13 July 2014 11:55:01 Simon Horman wrote:
> [Cc Olof Johansson, ARM SoC Team]
>
> On Wed, Jul 09, 2014 at 11:59:16AM +0200, Laurent Pinchart wrote:
> > On Friday 04 July 2014 15:53:32 Laurent Pinchart wrote:
> > > Hi Daniel,
> > >
> > > Could you please pull the following changes and drop the first version
> > > of this pull request ? I've fixed one last typo noticed by Simon in
> > > patch 09/19.
> > >
> > > As last time I have board and SoC changes that depend on the driver
> > > changes and that will need to go through Simon's tree. Could you thus
> > > please provide a stable branch based on one of the v3.16-rc tags ?
> >
> > Given that I'd like to get the arch/ part of the change set in v3.17,
> > could I ask you to fast track this pull request if possible ?
>
> Hi Laurent, Hi Daniel,
>
> I am wondering what the status of this pull request is. It would be nice
> to get the arch/ changes into v3.17 but we are getting closer to v3.16-rc6
> and I need to have things queued up before then.
>
> I have also CCed Olof and the ARM SoC team (via arm at kernel.org) as
> if Daniel does provide a stable branch that includes this pull request and
> I use it as the basis for a branch with the arch changes then the
> ARM SoC people would like to know about it before I send a pull request
> for the arch/ changes.
>From my point of view everything is ready for v3.17. Daniel, if you haven't
been abducted by aliens, could you please process the pull request ? If you
have, let us know what we can do to help negotiate your release.
> > > The following changes since commit
4c834452aad01531db949414f94f817a86348d59:
> > > Linux 3.16-rc3 (2014-06-29 14:11:36 -0700)
> > >
> > > are available in the git repository at:
> > > git://linuxtv.org/pinchartl/fbdev.git timers/upstream/drivers
> > >
> > > for you to fetch changes up to cca8d0596c4c7acb371ea1bc5eee9b404b30516a:
> > > clocksource: sh_mtu2: Add DT support (2014-07-04 15:50:29 +0200)
> > >
> > > ----------------------------------------------------------------
> > >
> > > Laurent Pinchart (10):
> > > clocksource: sh_cmt: Drop support for legacy platform data
> > > clocksource: sh_cmt: Replace global spinlock with a per-device
> > > spinlock
> > > clocksource: sh_tmu: Drop support for legacy platform data
> > > clocksource: sh_tmu: Replace global spinlock with a per-device
> > > spinlock
> > > clocksource: sh_mtu2: Drop support for legacy platform data
> > > clocksource: sh_mtu2: Replace global spinlock with a per-device
> > > spinlock
> > > clocksource: shmobile: Remove unused sh_timer_config members
> > > clocksource: sh_cmt: Add DT support
> > > clocksource: sh_tmu: Add DT support
> > > clocksource: sh_mtu2: Add DT support
> > >
> > > Documentation/devicetree/bindings/timer/renesas,cmt.txt | 47 +++++
> > > .../devicetree/bindings/timer/renesas,mtu2.txt | 39 ++++
> > > Documentation/devicetree/bindings/timer/renesas,tmu.txt | 39 ++++
> > > drivers/clocksource/sh_cmt.c | 233 +++++----
> > > drivers/clocksource/sh_mtu2.c | 146 ++++-----
> > > drivers/clocksource/sh_tmu.c | 127 +++++----
> > > include/linux/sh_timer.h | 5 -
> > > 7 files changed, 309 insertions(+), 327 deletions(-)
> > > create mode 100644
> > > Documentation/devicetree/bindings/timer/renesas,cmt.txt
> > > create mode 100644
> > > Documentation/devicetree/bindings/timer/renesas,mtu2.txt
> > > create mode 100644
> > > Documentation/devicetree/bindings/timer/renesas,tmu.txt
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 35+ messages in thread
* [GIT PULL v2 FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support
2014-07-13 13:00 ` Laurent Pinchart
@ 2014-07-13 14:42 ` Daniel Lezcano
2014-07-13 20:39 ` Simon Horman
2014-07-14 9:06 ` Laurent Pinchart
0 siblings, 2 replies; 35+ messages in thread
From: Daniel Lezcano @ 2014-07-13 14:42 UTC (permalink / raw)
To: linux-arm-kernel
On 07/13/2014 03:00 PM, Laurent Pinchart wrote:
> Hi Simon and Daniel,
>
> On Sunday 13 July 2014 11:55:01 Simon Horman wrote:
>> [Cc Olof Johansson, ARM SoC Team]
>>
>> On Wed, Jul 09, 2014 at 11:59:16AM +0200, Laurent Pinchart wrote:
>>> On Friday 04 July 2014 15:53:32 Laurent Pinchart wrote:
>>>> Hi Daniel,
>>>>
>>>> Could you please pull the following changes and drop the first version
>>>> of this pull request ? I've fixed one last typo noticed by Simon in
>>>> patch 09/19.
>>>>
>>>> As last time I have board and SoC changes that depend on the driver
>>>> changes and that will need to go through Simon's tree. Could you thus
>>>> please provide a stable branch based on one of the v3.16-rc tags ?
>>>
>>> Given that I'd like to get the arch/ part of the change set in v3.17,
>>> could I ask you to fast track this pull request if possible ?
>>
>> Hi Laurent, Hi Daniel,
>>
>> I am wondering what the status of this pull request is. It would be nice
>> to get the arch/ changes into v3.17 but we are getting closer to v3.16-rc6
>> and I need to have things queued up before then.
>>
>> I have also CCed Olof and the ARM SoC team (via arm at kernel.org) as
>> if Daniel does provide a stable branch that includes this pull request and
>> I use it as the basis for a branch with the arch changes then the
>> ARM SoC people would like to know about it before I send a pull request
>> for the arch/ changes.
>
> From my point of view everything is ready for v3.17. Daniel, if you haven't
> been abducted by aliens, could you please process the pull request ? If you
> have, let us know what we can do to help negotiate your release.
Hi Laurent,
sorry for no giving some news. I am in vacation for these two weeks.
I will take care of the PR this evening or tomorrow evening and keep you
in touch rapidly.
-- Daniel
>>>> The following changes since commit
> 4c834452aad01531db949414f94f817a86348d59:
>>>> Linux 3.16-rc3 (2014-06-29 14:11:36 -0700)
>>>>
>>>> are available in the git repository at:
>>>> git://linuxtv.org/pinchartl/fbdev.git timers/upstream/drivers
>>>>
>>>> for you to fetch changes up to cca8d0596c4c7acb371ea1bc5eee9b404b30516a:
>>>> clocksource: sh_mtu2: Add DT support (2014-07-04 15:50:29 +0200)
>>>>
>>>> ----------------------------------------------------------------
>>>>
>>>> Laurent Pinchart (10):
>>>> clocksource: sh_cmt: Drop support for legacy platform data
>>>> clocksource: sh_cmt: Replace global spinlock with a per-device
>>>> spinlock
>>>> clocksource: sh_tmu: Drop support for legacy platform data
>>>> clocksource: sh_tmu: Replace global spinlock with a per-device
>>>> spinlock
>>>> clocksource: sh_mtu2: Drop support for legacy platform data
>>>> clocksource: sh_mtu2: Replace global spinlock with a per-device
>>>> spinlock
>>>> clocksource: shmobile: Remove unused sh_timer_config members
>>>> clocksource: sh_cmt: Add DT support
>>>> clocksource: sh_tmu: Add DT support
>>>> clocksource: sh_mtu2: Add DT support
>>>>
>>>> Documentation/devicetree/bindings/timer/renesas,cmt.txt | 47 +++++
>>>> .../devicetree/bindings/timer/renesas,mtu2.txt | 39 ++++
>>>> Documentation/devicetree/bindings/timer/renesas,tmu.txt | 39 ++++
>>>> drivers/clocksource/sh_cmt.c | 233 +++++----
>>>> drivers/clocksource/sh_mtu2.c | 146 ++++-----
>>>> drivers/clocksource/sh_tmu.c | 127 +++++----
>>>> include/linux/sh_timer.h | 5 -
>>>> 7 files changed, 309 insertions(+), 327 deletions(-)
>>>> create mode 100644
>>>> Documentation/devicetree/bindings/timer/renesas,cmt.txt
>>>> create mode 100644
>>>> Documentation/devicetree/bindings/timer/renesas,mtu2.txt
>>>> create mode 100644
>>>> Documentation/devicetree/bindings/timer/renesas,tmu.txt
>
--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 35+ messages in thread
* [GIT PULL v2 FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support
2014-07-13 14:42 ` Daniel Lezcano
@ 2014-07-13 20:39 ` Simon Horman
2014-07-14 21:54 ` Daniel Lezcano
2014-07-14 9:06 ` Laurent Pinchart
1 sibling, 1 reply; 35+ messages in thread
From: Simon Horman @ 2014-07-13 20:39 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Jul 13, 2014 at 04:42:09PM +0200, Daniel Lezcano wrote:
> On 07/13/2014 03:00 PM, Laurent Pinchart wrote:
> >Hi Simon and Daniel,
> >
> >On Sunday 13 July 2014 11:55:01 Simon Horman wrote:
> >>[Cc Olof Johansson, ARM SoC Team]
> >>
> >>On Wed, Jul 09, 2014 at 11:59:16AM +0200, Laurent Pinchart wrote:
> >>>On Friday 04 July 2014 15:53:32 Laurent Pinchart wrote:
> >>>>Hi Daniel,
> >>>>
> >>>>Could you please pull the following changes and drop the first version
> >>>>of this pull request ? I've fixed one last typo noticed by Simon in
> >>>>patch 09/19.
> >>>>
> >>>>As last time I have board and SoC changes that depend on the driver
> >>>>changes and that will need to go through Simon's tree. Could you thus
> >>>>please provide a stable branch based on one of the v3.16-rc tags ?
> >>>
> >>>Given that I'd like to get the arch/ part of the change set in v3.17,
> >>>could I ask you to fast track this pull request if possible ?
> >>
> >>Hi Laurent, Hi Daniel,
> >>
> >>I am wondering what the status of this pull request is. It would be nice
> >>to get the arch/ changes into v3.17 but we are getting closer to v3.16-rc6
> >>and I need to have things queued up before then.
> >>
> >>I have also CCed Olof and the ARM SoC team (via arm at kernel.org) as
> >>if Daniel does provide a stable branch that includes this pull request and
> >>I use it as the basis for a branch with the arch changes then the
> >>ARM SoC people would like to know about it before I send a pull request
> >>for the arch/ changes.
> >
> > From my point of view everything is ready for v3.17. Daniel, if you haven't
> >been abducted by aliens, could you please process the pull request ? If you
> >have, let us know what we can do to help negotiate your release.
>
> Hi Laurent,
>
> sorry for no giving some news. I am in vacation for these two weeks.
>
> I will take care of the PR this evening or tomorrow evening and keep you in
> touch rapidly.
Hi Daniel,
thanks in advance. If you could create a stable branch for me to
use as a base for the arch/ patches that would be great.
> -- Daniel
>
>
> >>>>The following changes since commit
> >4c834452aad01531db949414f94f817a86348d59:
> >>>> Linux 3.16-rc3 (2014-06-29 14:11:36 -0700)
> >>>>
> >>>>are available in the git repository at:
> >>>> git://linuxtv.org/pinchartl/fbdev.git timers/upstream/drivers
> >>>>
> >>>>for you to fetch changes up to cca8d0596c4c7acb371ea1bc5eee9b404b30516a:
> >>>> clocksource: sh_mtu2: Add DT support (2014-07-04 15:50:29 +0200)
> >>>>
> >>>>----------------------------------------------------------------
> >>>>
> >>>>Laurent Pinchart (10):
> >>>> clocksource: sh_cmt: Drop support for legacy platform data
> >>>> clocksource: sh_cmt: Replace global spinlock with a per-device
> >>>>spinlock
> >>>> clocksource: sh_tmu: Drop support for legacy platform data
> >>>> clocksource: sh_tmu: Replace global spinlock with a per-device
> >>>>spinlock
> >>>> clocksource: sh_mtu2: Drop support for legacy platform data
> >>>> clocksource: sh_mtu2: Replace global spinlock with a per-device
> >>>>spinlock
> >>>> clocksource: shmobile: Remove unused sh_timer_config members
> >>>> clocksource: sh_cmt: Add DT support
> >>>> clocksource: sh_tmu: Add DT support
> >>>> clocksource: sh_mtu2: Add DT support
> >>>>
> >>>> Documentation/devicetree/bindings/timer/renesas,cmt.txt | 47 +++++
> >>>> .../devicetree/bindings/timer/renesas,mtu2.txt | 39 ++++
> >>>> Documentation/devicetree/bindings/timer/renesas,tmu.txt | 39 ++++
> >>>> drivers/clocksource/sh_cmt.c | 233 +++++----
> >>>> drivers/clocksource/sh_mtu2.c | 146 ++++-----
> >>>> drivers/clocksource/sh_tmu.c | 127 +++++----
> >>>> include/linux/sh_timer.h | 5 -
> >>>> 7 files changed, 309 insertions(+), 327 deletions(-)
> >>>> create mode 100644
> >>>> Documentation/devicetree/bindings/timer/renesas,cmt.txt
> >>>> create mode 100644
> >>>> Documentation/devicetree/bindings/timer/renesas,mtu2.txt
> >>>> create mode 100644
> >>>> Documentation/devicetree/bindings/timer/renesas,tmu.txt
> >
>
>
> --
> <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
>
> Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
> <http://twitter.com/#!/linaroorg> Twitter |
> <http://www.linaro.org/linaro-blog/> Blog
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 35+ messages in thread
* [GIT PULL v2 FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support
2014-07-13 20:39 ` Simon Horman
@ 2014-07-14 21:54 ` Daniel Lezcano
2014-07-15 9:09 ` Simon Horman
0 siblings, 1 reply; 35+ messages in thread
From: Daniel Lezcano @ 2014-07-14 21:54 UTC (permalink / raw)
To: linux-arm-kernel
On 07/13/2014 10:39 PM, Simon Horman wrote:
> On Sun, Jul 13, 2014 at 04:42:09PM +0200, Daniel Lezcano wrote:
>> On 07/13/2014 03:00 PM, Laurent Pinchart wrote:
>>> Hi Simon and Daniel,
>>>
>>> On Sunday 13 July 2014 11:55:01 Simon Horman wrote:
>>>> [Cc Olof Johansson, ARM SoC Team]
>>>>
>>>> On Wed, Jul 09, 2014 at 11:59:16AM +0200, Laurent Pinchart wrote:
>>>>> On Friday 04 July 2014 15:53:32 Laurent Pinchart wrote:
>>>>>> Hi Daniel,
>>>>>>
>>>>>> Could you please pull the following changes and drop the first version
>>>>>> of this pull request ? I've fixed one last typo noticed by Simon in
>>>>>> patch 09/19.
>>>>>>
>>>>>> As last time I have board and SoC changes that depend on the driver
>>>>>> changes and that will need to go through Simon's tree. Could you thus
>>>>>> please provide a stable branch based on one of the v3.16-rc tags ?
>>>>>
>>>>> Given that I'd like to get the arch/ part of the change set in v3.17,
>>>>> could I ask you to fast track this pull request if possible ?
>>>>
>>>> Hi Laurent, Hi Daniel,
>>>>
>>>> I am wondering what the status of this pull request is. It would be nice
>>>> to get the arch/ changes into v3.17 but we are getting closer to v3.16-rc6
>>>> and I need to have things queued up before then.
>>>>
>>>> I have also CCed Olof and the ARM SoC team (via arm at kernel.org) as
>>>> if Daniel does provide a stable branch that includes this pull request and
>>>> I use it as the basis for a branch with the arch changes then the
>>>> ARM SoC people would like to know about it before I send a pull request
>>>> for the arch/ changes.
>>>
>>> From my point of view everything is ready for v3.17. Daniel, if you haven't
>>> been abducted by aliens, could you please process the pull request ? If you
>>> have, let us know what we can do to help negotiate your release.
>>
>> Hi Laurent,
>>
>> sorry for no giving some news. I am in vacation for these two weeks.
>>
>> I will take care of the PR this evening or tomorrow evening and keep you in
>> touch rapidly.
>
> Hi Daniel,
>
> thanks in advance. If you could create a stable branch for me to
> use as a base for the arch/ patches that would be great.
Hi Simon and Laurent,
I pulled in the following branch:
git://git.linaro.org/people/daniel.lezcano/linux.git
clockevents/renesas-timers-dt
I will keep this branch untouched and it will be merge in the 3.17 branch.
Thanks
-- Daniel
>
>> -- Daniel
>>
>>
>>>>>> The following changes since commit
>>> 4c834452aad01531db949414f94f817a86348d59:
>>>>>> Linux 3.16-rc3 (2014-06-29 14:11:36 -0700)
>>>>>>
>>>>>> are available in the git repository at:
>>>>>> git://linuxtv.org/pinchartl/fbdev.git timers/upstream/drivers
>>>>>>
>>>>>> for you to fetch changes up to cca8d0596c4c7acb371ea1bc5eee9b404b30516a:
>>>>>> clocksource: sh_mtu2: Add DT support (2014-07-04 15:50:29 +0200)
>>>>>>
>>>>>> ----------------------------------------------------------------
>>>>>>
>>>>>> Laurent Pinchart (10):
>>>>>> clocksource: sh_cmt: Drop support for legacy platform data
>>>>>> clocksource: sh_cmt: Replace global spinlock with a per-device
>>>>>> spinlock
>>>>>> clocksource: sh_tmu: Drop support for legacy platform data
>>>>>> clocksource: sh_tmu: Replace global spinlock with a per-device
>>>>>> spinlock
>>>>>> clocksource: sh_mtu2: Drop support for legacy platform data
>>>>>> clocksource: sh_mtu2: Replace global spinlock with a per-device
>>>>>> spinlock
>>>>>> clocksource: shmobile: Remove unused sh_timer_config members
>>>>>> clocksource: sh_cmt: Add DT support
>>>>>> clocksource: sh_tmu: Add DT support
>>>>>> clocksource: sh_mtu2: Add DT support
>>>>>>
>>>>>> Documentation/devicetree/bindings/timer/renesas,cmt.txt | 47 +++++
>>>>>> .../devicetree/bindings/timer/renesas,mtu2.txt | 39 ++++
>>>>>> Documentation/devicetree/bindings/timer/renesas,tmu.txt | 39 ++++
>>>>>> drivers/clocksource/sh_cmt.c | 233 +++++----
>>>>>> drivers/clocksource/sh_mtu2.c | 146 ++++-----
>>>>>> drivers/clocksource/sh_tmu.c | 127 +++++----
>>>>>> include/linux/sh_timer.h | 5 -
>>>>>> 7 files changed, 309 insertions(+), 327 deletions(-)
>>>>>> create mode 100644
>>>>>> Documentation/devicetree/bindings/timer/renesas,cmt.txt
>>>>>> create mode 100644
>>>>>> Documentation/devicetree/bindings/timer/renesas,mtu2.txt
>>>>>> create mode 100644
>>>>>> Documentation/devicetree/bindings/timer/renesas,tmu.txt
>>>
>>
>>
>> --
>> <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
>>
>> Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
>> <http://twitter.com/#!/linaroorg> Twitter |
>> <http://www.linaro.org/linaro-blog/> Blog
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
>> the body of a message to majordomo at vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 35+ messages in thread
* [GIT PULL v2 FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support
2014-07-14 21:54 ` Daniel Lezcano
@ 2014-07-15 9:09 ` Simon Horman
0 siblings, 0 replies; 35+ messages in thread
From: Simon Horman @ 2014-07-15 9:09 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jul 14, 2014 at 11:54:01PM +0200, Daniel Lezcano wrote:
> On 07/13/2014 10:39 PM, Simon Horman wrote:
> >On Sun, Jul 13, 2014 at 04:42:09PM +0200, Daniel Lezcano wrote:
> >>On 07/13/2014 03:00 PM, Laurent Pinchart wrote:
> >>>Hi Simon and Daniel,
> >>>
> >>>On Sunday 13 July 2014 11:55:01 Simon Horman wrote:
> >>>>[Cc Olof Johansson, ARM SoC Team]
> >>>>
> >>>>On Wed, Jul 09, 2014 at 11:59:16AM +0200, Laurent Pinchart wrote:
> >>>>>On Friday 04 July 2014 15:53:32 Laurent Pinchart wrote:
> >>>>>>Hi Daniel,
> >>>>>>
> >>>>>>Could you please pull the following changes and drop the first version
> >>>>>>of this pull request ? I've fixed one last typo noticed by Simon in
> >>>>>>patch 09/19.
> >>>>>>
> >>>>>>As last time I have board and SoC changes that depend on the driver
> >>>>>>changes and that will need to go through Simon's tree. Could you thus
> >>>>>>please provide a stable branch based on one of the v3.16-rc tags ?
> >>>>>
> >>>>>Given that I'd like to get the arch/ part of the change set in v3.17,
> >>>>>could I ask you to fast track this pull request if possible ?
> >>>>
> >>>>Hi Laurent, Hi Daniel,
> >>>>
> >>>>I am wondering what the status of this pull request is. It would be nice
> >>>>to get the arch/ changes into v3.17 but we are getting closer to v3.16-rc6
> >>>>and I need to have things queued up before then.
> >>>>
> >>>>I have also CCed Olof and the ARM SoC team (via arm at kernel.org) as
> >>>>if Daniel does provide a stable branch that includes this pull request and
> >>>>I use it as the basis for a branch with the arch changes then the
> >>>>ARM SoC people would like to know about it before I send a pull request
> >>>>for the arch/ changes.
> >>>
> >>> From my point of view everything is ready for v3.17. Daniel, if you haven't
> >>>been abducted by aliens, could you please process the pull request ? If you
> >>>have, let us know what we can do to help negotiate your release.
> >>
> >>Hi Laurent,
> >>
> >>sorry for no giving some news. I am in vacation for these two weeks.
> >>
> >>I will take care of the PR this evening or tomorrow evening and keep you in
> >>touch rapidly.
> >
> >Hi Daniel,
> >
> >thanks in advance. If you could create a stable branch for me to
> >use as a base for the arch/ patches that would be great.
>
>
> Hi Simon and Laurent,
>
> I pulled in the following branch:
>
> git://git.linaro.org/people/daniel.lezcano/linux.git
> clockevents/renesas-timers-dt
>
> I will keep this branch untouched and it will be merge in the 3.17 branch.
Thanks!
^ permalink raw reply [flat|nested] 35+ messages in thread
* [GIT PULL v2 FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support
2014-07-13 14:42 ` Daniel Lezcano
2014-07-13 20:39 ` Simon Horman
@ 2014-07-14 9:06 ` Laurent Pinchart
2014-07-14 10:20 ` Daniel Lezcano
1 sibling, 1 reply; 35+ messages in thread
From: Laurent Pinchart @ 2014-07-14 9:06 UTC (permalink / raw)
To: linux-arm-kernel
Hi Daniel,
On Sunday 13 July 2014 16:42:09 Daniel Lezcano wrote:
> On 07/13/2014 03:00 PM, Laurent Pinchart wrote:
> > On Sunday 13 July 2014 11:55:01 Simon Horman wrote:
> >> [Cc Olof Johansson, ARM SoC Team]
> >>
> >> On Wed, Jul 09, 2014 at 11:59:16AM +0200, Laurent Pinchart wrote:
> >>> On Friday 04 July 2014 15:53:32 Laurent Pinchart wrote:
> >>>> Hi Daniel,
> >>>>
> >>>> Could you please pull the following changes and drop the first version
> >>>> of this pull request ? I've fixed one last typo noticed by Simon in
> >>>> patch 09/19.
> >>>>
> >>>> As last time I have board and SoC changes that depend on the driver
> >>>> changes and that will need to go through Simon's tree. Could you thus
> >>>> please provide a stable branch based on one of the v3.16-rc tags ?
> >>>
> >>> Given that I'd like to get the arch/ part of the change set in v3.17,
> >>> could I ask you to fast track this pull request if possible ?
> >>
> >> Hi Laurent, Hi Daniel,
> >>
> >> I am wondering what the status of this pull request is. It would be nice
> >> to get the arch/ changes into v3.17 but we are getting closer to
> >> v3.16-rc6 and I need to have things queued up before then.
> >>
> >> I have also CCed Olof and the ARM SoC team (via arm at kernel.org) as
> >> if Daniel does provide a stable branch that includes this pull request
> >> and I use it as the basis for a branch with the arch changes then the
> >> ARM SoC people would like to know about it before I send a pull request
> >> for the arch/ changes.
> >>
> > From my point of view everything is ready for v3.17. Daniel, if you
> > haven't been abducted by aliens, could you please process the pull request
> > ? If you have, let us know what we can do to help negotiate your release.
>
> Hi Laurent,
>
> sorry for no giving some news. I am in vacation for these two weeks.
>
> I will take care of the PR this evening or tomorrow evening and keep you
> in touch rapidly.
Thank you, and sorry for disturbing you during your holidays. Next time if you
setup an automatic e-mail reply I'll be more patient and won't worry about
aliens :-)
> >>>> The following changes since commit
> >
> > 4c834452aad01531db949414f94f817a86348d59:
> >>>> Linux 3.16-rc3 (2014-06-29 14:11:36 -0700)
> >>>>
> >>>> are available in the git repository at:
> >>>> git://linuxtv.org/pinchartl/fbdev.git timers/upstream/drivers
> >>>>
> >>>> for you to fetch changes up to
cca8d0596c4c7acb371ea1bc5eee9b404b30516a:
> >>>> clocksource: sh_mtu2: Add DT support (2014-07-04 15:50:29 +0200)
> >>>>
> >>>> ----------------------------------------------------------------
> >>>>
> >>>> Laurent Pinchart (10):
> >>>> clocksource: sh_cmt: Drop support for legacy platform data
> >>>> clocksource: sh_cmt: Replace global spinlock with a per-device
> >>>> spinlock
> >>>> clocksource: sh_tmu: Drop support for legacy platform data
> >>>> clocksource: sh_tmu: Replace global spinlock with a per-device
> >>>> spinlock
> >>>> clocksource: sh_mtu2: Drop support for legacy platform data
> >>>> clocksource: sh_mtu2: Replace global spinlock with a per-device
> >>>> spinlock
> >>>> clocksource: shmobile: Remove unused sh_timer_config members
> >>>> clocksource: sh_cmt: Add DT support
> >>>> clocksource: sh_tmu: Add DT support
> >>>> clocksource: sh_mtu2: Add DT support
> >>>>
> >>>> Documentation/devicetree/bindings/timer/renesas,cmt.txt | 47 +++++
> >>>> .../devicetree/bindings/timer/renesas,mtu2.txt | 39 ++++
> >>>> Documentation/devicetree/bindings/timer/renesas,tmu.txt | 39 ++++
> >>>> drivers/clocksource/sh_cmt.c | 233 ++++---
> >>>> drivers/clocksource/sh_mtu2.c | 146 +++----
> >>>> drivers/clocksource/sh_tmu.c | 127 ++++---
> >>>> include/linux/sh_timer.h | 5 -
> >>>> 7 files changed, 309 insertions(+), 327 deletions(-)
> >>>> create mode 100644
> >>>> Documentation/devicetree/bindings/timer/renesas,cmt.txt
> >>>> create mode 100644
> >>>> Documentation/devicetree/bindings/timer/renesas,mtu2.txt
> >>>> create mode 100644
> >>>> Documentation/devicetree/bindings/timer/renesas,tmu.txt
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 35+ messages in thread
* [GIT PULL v2 FOR v3.17] Renesas CMT, MTU2 and TMU timers DT support
2014-07-14 9:06 ` Laurent Pinchart
@ 2014-07-14 10:20 ` Daniel Lezcano
0 siblings, 0 replies; 35+ messages in thread
From: Daniel Lezcano @ 2014-07-14 10:20 UTC (permalink / raw)
To: linux-arm-kernel
On 07/14/2014 11:06 AM, Laurent Pinchart wrote:
> Hi Daniel,
>
> On Sunday 13 July 2014 16:42:09 Daniel Lezcano wrote:
>> On 07/13/2014 03:00 PM, Laurent Pinchart wrote:
>>> On Sunday 13 July 2014 11:55:01 Simon Horman wrote:
>>>> [Cc Olof Johansson, ARM SoC Team]
>>>>
>>>> On Wed, Jul 09, 2014 at 11:59:16AM +0200, Laurent Pinchart wrote:
>>>>> On Friday 04 July 2014 15:53:32 Laurent Pinchart wrote:
>>>>>> Hi Daniel,
>>>>>>
>>>>>> Could you please pull the following changes and drop the first version
>>>>>> of this pull request ? I've fixed one last typo noticed by Simon in
>>>>>> patch 09/19.
>>>>>>
>>>>>> As last time I have board and SoC changes that depend on the driver
>>>>>> changes and that will need to go through Simon's tree. Could you thus
>>>>>> please provide a stable branch based on one of the v3.16-rc tags ?
>>>>>
>>>>> Given that I'd like to get the arch/ part of the change set in v3.17,
>>>>> could I ask you to fast track this pull request if possible ?
>>>>
>>>> Hi Laurent, Hi Daniel,
>>>>
>>>> I am wondering what the status of this pull request is. It would be nice
>>>> to get the arch/ changes into v3.17 but we are getting closer to
>>>> v3.16-rc6 and I need to have things queued up before then.
>>>>
>>>> I have also CCed Olof and the ARM SoC team (via arm at kernel.org) as
>>>> if Daniel does provide a stable branch that includes this pull request
>>>> and I use it as the basis for a branch with the arch changes then the
>>>> ARM SoC people would like to know about it before I send a pull request
>>>> for the arch/ changes.
>>>>
>>> From my point of view everything is ready for v3.17. Daniel, if you
>>> haven't been abducted by aliens, could you please process the pull request
>>> ? If you have, let us know what we can do to help negotiate your release.
>>
>> Hi Laurent,
>>
>> sorry for no giving some news. I am in vacation for these two weeks.
>>
>> I will take care of the PR this evening or tomorrow evening and keep you
>> in touch rapidly.
>
> Thank you, and sorry for disturbing you during your holidays. Next time if you
> setup an automatic e-mail reply I'll be more patient and won't worry about
> aliens :-)
:)
right, I should have. I didn't think about it.
Thanks
-- Daniel
>>>>>> The following changes since commit
>>>
>>> 4c834452aad01531db949414f94f817a86348d59:
>>>>>> Linux 3.16-rc3 (2014-06-29 14:11:36 -0700)
>>>>>>
>>>>>> are available in the git repository at:
>>>>>> git://linuxtv.org/pinchartl/fbdev.git timers/upstream/drivers
>>>>>>
>>>>>> for you to fetch changes up to
> cca8d0596c4c7acb371ea1bc5eee9b404b30516a:
>>>>>> clocksource: sh_mtu2: Add DT support (2014-07-04 15:50:29 +0200)
>>>>>>
>>>>>> ----------------------------------------------------------------
>>>>>>
>>>>>> Laurent Pinchart (10):
>>>>>> clocksource: sh_cmt: Drop support for legacy platform data
>>>>>> clocksource: sh_cmt: Replace global spinlock with a per-device
>>>>>> spinlock
>>>>>> clocksource: sh_tmu: Drop support for legacy platform data
>>>>>> clocksource: sh_tmu: Replace global spinlock with a per-device
>>>>>> spinlock
>>>>>> clocksource: sh_mtu2: Drop support for legacy platform data
>>>>>> clocksource: sh_mtu2: Replace global spinlock with a per-device
>>>>>> spinlock
>>>>>> clocksource: shmobile: Remove unused sh_timer_config members
>>>>>> clocksource: sh_cmt: Add DT support
>>>>>> clocksource: sh_tmu: Add DT support
>>>>>> clocksource: sh_mtu2: Add DT support
>>>>>>
>>>>>> Documentation/devicetree/bindings/timer/renesas,cmt.txt | 47 +++++
>>>>>> .../devicetree/bindings/timer/renesas,mtu2.txt | 39 ++++
>>>>>> Documentation/devicetree/bindings/timer/renesas,tmu.txt | 39 ++++
>>>>>> drivers/clocksource/sh_cmt.c | 233 ++++---
>>>>>> drivers/clocksource/sh_mtu2.c | 146 +++----
>>>>>> drivers/clocksource/sh_tmu.c | 127 ++++---
>>>>>> include/linux/sh_timer.h | 5 -
>>>>>> 7 files changed, 309 insertions(+), 327 deletions(-)
>>>>>> create mode 100644
>>>>>> Documentation/devicetree/bindings/timer/renesas,cmt.txt
>>>>>> create mode 100644
>>>>>> Documentation/devicetree/bindings/timer/renesas,mtu2.txt
>>>>>> create mode 100644
>>>>>> Documentation/devicetree/bindings/timer/renesas,tmu.txt
>
--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 35+ messages in thread