All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 2/3] cosmetic: atcpit100_timer: Rename function name as atcpit100
@ 2017-11-23  5:39 Andes
  0 siblings, 0 replies; 4+ messages in thread
From: Andes @ 2017-11-23  5:39 UTC (permalink / raw)
  To: u-boot

From: Rick Chen <rick@andestech.com>

Integrate function and struct name as atcpit100 will be
more reasonable.

Signed-off-by: Rick Chen <rick@andestech.com>
---
 drivers/timer/atcpit100_timer.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/timer/atcpit100_timer.c b/drivers/timer/atcpit100_timer.c
index b710c28..d5146dd 100644
--- a/drivers/timer/atcpit100_timer.c
+++ b/drivers/timer/atcpit100_timer.c
@@ -67,51 +67,51 @@ struct atctmr_timer_regs {
 	u32	int_mask;	/* 0x38 */
 };
 
-struct atftmr_timer_platdata {
+struct atcpit_timer_platdata {
 	u32 *regs;
 };
 
-static int atftmr_timer_get_count(struct udevice *dev, u64 *count)
+static int atcpit_timer_get_count(struct udevice *dev, u64 *count)
 {
-	struct atftmr_timer_platdata *plat = dev->platdata;
+	struct atcpit_timer_platdata *plat = dev->platdata;
 	u32 val;
 	val = ~(REG32_TMR(CH_CNT(1))+0xffffffff);
 	*count = timer_conv_64(val);
 	return 0;
 }
 
-static int atctmr_timer_probe(struct udevice *dev)
+static int atcpit_timer_probe(struct udevice *dev)
 {
-	struct atftmr_timer_platdata *plat = dev->platdata;
+	struct atcpit_timer_platdata *plat = dev->platdata;
 	REG32_TMR(CH_REL(1)) = 0xffffffff;
 	REG32_TMR(CH_CTL(1)) = APB_CLK|TMR_32;
 	REG32_TMR(CH_EN) |= CH_TMR_EN(1 , 0);
 	return 0;
 }
 
-static int atctme_timer_ofdata_to_platdata(struct udevice *dev)
+static int atcpit_timer_ofdata_to_platdata(struct udevice *dev)
 {
-	struct atftmr_timer_platdata *plat = dev_get_platdata(dev);
+	struct atcpit_timer_platdata *plat = dev_get_platdata(dev);
 	plat->regs = map_physmem(devfdt_get_addr(dev) , 0x100 , MAP_NOCACHE);
 	return 0;
 }
 
-static const struct timer_ops ag101p_timer_ops = {
-	.get_count = atftmr_timer_get_count,
+static const struct timer_ops atcpit_timer_ops = {
+	.get_count = atcpit_timer_get_count,
 };
 
-static const struct udevice_id ag101p_timer_ids[] = {
+static const struct udevice_id atcpit_timer_ids[] = {
 	{ .compatible = "andestech,atcpit100" },
 	{}
 };
 
-U_BOOT_DRIVER(altera_timer) = {
-	.name	= "ae3xx_timer",
+U_BOOT_DRIVER(atcpit100_timer) = {
+	.name	= "atcpit100_timer",
 	.id	= UCLASS_TIMER,
-	.of_match = ag101p_timer_ids,
-	.ofdata_to_platdata = atctme_timer_ofdata_to_platdata,
-	.platdata_auto_alloc_size = sizeof(struct atftmr_timer_platdata),
-	.probe = atctmr_timer_probe,
-	.ops	= &ag101p_timer_ops,
+	.of_match = atcpit_timer_ids,
+	.ofdata_to_platdata = atcpit_timer_ofdata_to_platdata,
+	.platdata_auto_alloc_size = sizeof(struct atcpit_timer_platdata),
+	.probe = atcpit_timer_probe,
+	.ops	= &atcpit_timer_ops,
 	.flags = DM_FLAG_PRE_RELOC,
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH v2 2/3] cosmetic: atcpit100_timer: Rename function name as atcpit100
  2017-11-27  3:03 Andes
@ 2017-11-27 17:12 ` Simon Glass
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2017-11-27 17:12 UTC (permalink / raw)
  To: u-boot

Hi Andes,

On 26 November 2017 at 20:03, Andes <uboot@andestech.com> wrote:
> From: Rick Chen <rick@andestech.com>
>
> Integrate function and struct name as atcpit100 will be
> more reasonable.
>
> Signed-off-by: Rick Chen <rick@andestech.com>
> ---
>  drivers/timer/atcpit100_timer.c | 34 +++++++++++++++++-----------------
>  1 file changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/timer/atcpit100_timer.c b/drivers/timer/atcpit100_timer.c
> index b710c28..d5146dd 100644
> --- a/drivers/timer/atcpit100_timer.c
> +++ b/drivers/timer/atcpit100_timer.c
> @@ -67,51 +67,51 @@ struct atctmr_timer_regs {
>         u32     int_mask;       /* 0x38 */
>  };
>
> -struct atftmr_timer_platdata {
> +struct atcpit_timer_platdata {
>         u32 *regs;
>  };
>
> -static int atftmr_timer_get_count(struct udevice *dev, u64 *count)
> +static int atcpit_timer_get_count(struct udevice *dev, u64 *count)
>  {
> -       struct atftmr_timer_platdata *plat = dev->platdata;
> +       struct atcpit_timer_platdata *plat = dev->platdata;

dev_get_platdata()

and below

>         u32 val;
>         val = ~(REG32_TMR(CH_CNT(1))+0xffffffff);
>         *count = timer_conv_64(val);
>         return 0;
>  }
>
> -static int atctmr_timer_probe(struct udevice *dev)
> +static int atcpit_timer_probe(struct udevice *dev)
>  {
> -       struct atftmr_timer_platdata *plat = dev->platdata;
> +       struct atcpit_timer_platdata *plat = dev->platdata;
>         REG32_TMR(CH_REL(1)) = 0xffffffff;
>         REG32_TMR(CH_CTL(1)) = APB_CLK|TMR_32;
>         REG32_TMR(CH_EN) |= CH_TMR_EN(1 , 0);
>         return 0;
>  }
>
> -static int atctme_timer_ofdata_to_platdata(struct udevice *dev)
> +static int atcpit_timer_ofdata_to_platdata(struct udevice *dev)
>  {
> -       struct atftmr_timer_platdata *plat = dev_get_platdata(dev);
> +       struct atcpit_timer_platdata *plat = dev_get_platdata(dev);
>         plat->regs = map_physmem(devfdt_get_addr(dev) , 0x100 , MAP_NOCACHE);
>         return 0;
>  }
>
> -static const struct timer_ops ag101p_timer_ops = {
> -       .get_count = atftmr_timer_get_count,
> +static const struct timer_ops atcpit_timer_ops = {
> +       .get_count = atcpit_timer_get_count,
>  };
>
> -static const struct udevice_id ag101p_timer_ids[] = {
> +static const struct udevice_id atcpit_timer_ids[] = {
>         { .compatible = "andestech,atcpit100" },
>         {}
>  };
>
> -U_BOOT_DRIVER(altera_timer) = {
> -       .name   = "ae3xx_timer",
> +U_BOOT_DRIVER(atcpit100_timer) = {
> +       .name   = "atcpit100_timer",
>         .id     = UCLASS_TIMER,
> -       .of_match = ag101p_timer_ids,
> -       .ofdata_to_platdata = atctme_timer_ofdata_to_platdata,
> -       .platdata_auto_alloc_size = sizeof(struct atftmr_timer_platdata),
> -       .probe = atctmr_timer_probe,
> -       .ops    = &ag101p_timer_ops,
> +       .of_match = atcpit_timer_ids,
> +       .ofdata_to_platdata = atcpit_timer_ofdata_to_platdata,
> +       .platdata_auto_alloc_size = sizeof(struct atcpit_timer_platdata),
> +       .probe = atcpit_timer_probe,
> +       .ops    = &atcpit_timer_ops,
>         .flags = DM_FLAG_PRE_RELOC,
>  };
> --
> 2.7.4
>

Regards,
Simon

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH v2 2/3] cosmetic: atcpit100_timer: Rename function name as atcpit100
@ 2017-11-27  3:03 Andes
  2017-11-27 17:12 ` Simon Glass
  0 siblings, 1 reply; 4+ messages in thread
From: Andes @ 2017-11-27  3:03 UTC (permalink / raw)
  To: u-boot

From: Rick Chen <rick@andestech.com>

Integrate function and struct name as atcpit100 will be
more reasonable.

Signed-off-by: Rick Chen <rick@andestech.com>
---
 drivers/timer/atcpit100_timer.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/timer/atcpit100_timer.c b/drivers/timer/atcpit100_timer.c
index b710c28..d5146dd 100644
--- a/drivers/timer/atcpit100_timer.c
+++ b/drivers/timer/atcpit100_timer.c
@@ -67,51 +67,51 @@ struct atctmr_timer_regs {
 	u32	int_mask;	/* 0x38 */
 };
 
-struct atftmr_timer_platdata {
+struct atcpit_timer_platdata {
 	u32 *regs;
 };
 
-static int atftmr_timer_get_count(struct udevice *dev, u64 *count)
+static int atcpit_timer_get_count(struct udevice *dev, u64 *count)
 {
-	struct atftmr_timer_platdata *plat = dev->platdata;
+	struct atcpit_timer_platdata *plat = dev->platdata;
 	u32 val;
 	val = ~(REG32_TMR(CH_CNT(1))+0xffffffff);
 	*count = timer_conv_64(val);
 	return 0;
 }
 
-static int atctmr_timer_probe(struct udevice *dev)
+static int atcpit_timer_probe(struct udevice *dev)
 {
-	struct atftmr_timer_platdata *plat = dev->platdata;
+	struct atcpit_timer_platdata *plat = dev->platdata;
 	REG32_TMR(CH_REL(1)) = 0xffffffff;
 	REG32_TMR(CH_CTL(1)) = APB_CLK|TMR_32;
 	REG32_TMR(CH_EN) |= CH_TMR_EN(1 , 0);
 	return 0;
 }
 
-static int atctme_timer_ofdata_to_platdata(struct udevice *dev)
+static int atcpit_timer_ofdata_to_platdata(struct udevice *dev)
 {
-	struct atftmr_timer_platdata *plat = dev_get_platdata(dev);
+	struct atcpit_timer_platdata *plat = dev_get_platdata(dev);
 	plat->regs = map_physmem(devfdt_get_addr(dev) , 0x100 , MAP_NOCACHE);
 	return 0;
 }
 
-static const struct timer_ops ag101p_timer_ops = {
-	.get_count = atftmr_timer_get_count,
+static const struct timer_ops atcpit_timer_ops = {
+	.get_count = atcpit_timer_get_count,
 };
 
-static const struct udevice_id ag101p_timer_ids[] = {
+static const struct udevice_id atcpit_timer_ids[] = {
 	{ .compatible = "andestech,atcpit100" },
 	{}
 };
 
-U_BOOT_DRIVER(altera_timer) = {
-	.name	= "ae3xx_timer",
+U_BOOT_DRIVER(atcpit100_timer) = {
+	.name	= "atcpit100_timer",
 	.id	= UCLASS_TIMER,
-	.of_match = ag101p_timer_ids,
-	.ofdata_to_platdata = atctme_timer_ofdata_to_platdata,
-	.platdata_auto_alloc_size = sizeof(struct atftmr_timer_platdata),
-	.probe = atctmr_timer_probe,
-	.ops	= &ag101p_timer_ops,
+	.of_match = atcpit_timer_ids,
+	.ofdata_to_platdata = atcpit_timer_ofdata_to_platdata,
+	.platdata_auto_alloc_size = sizeof(struct atcpit_timer_platdata),
+	.probe = atcpit_timer_probe,
+	.ops	= &atcpit_timer_ops,
 	.flags = DM_FLAG_PRE_RELOC,
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH v2 2/3] cosmetic: atcpit100_timer: Rename function name as atcpit100
@ 2017-11-27  2:33 Andes
  0 siblings, 0 replies; 4+ messages in thread
From: Andes @ 2017-11-27  2:33 UTC (permalink / raw)
  To: u-boot

From: Rick Chen <rick@andestech.com>

Integrate function and struct name as atcpit100 will be
more reasonable.

Signed-off-by: Rick Chen <rick@andestech.com>
---
 drivers/timer/atcpit100_timer.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/timer/atcpit100_timer.c b/drivers/timer/atcpit100_timer.c
index b710c28..d5146dd 100644
--- a/drivers/timer/atcpit100_timer.c
+++ b/drivers/timer/atcpit100_timer.c
@@ -67,51 +67,51 @@ struct atctmr_timer_regs {
 	u32	int_mask;	/* 0x38 */
 };
 
-struct atftmr_timer_platdata {
+struct atcpit_timer_platdata {
 	u32 *regs;
 };
 
-static int atftmr_timer_get_count(struct udevice *dev, u64 *count)
+static int atcpit_timer_get_count(struct udevice *dev, u64 *count)
 {
-	struct atftmr_timer_platdata *plat = dev->platdata;
+	struct atcpit_timer_platdata *plat = dev->platdata;
 	u32 val;
 	val = ~(REG32_TMR(CH_CNT(1))+0xffffffff);
 	*count = timer_conv_64(val);
 	return 0;
 }
 
-static int atctmr_timer_probe(struct udevice *dev)
+static int atcpit_timer_probe(struct udevice *dev)
 {
-	struct atftmr_timer_platdata *plat = dev->platdata;
+	struct atcpit_timer_platdata *plat = dev->platdata;
 	REG32_TMR(CH_REL(1)) = 0xffffffff;
 	REG32_TMR(CH_CTL(1)) = APB_CLK|TMR_32;
 	REG32_TMR(CH_EN) |= CH_TMR_EN(1 , 0);
 	return 0;
 }
 
-static int atctme_timer_ofdata_to_platdata(struct udevice *dev)
+static int atcpit_timer_ofdata_to_platdata(struct udevice *dev)
 {
-	struct atftmr_timer_platdata *plat = dev_get_platdata(dev);
+	struct atcpit_timer_platdata *plat = dev_get_platdata(dev);
 	plat->regs = map_physmem(devfdt_get_addr(dev) , 0x100 , MAP_NOCACHE);
 	return 0;
 }
 
-static const struct timer_ops ag101p_timer_ops = {
-	.get_count = atftmr_timer_get_count,
+static const struct timer_ops atcpit_timer_ops = {
+	.get_count = atcpit_timer_get_count,
 };
 
-static const struct udevice_id ag101p_timer_ids[] = {
+static const struct udevice_id atcpit_timer_ids[] = {
 	{ .compatible = "andestech,atcpit100" },
 	{}
 };
 
-U_BOOT_DRIVER(altera_timer) = {
-	.name	= "ae3xx_timer",
+U_BOOT_DRIVER(atcpit100_timer) = {
+	.name	= "atcpit100_timer",
 	.id	= UCLASS_TIMER,
-	.of_match = ag101p_timer_ids,
-	.ofdata_to_platdata = atctme_timer_ofdata_to_platdata,
-	.platdata_auto_alloc_size = sizeof(struct atftmr_timer_platdata),
-	.probe = atctmr_timer_probe,
-	.ops	= &ag101p_timer_ops,
+	.of_match = atcpit_timer_ids,
+	.ofdata_to_platdata = atcpit_timer_ofdata_to_platdata,
+	.platdata_auto_alloc_size = sizeof(struct atcpit_timer_platdata),
+	.probe = atcpit_timer_probe,
+	.ops	= &atcpit_timer_ops,
 	.flags = DM_FLAG_PRE_RELOC,
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-27 17:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-23  5:39 [U-Boot] [PATCH v2 2/3] cosmetic: atcpit100_timer: Rename function name as atcpit100 Andes
2017-11-27  2:33 Andes
2017-11-27  3:03 Andes
2017-11-27 17:12 ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.