All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] Davinci: DM365: Add platform device for McBSP
@ 2009-08-28 22:25 miguel.aguilar
  2009-08-29  9:22 ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: miguel.aguilar @ 2009-08-28 22:25 UTC (permalink / raw)
  To: davinci-linux-open-source, alsa-devel
  Cc: Miguel Aguilar, todd.fischer, diego.dompe, clark.becker,
	nsnehaprabha

From: Miguel Aguilar <miguel.aguilar@ridgerun.com>

1) Registers the platform device for McBSP on dm365.
2) Add platform data to DM365 EVM board file.

Signed-off-by: Miguel Aguilar <miguel.aguilar@ridgerun.com>
---
 arch/arm/mach-davinci/board-dm365-evm.c    |    4 ++
 arch/arm/mach-davinci/dm365.c              |   45 +++++++++++++++++++++++++++-
 arch/arm/mach-davinci/include/mach/asp.h   |    3 ++
 arch/arm/mach-davinci/include/mach/dm365.h |    2 +
 4 files changed, 53 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
index f6adf79..fd2db78 100644
--- a/arch/arm/mach-davinci/board-dm365-evm.c
+++ b/arch/arm/mach-davinci/board-dm365-evm.c
@@ -177,6 +177,8 @@ static struct at24_platform_data eeprom_info = {
 	.context	= (void *)0x7f00,
 };
 
+static struct snd_platform_data dm365_evm_snd_data;
+
 static struct i2c_board_info i2c_info[] = {
 	{
 		I2C_BOARD_INFO("dm365evm_keys", 0x25),
@@ -476,6 +478,8 @@ static __init void dm365_evm_init(void)
 
 	/* maybe setup mmc1/etc ... _after_ mmc0 */
 	evm_init_cpld();
+	
+	dm365_init_asp(&dm365_evm_snd_data);
 }
 
 static __init void dm365_evm_irq_init(void)
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index e815174..c8bff14 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -32,6 +32,7 @@
 #include <mach/time.h>
 #include <mach/serial.h>
 #include <mach/common.h>
+#include <mach/asp.h>
 
 #include "clock.h"
 #include "mux.h"
@@ -456,7 +457,7 @@ static struct davinci_clk dm365_clks[] = {
 	CLK(NULL, "usb", &usb_clk),
 	CLK("davinci_emac.1", NULL, &emac_clk),
 	CLK("voice_codec", NULL, &voicecodec_clk),
-	CLK("soc-audio.0", NULL, &asp0_clk),
+	CLK("davinci-asp.0", NULL, &asp0_clk),
 	CLK(NULL, "rto", &rto_clk),
 	CLK(NULL, "mjcp", &mjcp_clk),
 	CLK(NULL, NULL, NULL),
@@ -603,6 +604,9 @@ INT_CFG(DM365,  INT_IMX1_ENABLE,     24,    1,    1,     false)
 INT_CFG(DM365,  INT_IMX1_DISABLE,    24,    1,    0,     false)
 INT_CFG(DM365,  INT_NSF_ENABLE,      25,    1,    1,     false)
 INT_CFG(DM365,  INT_NSF_DISABLE,     25,    1,    0,     false)
+
+EVT_CFG(DM365,	EVT2_ASP_TX,         0,     1,    0,     false)
+EVT_CFG(DM365,	EVT3_ASP_RX,         1,     1,    0,     false)
 #endif
 };
 
@@ -806,6 +810,31 @@ static struct platform_device dm365_edma_device = {
 	.resource		= edma_resources,
 };
 
+static struct resource dm365_asp_resources[] = {
+	{
+		.start	= DAVINCI_DM365_ASP0_BASE,
+		.end	= DAVINCI_DM365_ASP0_BASE + SZ_8K - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	{
+		.start	= DAVINCI_DMA_ASP0_TX,
+		.end	= DAVINCI_DMA_ASP0_TX,
+		.flags	= IORESOURCE_DMA,
+	},
+	{
+		.start	= DAVINCI_DMA_ASP0_RX,
+		.end	= DAVINCI_DMA_ASP0_RX,
+		.flags	= IORESOURCE_DMA,
+	},
+};
+
+static struct platform_device dm365_asp_device = {
+	.name		= "davinci-asp",
+	.id		= 0,
+	.num_resources	= ARRAY_SIZE(dm365_asp_resources),
+	.resource	= dm365_asp_resources,
+};
+
 static struct map_desc dm365_io_desc[] = {
 	{
 		.virtual	= IO_VIRT,
@@ -907,6 +936,20 @@ static struct davinci_soc_info davinci_soc_info_dm365 = {
 	.sram_len		= SZ_32K,
 };
 
+void __init dm365_init_asp(struct snd_platform_data *pdata)
+{
+	davinci_cfg_reg(DM365_MCBSP0_BDX);
+	davinci_cfg_reg(DM365_MCBSP0_X);
+	davinci_cfg_reg(DM365_MCBSP0_BFSX);
+	davinci_cfg_reg(DM365_MCBSP0_BDR);
+	davinci_cfg_reg(DM365_MCBSP0_R);
+	davinci_cfg_reg(DM365_MCBSP0_BFSR);
+	davinci_cfg_reg(DM365_EVT2_ASP_TX);
+	davinci_cfg_reg(DM365_EVT3_ASP_RX);
+	dm365_asp_device.dev.platform_data = pdata;
+	platform_device_register(&dm365_asp_device);
+}
+
 void __init dm365_init(void)
 {
 	davinci_common_init(&davinci_soc_info_dm365);
diff --git a/arch/arm/mach-davinci/include/mach/asp.h b/arch/arm/mach-davinci/include/mach/asp.h
index 18e4ce3..fbcbed0 100644
--- a/arch/arm/mach-davinci/include/mach/asp.h
+++ b/arch/arm/mach-davinci/include/mach/asp.h
@@ -15,6 +15,9 @@
 #define	DAVINCI_DM646X_MCASP0_REG_BASE		0x01D01000
 #define DAVINCI_DM646X_MCASP1_REG_BASE		0x01D01800
 
+/* Bases of dm365 register banks */
+#define DAVINCI_DM365_ASP0_BASE	0x01D02000
+
 /* Bases of da850/da830 McASP0  register banks */
 #define DAVINCI_DA8XX_MCASP0_REG_BASE	0x01D00000
 
diff --git a/arch/arm/mach-davinci/include/mach/dm365.h b/arch/arm/mach-davinci/include/mach/dm365.h
index 09db434..2291c0d 100644
--- a/arch/arm/mach-davinci/include/mach/dm365.h
+++ b/arch/arm/mach-davinci/include/mach/dm365.h
@@ -16,6 +16,7 @@
 #include <linux/platform_device.h>
 #include <mach/hardware.h>
 #include <mach/emac.h>
+#include <mach/asp.h>
 
 #define DM365_EMAC_BASE			(0x01D07000)
 #define DM365_EMAC_CNTRL_OFFSET		(0x0000)
@@ -25,5 +26,6 @@
 #define DM365_EMAC_CNTRL_RAM_SIZE	(0x2000)
 
 void __init dm365_init(void);
+void __init dm365_init_asp(struct snd_platform_data *pdata);
 
 #endif /* __ASM_ARCH_DM365_H */
-- 
1.6.0.4

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

* Re: [PATCH v2 1/2] Davinci: DM365: Add platform device for McBSP
  2009-08-28 22:25 [PATCH v2 1/2] Davinci: DM365: Add platform device for McBSP miguel.aguilar
@ 2009-08-29  9:22 ` Mark Brown
  2009-08-31 15:19   ` Miguel Aguilar
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2009-08-29  9:22 UTC (permalink / raw)
  To: miguel.aguilar
  Cc: davinci-linux-open-source, clark.becker, diego.dompe, alsa-devel,
	nsnehaprabha, todd.fischer

On Fri, Aug 28, 2009 at 04:25:18PM -0600, miguel.aguilar@ridgerun.com wrote:
> From: Miguel Aguilar <miguel.aguilar@ridgerun.com>

> 1) Registers the platform device for McBSP on dm365.
> 2) Add platform data to DM365 EVM board file.

> Signed-off-by: Miguel Aguilar <miguel.aguilar@ridgerun.com>

Please see my comments on one of your previous versions; there are some
patches due to be merged in 2.6.32 which change the board registration
quite a bit.  Take a look at Kevin's temp/asoc branch to see how the
final merge will look.

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

* Re: [PATCH v2 1/2] Davinci: DM365: Add platform device for McBSP
  2009-08-29  9:22 ` Mark Brown
@ 2009-08-31 15:19   ` Miguel Aguilar
  2009-08-31 20:11     ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Miguel Aguilar @ 2009-08-31 15:19 UTC (permalink / raw)
  To: Mark Brown
  Cc: davinci-linux-open-source, clark.becker, diego.dompe, alsa-devel,
	nsnehaprabha, todd.fischer

Mark,

Should I create the patch against Kevin's temp/asoc branch?

Thanks,

Miguel Aguilar
Mark Brown wrote:
> On Fri, Aug 28, 2009 at 04:25:18PM -0600, miguel.aguilar@ridgerun.com wrote:
>> From: Miguel Aguilar <miguel.aguilar@ridgerun.com>
> 
>> 1) Registers the platform device for McBSP on dm365.
>> 2) Add platform data to DM365 EVM board file.
> 
>> Signed-off-by: Miguel Aguilar <miguel.aguilar@ridgerun.com>
> 
> Please see my comments on one of your previous versions; there are some
> patches due to be merged in 2.6.32 which change the board registration
> quite a bit.  Take a look at Kevin's temp/asoc branch to see how the
> final merge will look.

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

* Re: [PATCH v2 1/2] Davinci: DM365: Add platform device for McBSP
  2009-08-31 15:19   ` Miguel Aguilar
@ 2009-08-31 20:11     ` Mark Brown
  2009-08-31 22:43       ` Miguel Aguilar
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2009-08-31 20:11 UTC (permalink / raw)
  To: Miguel Aguilar
  Cc: davinci-linux-open-source, clark.becker, diego.dompe, alsa-devel,
	nsnehaprabha, todd.fischer

On Mon, Aug 31, 2009 at 09:19:37AM -0600, Miguel Aguilar wrote:

> Should I create the patch against Kevin's temp/asoc branch?

Probably, but Kevin's the one to ask here.

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

* Re: [PATCH v2 1/2] Davinci: DM365: Add platform device for McBSP
  2009-08-31 20:11     ` Mark Brown
@ 2009-08-31 22:43       ` Miguel Aguilar
       [not found]         ` <4A9C5227.4060102-9uBrGCPFOa1Wk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Miguel Aguilar @ 2009-08-31 22:43 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: davinci-linux-open-source, clark.becker, Mark Brown, Diego Dompe,
	alsa-devel, nsnehaprabha, todd.fischer

Kevin,

Does the patch for DM365 EVM audio codec support should be created based on the 
current temp/asoc branch?

Thanks,

Miguel Aguilar

Mark Brown wrote:
> On Mon, Aug 31, 2009 at 09:19:37AM -0600, Miguel Aguilar wrote:
> 
>> Should I create the patch against Kevin's temp/asoc branch?
> 
> Probably, but Kevin's the one to ask here.

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

* RE: [alsa-devel] [PATCH v2 1/2] Davinci: DM365: Add platform device for McBSP
       [not found]         ` <4A9C5227.4060102-9uBrGCPFOa1Wk0Htik3J/w@public.gmane.org>
@ 2009-09-02 15:10           ` Narnakaje, Snehaprabha
  0 siblings, 0 replies; 6+ messages in thread
From: Narnakaje, Snehaprabha @ 2009-09-02 15:10 UTC (permalink / raw)
  To: Miguel Aguilar, Kevin Hilman
  Cc: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org,
	clark.becker-9uBrGCPFOa1Wk0Htik3J/w@public.gmane.org,
	todd.fischer-9uBrGCPFOa1Wk0Htik3J/w@public.gmane.org, Mark Brown,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org

Miguel,

We have audio working on temp/asoc branch (patches from Chaithrika).

I think you should create the patches against temp/asoc (similar to the latest patches from Troy).

If you create it against temp/asoc, you will be able to test audio on DM365.

Thanks
Sneha

> -----Original Message-----
> From: Miguel Aguilar [mailto:miguel.aguilar-9uBrGCPFOa1Wk0Htik3J/w@public.gmane.org]
> Sent: Monday, August 31, 2009 6:44 PM
> To: Kevin Hilman
> Cc: Mark Brown; davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org; alsa-
> devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org; todd.fischer-9uBrGCPFOa1Wk0Htik3J/w@public.gmane.org; Diego Dompe;
> clark.becker-9uBrGCPFOa1Wk0Htik3J/w@public.gmane.org; Narnakaje, Snehaprabha
> Subject: Re: [alsa-devel] [PATCH v2 1/2] Davinci: DM365: Add platform
> device for McBSP
> 
> Kevin,
> 
> Does the patch for DM365 EVM audio codec support should be created based
> on the
> current temp/asoc branch?
> 
> Thanks,
> 
> Miguel Aguilar
> 
> Mark Brown wrote:
> > On Mon, Aug 31, 2009 at 09:19:37AM -0600, Miguel Aguilar wrote:
> >
> >> Should I create the patch against Kevin's temp/asoc branch?
> >
> > Probably, but Kevin's the one to ask here.
> 
> 

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

end of thread, other threads:[~2009-09-02 15:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-28 22:25 [PATCH v2 1/2] Davinci: DM365: Add platform device for McBSP miguel.aguilar
2009-08-29  9:22 ` Mark Brown
2009-08-31 15:19   ` Miguel Aguilar
2009-08-31 20:11     ` Mark Brown
2009-08-31 22:43       ` Miguel Aguilar
     [not found]         ` <4A9C5227.4060102-9uBrGCPFOa1Wk0Htik3J/w@public.gmane.org>
2009-09-02 15:10           ` [alsa-devel] " Narnakaje, Snehaprabha

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