Skip to contentSkip to conversation

ARM: shmobile: Remove some of_sh_intc_* functions

PATCH New Nobuhiro Iwamatsu 2 participants 4 messages Nov 22, 2012 – Dec 4, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ARM: shmobile: Remove some of_sh_intc_* functions

This removes of_sh_intc_get_meminfo, of_sh_intc_get_pint and of_sh_intc_get_intc functions. These are not already used.

---
 drivers/sh/intc/of_intc.c |   76 ---------------------------------------------
 include/linux/sh_intc.h   |   28 -----------------
 2 files changed, 104 deletions(-)
drivers/sh/intc/of_intc.c +0 -76
index 30b1090..e833e48 100644
@@ -529,49 +529,6 @@ void __init of_sh_intc_get_skip_syscore_suspend(struct device_node *np,
 		d->skip_syscore_suspend = false;
 }
 
-int __init of_sh_intc_get_meminfo(struct device_node *np,
-				struct resource *res, int res_no)
-{
-	int ret = 0, i;
-
-	for (i = 0 ; i < res_no ; i++) {
-		ret = of_address_to_resource(np, i, &res[i]);
-		if (ret) {
-			pr_err("could not determine device base address\n");
-			return ret;
-		}
-
-		pr_debug("%s: Address 0x%x, size %d\n",
-					__func__, res[i].start, resource_size(&res[i]));
-	}
-
-	return ret;
-}
-
-int __init of_sh_intc_get_pint(struct device_node *np, struct intc_desc *d)
-{
-	/* pint uses vector, mask and sence. */
-	int ret = of_sh_intc_get_vector(np, &d->hw.vectors,
-				&d->hw.nr_vectors);
-	if (ret)
-		return ret;
-
-	ret = of_sh_intc_get_mask(np, &d->hw.mask_regs,
-				&d->hw.nr_mask_regs);
-	if (ret)
-		return ret;
-
-	ret = of_sh_intc_get_sense(np, &d->hw.sense_regs,
-				&d->hw.nr_sense_regs);
-	/* INTC may not need Sence register. */
-	if (ret && ret != -ENOENT)
-		return ret;
-
-	d->of_node = np;
-
-	return 0;
-}
-
 int __init of_sh_intc_get_intc(struct device_node *np, struct intc_desc *d)
 {
 	int ret = of_sh_intc_get_vector(np, &d->hw.vectors,
@@ -611,36 +568,3 @@ int __init of_sh_intc_get_intc(struct device_node *np, struct intc_desc *d)
 
 	return 0;
 }
-
-int __init of_sh_intc_get_intc_pins(struct device_node *np,
-				struct intc_desc *d)
-{
-	int ret = of_sh_intc_get_vector(np, &d->hw.vectors,
-				&d->hw.nr_vectors);
-	if (ret)
-		return ret;
-
-	ret = of_sh_intc_get_mask(np, &d->hw.mask_regs,
-				&d->hw.nr_mask_regs);
-	if (ret)
-		return ret;
-
-	ret = of_sh_intc_get_prio(np, &d->hw.prio_regs,
-				&d->hw.nr_prio_regs);
-	if (ret)
-		return ret;
-
-	ret = of_sh_intc_get_sense(np, &d->hw.sense_regs,
-				&d->hw.nr_sense_regs);
-	if (ret)
-		return ret;
-
-	ret = of_sh_intc_get_ack(np, &d->hw.ack_regs,
-				&d->hw.nr_ack_regs);
-	if (ret)
-		return ret;
-
-	d->of_node = np;
-
-	return 0;
-}
include/linux/sh_intc.h +0 -28
index 6603da6..c7954ee 100644
@@ -161,26 +161,6 @@ static inline int register_intc_userimask(unsigned long addr)
 int of_sh_intc_get_intc(struct device_node *np, struct intc_desc *d);
 
 /*
- * of_sh_initc_get_intc_pins() - Get INTC Pins table.
- * @np:     device node to get INTC from
- * @d:      a pointer of intc pins table
- *
- * Return: one of the errno value on the error condition
- */
-int of_sh_intc_get_intc_pins(struct device_node *np, struct intc_desc *d);
-
-/*
- * of_sh_intc_get_meminfo() - Get and set INTC register of memory.
- * @np:     device node to get INTC from
- * @res_mem:   a pointer of resource
- * @res_no:  resource number
- *
- * Return: one of the errno value on the error condition
- */
-int of_sh_intc_get_meminfo(struct device_node *np,
-				struct resource *res_mem, int resno);
-
-/*
  * of_sh_intc_get_force_enable - Get and set force_enable vector in
  *                               struct intc_desc.
  * @np:  device node to get INTC from
@@ -221,13 +201,5 @@ void of_sh_intc_get_skip_syscore_suspend(struct device_node *np,
  * Return: one of the errno value on the error condition
  */
 int of_sh_intc_get_intevtsa_vect(struct device_node *np, unsigned short *vect);
-/*
- * of_sh_initc_get_intc_pint() - Get INTC Pint table.
- * @np:     device node to get INTC from
- * @d:      a pointer of intc pint table
- *
- * Return: one of the errno value on the error condition
- */
-int of_sh_intc_get_pint(struct device_node *np, struct intc_desc *d);
 
 #endif /* __SH_INTC_H */
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/2 ARM: shmobile: Update document for sh_intc of DT

Delete "renesas,sh_intcs" and "renesas,sh_intca_irq_pins" as compatible. This updates the information about these.

---
 Documentation/devicetree/bindings/sh/intc.txt |   15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)
Documentation/devicetree/bindings/sh/intc.txt +2 -13
index ebb2398..04b7f73 100644
@@ -7,10 +7,7 @@ is managed by DT, in order to maintain compatibility.
 
 Main node required properties:
 
-- compatible : should be one of:
-	"renesas,sh_intca"
-	"renesas,sh_intcs"
-	"renesas,sh_intca_irq_pins"
+- compatible : "renesas,sh_intc"
 
 - interrupt-controller : Identifies the node as an interrupt controller
 - #interrupt-cells	: Set already 1.
@@ -100,18 +97,10 @@ Optional:
 	This node required properties:
 	  * vector : This specifies the address phandle of INTCS.
 
-Note:
-- "renesas,sh_intca" needs group_size, intc_group*, intc_vectors,
-  intc_mask_registers and intc_prio_registers.
-- "renesas,sh_intcs" needs group_size, intc_group*, intc_vectors,
-  intc_mask_registers, intc_prio_registers and  intc_intevtsa.
-- "renesas,sh_intca_irq_pins" needs intc_vectors, intc_mask_registers,
-  intc_prio_registers, intc_sense_registers and intc_ack_registers.
-
 Example:
 
 	intca: interrupt-controller at 0 {
-		compatible = "renesas,sh_intca";
+		compatible = "renesas,sh_intc";
 		interrupt-controller;
 		#address-cells = <1>;
 		#size-cells = <1>;
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 1/2 ARM: shmobile: Remove some of_sh_intc_* functions

In reply to Nobuhiro Iwamatsu
Quoted 2 lines · Nobuhiro Iwamatsu

This removes of_sh_intc_get_meminfo, of_sh_intc_get_pint and of_sh_intc_get_intc functions. These are not already used.

Hi Iwamatsu-san,

these patches are for Paul, right?

Quoted 146 lines
---
 drivers/sh/intc/of_intc.c |   76 ---------------------------------------------
 include/linux/sh_intc.h   |   28 -----------------
 2 files changed, 104 deletions(-)
drivers/sh/intc/of_intc.c +0 -76
index 30b1090..e833e48 100644
@@ -529,49 +529,6 @@ void __init of_sh_intc_get_skip_syscore_suspend(struct device_node *np,
 		d->skip_syscore_suspend = false;
 }
 
-int __init of_sh_intc_get_meminfo(struct device_node *np,
-				struct resource *res, int res_no)
-{
-	int ret = 0, i;
-
-	for (i = 0 ; i < res_no ; i++) {
-		ret = of_address_to_resource(np, i, &res[i]);
-		if (ret) {
-			pr_err("could not determine device base address\n");
-			return ret;
-		}
-
-		pr_debug("%s: Address 0x%x, size %d\n",
-					__func__, res[i].start, resource_size(&res[i]));
-	}
-
-	return ret;
-}
-
-int __init of_sh_intc_get_pint(struct device_node *np, struct intc_desc *d)
-{
-	/* pint uses vector, mask and sence. */
-	int ret = of_sh_intc_get_vector(np, &d->hw.vectors,
-				&d->hw.nr_vectors);
-	if (ret)
-		return ret;
-
-	ret = of_sh_intc_get_mask(np, &d->hw.mask_regs,
-				&d->hw.nr_mask_regs);
-	if (ret)
-		return ret;
-
-	ret = of_sh_intc_get_sense(np, &d->hw.sense_regs,
-				&d->hw.nr_sense_regs);
-	/* INTC may not need Sence register. */
-	if (ret && ret != -ENOENT)
-		return ret;
-
-	d->of_node = np;
-
-	return 0;
-}
-
 int __init of_sh_intc_get_intc(struct device_node *np, struct intc_desc *d)
 {
 	int ret = of_sh_intc_get_vector(np, &d->hw.vectors,
@@ -611,36 +568,3 @@ int __init of_sh_intc_get_intc(struct device_node *np, struct intc_desc *d)
 
 	return 0;
 }
-
-int __init of_sh_intc_get_intc_pins(struct device_node *np,
-				struct intc_desc *d)
-{
-	int ret = of_sh_intc_get_vector(np, &d->hw.vectors,
-				&d->hw.nr_vectors);
-	if (ret)
-		return ret;
-
-	ret = of_sh_intc_get_mask(np, &d->hw.mask_regs,
-				&d->hw.nr_mask_regs);
-	if (ret)
-		return ret;
-
-	ret = of_sh_intc_get_prio(np, &d->hw.prio_regs,
-				&d->hw.nr_prio_regs);
-	if (ret)
-		return ret;
-
-	ret = of_sh_intc_get_sense(np, &d->hw.sense_regs,
-				&d->hw.nr_sense_regs);
-	if (ret)
-		return ret;
-
-	ret = of_sh_intc_get_ack(np, &d->hw.ack_regs,
-				&d->hw.nr_ack_regs);
-	if (ret)
-		return ret;
-
-	d->of_node = np;
-
-	return 0;
-}
include/linux/sh_intc.h +0 -28
index 6603da6..c7954ee 100644
@@ -161,26 +161,6 @@ static inline int register_intc_userimask(unsigned long addr)
 int of_sh_intc_get_intc(struct device_node *np, struct intc_desc *d);
 
 /*
- * of_sh_initc_get_intc_pins() - Get INTC Pins table.
- * @np:     device node to get INTC from
- * @d:      a pointer of intc pins table
- *
- * Return: one of the errno value on the error condition
- */
-int of_sh_intc_get_intc_pins(struct device_node *np, struct intc_desc *d);
-
-/*
- * of_sh_intc_get_meminfo() - Get and set INTC register of memory.
- * @np:     device node to get INTC from
- * @res_mem:   a pointer of resource
- * @res_no:  resource number
- *
- * Return: one of the errno value on the error condition
- */
-int of_sh_intc_get_meminfo(struct device_node *np,
-				struct resource *res_mem, int resno);
-
-/*
  * of_sh_intc_get_force_enable - Get and set force_enable vector in
  *                               struct intc_desc.
  * @np:  device node to get INTC from
@@ -221,13 +201,5 @@ void of_sh_intc_get_skip_syscore_suspend(struct device_node *np,
  * Return: one of the errno value on the error condition
  */
 int of_sh_intc_get_intevtsa_vect(struct device_node *np, unsigned short *vect);
-/*
- * of_sh_initc_get_intc_pint() - Get INTC Pint table.
- * @np:     device node to get INTC from
- * @d:      a pointer of intc pint table
- *
- * Return: one of the errno value on the error condition
- */
-int of_sh_intc_get_pint(struct device_node *np, struct intc_desc *d);
 
 #endif /* __SH_INTC_H */
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH 1/2 ARM: shmobile: Remove some of_sh_intc_* functions

Hi,

No, These patches are to devel/dt of your repository.

Best regards,
Nobuhiro

Quoted 158 lines · Simon Horman
Quoted 2 lines · Nobuhiro Iwamatsu

This removes of_sh_intc_get_meminfo, of_sh_intc_get_pint and of_sh_intc_get_intc functions. These are not already used.

Hi Iwamatsu-san,

these patches are for Paul, right?

Quoted 144 lines
---
 drivers/sh/intc/of_intc.c |   76 ---------------------------------------------
 include/linux/sh_intc.h   |   28 -----------------
 2 files changed, 104 deletions(-)
drivers/sh/intc/of_intc.c +0 -76
index 30b1090..e833e48 100644
@@ -529,49 +529,6 @@ void __init of_sh_intc_get_skip_syscore_suspend(struct device_node *np,
              d->skip_syscore_suspend = false;
 }
 
-int __init of_sh_intc_get_meminfo(struct device_node *np,
-                             struct resource *res, int res_no)
-{
-     int ret = 0, i;
-
-     for (i = 0 ; i < res_no ; i++) {
-             ret = of_address_to_resource(np, i, &res[i]);
-             if (ret) {
-                     pr_err("could not determine device base address\n");
-                     return ret;
-             }
-
-             pr_debug("%s: Address 0x%x, size %d\n",
-                                     __func__, res[i].start, resource_size(&res[i]));
-     }
-
-     return ret;
-}
-
-int __init of_sh_intc_get_pint(struct device_node *np, struct intc_desc *d)
-{
-     /* pint uses vector, mask and sence. */
-     int ret = of_sh_intc_get_vector(np, &d->hw.vectors,
-                             &d->hw.nr_vectors);
-     if (ret)
-             return ret;
-
-     ret = of_sh_intc_get_mask(np, &d->hw.mask_regs,
-                             &d->hw.nr_mask_regs);
-     if (ret)
-             return ret;
-
-     ret = of_sh_intc_get_sense(np, &d->hw.sense_regs,
-                             &d->hw.nr_sense_regs);
-     /* INTC may not need Sence register. */
-     if (ret && ret != -ENOENT)
-             return ret;
-
-     d->of_node = np;
-
-     return 0;
-}
-
 int __init of_sh_intc_get_intc(struct device_node *np, struct intc_desc *d)
 {
      int ret = of_sh_intc_get_vector(np, &d->hw.vectors,
@@ -611,36 +568,3 @@ int __init of_sh_intc_get_intc(struct device_node *np, struct intc_desc *d)
 
      return 0;
 }
-
-int __init of_sh_intc_get_intc_pins(struct device_node *np,
-                             struct intc_desc *d)
-{
-     int ret = of_sh_intc_get_vector(np, &d->hw.vectors,
-                             &d->hw.nr_vectors);
-     if (ret)
-             return ret;
-
-     ret = of_sh_intc_get_mask(np, &d->hw.mask_regs,
-                             &d->hw.nr_mask_regs);
-     if (ret)
-             return ret;
-
-     ret = of_sh_intc_get_prio(np, &d->hw.prio_regs,
-                             &d->hw.nr_prio_regs);
-     if (ret)
-             return ret;
-
-     ret = of_sh_intc_get_sense(np, &d->hw.sense_regs,
-                             &d->hw.nr_sense_regs);
-     if (ret)
-             return ret;
-
-     ret = of_sh_intc_get_ack(np, &d->hw.ack_regs,
-                             &d->hw.nr_ack_regs);
-     if (ret)
-             return ret;
-
-     d->of_node = np;
-
-     return 0;
-}
include/linux/sh_intc.h +0 -29
index 6603da6..c7954ee 100644
@@ -161,26 +161,6 @@ static inline int register_intc_userimask(unsigned long addr)
 int of_sh_intc_get_intc(struct device_node *np, struct intc_desc *d);
 
 /*
- * of_sh_initc_get_intc_pins() - Get INTC Pins table.
- * @np:     device node to get INTC from
- * @d:      a pointer of intc pins table
- *
- * Return: one of the errno value on the error condition
- */
-int of_sh_intc_get_intc_pins(struct device_node *np, struct intc_desc *d);
-
-/*
- * of_sh_intc_get_meminfo() - Get and set INTC register of memory.
- * @np:     device node to get INTC from
- * @res_mem:   a pointer of resource
- * @res_no:  resource number
- *
- * Return: one of the errno value on the error condition
- */
-int of_sh_intc_get_meminfo(struct device_node *np,
-                             struct resource *res_mem, int resno);
-
-/*
  * of_sh_intc_get_force_enable - Get and set force_enable vector in
  *                               struct intc_desc.
  * @np:  device node to get INTC from
@@ -221,13 +201,5 @@ void of_sh_intc_get_skip_syscore_suspend(struct device_node *np,
  * Return: one of the errno value on the error condition
  */
 int of_sh_intc_get_intevtsa_vect(struct device_node *np, unsigned short *vect);
-/*
- * of_sh_initc_get_intc_pint() - Get INTC Pint table.
- * @np:     device node to get INTC from
- * @d:      a pointer of intc pint table
- *
- * Return: one of the errno value on the error condition
- */
-int of_sh_intc_get_pint(struct device_node *np, struct intc_desc *d);
 
 #endif /* __SH_INTC_H */
--
Quoted 2 lines

1.7.10.4

--
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

Signature · 1 line
Nobuhiro Iwamatsu