[PATCH V2 0/2] ASoC: OMAP2+: Update Audio IP with sDMA binding for DT boot

2013-03-11 Thread Sebastien Guiriec
This patch serie is converting OMAP Audio IPs in order to use OMAP sDMA DT
binding in case of DT boot on OMAP2+ platforms.

It is depending on the next patches:

[1] http://www.spinics.net/lists/arm-kernel/msg227836.html
[2] http://www.mail-archive.com/linux-omap@vger.kernel.org/msg84668.html

It has been tested on:
- OMAP5 (sEVM/panda)in DT boot (McPDM/DMIC).
- OMAP4 (SDP4430/Panda) in both DT/non DT boot (McPDM/DMIC)
- OMAP3 (Beagle XM) in both DT/non DT boot (McBSP)

Update since v1:
- Put DTS patch in first.
- Squash all OMAP IPs patch together.

Sebastien Guiriec (2):
  ARM: dts: OMAP2+: Add SDMA Audio IPs bindings
  ASoC: OMAP2+: Move McBSP, DMIC and McPDM to generic DMA DT binding

 arch/arm/boot/dts/omap2420.dtsi |6 ++
 arch/arm/boot/dts/omap2430.dtsi |   15 +++
 arch/arm/boot/dts/omap3.dtsi|   15 +++
 arch/arm/boot/dts/omap4.dtsi|   17 +
 arch/arm/boot/dts/omap5.dtsi|   14 ++
 sound/soc/omap/mcbsp.c  |   26 --
 sound/soc/omap/omap-dmic.c  |   15 +--
 sound/soc/omap/omap-mcpdm.c |   22 ++
 sound/soc/omap/omap-pcm.c   |   12 ++--
 sound/soc/omap/omap-pcm.h   |1 +
 10 files changed, 117 insertions(+), 26 deletions(-)

-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH V2 2/2] ASoC: OMAP2+: Move McBSP, DMIC and McPDM to generic DMA DT binding

2013-03-11 Thread Sebastien Guiriec
Update OMAP2+ driver in order to use OMAP DMA DT binding for OMAP2+.
In case of DT boot snd_dmaengine_generic_pcm_open function is used.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 sound/soc/omap/mcbsp.c  |   26 --
 sound/soc/omap/omap-dmic.c  |   15 +--
 sound/soc/omap/omap-mcpdm.c |   22 ++
 sound/soc/omap/omap-pcm.c   |   12 ++--
 sound/soc/omap/omap-pcm.h   |1 +
 5 files changed, 50 insertions(+), 26 deletions(-)

diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
index 285c836..16936493 100644
--- a/sound/soc/omap/mcbsp.c
+++ b/sound/soc/omap/mcbsp.c
@@ -1012,24 +1012,30 @@ int omap_mcbsp_init(struct platform_device *pdev)
}
}
 
-   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, rx);
-   if (!res) {
-   dev_err(pdev-dev, invalid rx DMA channel\n);
-   return -ENODEV;
+   if (!pdev-dev.of_node) {
+   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, rx);
+   if (!res) {
+   dev_err(pdev-dev, invalid rx DMA channel\n);
+   return -ENODEV;
+   }
+   mcbsp-dma_data[1].dma_req = res-start;
}
/* RX DMA request number, and port address configuration */
mcbsp-dma_data[1].name = Audio Capture;
-   mcbsp-dma_data[1].dma_req = res-start;
+   mcbsp-dma_data[1].dma_name = rx;
mcbsp-dma_data[1].port_addr = omap_mcbsp_dma_reg_params(mcbsp, 1);
 
-   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, tx);
-   if (!res) {
-   dev_err(pdev-dev, invalid tx DMA channel\n);
-   return -ENODEV;
+   if (!pdev-dev.of_node) {
+   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, tx);
+   if (!res) {
+   dev_err(pdev-dev, invalid tx DMA channel\n);
+   return -ENODEV;
+   }
+   mcbsp-dma_data[0].dma_req = res-start;
}
/* TX DMA request number, and port address configuration */
mcbsp-dma_data[0].name = Audio Playback;
-   mcbsp-dma_data[0].dma_req = res-start;
+   mcbsp-dma_data[0].dma_name = tx;
mcbsp-dma_data[0].port_addr = omap_mcbsp_dma_reg_params(mcbsp, 0);
 
mcbsp-fclk = clk_get(pdev-dev, fck);
diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c
index ba49ccd..8695b32 100644
--- a/sound/soc/omap/omap-dmic.c
+++ b/sound/soc/omap/omap-dmic.c
@@ -62,6 +62,7 @@ struct omap_dmic {
  */
 static struct omap_pcm_dma_data omap_dmic_dai_dma_params = {
.name   = DMIC capture,
+   .dma_name   = up_link,
 };
 
 static inline void omap_dmic_write(struct omap_dmic *dmic, u16 reg, u32 val)
@@ -478,13 +479,15 @@ static int asoc_dmic_probe(struct platform_device *pdev)
}
omap_dmic_dai_dma_params.port_addr = res-start + OMAP_DMIC_DATA_REG;
 
-   res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
-   if (!res) {
-   dev_err(dmic-dev, invalid dma resource\n);
-   ret = -ENODEV;
-   goto err_put_clk;
+   if (!pdev-dev.of_node) {
+   res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
+   if (!res) {
+   dev_err(dmic-dev, invalid dma resource\n);
+   ret = -ENODEV;
+   goto err_put_clk;
+   }
+   omap_dmic_dai_dma_params.dma_req = res-start;
}
-   omap_dmic_dai_dma_params.dma_req = res-start;
 
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, mpu);
if (!res) {
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
index 5ca11bd..f41bac8 100644
--- a/sound/soc/omap/omap-mcpdm.c
+++ b/sound/soc/omap/omap-mcpdm.c
@@ -71,9 +71,11 @@ struct omap_mcpdm {
 static struct omap_pcm_dma_data omap_mcpdm_dai_dma_params[] = {
{
.name = Audio playback,
+   .dma_name = dn_link,
},
{
.name = Audio capture,
+   .dma_name = up_link,
},
 };
 
@@ -449,17 +451,21 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
omap_mcpdm_dai_dma_params[0].port_addr = res-start + MCPDM_REG_DN_DATA;
omap_mcpdm_dai_dma_params[1].port_addr = res-start + MCPDM_REG_UP_DATA;
 
-   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, dn_link);
-   if (!res)
-   return -ENODEV;
+   if (!pdev-dev.of_node) {
+   res = platform_get_resource_byname(pdev, IORESOURCE_DMA,
+  dn_link);
+   if (!res)
+   return -ENODEV;
 
-   omap_mcpdm_dai_dma_params[0].dma_req = res-start;
+   omap_mcpdm_dai_dma_params[0].dma_req = res-start;
 
-   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, up_link

[PATCH V2 1/2] ARM: dts: OMAP2+: Add SDMA Audio IPs bindings

2013-03-11 Thread Sebastien Guiriec
Populate DMA client information for McBSP DMIC and McPDM periperhal on
OMAP2+ devices.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 arch/arm/boot/dts/omap2420.dtsi |6 ++
 arch/arm/boot/dts/omap2430.dtsi |   15 +++
 arch/arm/boot/dts/omap3.dtsi|   15 +++
 arch/arm/boot/dts/omap4.dtsi|   17 +
 arch/arm/boot/dts/omap5.dtsi|   14 ++
 5 files changed, 67 insertions(+)

diff --git a/arch/arm/boot/dts/omap2420.dtsi b/arch/arm/boot/dts/omap2420.dtsi
index af65609..45930f2 100644
--- a/arch/arm/boot/dts/omap2420.dtsi
+++ b/arch/arm/boot/dts/omap2420.dtsi
@@ -37,6 +37,9 @@
 60; /* RX interrupt */
interrupt-names = tx, rx;
ti,hwmods = mcbsp1;
+   dmas = sdma 31,
+  sdma 32;
+   dma-names = tx, rx;
};
 
mcbsp2: mcbsp@48076000 {
@@ -47,6 +50,9 @@
 63; /* RX interrupt */
interrupt-names = tx, rx;
ti,hwmods = mcbsp2;
+   dmas = sdma 33,
+  sdma 34;
+   dma-names = tx, rx;
};
 
timer1: timer@48028000 {
diff --git a/arch/arm/boot/dts/omap2430.dtsi b/arch/arm/boot/dts/omap2430.dtsi
index c392445..cfe7ed9 100644
--- a/arch/arm/boot/dts/omap2430.dtsi
+++ b/arch/arm/boot/dts/omap2430.dtsi
@@ -40,6 +40,9 @@
interrupt-names = common, tx, rx, rx_overflow;
ti,buffer-size = 128;
ti,hwmods = mcbsp1;
+   dmas = sdma 31,
+  sdma 32;
+   dma-names = tx, rx;
};
 
mcbsp2: mcbsp@48076000 {
@@ -52,6 +55,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp2;
+   dmas = sdma 33,
+  sdma 34;
+   dma-names = tx, rx;
};
 
mcbsp3: mcbsp@4808c000 {
@@ -64,6 +70,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp3;
+   dmas = sdma 17,
+  sdma 18;
+   dma-names = tx, rx;
};
 
mcbsp4: mcbsp@4808e000 {
@@ -76,6 +85,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp4;
+   dmas = sdma 19,
+  sdma 20;
+   dma-names = tx, rx;
};
 
mcbsp5: mcbsp@48096000 {
@@ -88,6 +100,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp5;
+   dmas = sdma 21,
+  sdma 22;
+   dma-names = tx, rx;
};
 
timer1: timer@49018000 {
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 4e7acb6..f901404 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -289,6 +289,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp1;
+   dmas = sdma 31,
+  sdma 32;
+   dma-names = tx, rx;
};
 
mcbsp2: mcbsp@49022000 {
@@ -303,6 +306,9 @@
interrupt-names = common, tx, rx, sidetone;
ti,buffer-size = 1280;
ti,hwmods = mcbsp2, mcbsp2_sidetone;
+   dmas = sdma 33,
+  sdma 34;
+   dma-names = tx, rx;
};
 
mcbsp3: mcbsp@49024000 {
@@ -317,6 +323,9 @@
interrupt-names = common, tx, rx, sidetone;
ti,buffer-size = 128;
ti,hwmods = mcbsp3, mcbsp3_sidetone;
+   dmas = sdma 17,
+  sdma 18;
+   dma-names = tx, rx;
};
 
mcbsp4: mcbsp@49026000 {
@@ -329,6 +338,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp4;
+   dmas = sdma 19,
+  sdma 20;
+   dma-names = tx, rx;
};
 
mcbsp5: mcbsp@48096000 {
@@ -341,6 +353,9

[PATCH 0/5] ASoC: OMAP2+: Update Audio IP with sDMA binding for DT boot

2013-03-07 Thread Sebastien Guiriec
This patch serie is converting OMAP Audio IPs in order to use OMAP sDMA DT
binding in case of DT boot on OMAP2+ platforms.

It is depending on the next patches:

[1] http://www.spinics.net/lists/arm-kernel/msg227836.html
[2] http://www.mail-archive.com/linux-omap@vger.kernel.org/msg84668.html

It has been tested on:
- OMAP5 (sEVM/panda)in DT boot (McPDM/DMIC).
- OMAP4 (SDP4430/Panda) in both DT/non DT boot (McPDM/DMIC)
- OMAP3 (Beagle XM) in both DT/non DT boot (McBSP)

Sebastien Guiriec (5):
  ASoC: omap-pcm: Move to generic DMA for DT binding
  ASoC: omap-dmic: Update driver for DMA DT binding.
  ASoC: omap-mcpdm: Update driver for DMA DT binding.
  ASoC: omap-mcbsp:Update driver for DMA DT binding.
  ARM: dts: OMAP2+: Add SDMA Audio IPs bindings

 arch/arm/boot/dts/omap2420.dtsi |6 ++
 arch/arm/boot/dts/omap2430.dtsi |   15 +++
 arch/arm/boot/dts/omap3.dtsi|   15 +++
 arch/arm/boot/dts/omap4.dtsi|   17 +
 arch/arm/boot/dts/omap5.dtsi|   14 ++
 sound/soc/omap/mcbsp.c  |   26 --
 sound/soc/omap/omap-dmic.c  |   15 +--
 sound/soc/omap/omap-mcpdm.c |   22 ++
 sound/soc/omap/omap-pcm.c   |   12 ++--
 sound/soc/omap/omap-pcm.h   |1 +
 10 files changed, 117 insertions(+), 26 deletions(-)

-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/5] ASoC: omap-pcm: Move to generic DMA for DT binding

2013-03-07 Thread Sebastien Guiriec
Update in order to use OMAP DMA DT binding for OMAP2+. In case
of DT boot snd_dmaengine_generic_pcm_open function is used.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 sound/soc/omap/omap-pcm.c |   12 ++--
 sound/soc/omap/omap-pcm.h |1 +
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index c722c2e..df01a95 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -176,13 +176,21 @@ static int omap_pcm_open(struct snd_pcm_substream 
*substream)
 {
struct snd_soc_pcm_runtime *rtd = substream-private_data;
struct omap_pcm_dma_data *dma_data;
+   int ret;
 
snd_soc_set_runtime_hwparams(substream, omap_pcm_hardware);
 
dma_data = snd_soc_dai_get_dma_data(rtd-cpu_dai, substream);
 
-   return snd_dmaengine_pcm_open(substream, omap_dma_filter_fn,
- dma_data-dma_req);
+   if (rtd-cpu_dai-dev-of_node)
+   ret = snd_dmaengine_generic_pcm_open(substream,
+rtd-cpu_dai-dev,
+dma_data-dma_name);
+   else
+   ret = snd_dmaengine_pcm_open(substream, omap_dma_filter_fn,
+dma_data-dma_req);
+
+   return ret;
 }
 
 static int omap_pcm_close(struct snd_pcm_substream *substream)
diff --git a/sound/soc/omap/omap-pcm.h b/sound/soc/omap/omap-pcm.h
index cabe74c..06faa38 100644
--- a/sound/soc/omap/omap-pcm.h
+++ b/sound/soc/omap/omap-pcm.h
@@ -29,6 +29,7 @@ struct snd_pcm_substream;
 
 struct omap_pcm_dma_data {
char*name;  /* stream identifier */
+   char*dma_name;  /* DMA request name */
int dma_req;/* DMA request line */
unsigned long   port_addr;  /* transmit/receive register */
void (*set_threshold)(struct snd_pcm_substream *substream);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/5] ASoC: omap-mcpdm: Update driver for DMA DT binding.

2013-03-07 Thread Sebastien Guiriec
Update the driver in order to use OMAP DMA DT binding instead of
hwmod data for DT boot.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 sound/soc/omap/omap-mcpdm.c |   22 ++
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
index 5ca11bd..f41bac8 100644
--- a/sound/soc/omap/omap-mcpdm.c
+++ b/sound/soc/omap/omap-mcpdm.c
@@ -71,9 +71,11 @@ struct omap_mcpdm {
 static struct omap_pcm_dma_data omap_mcpdm_dai_dma_params[] = {
{
.name = Audio playback,
+   .dma_name = dn_link,
},
{
.name = Audio capture,
+   .dma_name = up_link,
},
 };
 
@@ -449,17 +451,21 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
omap_mcpdm_dai_dma_params[0].port_addr = res-start + MCPDM_REG_DN_DATA;
omap_mcpdm_dai_dma_params[1].port_addr = res-start + MCPDM_REG_UP_DATA;
 
-   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, dn_link);
-   if (!res)
-   return -ENODEV;
+   if (!pdev-dev.of_node) {
+   res = platform_get_resource_byname(pdev, IORESOURCE_DMA,
+  dn_link);
+   if (!res)
+   return -ENODEV;
 
-   omap_mcpdm_dai_dma_params[0].dma_req = res-start;
+   omap_mcpdm_dai_dma_params[0].dma_req = res-start;
 
-   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, up_link);
-   if (!res)
-   return -ENODEV;
+   res = platform_get_resource_byname(pdev, IORESOURCE_DMA,
+  up_link);
+   if (!res)
+   return -ENODEV;
 
-   omap_mcpdm_dai_dma_params[1].dma_req = res-start;
+   omap_mcpdm_dai_dma_params[1].dma_req = res-start;
+   }
 
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, mpu);
if (res == NULL)
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/5] ASoC: omap-dmic: Update driver for DMA DT binding.

2013-03-07 Thread Sebastien Guiriec
Update the driver in order to use OMAP DMA DT binding instead of
hwmod data for DT boot.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 sound/soc/omap/omap-dmic.c |   15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c
index ba49ccd..8695b32 100644
--- a/sound/soc/omap/omap-dmic.c
+++ b/sound/soc/omap/omap-dmic.c
@@ -62,6 +62,7 @@ struct omap_dmic {
  */
 static struct omap_pcm_dma_data omap_dmic_dai_dma_params = {
.name   = DMIC capture,
+   .dma_name   = up_link,
 };
 
 static inline void omap_dmic_write(struct omap_dmic *dmic, u16 reg, u32 val)
@@ -478,13 +479,15 @@ static int asoc_dmic_probe(struct platform_device *pdev)
}
omap_dmic_dai_dma_params.port_addr = res-start + OMAP_DMIC_DATA_REG;
 
-   res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
-   if (!res) {
-   dev_err(dmic-dev, invalid dma resource\n);
-   ret = -ENODEV;
-   goto err_put_clk;
+   if (!pdev-dev.of_node) {
+   res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
+   if (!res) {
+   dev_err(dmic-dev, invalid dma resource\n);
+   ret = -ENODEV;
+   goto err_put_clk;
+   }
+   omap_dmic_dai_dma_params.dma_req = res-start;
}
-   omap_dmic_dai_dma_params.dma_req = res-start;
 
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, mpu);
if (!res) {
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/5] ASoC: omap-mcbsp:Update driver for DMA DT binding.

2013-03-07 Thread Sebastien Guiriec
Update the driver in order to use OMAP DMA DT binding instead of
hwmod data for DT boot.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 sound/soc/omap/mcbsp.c |   26 --
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
index 285c836..16936493 100644
--- a/sound/soc/omap/mcbsp.c
+++ b/sound/soc/omap/mcbsp.c
@@ -1012,24 +1012,30 @@ int omap_mcbsp_init(struct platform_device *pdev)
}
}
 
-   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, rx);
-   if (!res) {
-   dev_err(pdev-dev, invalid rx DMA channel\n);
-   return -ENODEV;
+   if (!pdev-dev.of_node) {
+   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, rx);
+   if (!res) {
+   dev_err(pdev-dev, invalid rx DMA channel\n);
+   return -ENODEV;
+   }
+   mcbsp-dma_data[1].dma_req = res-start;
}
/* RX DMA request number, and port address configuration */
mcbsp-dma_data[1].name = Audio Capture;
-   mcbsp-dma_data[1].dma_req = res-start;
+   mcbsp-dma_data[1].dma_name = rx;
mcbsp-dma_data[1].port_addr = omap_mcbsp_dma_reg_params(mcbsp, 1);
 
-   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, tx);
-   if (!res) {
-   dev_err(pdev-dev, invalid tx DMA channel\n);
-   return -ENODEV;
+   if (!pdev-dev.of_node) {
+   res = platform_get_resource_byname(pdev, IORESOURCE_DMA, tx);
+   if (!res) {
+   dev_err(pdev-dev, invalid tx DMA channel\n);
+   return -ENODEV;
+   }
+   mcbsp-dma_data[0].dma_req = res-start;
}
/* TX DMA request number, and port address configuration */
mcbsp-dma_data[0].name = Audio Playback;
-   mcbsp-dma_data[0].dma_req = res-start;
+   mcbsp-dma_data[0].dma_name = tx;
mcbsp-dma_data[0].port_addr = omap_mcbsp_dma_reg_params(mcbsp, 0);
 
mcbsp-fclk = clk_get(pdev-dev, fck);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/5] ARM: dts: OMAP2+: Add SDMA Audio IPs bindings

2013-03-07 Thread Sebastien Guiriec
Populate DMA client information for McBSP DMIC and McPDM periperhal on
OMAP2+ devices.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 arch/arm/boot/dts/omap2420.dtsi |6 ++
 arch/arm/boot/dts/omap2430.dtsi |   15 +++
 arch/arm/boot/dts/omap3.dtsi|   15 +++
 arch/arm/boot/dts/omap4.dtsi|   17 +
 arch/arm/boot/dts/omap5.dtsi|   14 ++
 5 files changed, 67 insertions(+)

diff --git a/arch/arm/boot/dts/omap2420.dtsi b/arch/arm/boot/dts/omap2420.dtsi
index af65609..45930f2 100644
--- a/arch/arm/boot/dts/omap2420.dtsi
+++ b/arch/arm/boot/dts/omap2420.dtsi
@@ -37,6 +37,9 @@
 60; /* RX interrupt */
interrupt-names = tx, rx;
ti,hwmods = mcbsp1;
+   dmas = sdma 31,
+  sdma 32;
+   dma-names = tx, rx;
};
 
mcbsp2: mcbsp@48076000 {
@@ -47,6 +50,9 @@
 63; /* RX interrupt */
interrupt-names = tx, rx;
ti,hwmods = mcbsp2;
+   dmas = sdma 33,
+  sdma 34;
+   dma-names = tx, rx;
};
 
timer1: timer@48028000 {
diff --git a/arch/arm/boot/dts/omap2430.dtsi b/arch/arm/boot/dts/omap2430.dtsi
index c392445..cfe7ed9 100644
--- a/arch/arm/boot/dts/omap2430.dtsi
+++ b/arch/arm/boot/dts/omap2430.dtsi
@@ -40,6 +40,9 @@
interrupt-names = common, tx, rx, rx_overflow;
ti,buffer-size = 128;
ti,hwmods = mcbsp1;
+   dmas = sdma 31,
+  sdma 32;
+   dma-names = tx, rx;
};
 
mcbsp2: mcbsp@48076000 {
@@ -52,6 +55,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp2;
+   dmas = sdma 33,
+  sdma 34;
+   dma-names = tx, rx;
};
 
mcbsp3: mcbsp@4808c000 {
@@ -64,6 +70,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp3;
+   dmas = sdma 17,
+  sdma 18;
+   dma-names = tx, rx;
};
 
mcbsp4: mcbsp@4808e000 {
@@ -76,6 +85,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp4;
+   dmas = sdma 19,
+  sdma 20;
+   dma-names = tx, rx;
};
 
mcbsp5: mcbsp@48096000 {
@@ -88,6 +100,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp5;
+   dmas = sdma 21,
+  sdma 22;
+   dma-names = tx, rx;
};
 
timer1: timer@49018000 {
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 4e7acb6..f901404 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -289,6 +289,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp1;
+   dmas = sdma 31,
+  sdma 32;
+   dma-names = tx, rx;
};
 
mcbsp2: mcbsp@49022000 {
@@ -303,6 +306,9 @@
interrupt-names = common, tx, rx, sidetone;
ti,buffer-size = 1280;
ti,hwmods = mcbsp2, mcbsp2_sidetone;
+   dmas = sdma 33,
+  sdma 34;
+   dma-names = tx, rx;
};
 
mcbsp3: mcbsp@49024000 {
@@ -317,6 +323,9 @@
interrupt-names = common, tx, rx, sidetone;
ti,buffer-size = 128;
ti,hwmods = mcbsp3, mcbsp3_sidetone;
+   dmas = sdma 17,
+  sdma 18;
+   dma-names = tx, rx;
};
 
mcbsp4: mcbsp@49026000 {
@@ -329,6 +338,9 @@
interrupt-names = common, tx, rx;
ti,buffer-size = 128;
ti,hwmods = mcbsp4;
+   dmas = sdma 19,
+  sdma 20;
+   dma-names = tx, rx;
};
 
mcbsp5: mcbsp@48096000 {
@@ -341,6 +353,9

[PATCH] ASoC: omap-mcpdm: Clean up with devm_* function

2013-02-12 Thread Sebastien Guiriec
Clean up McPDM driver with devm_ function.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 sound/soc/omap/omap-mcpdm.c |   14 +-
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
index 5ca11bd..079f277 100644
--- a/sound/soc/omap/omap-mcpdm.c
+++ b/sound/soc/omap/omap-mcpdm.c
@@ -369,7 +369,7 @@ static int omap_mcpdm_probe(struct snd_soc_dai *dai)
pm_runtime_get_sync(mcpdm-dev);
omap_mcpdm_write(mcpdm, MCPDM_REG_CTRL, 0x00);
 
-   ret = request_irq(mcpdm-irq, omap_mcpdm_irq_handler,
+   ret = devm_request_irq(mcpdm-dev, mcpdm-irq, omap_mcpdm_irq_handler,
0, McPDM, (void *)mcpdm);
 
pm_runtime_put_sync(mcpdm-dev);
@@ -389,7 +389,6 @@ static int omap_mcpdm_remove(struct snd_soc_dai *dai)
 {
struct omap_mcpdm *mcpdm = snd_soc_dai_get_drvdata(dai);
 
-   free_irq(mcpdm-irq, (void *)mcpdm);
pm_runtime_disable(mcpdm-dev);
 
return 0;
@@ -465,14 +464,11 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
if (res == NULL)
return -ENOMEM;
 
-   if (!devm_request_mem_region(pdev-dev, res-start,
-resource_size(res), McPDM))
-   return -EBUSY;
-
-   mcpdm-io_base = devm_ioremap(pdev-dev, res-start,
- resource_size(res));
-   if (!mcpdm-io_base)
+   mcpdm-io_base = devm_request_and_ioremap(pdev-dev, res);
+   if (!mcpdm-io_base) {
+   dev_err(pdev-dev, cannot remap\n);
return -ENOMEM;
+   }
 
mcpdm-irq = platform_get_irq(pdev, 0);
if (mcpdm-irq  0)
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ASoC: omap-dmic: Clean up with devm_request_and_ioremap

2013-02-12 Thread Sebastien Guiriec
Clean up dmic code with devm_request_and_ioremap function.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 sound/soc/omap/omap-dmic.c |   11 ++-
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c
index ba49ccd..77e9e7e 100644
--- a/sound/soc/omap/omap-dmic.c
+++ b/sound/soc/omap/omap-dmic.c
@@ -493,16 +493,9 @@ static int asoc_dmic_probe(struct platform_device *pdev)
goto err_put_clk;
}
 
-   if (!devm_request_mem_region(pdev-dev, res-start,
-resource_size(res), pdev-name)) {
-   dev_err(dmic-dev, memory region already claimed\n);
-   ret = -ENODEV;
-   goto err_put_clk;
-   }
-
-   dmic-io_base = devm_ioremap(pdev-dev, res-start,
-resource_size(res));
+   dmic-io_base = devm_request_and_ioremap(pdev-dev, res);
if (!dmic-io_base) {
+   dev_err(pdev-dev, cannot remap\n);
ret = -ENOMEM;
goto err_put_clk;
}
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ASoC: omap-mcpdm: Remove useless ressource get.

2013-02-11 Thread Sebastien Guiriec
Remove unused memory ressource get from McPDM driver.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 sound/soc/omap/omap-mcpdm.c |4 
 1 file changed, 4 deletions(-)

diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
index 2fe8be2..5ca11bd 100644
--- a/sound/soc/omap/omap-mcpdm.c
+++ b/sound/soc/omap/omap-mcpdm.c
@@ -449,10 +449,6 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
omap_mcpdm_dai_dma_params[0].port_addr = res-start + MCPDM_REG_DN_DATA;
omap_mcpdm_dai_dma_params[1].port_addr = res-start + MCPDM_REG_UP_DATA;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   if (res == NULL)
-   return -ENOMEM;
-
res = platform_get_resource_byname(pdev, IORESOURCE_DMA, dn_link);
if (!res)
return -ENODEV;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [alsa-devel] [RESEND PATCH v3 2/5] ARM: OMAP4: Assign IDs to DSS HDMI devices

2013-01-25 Thread Sebastien Guiriec

Hi Ricardo,

You need to rebase this patch as the code has been moved to dss-common.c 
file now. So it would not apply.


Sebastien

On 01/05/2013 12:26 AM, Ricardo Neri wrote:

While Pandaboard and SDP4430 have only one HDMI output connector, it may be
possible that future boards and SoCs support more than one HDMI output.
Thus, we define the identifier of the device. This is used by display
common code to identify and create the platform devices for HDMI audio drivers.

Signed-off-by: Ricardo Neri rn...@dextratech.com
---
  arch/arm/mach-omap2/board-4430sdp.c|3 +++
  arch/arm/mach-omap2/board-omap4panda.c |3 +++
  2 files changed, 6 insertions(+)

diff --git a/arch/arm/mach-omap2/board-4430sdp.c 
b/arch/arm/mach-omap2/board-4430sdp.c
index 3669c12..5a486d9 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -666,6 +666,9 @@ static struct omap_dss_device sdp4430_hdmi_device = {
.type = OMAP_DISPLAY_TYPE_HDMI,
.channel = OMAP_DSS_CHANNEL_DIGIT,
.data = sdp4430_hdmi_data,
+   .dev = {
+   .id = -1,
+   },
  };

  static struct picodlp_panel_data sdp4430_picodlp_pdata = {
diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index bfcd397..9f336a3 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -440,6 +440,9 @@ static struct omap_dss_device  omap4_panda_hdmi_device = {
.type = OMAP_DISPLAY_TYPE_HDMI,
.channel = OMAP_DSS_CHANNEL_DIGIT,
.data = omap4_panda_hdmi_data,
+   .dev = {
+   .id = -1,
+   },
  };

  static struct omap_dss_device *omap4_panda_dss_devices[] = {



--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 08/10] ARM: OMAP5: hwmod data: Create initial OMAP5 SOC hwmod data

2013-01-21 Thread Sebastien Guiriec

Hi Santosh

We can also remove all the next data:
omap54xx_l4_abe__aess_dma,
omap54xx_l4_abe__dmic_dma,
omap54xx_l4_abe__mcasp_dma,
omap54xx_l4_abe__mcbsp1_dma,
omap54xx_l4_abe__mcbsp2_dma,
omap54xx_l4_abe__mcbsp3_dma,
omap54xx_l4_abe__mcpdm_dma,
omap54xx_l4_abe__slimbus1_dma,
omap54xx_l4_abe__timer5_dma,
omap54xx_l4_abe__timer6_dma,
omap54xx_l4_abe__timer7_dma,
omap54xx_l4_abe__timer8_dma,
omap54xx_l4_abe__wd_timer3_dma,

It was needed in the past due to the way the lockup between DT data and 
hwmod was done but Peter clean it up in 3.8.


For AESS we just need the last memory bank due to hwmod code for 
SYS_CONFIG access.


Best regards,

Sebastien


On 01/21/2013 09:11 AM, Santosh Shilimkar wrote:

On Friday 18 January 2013 10:45 PM, Tony Lindgren wrote:

Hi,

* Santosh Shilimkar santosh.shilim...@ti.com [130118 07:30]:

From: Benoit Cousson b-cous...@ti.com

Adding the hwmod data for OMAP54xx platforms.
--- /dev/null
+++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
+/* bb2d */
+static struct omap_hwmod_irq_info omap54xx_bb2d_irqs[] = {
+{ .irq = 125 + OMAP54XX_IRQ_GIC_START },
+{ .irq = -1 }
+};

...


+/* c2c */
+static struct omap_hwmod_irq_info omap54xx_c2c_irqs[] = {
+{ .irq = 88 + OMAP54XX_IRQ_GIC_START },
+{ .irq = -1 }
+};

...



+static struct omap_hwmod_dma_info omap54xx_c2c_sdma_reqs[] = {
+{ .dma_req = 68 + OMAP54XX_DMA_REQ_START },
+{ .dma_req = -1 }
+};





+static struct omap_hwmod_addr_space omap54xx_elm_addrs[] = {
+{
+.pa_start= 0x48078000,
+.pa_end= 0x48078fff,
+.flags= ADDR_TYPE_RT
+},
+{ }
+};

...


+static struct omap_hwmod_addr_space omap54xx_emif1_addrs[] = {
+{
+.pa_start= 0x4c00,
+.pa_end= 0x4c0003ff,
+.flags= ADDR_TYPE_RT
+},
+{ }
+};


As discussed earlier on this list, let's not duplicate the standard
resources here as they already are supposed to come from device tree.

Whatever issues prevent us from dropping the duplicate data here need
to be fixed. I believe Benoit already had some scripts/patches for
that and was just waiting for the DMA binding to get merged?


Will have a loot at it. DMA binding pull request narrowly missed
3.8 but should get into 3.9.

Regards
santosh


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 07/10] ARM: OMAP5: clock data: Add OMAP54XX full clock tree and headers

2013-01-21 Thread Sebastien Guiriec

Hi Santosh,

I have push under the omap-audio gitorious two patches on top of your 
series. One for adding the ABE DPLL and a second for the remove of Audio 
DMA addresses.


https://gitorious.org/omap-audio/linux-audio/commits/base/omap5_es2_data

I will try to check Display tomorrow.

Sebastien

On 01/21/2013 03:31 PM, Santosh Shilimkar wrote:

On Monday 21 January 2013 07:57 PM, Sebastien Guiriec wrote:

Hi Santosh,

I check the tree with Audio and it is working. Just a comment for the
addition of ABE DPLL locking like for OMAP4.


Excellent. Can you send the update please?
I will fold that in.

Regards
santosh



--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/5] ARM: OMAP4: Enable AESS IP.

2013-01-18 Thread Sebastien Guiriec

Paul, Benoit,

Any comments before I resend the serie with the minor comment for Felipe?

Sebastien

On 01/09/2013 04:03 PM, Sebastien Guiriec wrote:

v2:
- Add missing AESS memory banks.
- Update the serie base on comments related earlier serie:
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg69853.html

The location of the callback has been updated in order to fit with AESS.
Some call of PM runtime can be done by ASoC core when AESS is in RET so
we need to ensure that the additional callback is call on enable
also in order to have clock correctly stop.

v1:
ARM: OMAP4: Enable AESS IP.

This patch serie extends the the hwmod HWMOD_EXT_OPT_MAIN_CLK flag for the
AESS IP. This IP has additional register for Auto Gatting configuration. As
it is used only for Audio the driver is not always loaded. We can reuse the
same flag as McPDM to work around the HW problem due to bad reset value of
AESS Auto gatting configuration register.

If we try to setup and reset AESS during boot time without this serie the
next clocks will still remain enable.

omapconf abe cfg:
|--|
| ABEClock Domain Configuration|
||-|
| Clock State Transition control | HW-Auto |
| Clock State| |
|   ABE_24M_FCLK | GATED   |
|   ABE_ALWON_32K_CLK| GATED   |
|   ABE_SYSCLK   | GATED   |
|   24M_FCLK | GATED   |
|   ABE_ICLK2| RUNNING |
|   DPLL_ABE_X2_CLK  | RUNNING |
|   PAD_CLKS | GATED   |
|   SLIMBUS_CLK  | GATED   |
| OPP Divider| ABE_CLK = DPLL_ABE_X2_CLK/1 |
|--|

Paul Walmsley (3):
   ARM: OMAP2+: hwmod: add enable_preprogram hook
   ASoC: TI AESS: add autogating-enable function, callable from
 architecture code
   ARM: OMAP4+: AESS: enable internal auto-gating during initial setup

Sebastien Guiriec (2):
   OMAP4: hwmod data: Enable AESS hwmod device
   OMAP4: hwmod data: Update AESS data with memory bank area

  arch/arm/mach-omap2/Makefile   |2 +-
  arch/arm/mach-omap2/omap_hwmod.c   |   18 ++
  arch/arm/mach-omap2/omap_hwmod.h   |8 +
  arch/arm/mach-omap2/omap_hwmod_44xx_data.c |   49 +++--
  arch/arm/mach-omap2/omap_hwmod_reset.c |   52 +++
  include/sound/aess.h   |   53 
  6 files changed, 178 insertions(+), 4 deletions(-)
  create mode 100644 arch/arm/mach-omap2/omap_hwmod_reset.c
  create mode 100644 include/sound/aess.h



--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 0/5] ARM: OMAP4: Enable AESS IP.

2013-01-09 Thread Sebastien Guiriec
v2:
- Add missing AESS memory banks.
- Update the serie base on comments related earlier serie:
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg69853.html

The location of the callback has been updated in order to fit with AESS.
Some call of PM runtime can be done by ASoC core when AESS is in RET so
we need to ensure that the additional callback is call on enable
also in order to have clock correctly stop.

v1:
ARM: OMAP4: Enable AESS IP.

This patch serie extends the the hwmod HWMOD_EXT_OPT_MAIN_CLK flag for the
AESS IP. This IP has additional register for Auto Gatting configuration. As
it is used only for Audio the driver is not always loaded. We can reuse the
same flag as McPDM to work around the HW problem due to bad reset value of
AESS Auto gatting configuration register. 

If we try to setup and reset AESS during boot time without this serie the
next clocks will still remain enable.

omapconf abe cfg:
|--|
| ABEClock Domain Configuration|
||-|
| Clock State Transition control | HW-Auto |
| Clock State| |
|   ABE_24M_FCLK | GATED   |
|   ABE_ALWON_32K_CLK| GATED   |
|   ABE_SYSCLK   | GATED   |
|   24M_FCLK | GATED   |
|   ABE_ICLK2| RUNNING |
|   DPLL_ABE_X2_CLK  | RUNNING |
|   PAD_CLKS | GATED   |
|   SLIMBUS_CLK  | GATED   |
| OPP Divider| ABE_CLK = DPLL_ABE_X2_CLK/1 |
|--|

Paul Walmsley (3):
  ARM: OMAP2+: hwmod: add enable_preprogram hook
  ASoC: TI AESS: add autogating-enable function, callable from
architecture code
  ARM: OMAP4+: AESS: enable internal auto-gating during initial setup

Sebastien Guiriec (2):
  OMAP4: hwmod data: Enable AESS hwmod device
  OMAP4: hwmod data: Update AESS data with memory bank area

 arch/arm/mach-omap2/Makefile   |2 +-
 arch/arm/mach-omap2/omap_hwmod.c   |   18 ++
 arch/arm/mach-omap2/omap_hwmod.h   |8 +
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |   49 +++--
 arch/arm/mach-omap2/omap_hwmod_reset.c |   52 +++
 include/sound/aess.h   |   53 
 6 files changed, 178 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm/mach-omap2/omap_hwmod_reset.c
 create mode 100644 include/sound/aess.h

-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 3/5] ARM: OMAP4+: AESS: enable internal auto-gating during initial setup

2013-01-09 Thread Sebastien Guiriec
From: Paul Walmsley p...@pwsan.com

Enable the AESS auto-gating control bit during AESS hwmod setup.  This
fixes the following boot warning on OMAP4:

omap_hwmod: aess: _wait_target_disable failed

Without this patch, the AESS IP block does not indicate to the PRCM
that it is idle after it is reset.  This prevents some types of SoC
power management until something sets the auto-gating control bit.

Signed-off-by: Paul Walmsley p...@pwsan.com
Signed-off-by: Sebastien Guiriec s-guir...@ti.com
Cc: Benoît Cousson b-cous...@ti.com
Cc: Péter Ujfalusi peter.ujfal...@ti.com
Cc: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/Makefile   |2 +-
 arch/arm/mach-omap2/omap_hwmod.h   |6 
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |1 +
 arch/arm/mach-omap2/omap_hwmod_reset.c |   52 
 4 files changed, 60 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/mach-omap2/omap_hwmod_reset.c

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 947cafe..d88788f 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -8,7 +8,7 @@ obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o 
gpmc.o timer.o pm.o \
 omap_device.o sram.o
 
 omap-2-3-common= irq.o
-hwmod-common   = omap_hwmod.o \
+hwmod-common   = omap_hwmod.o omap_hwmod_reset.o \
  omap_hwmod_common_data.o
 clock-common   = clock.o clock_common_data.o \
  clkt_dpll.o clkt_clksel.o
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index 41066b4..6ec73cb 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -673,6 +673,12 @@ extern void __init omap_hwmod_init(void);
 const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh);
 
 /*
+ *
+ */
+
+extern int omap_hwmod_aess_preprogram(struct omap_hwmod *oh);
+
+/*
  * Chip variant-specific hwmod init routines - XXX should be converted
  * to use initcalls once the initial boot ordering is straightened out
  */
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c 
b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 584acf9..13e397f 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -322,6 +322,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_aess_sysc 
= {
 static struct omap_hwmod_class omap44xx_aess_hwmod_class = {
.name   = aess,
.sysc   = omap44xx_aess_sysc,
+   .enable_preprogram = omap_hwmod_aess_preprogram,
 };
 
 /* aess */
diff --git a/arch/arm/mach-omap2/omap_hwmod_reset.c 
b/arch/arm/mach-omap2/omap_hwmod_reset.c
new file mode 100644
index 000..bba43fa
--- /dev/null
+++ b/arch/arm/mach-omap2/omap_hwmod_reset.c
@@ -0,0 +1,52 @@
+/*
+ * OMAP IP block custom reset and preprogramming stubs
+ *
+ * Copyright (C) 2012 Texas Instruments, Inc.
+ * Paul Walmsley
+ *
+ * A small number of IP blocks need custom reset and preprogramming
+ * functions.  The stubs in this file provide a standard way for the
+ * hwmod code to call these functions, which are to be located under
+ * drivers/.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed as is WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+#include linux/kernel.h
+
+#include sound/aess.h
+
+#include omap_hwmod.h
+
+/**
+ * omap_hwmod_aess_preprogram - enable AESS internal autogating
+ * @oh: struct omap_hwmod *
+ *
+ * The AESS will not IdleAck to the PRCM until its internal autogating
+ * is enabled.  Since internal autogating is disabled by default after
+ * AESS reset, we must enable autogating after the hwmod code resets
+ * the AESS.  Returns 0.
+ */
+int omap_hwmod_aess_preprogram(struct omap_hwmod *oh)
+{
+   void __iomem *va;
+
+   va = omap_hwmod_get_mpu_rt_va(oh);
+   if (!va)
+   return -EINVAL;
+
+   aess_enable_autogating(va);
+
+   return 0;
+}
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 1/5] ARM: OMAP2+: hwmod: add enable_preprogram hook

2013-01-09 Thread Sebastien Guiriec
From: Paul Walmsley p...@pwsan.com

After setup/enable, some IP blocks need some additional setting to
indicate the PRCM that they are inactive until they are configured.
Some examples on OMAP4 include the AESS and FSUSB IP blocks.

To fix this cleanly, this patch adds another optional function
pointer, setup_preprogram, to the IP block's hwmod data.  The function
that is pointed to is called by the hwmod code immediately after the
IP block is reset.

Signed-off-by: Paul Walmsley p...@pwsan.com
Signed-off-by: Sebastien Guiriec s-guir...@ti.com
Cc: Benoît Cousson b-cous...@ti.com
Cc: Péter Ujfalusi peter.ujfal...@ti.com
Cc: Felipe Balbi ba...@ti.com
---
 arch/arm/mach-omap2/omap_hwmod.c |   18 ++
 arch/arm/mach-omap2/omap_hwmod.h |2 ++
 2 files changed, 20 insertions(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 4653efb..f37d22c 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2053,6 +2053,23 @@ static int _omap4_get_context_lost(struct omap_hwmod *oh)
 }
 
 /**
+ * _enable_preprogram - Pre-program an IP block during the _enable() process
+ * @oh: struct omap_hwmod *
+ *
+ * Some IP blocks (such as AESS) require some additional programming
+ * after enable before they can enter idle.  If a function pointer to
+ * do so is present in the hwmod data, then call it and pass along the
+ * return value; otherwise, return 0.
+ */
+static int __init _enable_preprogram(struct omap_hwmod *oh)
+{
+   if (!oh-class-enable_preprogram)
+   return 0;
+
+   return oh-class-enable_preprogram(oh);
+}
+
+/**
  * _enable - enable an omap_hwmod
  * @oh: struct omap_hwmod *
  *
@@ -2156,6 +2173,7 @@ static int _enable(struct omap_hwmod *oh)
_update_sysc_cache(oh);
_enable_sysc(oh);
}
+   r = _enable_preprogram(oh);
} else {
if (soc_ops.disable_module)
soc_ops.disable_module(oh);
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index 3ae852a..41066b4 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -501,6 +501,7 @@ struct omap_hwmod_omap4_prcm {
  * @rev: revision of the IP class
  * @pre_shutdown: ptr to fn to be executed immediately prior to device shutdown
  * @reset: ptr to fn to be executed in place of the standard hwmod reset fn
+ * @enable_preprogram:  ptr to fn to be executed during device enable
  *
  * Represent the class of a OMAP hardware modules (e.g. timer,
  * smartreflex, gpio, uart...)
@@ -524,6 +525,7 @@ struct omap_hwmod_class {
u32 rev;
int (*pre_shutdown)(struct 
omap_hwmod *oh);
int (*reset)(struct omap_hwmod *oh);
+   int (*enable_preprogram)(struct 
omap_hwmod *oh);
 };
 
 /**
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 2/5] ASoC: TI AESS: add autogating-enable function, callable from architecture code

2013-01-09 Thread Sebastien Guiriec
From: Paul Walmsley p...@pwsan.com

Add a basic header file for the TI AESS IP block, located in the OMAP4
Audio Back-End subsystem.

Currently, this header file only contains a function to enable the
AESS internal clock auto-gating.  This will be used by a subsequent
patch to ensure that the AESS won't block the entire chip
low-power-idle mode.  We wish to be able to place the AESS into idle
even when no AESS driver has been compiled in.

Signed-off-by: Paul Walmsley p...@pwsan.com
Cc: Liam Girdwood l...@ti.com
Cc: Mark Brown broo...@opensource.wolfsonmicro.com
Cc: Péter Ujfalusi peter.ujfal...@ti.com
Cc: Tony Lindgren t...@atomide.com
---
 include/sound/aess.h |   53 ++
 1 file changed, 53 insertions(+)
 create mode 100644 include/sound/aess.h

diff --git a/include/sound/aess.h b/include/sound/aess.h
new file mode 100644
index 000..cee0d09
--- /dev/null
+++ b/include/sound/aess.h
@@ -0,0 +1,53 @@
+/*
+ * AESS IP block reset
+ *
+ * Copyright (C) 2012 Texas Instruments, Inc.
+ * Paul Walmsley
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed as is WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+#ifndef __SOUND_AESS_H__
+#define __SOUND_AESS_H__
+
+#include linux/kernel.h
+#include linux/io.h
+
+/*
+ * AESS_AUTO_GATING_ENABLE_OFFSET: offset in bytes of the AESS IP
+ * block's AESS_AUTO_GATING_ENABLE__1 register from the IP block's
+ * base address
+ */
+#define AESS_AUTO_GATING_ENABLE_OFFSET 0x07c
+
+/* Register bitfields in the AESS_AUTO_GATING_ENABLE__1 register */
+#define AESS_AUTO_GATING_ENABLE_SHIFT  0
+
+/**
+ * aess_enable_autogating - enable AESS internal autogating
+ * @oh: struct omap_hwmod *
+ *
+ * Enable internal autogating on the AESS.  This allows the AESS to
+ * indicate that it is idle to the OMAP PRCM.  Returns 0.
+ */
+static inline void aess_enable_autogating(void __iomem *base)
+{
+   u32 v;
+
+   /* Set AESS_AUTO_GATING_ENABLE__1.ENABLE to allow idle entry */
+   v = 1  AESS_AUTO_GATING_ENABLE_SHIFT;
+   writel(v, base + AESS_AUTO_GATING_ENABLE_OFFSET);
+}
+
+#endif /* __SOUND_AESS_H__ */
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 4/5] OMAP4: hwmod data: Enable AESS hwmod device

2013-01-09 Thread Sebastien Guiriec
Enable AESS data in hwmod in order to be able to probe
audio driver.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c 
b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 13e397f..6d22fd0 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -6279,7 +6279,7 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] 
__initdata = {
omap44xx_l3_main_1__l3_main_3,
omap44xx_l3_main_2__l3_main_3,
omap44xx_l4_cfg__l3_main_3,
-   /* omap44xx_aess__l4_abe, */
+   omap44xx_aess__l4_abe,
omap44xx_dsp__l4_abe,
omap44xx_l3_main_1__l4_abe,
omap44xx_mpu__l4_abe,
@@ -6288,8 +6288,8 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] 
__initdata = {
omap44xx_l4_cfg__l4_wkup,
omap44xx_mpu__mpu_private,
omap44xx_l4_cfg__ocp_wp_noc,
-   /* omap44xx_l4_abe__aess, */
-   /* omap44xx_l4_abe__aess_dma, */
+   omap44xx_l4_abe__aess,
+   omap44xx_l4_abe__aess_dma,
omap44xx_l3_main_2__c2c,
omap44xx_l4_wkup__counter_32k,
omap44xx_l4_cfg__ctrl_module_core,
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 5/5] OMAP4: hwmod data: Update AESS data with memory bank area

2013-01-09 Thread Sebastien Guiriec
Add AESS memory bank data in hwmod in order to provide memory
address information to the driver.

Signed-off-by: sebastien Guiriec s-guir...@ti.com
---
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |   42 
 1 file changed, 42 insertions(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c 
b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 6d22fd0..631611c 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -4246,6 +4246,27 @@ static struct omap_hwmod_ocp_if 
omap44xx_l4_cfg__ocp_wp_noc = {
 
 static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = {
{
+   .name   = dmem,
+   .pa_start   = 0x4018,
+   .pa_end = 0x4018
+   },
+   {
+   .name   = cmem,
+   .pa_start   = 0x401a,
+   .pa_end = 0x401a1fff
+   },
+   {
+   .name   = smem,
+   .pa_start   = 0x401c,
+   .pa_end = 0x401c5fff
+   },
+   {
+   .name   = pmem,
+   .pa_start   = 0x401e,
+   .pa_end = 0x401e1fff
+   },
+   {
+   .name   = mpu,
.pa_start   = 0x401f1000,
.pa_end = 0x401f13ff,
.flags  = ADDR_TYPE_RT
@@ -4264,6 +4285,27 @@ static struct omap_hwmod_ocp_if __maybe_unused 
omap44xx_l4_abe__aess = {
 
 static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = {
{
+   .name   = dmem_dma,
+   .pa_start   = 0x4908,
+   .pa_end = 0x4908
+   },
+   {
+   .name   = cmem_dma,
+   .pa_start   = 0x490a,
+   .pa_end = 0x490a1fff
+   },
+   {
+   .name   = smem_dma,
+   .pa_start   = 0x490c,
+   .pa_end = 0x490c5fff
+   },
+   {
+   .name   = pmem_dma,
+   .pa_start   = 0x490e,
+   .pa_end = 0x490e1fff
+   },
+   {
+   .name   = dma,
.pa_start   = 0x490f1000,
.pa_end = 0x490f13ff,
.flags  = ADDR_TYPE_RT
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/3] ARM: OMAP4: Enable AESS IP.

2013-01-04 Thread Sebastien Guiriec
This patch serie extends the the hwmod HWMOD_EXT_OPT_MAIN_CLK flag for the
AESS IP. This IP has additional register for Auto Gatting configuration. As
it is used only for Audio the driver is not always loaded. We can reuse the
same flag as McPDM to work around the HW problem due to bad reset value of
AESS Auto gatting configuration register. 

If we try to setup and reset AESS during boot time without this serie the
next clocks will still remain enable.

omapconf abe cfg:
|--|
| ABEClock Domain Configuration|
||-|
| Clock State Transition control | HW-Auto |
| Clock State| |
|   ABE_24M_FCLK | GATED   |
|   ABE_ALWON_32K_CLK| GATED   |
|   ABE_SYSCLK   | GATED   |
|   24M_FCLK | GATED   |
|   ABE_ICLK2| RUNNING |
|   DPLL_ABE_X2_CLK  | RUNNING |
|   PAD_CLKS | GATED   |
|   SLIMBUS_CLK  | GATED   |
| OPP Divider| ABE_CLK = DPLL_ABE_X2_CLK/1 |
|--|

Sebastien Guiriec (3):
  ARM: OMAP2+: hwmod: rename flag to prevent hwmod code from touching
IP block during init
  ARM: OMAP4: hwmod data: do not enable or reset the AESS during kernel
init
  OMAP4: hwmod data: Enable AESS hwmod device

 arch/arm/mach-omap2/omap_hwmod.c   |2 +-
 arch/arm/mach-omap2/omap_hwmod.h   |   10 --
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |   16 
 3 files changed, 21 insertions(+), 7 deletions(-)

-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] ARM: OMAP2+: hwmod: rename flag to prevent hwmod code from touching IP block during init

2013-01-04 Thread Sebastien Guiriec
Rename HWMOD_EXT_OPT_MAIN_CLK flag to indicate that this IP block is
dependent on an off-chip functional clock that is not guaranteed to
be present during initialization. Same flag can be use for IP with
additional HW registers to control Auto IDLE mode.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 arch/arm/mach-omap2/omap_hwmod.c   |2 +-
 arch/arm/mach-omap2/omap_hwmod.h   |   10 --
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 4653efb..640c179 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2447,7 +2447,7 @@ static int __init _setup_reset(struct omap_hwmod *oh)
if (oh-_state != _HWMOD_STATE_INITIALIZED)
return -EINVAL;
 
-   if (oh-flags  HWMOD_EXT_OPT_MAIN_CLK)
+   if (oh-flags  HWMOD_NO_SETUP_RESET)
return -EPERM;
 
if (oh-rst_lines_cnt == 0) {
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index 3ae852a..ce4bed4 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -446,11 +446,17 @@ struct omap_hwmod_omap4_prcm {
  * in order to complete the reset. Optional clocks will be disabled
  * again after the reset.
  * HWMOD_16BIT_REG: Module has 16bit registers
- * HWMOD_EXT_OPT_MAIN_CLK: The only main functional clock source for
+ * HWMOD_NO_SETUP_RESET: This flag can be used for 2 problems:
+ * 1) The only main functional clock source for
  * this IP block comes from an off-chip source and is not always
  * enabled.  This prevents the hwmod code from being able to
  * enable and reset the IP block early.  XXX Eventually it should
  * be possible to query the clock framework for this information.
+ * 2) IP with additional registers for auto gatting control like AESS
+ * For some IPs we need to set AUTO_GATTING_ENABLE bit. This bit is set
+ * only when the associated driver is probed. If hwmod is enabling and
+ * reseting the IP early without setting auto idle bit then clocks are
+ * not gated.
  */
 #define HWMOD_SWSUP_SIDLE  (1  0)
 #define HWMOD_SWSUP_MSTANDBY   (1  1)
@@ -461,7 +467,7 @@ struct omap_hwmod_omap4_prcm {
 #define HWMOD_NO_IDLEST(1  6)
 #define HWMOD_CONTROL_OPT_CLKS_IN_RESET(1  7)
 #define HWMOD_16BIT_REG(1  8)
-#define HWMOD_EXT_OPT_MAIN_CLK (1  9)
+#define HWMOD_NO_SETUP_RESET   (1  9)
 
 /*
  * omap_hwmod._int_flags definitions
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c 
b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 129d508..b340a4e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -2133,7 +2133,7 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = {
 * available, so it doesn't seem that we have any choice in
 * the kernel other than to avoid resetting it.
 */
-   .flags  = HWMOD_EXT_OPT_MAIN_CLK,
+   .flags  = HWMOD_NO_SETUP_RESET,
.mpu_irqs   = omap44xx_mcpdm_irqs,
.sdma_reqs  = omap44xx_mcpdm_sdma_reqs,
.main_clk   = mcpdm_fck,
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/3] ARM: OMAP4: hwmod data: do not enable or reset the AESS during kernel init

2013-01-04 Thread Sebastien Guiriec
The AESS on OMAP4 has additional register on top of SYS_CONFIG for
auto gatting configuration. In order to avoid running clock after
boot up we should avoid to enable and reset the module during boot up.

Audio driver will be in charge of configuring the addition register.

At its core, this patch is a workaround for an OMAP hardware problem.
It should be possible to configure the OMAP with good default reset
configuration of AESS IP for auto gatting mode.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |8 
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c 
b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index b340a4e..26d6cde 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -346,6 +346,14 @@ static struct omap_hwmod omap44xx_aess_hwmod = {
.name   = aess,
.class  = omap44xx_aess_hwmod_class,
.clkdm_name = abe_clkdm,
+   /*
+* AESS has an internal register on top of SYS_CONFIG for
+* AUTO GATTING mode. Unfortunately the reset value of this
+* register is not set correctly. So until AESS driver is not
+* probe we should not try to control the module during boot up.
+* Audio driver will handle the additional register configuration.
+*/
+   .flags  = HWMOD_NO_SETUP_RESET,
.mpu_irqs   = omap44xx_aess_irqs,
.sdma_reqs  = omap44xx_aess_sdma_reqs,
.main_clk   = aess_fck,
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/3] OMAP4: hwmod data: Enable AESS hwmod device

2013-01-04 Thread Sebastien Guiriec
Enable AESS data in hwmod in order to be able to probe
audio driver.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c 
b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 26d6cde..dd60e52 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -6286,7 +6286,7 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] 
__initdata = {
omap44xx_l3_main_1__l3_main_3,
omap44xx_l3_main_2__l3_main_3,
omap44xx_l4_cfg__l3_main_3,
-   /* omap44xx_aess__l4_abe, */
+   omap44xx_aess__l4_abe,
omap44xx_dsp__l4_abe,
omap44xx_l3_main_1__l4_abe,
omap44xx_mpu__l4_abe,
@@ -6295,8 +6295,8 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] 
__initdata = {
omap44xx_l4_cfg__l4_wkup,
omap44xx_mpu__mpu_private,
omap44xx_l4_cfg__ocp_wp_noc,
-   /* omap44xx_l4_abe__aess, */
-   /* omap44xx_l4_abe__aess_dma, */
+   omap44xx_l4_abe__aess,
+   omap44xx_l4_abe__aess_dma,
omap44xx_l3_main_2__c2c,
omap44xx_l4_wkup__counter_32k,
omap44xx_l4_cfg__ctrl_module_core,
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] ARM: OMAP4: hwmod data: do not enable or reset the AESS during kernel init

2013-01-04 Thread Sebastien Guiriec

On 01/04/2013 07:35 PM, Paul Walmsley wrote:

Hi Sebastien

On Fri, 4 Jan 2013, Sebastien Guiriec wrote:


The AESS on OMAP4 has additional register on top of SYS_CONFIG for
auto gatting configuration. In order to avoid running clock after
boot up we should avoid to enable and reset the module during boot up.

Audio driver will be in charge of configuring the addition register.

At its core, this patch is a workaround for an OMAP hardware problem.
It should be possible to configure the OMAP with good default reset
configuration of AESS IP for auto gatting mode.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com


What do you think about a slightly modified and updated version of:

http://www.mail-archive.com/linux-omap@vger.kernel.org/msg69853.html


This solution is the better. I was thinking that Tony reject this 
callback (but I realize that I miss the second series long time back).


Paul,
Do you want me to rebase this version and update the serie or are you 
handle it?




?  That way we can reset the IP block at startup, like most of our other
IP blocks, to avoid previous OS and bootloader dependencies.


Yes can be useful.




- Paul



--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] ARM: OMAP2+: hwmod: rename flag to prevent hwmod code from touching IP block during init

2013-01-04 Thread Sebastien Guiriec

On 01/04/2013 07:19 PM, Paul Walmsley wrote:

Hi Sebastien

On Fri, 4 Jan 2013, Sebastien Guiriec wrote:


Rename HWMOD_EXT_OPT_MAIN_CLK flag to indicate that this IP block is
dependent on an off-chip functional clock that is not guaranteed to
be present during initialization. Same flag can be use for IP with
additional HW registers to control Auto IDLE mode.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com


We already have the HWMOD_NO_INIT_RESET flag.  Wouldn't that accomplish
the same goal?


I am assuming that it was HWMOD_INIT_NO_RESET flag. This is not solving 
the issue. After boot with this mode some of same clocks are still not 
gated.




Also I think we can reset the AESS during init.  I posted a patch for this
a few months ago, but looks like it got lost.  Will reply to one of your
other patches with more details.


- Paul



--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/2] ARM: OMAP: hwmod/omapd_device: Fix for resource handling in DT boot

2012-10-30 Thread Sebastien Guiriec

Hi Peter,

On 10/30/2012 12:24 PM, Peter Ujfalusi wrote:

Hello,

Changes since v1:
- If the device does not have DMA resource do not try to recreate the resources

Intro mail from v1:

This series resolves the issue we currently have with the resource handling when
booting with DT.
In short: at the moment the omap_device_alloc() decides if it needs to update 
the
OF filled resources based on the number of resources on the device and in the
hwmod database.
This prevents us from removing hwmod data for platforms (OMAP5) which does not
support non DT boot anymore.


At list removing 160 lines for out of tree data for OMAP5 audio part. So 
going in the good direction. But should much more after cleaning up all 
IP. Now we need to add DMA binding to remove the data.




With this series we can make sure that the DT provided resources are used and we
only append the DMA resources to the device from hwmod.
I have added extra check to prepare us when the DMA resource can be filled via
OF. In this case we do not update the resources at all.

Tony, Benoit, Paul: Not sure if this qualify for 3.7 inclusion, but for sure
going to help us to clean up the OMAP5 hwmod database.

Regards,
Peter
---
Peter Ujfalusi (2):
   ARM: OMAP: hwmod: Add possibility to count hwmod resources based on
 type
   ARM: OMAP: omap_device: Correct resource handling for DT boot

  arch/arm/mach-omap2/omap_hwmod.c | 27 +
  arch/arm/plat-omap/include/plat/omap_hwmod.h |  2 +-
  arch/arm/plat-omap/omap_device.c | 87 ++--
  3 files changed, 72 insertions(+), 44 deletions(-)


Tested-by: Sebastien Guiriec s-guir...@ti.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] i2c: pinctrl-ify i2c-omap.c

2012-10-30 Thread Sebastien Guiriec

Hi Pantelis,

Can you look at the early thread?
  https://patchwork.kernel.org/patch/1601331/

I send a similar patch earlier with defer probe usage.

Best regards,

Sebastien
On 10/31/2012 04:55 PM, Pantelis Antoniou wrote:

Enable pinctrl for i2c-omap.

Signed-off-by: Pantelis Antoniou pa...@antoniou-consulting.com
---
  drivers/i2c/busses/i2c-omap.c | 10 ++
  1 file changed, 10 insertions(+)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index db31eae..4c38aa0 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -44,6 +44,8 @@
  #include linux/i2c-omap.h
  #include linux/pm_runtime.h
  #include linux/pm_qos.h
+#include linux/pinctrl/consumer.h
+#include linux/err.h

  /* I2C controller revisions */
  #define OMAP_I2C_OMAP1_REV_2  0x20
@@ -1064,6 +1066,7 @@ omap_i2c_probe(struct platform_device *pdev)
const struct of_device_id *match;
int irq;
int r;
+   struct pinctrl *pinctrl;

/* NOTE: driver uses the static register mapping */
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -1202,6 +1205,13 @@ omap_i2c_probe(struct platform_device *pdev)

of_i2c_register_devices(adap);

+   pinctrl = devm_pinctrl_get_select_default(pdev-dev);
+   if (IS_ERR(pinctrl))
+   dev_warn(dev-dev, unable to select pin group\n);
+
+   dev_info(dev-dev, bus %d rev%d.%d.%d at %d kHz\n, adap-nr,
+dev-dtrev, dev-rev  4, dev-rev  0xf, dev-speed);
+
pm_runtime_mark_last_busy(dev-dev);
pm_runtime_put_autosuspend(dev-dev);




--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 0/4] ARM: dts: Update OMAP5 with address space and interrupts

2012-10-24 Thread Sebastien Guiriec
Since kernel 3.7 the DTS data are not overwriten by hwmod data we can add the 
address space
and interrupt line description inside dtsi file for OMAP5. This serie is 
updating the
current OMAP5 IP with missing entry.

It has been tested on OMAP5 with 3.7-audio-display feature tree.
- MMC is probing and functional
- TWL6041 probing (GPIO/I2C)
- booting (UART)

Update since v1:
- Add Ack and review
- Fix up commit messages.

Update since v2:
- Add interrupt-parent.

Sebastien Guiriec (4):
  ARM: dts: omap5: Update GPIO with address space and interrupts
  ARM: dts: omap5: Update I2C with address space and interrupts
  ARM: dts: omap5: Update UART with address space and interrupts
  ARM: dts: omap5: Update MMC with address space and interrupts

 arch/arm/boot/dts/omap5.dtsi |   80 +++---
 1 file changed, 76 insertions(+), 4 deletions(-)

-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 3/4] ARM: dts: omap5: Update UART with address space and interrupts

2012-10-24 Thread Sebastien Guiriec
Add base address and interrupt line inside Device Tree data for
OMAP5.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
Reviewed-by: Shubhrajyoti D shubhrajy...@ti.com
---
 arch/arm/boot/dts/omap5.dtsi |   22 --
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 07d2607..b535d8e 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -250,36 +250,54 @@
 
uart1: serial@4806a000 {
compatible = ti,omap4-uart;
+   reg = 0x4806a000 0x100;
+   interrupts = 0 72 0x4;
+   interrupt-parent = gic;
ti,hwmods = uart1;
clock-frequency = 4800;
};
 
uart2: serial@4806c000 {
compatible = ti,omap4-uart;
+   reg = 0x4806c000 0x100;
+   interrupts = 0 73 0x4;
+   interrupt-parent = gic;
ti,hwmods = uart2;
clock-frequency = 4800;
};
 
uart3: serial@4802 {
compatible = ti,omap4-uart;
+   reg = 0x4802 0x100;
+   interrupts = 0 74 0x4;
+   interrupt-parent = gic;
ti,hwmods = uart3;
clock-frequency = 4800;
};
 
uart4: serial@4806e000 {
compatible = ti,omap4-uart;
+   reg = 0x4806e000 0x100;
+   interrupts = 0 70 0x4;
+   interrupt-parent = gic;
ti,hwmods = uart4;
clock-frequency = 4800;
};
 
uart5: serial@48066000 {
-   compatible = ti,omap5-uart;
+   compatible = ti,omap4-uart;
+   reg = 0x48066000 0x100;
+   interrupts = 0 105 0x4;
+   interrupt-parent = gic;
ti,hwmods = uart5;
clock-frequency = 4800;
};
 
uart6: serial@48068000 {
-   compatible = ti,omap6-uart;
+   compatible = ti,omap4-uart;
+   reg = 0x48068000 0x100;
+   interrupts = 0 106 0x4;
+   interrupt-parent = gic;
ti,hwmods = uart6;
clock-frequency = 4800;
};
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 4/4] ARM: dts: omap5: Update MMC with address space and interrupts

2012-10-24 Thread Sebastien Guiriec
Add base address and interrupt line inside Device Tree data for
OMAP5.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 arch/arm/boot/dts/omap5.dtsi |   15 +++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index b535d8e..304dd8d 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -304,6 +304,9 @@
 
mmc1: mmc@4809c000 {
compatible = ti,omap4-hsmmc;
+   reg = 0x4809c000 0x400;
+   interrupts = 0 83 0x4;
+   interrupt-parent = gic;
ti,hwmods = mmc1;
ti,dual-volt;
ti,needs-special-reset;
@@ -311,24 +314,36 @@
 
mmc2: mmc@480b4000 {
compatible = ti,omap4-hsmmc;
+   reg = 0x480b4000 0x400;
+   interrupts = 0 86 0x4;
+   interrupt-parent = gic;
ti,hwmods = mmc2;
ti,needs-special-reset;
};
 
mmc3: mmc@480ad000 {
compatible = ti,omap4-hsmmc;
+   reg = 0x480ad000 0x400;
+   interrupts = 0 94 0x4;
+   interrupt-parent = gic;
ti,hwmods = mmc3;
ti,needs-special-reset;
};
 
mmc4: mmc@480d1000 {
compatible = ti,omap4-hsmmc;
+   reg = 0x480d1000 0x400;
+   interrupts = 0 96 0x4;
+   interrupt-parent = gic;
ti,hwmods = mmc4;
ti,needs-special-reset;
};
 
mmc5: mmc@480d5000 {
compatible = ti,omap4-hsmmc;
+   reg = 0x480d5000 0x400;
+   interrupts = 0 59 0x4;
+   interrupt-parent = gic;
ti,hwmods = mmc5;
ti,needs-special-reset;
};
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 2/4] ARM: dts: omap5: Update I2C with address space and interrupts

2012-10-24 Thread Sebastien Guiriec
Add base address and interrupt line inside Device Tree data for
OMAP5

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
Reviewed-by: Shubhrajyoti D shubhrajy...@ti.com
---
 arch/arm/boot/dts/omap5.dtsi |   19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 737a536..07d2607 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -200,6 +200,9 @@
 
i2c1: i2c@4807 {
compatible = ti,omap4-i2c;
+   reg = 0x4807 0x100;
+   interrupts = 0 56 0x4;
+   interrupt-parent = gic;
#address-cells = 1;
#size-cells = 0;
ti,hwmods = i2c1;
@@ -207,6 +210,9 @@
 
i2c2: i2c@48072000 {
compatible = ti,omap4-i2c;
+   reg = 0x48072000 0x100;
+   interrupts = 0 57 0x4;
+   interrupt-parent = gic;
#address-cells = 1;
#size-cells = 0;
ti,hwmods = i2c2;
@@ -214,20 +220,29 @@
 
i2c3: i2c@4806 {
compatible = ti,omap4-i2c;
+   reg = 0x4806 0x100;
+   interrupts = 0 61 0x4;
+   interrupt-parent = gic;
#address-cells = 1;
#size-cells = 0;
ti,hwmods = i2c3;
};
 
-   i2c4: i2c@4807A000 {
+   i2c4: i2c@4807a000 {
compatible = ti,omap4-i2c;
+   reg = 0x4807a000 0x100;
+   interrupts = 0 62 0x4;
+   interrupt-parent = gic;
#address-cells = 1;
#size-cells = 0;
ti,hwmods = i2c4;
};
 
-   i2c5: i2c@4807C000 {
+   i2c5: i2c@4807c000 {
compatible = ti,omap4-i2c;
+   reg = 0x4807c000 0x100;
+   interrupts = 0 60 0x4;
+   interrupt-parent = gic;
#address-cells = 1;
#size-cells = 0;
ti,hwmods = i2c5;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 1/4] ARM: dts: omap5: Update GPIO with address space and interrupts

2012-10-24 Thread Sebastien Guiriec
Add base address and interrupt line inside Device Tree data for
OMAP5

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 arch/arm/boot/dts/omap5.dtsi |   24 
 1 file changed, 24 insertions(+)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 42c78be..737a536 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -104,6 +104,9 @@
 
gpio1: gpio@4ae1 {
compatible = ti,omap4-gpio;
+   reg = 0x4ae1 0x200;
+   interrupts = 0 29 0x4;
+   interrupt-parent = gic;
ti,hwmods = gpio1;
gpio-controller;
#gpio-cells = 2;
@@ -113,6 +116,9 @@
 
gpio2: gpio@48055000 {
compatible = ti,omap4-gpio;
+   reg = 0x48055000 0x200;
+   interrupts = 0 30 0x4;
+   interrupt-parent = gic;
ti,hwmods = gpio2;
gpio-controller;
#gpio-cells = 2;
@@ -122,6 +128,9 @@
 
gpio3: gpio@48057000 {
compatible = ti,omap4-gpio;
+   reg = 0x48057000 0x200;
+   interrupts = 0 31 0x4;
+   interrupt-parent = gic;
ti,hwmods = gpio3;
gpio-controller;
#gpio-cells = 2;
@@ -131,6 +140,9 @@
 
gpio4: gpio@48059000 {
compatible = ti,omap4-gpio;
+   reg = 0x48059000 0x200;
+   interrupts = 0 32 0x4;
+   interrupt-parent = gic;
ti,hwmods = gpio4;
gpio-controller;
#gpio-cells = 2;
@@ -140,6 +152,9 @@
 
gpio5: gpio@4805b000 {
compatible = ti,omap4-gpio;
+   reg = 0x4805b000 0x200;
+   interrupts = 0 33 0x4;
+   interrupt-parent = gic;
ti,hwmods = gpio5;
gpio-controller;
#gpio-cells = 2;
@@ -149,6 +164,9 @@
 
gpio6: gpio@4805d000 {
compatible = ti,omap4-gpio;
+   reg = 0x4805d000 0x200;
+   interrupts = 0 34 0x4;
+   interrupt-parent = gic;
ti,hwmods = gpio6;
gpio-controller;
#gpio-cells = 2;
@@ -158,6 +176,9 @@
 
gpio7: gpio@48051000 {
compatible = ti,omap4-gpio;
+   reg = 0x48051000 0x200;
+   interrupts = 0 35 0x4;
+   interrupt-parent = gic;
ti,hwmods = gpio7;
gpio-controller;
#gpio-cells = 2;
@@ -167,6 +188,9 @@
 
gpio8: gpio@48053000 {
compatible = ti,omap4-gpio;
+   reg = 0x48053000 0x200;
+   interrupts = 0 121 0x4;
+   interrupt-parent = gic;
ti,hwmods = gpio8;
gpio-controller;
#gpio-cells = 2;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 0/4] ARM: dts: Update OMAP5 with address space and interrupts

2012-10-24 Thread Sebastien Guiriec

Hi Benoit,

On 10/24/2012 11:15 AM, Benoit Cousson wrote:

Hi Seb,

Sorry, I missed your previous email, your v2 was the right one.
We do have a single INTC in every OMAP, there is no point to repeat the
same data hundred times.
The DTS are already big enough.


So in such case we should send a series for audio IP interrupt-parent 
removal for OMAP3/4/5 dtsi file in order to be coherent.


Do you want me to do it?



On 10/24/2012 09:07 AM, Sebastien Guiriec wrote:

Since kernel 3.7 the DTS data are not overwriten by hwmod data we can add the 
address space
and interrupt line description inside dtsi file for OMAP5. This serie is 
updating the
current OMAP5 IP with missing entry.

It has been tested on OMAP5 with 3.7-audio-display feature tree.
- MMC is probing and functional
- TWL6041 probing (GPIO/I2C)
- booting (UART)

Update since v1:
- Add Ack and review
- Fix up commit messages.

Update since v2:
- Add interrupt-parent.


I will take the previous one to avoid the duplication of attributes.

On top of that I will remove the ones introduce in audio IPs for
consistency on OMAP3/4/5 platforms.

Regards,
Benoit



--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 0/4] ARM: dts: Update OMAP5 with address space and interrupts

2012-10-23 Thread Sebastien Guiriec
Since kernel 3.7 the DTS data are not overwriten by hwmod data we can add the 
address space
and interrupt line description inside dtsi file for OMAP5. This serie is 
updating the
current OMAP5 IP with missing entry.

It has been tested on OMAP5 with 3.7-audio-display feature tree.
- MMC is probing and functional
- TWL6041 probing (GPIO/I2C)
- booting (UART)

Update since v1:
- Add Ack and review
- Fix up commit messages.

Sebastien Guiriec (4):
  ARM: dts: omap5: Update GPIO with address space and interrupts
  ARM: dts: omap5: Update I2C with address space and interrupts
  ARM: dts: omap5: Update UART with address space and interrupts
  ARM: dts: omap5: Update MMC with address space and interrupts

 arch/arm/boot/dts/omap5.dtsi |   56 +++---
 1 file changed, 52 insertions(+), 4 deletions(-)

-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 2/4] ARM: dts: omap5: Update I2C with address space and interrupts

2012-10-23 Thread Sebastien Guiriec
Add base address and interrupt line inside Device Tree data for
OMAP5

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
Reviewed-by: Shubhrajyoti D shubhrajy...@ti.com
---
 arch/arm/boot/dts/omap5.dtsi |   14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 9e39f9f..6c22e1b 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -192,6 +192,8 @@
 
i2c1: i2c@4807 {
compatible = ti,omap4-i2c;
+   reg = 0x4807 0x100;
+   interrupts = 0 56 0x4;
#address-cells = 1;
#size-cells = 0;
ti,hwmods = i2c1;
@@ -199,6 +201,8 @@
 
i2c2: i2c@48072000 {
compatible = ti,omap4-i2c;
+   reg = 0x48072000 0x100;
+   interrupts = 0 57 0x4;
#address-cells = 1;
#size-cells = 0;
ti,hwmods = i2c2;
@@ -206,20 +210,26 @@
 
i2c3: i2c@4806 {
compatible = ti,omap4-i2c;
+   reg = 0x4806 0x100;
+   interrupts = 0 61 0x4;
#address-cells = 1;
#size-cells = 0;
ti,hwmods = i2c3;
};
 
-   i2c4: i2c@4807A000 {
+   i2c4: i2c@4807a000 {
compatible = ti,omap4-i2c;
+   reg = 0x4807a000 0x100;
+   interrupts = 0 62 0x4;
#address-cells = 1;
#size-cells = 0;
ti,hwmods = i2c4;
};
 
-   i2c5: i2c@4807C000 {
+   i2c5: i2c@4807c000 {
compatible = ti,omap4-i2c;
+   reg = 0x4807c000 0x100;
+   interrupts = 0 60 0x4;
#address-cells = 1;
#size-cells = 0;
ti,hwmods = i2c5;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 4/4] ARM: dts: omap5: Update MMC with address space and interrupts

2012-10-23 Thread Sebastien Guiriec
Add base address and interrupt line inside Device Tree data for
OMAP5.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 arch/arm/boot/dts/omap5.dtsi |   10 ++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 413df94..b643cd3 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -285,6 +285,8 @@
 
mmc1: mmc@4809c000 {
compatible = ti,omap4-hsmmc;
+   reg = 0x4809c000 0x400;
+   interrupts = 0 83 0x4;
ti,hwmods = mmc1;
ti,dual-volt;
ti,needs-special-reset;
@@ -292,24 +294,32 @@
 
mmc2: mmc@480b4000 {
compatible = ti,omap4-hsmmc;
+   reg = 0x480b4000 0x400;
+   interrupts = 0 86 0x4;
ti,hwmods = mmc2;
ti,needs-special-reset;
};
 
mmc3: mmc@480ad000 {
compatible = ti,omap4-hsmmc;
+   reg = 0x480ad000 0x400;
+   interrupts = 0 94 0x4;
ti,hwmods = mmc3;
ti,needs-special-reset;
};
 
mmc4: mmc@480d1000 {
compatible = ti,omap4-hsmmc;
+   reg = 0x480d1000 0x400;
+   interrupts = 0 96 0x4;
ti,hwmods = mmc4;
ti,needs-special-reset;
};
 
mmc5: mmc@480d5000 {
compatible = ti,omap4-hsmmc;
+   reg = 0x480d5000 0x400;
+   interrupts = 0 59 0x4;
ti,hwmods = mmc5;
ti,needs-special-reset;
};
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 1/4] ARM: dts: omap5: Update GPIO with address space and interrupts

2012-10-23 Thread Sebastien Guiriec
Add base address and interrupt line inside Device Tree data for
OMAP5

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 arch/arm/boot/dts/omap5.dtsi |   16 
 1 file changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 42c78be..9e39f9f 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -104,6 +104,8 @@
 
gpio1: gpio@4ae1 {
compatible = ti,omap4-gpio;
+   reg = 0x4ae1 0x200;
+   interrupts = 0 29 0x4;
ti,hwmods = gpio1;
gpio-controller;
#gpio-cells = 2;
@@ -113,6 +115,8 @@
 
gpio2: gpio@48055000 {
compatible = ti,omap4-gpio;
+   reg = 0x48055000 0x200;
+   interrupts = 0 30 0x4;
ti,hwmods = gpio2;
gpio-controller;
#gpio-cells = 2;
@@ -122,6 +126,8 @@
 
gpio3: gpio@48057000 {
compatible = ti,omap4-gpio;
+   reg = 0x48057000 0x200;
+   interrupts = 0 31 0x4;
ti,hwmods = gpio3;
gpio-controller;
#gpio-cells = 2;
@@ -131,6 +137,8 @@
 
gpio4: gpio@48059000 {
compatible = ti,omap4-gpio;
+   reg = 0x48059000 0x200;
+   interrupts = 0 32 0x4;
ti,hwmods = gpio4;
gpio-controller;
#gpio-cells = 2;
@@ -140,6 +148,8 @@
 
gpio5: gpio@4805b000 {
compatible = ti,omap4-gpio;
+   reg = 0x4805b000 0x200;
+   interrupts = 0 33 0x4;
ti,hwmods = gpio5;
gpio-controller;
#gpio-cells = 2;
@@ -149,6 +159,8 @@
 
gpio6: gpio@4805d000 {
compatible = ti,omap4-gpio;
+   reg = 0x4805d000 0x200;
+   interrupts = 0 34 0x4;
ti,hwmods = gpio6;
gpio-controller;
#gpio-cells = 2;
@@ -158,6 +170,8 @@
 
gpio7: gpio@48051000 {
compatible = ti,omap4-gpio;
+   reg = 0x48051000 0x200;
+   interrupts = 0 35 0x4;
ti,hwmods = gpio7;
gpio-controller;
#gpio-cells = 2;
@@ -167,6 +181,8 @@
 
gpio8: gpio@48053000 {
compatible = ti,omap4-gpio;
+   reg = 0x48053000 0x200;
+   interrupts = 0 121 0x4;
ti,hwmods = gpio8;
gpio-controller;
#gpio-cells = 2;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 3/4] ARM: dts: omap5: Update UART with address space and interrupts

2012-10-23 Thread Sebastien Guiriec
Add base address and interrupt line inside Device Tree data for
OMAP5.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
Reviewed-by: Shubhrajyoti D shubhrajy...@ti.com
---
 arch/arm/boot/dts/omap5.dtsi |   16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 6c22e1b..413df94 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -237,36 +237,48 @@
 
uart1: serial@4806a000 {
compatible = ti,omap4-uart;
+   reg = 0x4806a000 0x100;
+   interrupts = 0 72 0x4;
ti,hwmods = uart1;
clock-frequency = 4800;
};
 
uart2: serial@4806c000 {
compatible = ti,omap4-uart;
+   reg = 0x4806c000 0x100;
+   interrupts = 0 73 0x4;
ti,hwmods = uart2;
clock-frequency = 4800;
};
 
uart3: serial@4802 {
compatible = ti,omap4-uart;
+   reg = 0x4802 0x100;
+   interrupts = 0 74 0x4;
ti,hwmods = uart3;
clock-frequency = 4800;
};
 
uart4: serial@4806e000 {
compatible = ti,omap4-uart;
+   reg = 0x4806e000 0x100;
+   interrupts = 0 70 0x4;
ti,hwmods = uart4;
clock-frequency = 4800;
};
 
uart5: serial@48066000 {
-   compatible = ti,omap5-uart;
+   compatible = ti,omap4-uart;
+   reg = 0x48066000 0x100;
+   interrupts = 0 105 0x4;
ti,hwmods = uart5;
clock-frequency = 4800;
};
 
uart6: serial@48068000 {
-   compatible = ti,omap6-uart;
+   compatible = ti,omap4-uart;
+   reg = 0x48068000 0x100;
+   interrupts = 0 106 0x4;
ti,hwmods = uart6;
clock-frequency = 4800;
};
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 1/4] ARM: dts: omap5: Update GPIO with address space and interrupts

2012-10-23 Thread Sebastien Guiriec

Hi Benoit and John,

On 10/23/2012 06:07 PM, Benoit Cousson wrote:

On 10/23/2012 05:59 PM, Jon Hunter wrote:


On 10/23/2012 10:09 AM, Benoit Cousson wrote:

On 10/23/2012 04:49 PM, Jon Hunter wrote:

Hi Seb,

On 10/23/2012 03:37 AM, Sebastien Guiriec wrote:

Add base address and interrupt line inside Device Tree data for
OMAP5

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
  arch/arm/boot/dts/omap5.dtsi |   16 
  1 file changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 42c78be..9e39f9f 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -104,6 +104,8 @@

gpio1: gpio@4ae1 {
compatible = ti,omap4-gpio;
+   reg = 0x4ae1 0x200;
+   interrupts = 0 29 0x4;
ti,hwmods = gpio1;
gpio-controller;
#gpio-cells = 2;


I am wondering if we should add the interrupt-parent property to add
nodes in the device-tree source. I know that today the interrupt-parent
is being defined globally, but when device-tree maps an interrupt for a
device it searches for the interrupt-parent starting the current device
node.

So in other words, for gpio1 it will search the gpio1 binding for
interrupt-parent and if not found move up a level and search again. It
will keep doing this until it finds the interrupt-parent.

Therefore, I believe it will improve search time and hence, boot time if
we have interrupt-parent defined in each node.


Mmm, I'm not that sure. it will increase the size of the blob, so
increase the time to load it and then to parse it. Where in the current
case, it is just going up to the parent node using the already
un-flatten tree in memory and thus that should not take that much time.


Yes it will definitely increase the size, so that could slow things down.


That being said, it might be interesting to benchmark that to see what
is the real impact.


Right, I wonder what the key functions are we need to benchmark to get
an overall feel for what is best? Right now I am seeing some people add
the interrupt-parent for device nodes and others not. Ideally we should
be consistent, but at the same time it is probably something that we can
easily sort out later. So not a big deal either way.


For consistency, I'd rather not add it at all for the moment.
Later, when we will only support DT boot, people will start complaining
about the boot time increase and then we will start optimizing a little
bit :-)


I just do it like that to be consistent with what is inside OMAP4 dtsi 
for those IPs (GPIO/UART/MMC/I2C). Now after checking Peter already add 
the interrupt-parent for all audio IPs (OMAP3/4/5). But here we need 
also interrupts name. So here we should try to be consistent.


So I can send back the series for OMAP5 and update the OMAP4 with
  interrupts-parent = gic

As of today we are not consistent.



Regards,
Benoit




--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/4] ARM/dts: omap5: Update GPIO with address space and interrupt

2012-10-22 Thread Sebastien Guiriec
Add base address and interrupt line inside Device Tree data for
OMAP5

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 arch/arm/boot/dts/omap5.dtsi |   16 
 1 file changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 42c78be..9e39f9f 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -104,6 +104,8 @@
 
gpio1: gpio@4ae1 {
compatible = ti,omap4-gpio;
+   reg = 0x4ae1 0x200;
+   interrupts = 0 29 0x4;
ti,hwmods = gpio1;
gpio-controller;
#gpio-cells = 2;
@@ -113,6 +115,8 @@
 
gpio2: gpio@48055000 {
compatible = ti,omap4-gpio;
+   reg = 0x48055000 0x200;
+   interrupts = 0 30 0x4;
ti,hwmods = gpio2;
gpio-controller;
#gpio-cells = 2;
@@ -122,6 +126,8 @@
 
gpio3: gpio@48057000 {
compatible = ti,omap4-gpio;
+   reg = 0x48057000 0x200;
+   interrupts = 0 31 0x4;
ti,hwmods = gpio3;
gpio-controller;
#gpio-cells = 2;
@@ -131,6 +137,8 @@
 
gpio4: gpio@48059000 {
compatible = ti,omap4-gpio;
+   reg = 0x48059000 0x200;
+   interrupts = 0 32 0x4;
ti,hwmods = gpio4;
gpio-controller;
#gpio-cells = 2;
@@ -140,6 +148,8 @@
 
gpio5: gpio@4805b000 {
compatible = ti,omap4-gpio;
+   reg = 0x4805b000 0x200;
+   interrupts = 0 33 0x4;
ti,hwmods = gpio5;
gpio-controller;
#gpio-cells = 2;
@@ -149,6 +159,8 @@
 
gpio6: gpio@4805d000 {
compatible = ti,omap4-gpio;
+   reg = 0x4805d000 0x200;
+   interrupts = 0 34 0x4;
ti,hwmods = gpio6;
gpio-controller;
#gpio-cells = 2;
@@ -158,6 +170,8 @@
 
gpio7: gpio@48051000 {
compatible = ti,omap4-gpio;
+   reg = 0x48051000 0x200;
+   interrupts = 0 35 0x4;
ti,hwmods = gpio7;
gpio-controller;
#gpio-cells = 2;
@@ -167,6 +181,8 @@
 
gpio8: gpio@48053000 {
compatible = ti,omap4-gpio;
+   reg = 0x48053000 0x200;
+   interrupts = 0 121 0x4;
ti,hwmods = gpio8;
gpio-controller;
#gpio-cells = 2;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/4] ARM/dts: Update OMAP5 with address space and interrupts

2012-10-22 Thread Sebastien Guiriec
Since kernel 3.7 the DTS data are not overwriten by hwmod data we can add the 
address space
and interrupt line description inside dtsi file for OMAP5. This serie is 
updating the
current OMAP5 IP with missing entry.

It has been tested on OMAP5 with 3.7-audio-display feature tree.
- MMC is probing and functional
- TWL6041 probing (GPIO/I2C)
- booting (UART)

Sebastien Guiriec (4):
  ARM/dts: omap5: Update GPIO with address space and interrupt
  ARM/dts: omap5: Update I2C with address space and interrupts
  ARM/dts: omap5: Update UART with address space and interrupts
  ARM/dts: omap5: Update MMC with address space and interrupts

 arch/arm/boot/dts/omap5.dtsi |   56 +++---
 1 file changed, 52 insertions(+), 4 deletions(-)

-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/4] ARM/dts: omap5: Update UART with address space and interrupts

2012-10-22 Thread Sebastien Guiriec
Add base address and interrupt line inside Device Tree data for

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 arch/arm/boot/dts/omap5.dtsi |   16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 6c22e1b..413df94 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -237,36 +237,48 @@
 
uart1: serial@4806a000 {
compatible = ti,omap4-uart;
+   reg = 0x4806a000 0x100;
+   interrupts = 0 72 0x4;
ti,hwmods = uart1;
clock-frequency = 4800;
};
 
uart2: serial@4806c000 {
compatible = ti,omap4-uart;
+   reg = 0x4806c000 0x100;
+   interrupts = 0 73 0x4;
ti,hwmods = uart2;
clock-frequency = 4800;
};
 
uart3: serial@4802 {
compatible = ti,omap4-uart;
+   reg = 0x4802 0x100;
+   interrupts = 0 74 0x4;
ti,hwmods = uart3;
clock-frequency = 4800;
};
 
uart4: serial@4806e000 {
compatible = ti,omap4-uart;
+   reg = 0x4806e000 0x100;
+   interrupts = 0 70 0x4;
ti,hwmods = uart4;
clock-frequency = 4800;
};
 
uart5: serial@48066000 {
-   compatible = ti,omap5-uart;
+   compatible = ti,omap4-uart;
+   reg = 0x48066000 0x100;
+   interrupts = 0 105 0x4;
ti,hwmods = uart5;
clock-frequency = 4800;
};
 
uart6: serial@48068000 {
-   compatible = ti,omap6-uart;
+   compatible = ti,omap4-uart;
+   reg = 0x48068000 0x100;
+   interrupts = 0 106 0x4;
ti,hwmods = uart6;
clock-frequency = 4800;
};
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/4] ARM/dts: omap5: Update MMC with address space and interrupts

2012-10-22 Thread Sebastien Guiriec
Add base address and interrupt line inside Device Tree data for
OMAP5.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 arch/arm/boot/dts/omap5.dtsi |   10 ++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 413df94..b643cd3 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -285,6 +285,8 @@
 
mmc1: mmc@4809c000 {
compatible = ti,omap4-hsmmc;
+   reg = 0x4809c000 0x400;
+   interrupts = 0 83 0x4;
ti,hwmods = mmc1;
ti,dual-volt;
ti,needs-special-reset;
@@ -292,24 +294,32 @@
 
mmc2: mmc@480b4000 {
compatible = ti,omap4-hsmmc;
+   reg = 0x480b4000 0x400;
+   interrupts = 0 86 0x4;
ti,hwmods = mmc2;
ti,needs-special-reset;
};
 
mmc3: mmc@480ad000 {
compatible = ti,omap4-hsmmc;
+   reg = 0x480ad000 0x400;
+   interrupts = 0 94 0x4;
ti,hwmods = mmc3;
ti,needs-special-reset;
};
 
mmc4: mmc@480d1000 {
compatible = ti,omap4-hsmmc;
+   reg = 0x480d1000 0x400;
+   interrupts = 0 96 0x4;
ti,hwmods = mmc4;
ti,needs-special-reset;
};
 
mmc5: mmc@480d5000 {
compatible = ti,omap4-hsmmc;
+   reg = 0x480d5000 0x400;
+   interrupts = 0 59 0x4;
ti,hwmods = mmc5;
ti,needs-special-reset;
};
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/4] ARM/dts: omap5: Update I2C with address space and interrupts

2012-10-22 Thread Sebastien Guiriec
Add base address and interrupt line inside Device Tree data for
OMAP5

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 arch/arm/boot/dts/omap5.dtsi |   14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 9e39f9f..6c22e1b 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -192,6 +192,8 @@
 
i2c1: i2c@4807 {
compatible = ti,omap4-i2c;
+   reg = 0x4807 0x100;
+   interrupts = 0 56 0x4;
#address-cells = 1;
#size-cells = 0;
ti,hwmods = i2c1;
@@ -199,6 +201,8 @@
 
i2c2: i2c@48072000 {
compatible = ti,omap4-i2c;
+   reg = 0x48072000 0x100;
+   interrupts = 0 57 0x4;
#address-cells = 1;
#size-cells = 0;
ti,hwmods = i2c2;
@@ -206,20 +210,26 @@
 
i2c3: i2c@4806 {
compatible = ti,omap4-i2c;
+   reg = 0x4806 0x100;
+   interrupts = 0 61 0x4;
#address-cells = 1;
#size-cells = 0;
ti,hwmods = i2c3;
};
 
-   i2c4: i2c@4807A000 {
+   i2c4: i2c@4807a000 {
compatible = ti,omap4-i2c;
+   reg = 0x4807a000 0x100;
+   interrupts = 0 62 0x4;
#address-cells = 1;
#size-cells = 0;
ti,hwmods = i2c4;
};
 
-   i2c5: i2c@4807C000 {
+   i2c5: i2c@4807c000 {
compatible = ti,omap4-i2c;
+   reg = 0x4807c000 0x100;
+   interrupts = 0 60 0x4;
#address-cells = 1;
#size-cells = 0;
ti,hwmods = i2c5;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] ARM/dts: Update OMAP5 with address space and interrupts

2012-10-22 Thread Sebastien Guiriec

Hi Benoit,

On 10/22/2012 04:11 PM, Benoit Cousson wrote:

Hi Seb,

Good work. Thanks for that series.

Just update it with all the acked-by you've got from the TI driver folks
+ the minor comment and I'll pull it in the for_3.8/dts branch.

That's a detail but you should update the subject with ARM: dts: OMAP5:
XXX prefix for consistency with the latest naming convention.
Thanks for the information I will update the series. I was thinking that 
it was the convention according to a past talk. I will update our full 
audio/display feature tree with this convention.




Please, Cc the DT list as well.

Regards,
Benoit

On 10/22/2012 12:22 PM, Sebastien Guiriec wrote:

Since kernel 3.7 the DTS data are not overwriten by hwmod data we can add the 
address space
and interrupt line description inside dtsi file for OMAP5. This serie is 
updating the
current OMAP5 IP with missing entry.

It has been tested on OMAP5 with 3.7-audio-display feature tree.
- MMC is probing and functional
- TWL6041 probing (GPIO/I2C)
- booting (UART)

Sebastien Guiriec (4):
   ARM/dts: omap5: Update GPIO with address space and interrupt
   ARM/dts: omap5: Update I2C with address space and interrupts
   ARM/dts: omap5: Update UART with address space and interrupts
   ARM/dts: omap5: Update MMC with address space and interrupts

  arch/arm/boot/dts/omap5.dtsi |   56 +++---
  1 file changed, 52 insertions(+), 4 deletions(-)





--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] i2c: omap: adopt pinctrl support

2012-10-16 Thread Sebastien Guiriec
Some GPIO expanders need some early pin control muxing. Due to
legacy boards sometimes the driver uses subsys_initcall instead of
module_init. This patch takes advantage of defer probe feature
and pin control in order to wait until pin control probing before
GPIO driver probing. It has been tested on OMAP5 board with TCA6424
driver.

log:

[0.482299] omap_i2c i2c.15: could not find pctldev for node /ocp/pinmux@4a00
2840/pinmux_i2c5_pins, deferring probe
[0.482330] platform i2c.15: Driver omap_i2c requests probe deferral
[0.484466] Advanced Linux Sound Architecture Driver Initialized.

[4.746917] omap_i2c i2c.15: bus 4 rev2.4.0 at 100 kHz
[4.755279] gpiochip_find_base: found new base at 477
[4.761169] gpiochip_add: registered GPIOs 477 to 500 on device: tca6424a

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 drivers/i2c/busses/i2c-omap.c |   13 +
 1 file changed, 13 insertions(+)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index db31eae..661d8a2 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -44,6 +44,7 @@
 #include linux/i2c-omap.h
 #include linux/pm_runtime.h
 #include linux/pm_qos.h
+#include linux/pinctrl/consumer.h
 
 /* I2C controller revisions */
 #define OMAP_I2C_OMAP1_REV_2   0x20
@@ -213,6 +214,8 @@ struct omap_i2c_dev {
u16 syscstate;
u16 westate;
u16 errata;
+
+   struct pinctrl  *pins;
 };
 
 static const u8 reg_map_ip_v1[] = {
@@ -1107,6 +1110,16 @@ omap_i2c_probe(struct platform_device *pdev)
dev-dtrev = pdata-rev;
}
 
+   dev-pins = devm_pinctrl_get_select_default(pdev-dev);
+   if (IS_ERR(dev-pins)) {
+   if (PTR_ERR(dev-pins) == -EPROBE_DEFER)
+   return -EPROBE_DEFER;
+
+   dev_warn(pdev-dev, did not get pins for i2c error: %li\n,
+PTR_ERR(dev-pins));
+   dev-pins = NULL;
+   }
+
dev-dev = pdev-dev;
dev-irq = irq;
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] OMAP4: devices: fixup OMAP4 DMIC platform device error message

2012-10-16 Thread Sebastien Guiriec
Correct DMIC hwmod lockup error message and replace printk() by
pr_err().

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 arch/arm/mach-omap2/devices.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index c8c2117..cba60e0 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -341,7 +341,7 @@ static void __init omap_init_dmic(void)
 
oh = omap_hwmod_lookup(dmic);
if (!oh) {
-   printk(KERN_ERR Could not look up mcpdm hw_mod\n);
+   pr_err(Could not look up dmic hw_mod\n);
return;
}
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ASoC: omap-mcbsp: Add pm_runtime_get/put functions call for McBSP.

2012-06-01 Thread Sebastien Guiriec
pm_runtime_get_sync() and put_sync() are not called by McBSP driver.
This is introducing a problem with PM and Audio Backend due to
missing get/put for McBSP IP.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 sound/soc/omap/omap-mcbsp.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index 1046083..007d239 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -117,6 +117,8 @@ static int omap_mcbsp_dai_startup(struct snd_pcm_substream 
*substream,
struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
int err = 0;
 
+   pm_runtime_get_sync(mcbsp-dev);
+
if (!cpu_dai-active)
err = omap_mcbsp_request(mcbsp);
 
@@ -165,6 +167,8 @@ static void omap_mcbsp_dai_shutdown(struct 
snd_pcm_substream *substream,
omap_mcbsp_free(mcbsp);
mcbsp-configured = 0;
}
+
+   pm_runtime_put_sync(mcbsp-dev);
 }
 
 static int omap_mcbsp_dai_trigger(struct snd_pcm_substream *substream, int cmd,
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP4: hwmod data: Update AESS data with memory bank area

2012-04-23 Thread Sebastien Guiriec
Add AESS memory bank data in hwmod in order to provide memory
address information to the driver. AESS is divided inside 5
memory banks than can be accessed directly by MPU or by L3.
- PMEM: Program memory bank.
- SMEM: Sample memory bank.
- CMEM: Coefficients memory bank
- DMEM: Data memory bank.
- MPU/DMA: Register of AESS IP.

Signed-off-by: Sebastien Guiriec s-guir...@ti.com
---
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |   42 
 1 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c 
b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 4906129..b0d333a 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -3999,6 +3999,27 @@ static struct omap_hwmod_ocp_if 
omap44xx_l4_cfg__ocp_wp_noc = {
 
 static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = {
{
+   .name   = dmem,
+   .pa_start   = 0x4018,
+   .pa_end = 0x4018
+   },
+   {
+   .name   = cmem,
+   .pa_start   = 0x401a,
+   .pa_end = 0x401a1fff
+   },
+   {
+   .name   = smem,
+   .pa_start   = 0x401c,
+   .pa_end = 0x401c5fff
+   },
+   {
+   .name   = pmem,
+   .pa_start   = 0x401e,
+   .pa_end = 0x401e1fff
+   },
+   {
+   .name   = mpu,
.pa_start   = 0x401f1000,
.pa_end = 0x401f13ff,
.flags  = ADDR_TYPE_RT
@@ -4017,6 +4038,27 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = {
 
 static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = {
{
+   .name   = dmem_dma,
+   .pa_start   = 0x4908,
+   .pa_end = 0x4908
+   },
+   {
+   .name   = cmem_dma,
+   .pa_start   = 0x490a,
+   .pa_end = 0x490a1fff
+   },
+   {
+   .name   = smem_dma,
+   .pa_start   = 0x490c,
+   .pa_end = 0x490c5fff
+   },
+   {
+   .name   = pmem_dma,
+   .pa_start   = 0x490e,
+   .pa_end = 0x490e1fff
+   },
+   {
+   .name   = dma,
.pa_start   = 0x490f1000,
.pa_end = 0x490f13ff,
.flags  = ADDR_TYPE_RT
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html