aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf548/boards/ezkit.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-bf548/boards/ezkit.c')
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c116
1 files changed, 109 insertions, 7 deletions
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index 93e19a54a880..311bf9970fe7 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -22,6 +22,7 @@
22#include <asm/gpio.h> 22#include <asm/gpio.h>
23#include <asm/nand.h> 23#include <asm/nand.h>
24#include <asm/dpmc.h> 24#include <asm/dpmc.h>
25#include <asm/bfin_sport.h>
25#include <asm/portmux.h> 26#include <asm/portmux.h>
26#include <asm/bfin_sdh.h> 27#include <asm/bfin_sdh.h>
27#include <mach/bf54x_keys.h> 28#include <mach/bf54x_keys.h>
@@ -956,7 +957,15 @@ static struct mtd_partition ezkit_partitions[] = {
956 .offset = MTDPART_OFS_APPEND, 957 .offset = MTDPART_OFS_APPEND,
957 }, { 958 }, {
958 .name = "file system(nor)", 959 .name = "file system(nor)",
959 .size = MTDPART_SIZ_FULL, 960 .size = 0x1000000 - 0x80000 - 0x400000 - 0x8000 * 4,
961 .offset = MTDPART_OFS_APPEND,
962 }, {
963 .name = "config(nor)",
964 .size = 0x8000 * 3,
965 .offset = MTDPART_OFS_APPEND,
966 }, {
967 .name = "u-boot env(nor)",
968 .size = 0x8000,
960 .offset = MTDPART_OFS_APPEND, 969 .offset = MTDPART_OFS_APPEND,
961 } 970 }
962}; 971};
@@ -1312,27 +1321,110 @@ static struct platform_device bfin_dpmc = {
1312 }, 1321 },
1313}; 1322};
1314 1323
1315#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 1324#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \
1325 defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) || \
1326 defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
1327
1328#define SPORT_REQ(x) \
1329 [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \
1330 P_SPORT##x##_RFS, P_SPORT##x##_DRPRI, P_SPORT##x##_RSCLK, 0}
1331
1332static const u16 bfin_snd_pin[][7] = {
1333 SPORT_REQ(0),
1334 SPORT_REQ(1),
1335};
1336
1337static struct bfin_snd_platform_data bfin_snd_data[] = {
1338 {
1339 .pin_req = &bfin_snd_pin[0][0],
1340 },
1341 {
1342 .pin_req = &bfin_snd_pin[1][0],
1343 },
1344};
1345
1346#define BFIN_SND_RES(x) \
1347 [x] = { \
1348 { \
1349 .start = SPORT##x##_TCR1, \
1350 .end = SPORT##x##_TCR1, \
1351 .flags = IORESOURCE_MEM \
1352 }, \
1353 { \
1354 .start = CH_SPORT##x##_RX, \
1355 .end = CH_SPORT##x##_RX, \
1356 .flags = IORESOURCE_DMA, \
1357 }, \
1358 { \
1359 .start = CH_SPORT##x##_TX, \
1360 .end = CH_SPORT##x##_TX, \
1361 .flags = IORESOURCE_DMA, \
1362 }, \
1363 { \
1364 .start = IRQ_SPORT##x##_ERROR, \
1365 .end = IRQ_SPORT##x##_ERROR, \
1366 .flags = IORESOURCE_IRQ, \
1367 } \
1368 }
1369
1370static struct resource bfin_snd_resources[][4] = {
1371 BFIN_SND_RES(0),
1372 BFIN_SND_RES(1),
1373};
1374
1375static struct platform_device bfin_pcm = {
1376 .name = "bfin-pcm-audio",
1377 .id = -1,
1378};
1379#endif
1380
1381#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
1382static struct platform_device bfin_ad73311_codec_device = {
1383 .name = "ad73311",
1384 .id = -1,
1385};
1386#endif
1387
1388#if defined(CONFIG_SND_BF5XX_SOC_AD1980) || defined(CONFIG_SND_BF5XX_SOC_AD1980_MODULE)
1389static struct platform_device bfin_ad1980_codec_device = {
1390 .name = "ad1980",
1391 .id = -1,
1392};
1393#endif
1394
1395#if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE)
1316static struct platform_device bfin_i2s = { 1396static struct platform_device bfin_i2s = {
1317 .name = "bfin-i2s", 1397 .name = "bfin-i2s",
1318 .id = CONFIG_SND_BF5XX_SPORT_NUM, 1398 .id = CONFIG_SND_BF5XX_SPORT_NUM,
1319 /* TODO: add platform data here */ 1399 .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
1400 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
1401 .dev = {
1402 .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
1403 },
1320}; 1404};
1321#endif 1405#endif
1322 1406
1323#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) 1407#if defined(CONFIG_SND_BF5XX_SOC_TDM) || defined(CONFIG_SND_BF5XX_SOC_TDM_MODULE)
1324static struct platform_device bfin_tdm = { 1408static struct platform_device bfin_tdm = {
1325 .name = "bfin-tdm", 1409 .name = "bfin-tdm",
1326 .id = CONFIG_SND_BF5XX_SPORT_NUM, 1410 .id = CONFIG_SND_BF5XX_SPORT_NUM,
1327 /* TODO: add platform data here */ 1411 .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
1412 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
1413 .dev = {
1414 .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
1415 },
1328}; 1416};
1329#endif 1417#endif
1330 1418
1331#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 1419#if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE)
1332static struct platform_device bfin_ac97 = { 1420static struct platform_device bfin_ac97 = {
1333 .name = "bfin-ac97", 1421 .name = "bfin-ac97",
1334 .id = CONFIG_SND_BF5XX_SPORT_NUM, 1422 .id = CONFIG_SND_BF5XX_SPORT_NUM,
1335 /* TODO: add platform data here */ 1423 .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
1424 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
1425 .dev = {
1426 .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
1427 },
1336}; 1428};
1337#endif 1429#endif
1338 1430
@@ -1450,6 +1542,16 @@ static struct platform_device *ezkit_devices[] __initdata = {
1450 &ezkit_flash_device, 1542 &ezkit_flash_device,
1451#endif 1543#endif
1452 1544
1545#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \
1546 defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) || \
1547 defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
1548 &bfin_pcm,
1549#endif
1550
1551#if defined(CONFIG_SND_BF5XX_SOC_AD1980) || defined(CONFIG_SND_BF5XX_SOC_AD1980_MODULE)
1552 &bfin_ad1980_codec_device,
1553#endif
1554
1453#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 1555#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
1454 &bfin_i2s, 1556 &bfin_i2s,
1455#endif 1557#endif