All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dong Aisheng-B29396 <B29396@freescale.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"broonie@opensource.wolfsonmicro.com"
	<broonie@opensource.wolfsonmicro.com>,
	"w.sang@pengutronix.de" <w.sang@pengutronix.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"lrg@ti.com" <lrg@ti.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH v2 1/3] ARM: mx28evk: add platform data for saif
Date: Thu, 8 Sep 2011 07:52:59 +0000	[thread overview]
Message-ID: <65EE16ACC360FA4D99C96DC085B3F77223C8CB@039-SN1MPN1-003.039d.mgd.msft.net> (raw)
In-Reply-To: <20110907181811.GX28816@pengutronix.de>

> -----Original Message-----
> From: linux-arm-kernel-bounces@lists.infradead.org [mailto:linux-arm-
> kernel-bounces@lists.infradead.org] On Behalf Of Uwe Kleine-K?nig
> Sent: Thursday, September 08, 2011 2:18 AM
> To: Dong Aisheng-B29396
> Cc: alsa-devel@alsa-project.org; s.hauer@pengutronix.de;
> broonie@opensource.wolfsonmicro.com; w.sang@pengutronix.de;
> kernel@pengutronix.de; lrg@ti.com; linux-arm-kernel@lists.infradead.org
> Subject: Re: [PATCH v2 1/3] ARM: mx28evk: add platform data for saif
> 
> Hello,
> 
> On Wed, Sep 07, 2011 at 09:57:36PM +0800, Dong Aisheng wrote:
> > This is for supporting saif record function.
> >
> > Signed-off-by: Dong Aisheng <b29396@freescale.com>
> > Cc: Sascha Hauer <s.hauer@pengutronix.de>
> > Cc: Wolfram Sang <w.sang@pengutronix.de>
> > Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> > Cc: Liam Girdwood <lrg@ti.com>
> >
> > ---
> > changes since v1:
> >  * move saif clkmux code into mach-specific part
> > ---
> >  arch/arm/mach-mxs/clock-mx28.c                  |   47
> +++++++++++++++++++++++
> >  arch/arm/mach-mxs/devices-mx28.h                |    4 +-
> >  arch/arm/mach-mxs/devices/platform-mxs-saif.c   |    5 +-
> >  arch/arm/mach-mxs/include/mach/common.h         |    2 +
> >  arch/arm/mach-mxs/include/mach/devices-common.h |    4 +-
> >  arch/arm/mach-mxs/include/mach/digctl.h         |   18 +++++++++
> >  arch/arm/mach-mxs/mach-mx28evk.c                |   15 ++++++-
> >  7 files changed, 89 insertions(+), 6 deletions(-)
> >
> > diff --git a/arch/arm/mach-mxs/clock-mx28.c
> > b/arch/arm/mach-mxs/clock-mx28.c index 7954013..f0c7cb6 100644
> > --- a/arch/arm/mach-mxs/clock-mx28.c
> > +++ b/arch/arm/mach-mxs/clock-mx28.c
> > @@ -29,6 +29,7 @@
> >  #include <mach/mx28.h>
> >  #include <mach/common.h>
> >  #include <mach/clock.h>
> > +#include <mach/digctl.h>
> >
> >  #include "regs-clkctrl-mx28.h"
> >
> > @@ -43,6 +44,52 @@ static struct clk emi_clk;  static struct clk
> > saif0_clk;  static struct clk saif1_clk;  static struct clk
> > clk32k_clk;
> > +static unsigned int saif_clkmux;
> > +
> > +/*
> > + * HW_SAIF_CLKMUX_SEL:
> > + *  DIRECT(0x0): SAIF0 clock pins selected for SAIF0 input clocks, and
> SAIF1
> > + *		clock pins selected for SAIF1 input clocks.
> > + *  CROSSINPUT(0x1): SAIF1 clock inputs selected for SAIF0 input
> clocks, and
> > + *		SAIF0 clock inputs selected for SAIF1 input clocks.
> > + *  EXTMSTR0(0x2): SAIF0 clock pin selected for both SAIF0 and SAIF1
> input
> > + *		clocks.
> > + *  EXTMSTR1(0x3): SAIF1 clock pin selected for both SAIF0 and SAIF1
> input
> > + *		clocks.
> > + */
> > +int mxs_saif_clkmux_select(unsigned int clkmux) {
> > +	if (clkmux > 0x3)
> > +		return -EINVAL;
> > +
> > +	__raw_writel(clkmux << 10, DIGCTRL_BASE_ADDR + MXS_SET_ADDR);
> hmm, in my version of the mx28 reference the module is named DIGCTL?!
> 
> shouldn't that be something like:
> 
> 	DIGCTRL_BASE_ADDR + DIGCTRL_CTRL + MXS_SET_ADDR?
Yes, DIGCTRL_CTRL is still not defined.
So for conveniently I just used DIGCTRL_BASE_ADDR.
I'm going to add it in digctl.h.
If it's not the right place please let me know.

> and is it intended that if you do:
> 
> 	mxs_saif_clkmux_select(1);
> 	mxs_saif_clkmux_select(2);
> 
> the SAIF_CLKMUX_SEL bitfield ends up being 3?
Yes, it ends up being 3.

> > +	saif_clkmux = clkmux;
> > +	return 0;
> > +}
> > +
> > +int mxs_get_saif_clk_master_id(unsigned int saif_id) {
> > +	unsigned int master_id;
> > +
> > +	switch (saif_clkmux) {
> > +	case MXS_DIGCTL_SAIF_CLKMUX_DIRECT:
> > +		master_id = saif_id;
> > +		break;
> > +	case MXS_DIGCTL_SAIF_CLKMUX_CROSSINPUT:
> > +		master_id = saif_id ? 0 : 1;
> > +		break;
> > +	case MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0:
> > +		master_id = 0;
> > +		break;
> > +	case MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR1:
> > +		master_id = 1;
> > +		break;
> > +	default:
> > +		return -EINVAL;
> > +	}
> > +
> > +	return master_id;
> > +}
> These two functions are only supposed to be called by arch code right?
> (If not, you might need to export them.)
Yes, it's supposed to be called by arch code right now.

> >
> >  static int _raw_clk_enable(struct clk *clk)  { diff --git
> > a/arch/arm/mach-mxs/devices-mx28.h b/arch/arm/mach-mxs/devices-mx28.h
> > index c888710..40be649 100644
> > --- a/arch/arm/mach-mxs/devices-mx28.h
> > +++ b/arch/arm/mach-mxs/devices-mx28.h
> > @@ -47,6 +47,8 @@ struct platform_device *__init mx28_add_mxsfb(
> >  		const struct mxsfb_platform_data *pdata);
> >
> >  extern const struct mxs_saif_data mx28_saif_data[] __initconst;
> > -#define mx28_add_saif(id)
> mxs_add_saif(&mx28_saif_data[id])
> > +#define mx28_add_saif(id, pdata) \
> > +	mxs_add_saif(&mx28_saif_data[id], pdata)
> should it be a seperate patch to add pdata for saif devices?
How do you suggest to separate?
All changes are mainly to add saif pdata.
You mean to move DIGCTL related saif pdata function to another patch?

> > +
> undesirable empty line.
Got it. I will remove.

> >
> >  struct platform_device *__init mx28_add_rtc_stmp3xxx(void); diff
> > --git a/arch/arm/mach-mxs/devices/platform-mxs-saif.c
> > b/arch/arm/mach-mxs/devices/platform-mxs-saif.c
> > index 1ec965e..f6e3a60 100644
> > --- a/arch/arm/mach-mxs/devices/platform-mxs-saif.c
> > +++ b/arch/arm/mach-mxs/devices/platform-mxs-saif.c
> > @@ -32,7 +32,8 @@ const struct mxs_saif_data mx28_saif_data[]
> > __initconst = {  };  #endif
> >
> > -struct platform_device *__init mxs_add_saif(const struct
> > mxs_saif_data *data)
> > +struct platform_device *__init mxs_add_saif(const struct mxs_saif_data
> *data,
> > +				const struct mxs_saif_platform_data *pdata)
> >  {
> >  	struct resource res[] = {
> >  		{
> > @@ -56,5 +57,5 @@ struct platform_device *__init mxs_add_saif(const
> struct mxs_saif_data *data)
> >  	};
> >
> >  	return mxs_add_platform_device("mxs-saif", data->id, res,
> > -					ARRAY_SIZE(res), NULL, 0);
> > +				ARRAY_SIZE(res), pdata, sizeof(*pdata));
> >  }
> > diff --git a/arch/arm/mach-mxs/include/mach/common.h
> > b/arch/arm/mach-mxs/include/mach/common.h
> > index 635bb5d..bf91a10 100644
> > --- a/arch/arm/mach-mxs/include/mach/common.h
> > +++ b/arch/arm/mach-mxs/include/mach/common.h
> > @@ -29,4 +29,6 @@ extern void mx28_init_irq(void);
> >
> >  extern void icoll_init_irq(void);
> >
> > +extern int mxs_saif_clkmux_select(unsigned int clkmux); extern int
> > +mxs_get_saif_clk_master_id(unsigned int saif_id);
> >  #endif /* __MACH_MXS_COMMON_H__ */
> > diff --git a/arch/arm/mach-mxs/include/mach/devices-common.h
> > b/arch/arm/mach-mxs/include/mach/devices-common.h
> > index a8080f4..dc369c1 100644
> > --- a/arch/arm/mach-mxs/include/mach/devices-common.h
> > +++ b/arch/arm/mach-mxs/include/mach/devices-common.h
> > @@ -94,6 +94,7 @@ struct platform_device *__init mxs_add_mxs_pwm(
> >  		resource_size_t iobase, int id);
> >
> >  /* saif */
> > +#include <sound/saif.h>
> >  struct mxs_saif_data {
> >  	int id;
> >  	resource_size_t iobase;
> > @@ -103,4 +104,5 @@ struct mxs_saif_data {  };
> >
> >  struct platform_device *__init mxs_add_saif(
> > -		const struct mxs_saif_data *data);
> > +		const struct mxs_saif_data *data,
> > +		const struct mxs_saif_platform_data *pdata);
> > diff --git a/arch/arm/mach-mxs/include/mach/digctl.h
> > b/arch/arm/mach-mxs/include/mach/digctl.h
> > new file mode 100644
> > index 0000000..6231e10
> > --- /dev/null
> > +++ b/arch/arm/mach-mxs/include/mach/digctl.h
> > @@ -0,0 +1,18 @@
> > +/*
> > + * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
> > + *
> > + * This program is free software; you can redistribute it and/or
> > +modify
> > + * it under the terms of the GNU General Public License version 2 as
> > + * published by the Free Software Foundation.
> > + */
> > +
> > +#ifndef __MACH_DIGCTL_H__
> > +#define __MACH_DIGCTL_H__
> > +
> > +/* MXS DIGCTL SAIF CLKMUX */
> > +#define MXS_DIGCTL_SAIF_CLKMUX_DIRECT		0x0
> > +#define MXS_DIGCTL_SAIF_CLKMUX_CROSSINPUT	0x1
> > +#define MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0		0x2
> > +#define MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR1		0x3
> > +
> > +#endif
> > diff --git a/arch/arm/mach-mxs/mach-mx28evk.c
> > b/arch/arm/mach-mxs/mach-mx28evk.c
> > index 4a3cca3..6affe5d 100644
> > --- a/arch/arm/mach-mxs/mach-mx28evk.c
> > +++ b/arch/arm/mach-mxs/mach-mx28evk.c
> > @@ -28,6 +28,7 @@
> >
> >  #include <mach/common.h>
> >  #include <mach/iomux-mx28.h>
> > +#include <mach/digctl.h>
> >
> >  #include "devices-mx28.h"
> >
> > @@ -417,6 +418,16 @@ static void __init mx28evk_add_regulators(void)
> > static void __init mx28evk_add_regulators(void) {}  #endif
> >
> > +static int mx28evk_mxs_saif_pinit(void) {
> > +	return mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0);
> > +}
> > +
> > +struct mxs_saif_platform_data mx28evk_mxs_saif_pdata __initdata = {
> const + __initconst?
Yes, will change like that.

> > +	.init = mx28evk_mxs_saif_pinit,
> > +	.get_master_id = mxs_get_saif_clk_master_id, };
> > +
> >  static void __init mx28evk_init(void)  {
> >  	int ret;
> > @@ -457,8 +468,8 @@ static void __init mx28evk_init(void)
> >
> >  	mx28_add_mxsfb(&mx28evk_mxsfb_pdata);
> >
> > -	mx28_add_saif(0);
> > -	mx28_add_saif(1);
> > +	mx28_add_saif(0, &mx28evk_mxs_saif_pdata);
> > +	mx28_add_saif(1, &mx28evk_mxs_saif_pdata);
> >
> >  	mx28_add_mxs_i2c(0);
> >  	i2c_register_board_info(0, mxs_i2c0_board_info,
> > --
> > 1.7.0.4
> Best regards
> Uwe
> 
> --
> Pengutronix e.K.                           | Uwe Kleine-König
> |
> Industrial Linux Solutions                 | http://www.pengutronix.de/
> |
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: B29396@freescale.com (Dong Aisheng-B29396)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/3] ARM: mx28evk: add platform data for saif
Date: Thu, 8 Sep 2011 07:52:59 +0000	[thread overview]
Message-ID: <65EE16ACC360FA4D99C96DC085B3F77223C8CB@039-SN1MPN1-003.039d.mgd.msft.net> (raw)
In-Reply-To: <20110907181811.GX28816@pengutronix.de>

> -----Original Message-----
> From: linux-arm-kernel-bounces at lists.infradead.org [mailto:linux-arm-
> kernel-bounces at lists.infradead.org] On Behalf Of Uwe Kleine-K?nig
> Sent: Thursday, September 08, 2011 2:18 AM
> To: Dong Aisheng-B29396
> Cc: alsa-devel at alsa-project.org; s.hauer at pengutronix.de;
> broonie at opensource.wolfsonmicro.com; w.sang at pengutronix.de;
> kernel at pengutronix.de; lrg at ti.com; linux-arm-kernel at lists.infradead.org
> Subject: Re: [PATCH v2 1/3] ARM: mx28evk: add platform data for saif
> 
> Hello,
> 
> On Wed, Sep 07, 2011 at 09:57:36PM +0800, Dong Aisheng wrote:
> > This is for supporting saif record function.
> >
> > Signed-off-by: Dong Aisheng <b29396@freescale.com>
> > Cc: Sascha Hauer <s.hauer@pengutronix.de>
> > Cc: Wolfram Sang <w.sang@pengutronix.de>
> > Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> > Cc: Liam Girdwood <lrg@ti.com>
> >
> > ---
> > changes since v1:
> >  * move saif clkmux code into mach-specific part
> > ---
> >  arch/arm/mach-mxs/clock-mx28.c                  |   47
> +++++++++++++++++++++++
> >  arch/arm/mach-mxs/devices-mx28.h                |    4 +-
> >  arch/arm/mach-mxs/devices/platform-mxs-saif.c   |    5 +-
> >  arch/arm/mach-mxs/include/mach/common.h         |    2 +
> >  arch/arm/mach-mxs/include/mach/devices-common.h |    4 +-
> >  arch/arm/mach-mxs/include/mach/digctl.h         |   18 +++++++++
> >  arch/arm/mach-mxs/mach-mx28evk.c                |   15 ++++++-
> >  7 files changed, 89 insertions(+), 6 deletions(-)
> >
> > diff --git a/arch/arm/mach-mxs/clock-mx28.c
> > b/arch/arm/mach-mxs/clock-mx28.c index 7954013..f0c7cb6 100644
> > --- a/arch/arm/mach-mxs/clock-mx28.c
> > +++ b/arch/arm/mach-mxs/clock-mx28.c
> > @@ -29,6 +29,7 @@
> >  #include <mach/mx28.h>
> >  #include <mach/common.h>
> >  #include <mach/clock.h>
> > +#include <mach/digctl.h>
> >
> >  #include "regs-clkctrl-mx28.h"
> >
> > @@ -43,6 +44,52 @@ static struct clk emi_clk;  static struct clk
> > saif0_clk;  static struct clk saif1_clk;  static struct clk
> > clk32k_clk;
> > +static unsigned int saif_clkmux;
> > +
> > +/*
> > + * HW_SAIF_CLKMUX_SEL:
> > + *  DIRECT(0x0): SAIF0 clock pins selected for SAIF0 input clocks, and
> SAIF1
> > + *		clock pins selected for SAIF1 input clocks.
> > + *  CROSSINPUT(0x1): SAIF1 clock inputs selected for SAIF0 input
> clocks, and
> > + *		SAIF0 clock inputs selected for SAIF1 input clocks.
> > + *  EXTMSTR0(0x2): SAIF0 clock pin selected for both SAIF0 and SAIF1
> input
> > + *		clocks.
> > + *  EXTMSTR1(0x3): SAIF1 clock pin selected for both SAIF0 and SAIF1
> input
> > + *		clocks.
> > + */
> > +int mxs_saif_clkmux_select(unsigned int clkmux) {
> > +	if (clkmux > 0x3)
> > +		return -EINVAL;
> > +
> > +	__raw_writel(clkmux << 10, DIGCTRL_BASE_ADDR + MXS_SET_ADDR);
> hmm, in my version of the mx28 reference the module is named DIGCTL?!
> 
> shouldn't that be something like:
> 
> 	DIGCTRL_BASE_ADDR + DIGCTRL_CTRL + MXS_SET_ADDR?
Yes, DIGCTRL_CTRL is still not defined.
So for conveniently I just used DIGCTRL_BASE_ADDR.
I'm going to add it in digctl.h.
If it's not the right place please let me know.

> and is it intended that if you do:
> 
> 	mxs_saif_clkmux_select(1);
> 	mxs_saif_clkmux_select(2);
> 
> the SAIF_CLKMUX_SEL bitfield ends up being 3?
Yes, it ends up being 3.

> > +	saif_clkmux = clkmux;
> > +	return 0;
> > +}
> > +
> > +int mxs_get_saif_clk_master_id(unsigned int saif_id) {
> > +	unsigned int master_id;
> > +
> > +	switch (saif_clkmux) {
> > +	case MXS_DIGCTL_SAIF_CLKMUX_DIRECT:
> > +		master_id = saif_id;
> > +		break;
> > +	case MXS_DIGCTL_SAIF_CLKMUX_CROSSINPUT:
> > +		master_id = saif_id ? 0 : 1;
> > +		break;
> > +	case MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0:
> > +		master_id = 0;
> > +		break;
> > +	case MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR1:
> > +		master_id = 1;
> > +		break;
> > +	default:
> > +		return -EINVAL;
> > +	}
> > +
> > +	return master_id;
> > +}
> These two functions are only supposed to be called by arch code right?
> (If not, you might need to export them.)
Yes, it's supposed to be called by arch code right now.

> >
> >  static int _raw_clk_enable(struct clk *clk)  { diff --git
> > a/arch/arm/mach-mxs/devices-mx28.h b/arch/arm/mach-mxs/devices-mx28.h
> > index c888710..40be649 100644
> > --- a/arch/arm/mach-mxs/devices-mx28.h
> > +++ b/arch/arm/mach-mxs/devices-mx28.h
> > @@ -47,6 +47,8 @@ struct platform_device *__init mx28_add_mxsfb(
> >  		const struct mxsfb_platform_data *pdata);
> >
> >  extern const struct mxs_saif_data mx28_saif_data[] __initconst;
> > -#define mx28_add_saif(id)
> mxs_add_saif(&mx28_saif_data[id])
> > +#define mx28_add_saif(id, pdata) \
> > +	mxs_add_saif(&mx28_saif_data[id], pdata)
> should it be a seperate patch to add pdata for saif devices?
How do you suggest to separate?
All changes are mainly to add saif pdata.
You mean to move DIGCTL related saif pdata function to another patch?

> > +
> undesirable empty line.
Got it. I will remove.

> >
> >  struct platform_device *__init mx28_add_rtc_stmp3xxx(void); diff
> > --git a/arch/arm/mach-mxs/devices/platform-mxs-saif.c
> > b/arch/arm/mach-mxs/devices/platform-mxs-saif.c
> > index 1ec965e..f6e3a60 100644
> > --- a/arch/arm/mach-mxs/devices/platform-mxs-saif.c
> > +++ b/arch/arm/mach-mxs/devices/platform-mxs-saif.c
> > @@ -32,7 +32,8 @@ const struct mxs_saif_data mx28_saif_data[]
> > __initconst = {  };  #endif
> >
> > -struct platform_device *__init mxs_add_saif(const struct
> > mxs_saif_data *data)
> > +struct platform_device *__init mxs_add_saif(const struct mxs_saif_data
> *data,
> > +				const struct mxs_saif_platform_data *pdata)
> >  {
> >  	struct resource res[] = {
> >  		{
> > @@ -56,5 +57,5 @@ struct platform_device *__init mxs_add_saif(const
> struct mxs_saif_data *data)
> >  	};
> >
> >  	return mxs_add_platform_device("mxs-saif", data->id, res,
> > -					ARRAY_SIZE(res), NULL, 0);
> > +				ARRAY_SIZE(res), pdata, sizeof(*pdata));
> >  }
> > diff --git a/arch/arm/mach-mxs/include/mach/common.h
> > b/arch/arm/mach-mxs/include/mach/common.h
> > index 635bb5d..bf91a10 100644
> > --- a/arch/arm/mach-mxs/include/mach/common.h
> > +++ b/arch/arm/mach-mxs/include/mach/common.h
> > @@ -29,4 +29,6 @@ extern void mx28_init_irq(void);
> >
> >  extern void icoll_init_irq(void);
> >
> > +extern int mxs_saif_clkmux_select(unsigned int clkmux); extern int
> > +mxs_get_saif_clk_master_id(unsigned int saif_id);
> >  #endif /* __MACH_MXS_COMMON_H__ */
> > diff --git a/arch/arm/mach-mxs/include/mach/devices-common.h
> > b/arch/arm/mach-mxs/include/mach/devices-common.h
> > index a8080f4..dc369c1 100644
> > --- a/arch/arm/mach-mxs/include/mach/devices-common.h
> > +++ b/arch/arm/mach-mxs/include/mach/devices-common.h
> > @@ -94,6 +94,7 @@ struct platform_device *__init mxs_add_mxs_pwm(
> >  		resource_size_t iobase, int id);
> >
> >  /* saif */
> > +#include <sound/saif.h>
> >  struct mxs_saif_data {
> >  	int id;
> >  	resource_size_t iobase;
> > @@ -103,4 +104,5 @@ struct mxs_saif_data {  };
> >
> >  struct platform_device *__init mxs_add_saif(
> > -		const struct mxs_saif_data *data);
> > +		const struct mxs_saif_data *data,
> > +		const struct mxs_saif_platform_data *pdata);
> > diff --git a/arch/arm/mach-mxs/include/mach/digctl.h
> > b/arch/arm/mach-mxs/include/mach/digctl.h
> > new file mode 100644
> > index 0000000..6231e10
> > --- /dev/null
> > +++ b/arch/arm/mach-mxs/include/mach/digctl.h
> > @@ -0,0 +1,18 @@
> > +/*
> > + * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
> > + *
> > + * This program is free software; you can redistribute it and/or
> > +modify
> > + * it under the terms of the GNU General Public License version 2 as
> > + * published by the Free Software Foundation.
> > + */
> > +
> > +#ifndef __MACH_DIGCTL_H__
> > +#define __MACH_DIGCTL_H__
> > +
> > +/* MXS DIGCTL SAIF CLKMUX */
> > +#define MXS_DIGCTL_SAIF_CLKMUX_DIRECT		0x0
> > +#define MXS_DIGCTL_SAIF_CLKMUX_CROSSINPUT	0x1
> > +#define MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0		0x2
> > +#define MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR1		0x3
> > +
> > +#endif
> > diff --git a/arch/arm/mach-mxs/mach-mx28evk.c
> > b/arch/arm/mach-mxs/mach-mx28evk.c
> > index 4a3cca3..6affe5d 100644
> > --- a/arch/arm/mach-mxs/mach-mx28evk.c
> > +++ b/arch/arm/mach-mxs/mach-mx28evk.c
> > @@ -28,6 +28,7 @@
> >
> >  #include <mach/common.h>
> >  #include <mach/iomux-mx28.h>
> > +#include <mach/digctl.h>
> >
> >  #include "devices-mx28.h"
> >
> > @@ -417,6 +418,16 @@ static void __init mx28evk_add_regulators(void)
> > static void __init mx28evk_add_regulators(void) {}  #endif
> >
> > +static int mx28evk_mxs_saif_pinit(void) {
> > +	return mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0);
> > +}
> > +
> > +struct mxs_saif_platform_data mx28evk_mxs_saif_pdata __initdata = {
> const + __initconst?
Yes, will change like that.

> > +	.init = mx28evk_mxs_saif_pinit,
> > +	.get_master_id = mxs_get_saif_clk_master_id, };
> > +
> >  static void __init mx28evk_init(void)  {
> >  	int ret;
> > @@ -457,8 +468,8 @@ static void __init mx28evk_init(void)
> >
> >  	mx28_add_mxsfb(&mx28evk_mxsfb_pdata);
> >
> > -	mx28_add_saif(0);
> > -	mx28_add_saif(1);
> > +	mx28_add_saif(0, &mx28evk_mxs_saif_pdata);
> > +	mx28_add_saif(1, &mx28evk_mxs_saif_pdata);
> >
> >  	mx28_add_mxs_i2c(0);
> >  	i2c_register_board_info(0, mxs_i2c0_board_info,
> > --
> > 1.7.0.4
> Best regards
> Uwe
> 
> --
> Pengutronix e.K.                           | Uwe Kleine-K?nig
> |
> Industrial Linux Solutions                 | http://www.pengutronix.de/
> |
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2011-09-08  7:52 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-07 13:57 [PATCH v2 0/3] ARM: mxs: add recording support for saif Dong Aisheng
2011-09-07 13:57 ` Dong Aisheng
2011-09-07 13:57 ` [PATCH v2 1/3] ARM: mx28evk: add platform data " Dong Aisheng
2011-09-07 13:57   ` Dong Aisheng
2011-09-07 18:18   ` Uwe Kleine-König
2011-09-07 18:18     ` Uwe Kleine-König
2011-09-08  7:52     ` Dong Aisheng-B29396 [this message]
2011-09-08  7:52       ` Dong Aisheng-B29396
2011-09-09 13:41       ` Wolfram Sang
2011-09-09 13:41         ` Wolfram Sang
2011-09-10 14:08         ` Uwe Kleine-König
2011-09-10 14:08           ` Uwe Kleine-König
2011-09-07 13:57 ` [PATCH v2 2/3] ARM: mx28evk: set a initial clock rate " Dong Aisheng
2011-09-07 13:57   ` Dong Aisheng
2011-09-07 18:21   ` Uwe Kleine-König
2011-09-07 18:21     ` Uwe Kleine-König
2011-09-08  8:03     ` Dong Aisheng-B29396
2011-09-08  8:03       ` Dong Aisheng-B29396
2011-09-08  8:56       ` Uwe Kleine-König
2011-09-08  8:56         ` Uwe Kleine-König
2011-09-08  9:06         ` Dong Aisheng-B29396
2011-09-08  9:06           ` Dong Aisheng-B29396
2011-09-07 13:57 ` [PATCH v2 3/3] arm: mxs: disable clock-gates when setting saif-clocks Dong Aisheng
2011-09-07 13:57   ` Dong Aisheng
2011-09-07 18:24   ` Uwe Kleine-König
2011-09-07 18:24     ` Uwe Kleine-König
2011-09-08  8:24     ` Dong Aisheng-B29396
2011-09-08  8:24       ` Dong Aisheng-B29396
2011-09-09 13:42       ` Wolfram Sang
2011-09-09 13:42         ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65EE16ACC360FA4D99C96DC085B3F77223C8CB@039-SN1MPN1-003.039d.mgd.msft.net \
    --to=b29396@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lrg@ti.com \
    --cc=s.hauer@pengutronix.de \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=w.sang@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.