Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281797
b: refs/heads/master
c: 4c0174c
h: refs/heads/master
i:
  281795: 4147fe3
v: v3
  • Loading branch information
Dong Aisheng authored and Shawn Guo committed Dec 2, 2011
1 parent fda7407 commit 020923c
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4e1b4ecaa23108a8422c84c602b308d21948d642
refs/heads/master: 4c0174c52010435e6e0158500033868dc404f014
3 changes: 2 additions & 1 deletion trunk/arch/arm/mach-mxs/devices-mx28.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ 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)

struct platform_device *__init mx28_add_rtc_stmp3xxx(void);
5 changes: 3 additions & 2 deletions trunk/arch/arm/mach-mxs/devices/platform-mxs-saif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
{
Expand All @@ -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));
}
4 changes: 3 additions & 1 deletion trunk/arch/arm/mach-mxs/include/mach/devices-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
18 changes: 16 additions & 2 deletions trunk/arch/arm/mach-mxs/mach-mx28evk.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include <mach/common.h>
#include <mach/iomux-mx28.h>
#include <mach/digctl.h>

#include "devices-mx28.h"

Expand Down Expand Up @@ -421,6 +422,18 @@ static struct gpio mx28evk_lcd_gpios[] = {
{ MX28EVK_BL_ENABLE, GPIOF_OUT_INIT_HIGH, "bl-enable" },
};

static const struct mxs_saif_platform_data
mx28evk_mxs_saif_pdata[] __initconst = {
/* working on EXTMSTR0 mode (saif0 master, saif1 slave) */
{
.master_mode = 1,
.master_id = 0,
}, {
.master_mode = 0,
.master_id = 0,
},
};

static void __init mx28evk_init(void)
{
int ret;
Expand Down Expand Up @@ -454,8 +467,9 @@ static void __init mx28evk_init(void)
else
mx28_add_mxsfb(&mx28evk_mxsfb_pdata);

mx28_add_saif(0);
mx28_add_saif(1);
mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0);
mx28_add_saif(0, &mx28evk_mxs_saif_pdata[0]);
mx28_add_saif(1, &mx28evk_mxs_saif_pdata[1]);

mx28_add_mxs_i2c(0);
i2c_register_board_info(0, mxs_i2c0_board_info,
Expand Down

0 comments on commit 020923c

Please sign in to comment.