~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to arch/arm/mach-shmobile/board-ag5evm.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
#include <linux/input/sh_keysc.h>
35
35
#include <linux/mmc/host.h>
36
36
#include <linux/mmc/sh_mmcif.h>
 
37
#include <linux/mmc/sh_mobile_sdhi.h>
 
38
#include <linux/mfd/tmio.h>
37
39
#include <linux/sh_clk.h>
38
40
#include <video/sh_mobile_lcdc.h>
39
41
#include <video/sh_mipi_dsi.h>
156
158
        },
157
159
};
158
160
 
 
161
static struct sh_mmcif_dma sh_mmcif_dma = {
 
162
        .chan_priv_rx   = {
 
163
                .slave_id       = SHDMA_SLAVE_MMCIF_RX,
 
164
        },
 
165
        .chan_priv_tx   = {
 
166
                .slave_id       = SHDMA_SLAVE_MMCIF_TX,
 
167
        },
 
168
};
159
169
static struct sh_mmcif_plat_data sh_mmcif_platdata = {
160
170
        .sup_pclk       = 0,
161
171
        .ocr            = MMC_VDD_165_195,
162
172
        .caps           = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
 
173
        .dma            = &sh_mmcif_dma,
163
174
};
164
175
 
165
176
static struct platform_device mmc_device = {
296
307
/* MIPI-DSI */
297
308
static struct resource mipidsi0_resources[] = {
298
309
        [0] = {
 
310
                .name   = "DSI0",
299
311
                .start  = 0xfeab0000,
300
312
                .end    = 0xfeab3fff,
301
313
                .flags  = IORESOURCE_MEM,
302
314
        },
303
315
        [1] = {
 
316
                .name   = "DSI0",
304
317
                .start  = 0xfeab4000,
305
318
                .end    = 0xfeab7fff,
306
319
                .flags  = IORESOURCE_MEM,
325
338
        },
326
339
};
327
340
 
 
341
static struct sh_mobile_sdhi_info sdhi0_info = {
 
342
        .dma_slave_tx   = SHDMA_SLAVE_SDHI0_TX,
 
343
        .dma_slave_rx   = SHDMA_SLAVE_SDHI0_RX,
 
344
        .tmio_caps      = MMC_CAP_SD_HIGHSPEED,
 
345
        .tmio_ocr_mask  = MMC_VDD_27_28 | MMC_VDD_28_29,
 
346
};
 
347
 
 
348
static struct resource sdhi0_resources[] = {
 
349
        [0] = {
 
350
                .name   = "SDHI0",
 
351
                .start  = 0xee100000,
 
352
                .end    = 0xee1000ff,
 
353
                .flags  = IORESOURCE_MEM,
 
354
        },
 
355
        [1] = {
 
356
                .start  = gic_spi(83),
 
357
                .flags  = IORESOURCE_IRQ,
 
358
        },
 
359
        [2] = {
 
360
                .start  = gic_spi(84),
 
361
                .flags  = IORESOURCE_IRQ,
 
362
        },
 
363
        [3] = {
 
364
                .start  = gic_spi(85),
 
365
                .flags  = IORESOURCE_IRQ,
 
366
        },
 
367
};
 
368
 
 
369
static struct platform_device sdhi0_device = {
 
370
        .name           = "sh_mobile_sdhi",
 
371
        .id             = 0,
 
372
        .num_resources  = ARRAY_SIZE(sdhi0_resources),
 
373
        .resource       = sdhi0_resources,
 
374
        .dev    = {
 
375
                .platform_data  = &sdhi0_info,
 
376
        },
 
377
};
 
378
 
 
379
void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state)
 
380
{
 
381
        gpio_set_value(GPIO_PORT114, state);
 
382
}
 
383
 
 
384
static struct sh_mobile_sdhi_info sh_sdhi1_info = {
 
385
        .tmio_flags     = TMIO_MMC_WRPROTECT_DISABLE,
 
386
        .tmio_caps      = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ,
 
387
        .tmio_ocr_mask  = MMC_VDD_32_33 | MMC_VDD_33_34,
 
388
        .set_pwr        = ag5evm_sdhi1_set_pwr,
 
389
};
 
390
 
 
391
static struct resource sdhi1_resources[] = {
 
392
        [0] = {
 
393
                .name   = "SDHI1",
 
394
                .start  = 0xee120000,
 
395
                .end    = 0xee1200ff,
 
396
                .flags  = IORESOURCE_MEM,
 
397
        },
 
398
        [1] = {
 
399
                .start  = gic_spi(87),
 
400
                .flags  = IORESOURCE_IRQ,
 
401
        },
 
402
        [2] = {
 
403
                .start  = gic_spi(88),
 
404
                .flags  = IORESOURCE_IRQ,
 
405
        },
 
406
        [3] = {
 
407
                .start  = gic_spi(89),
 
408
                .flags  = IORESOURCE_IRQ,
 
409
        },
 
410
};
 
411
 
 
412
static struct platform_device sdhi1_device = {
 
413
        .name           = "sh_mobile_sdhi",
 
414
        .id             = 1,
 
415
        .dev            = {
 
416
                .platform_data  = &sh_sdhi1_info,
 
417
        },
 
418
        .num_resources  = ARRAY_SIZE(sdhi1_resources),
 
419
        .resource       = sdhi1_resources,
 
420
};
 
421
 
328
422
static struct platform_device *ag5evm_devices[] __initdata = {
329
423
        &eth_device,
330
424
        &keysc_device,
333
427
        &irda_device,
334
428
        &lcdc0_device,
335
429
        &mipidsi0_device,
 
430
        &sdhi0_device,
 
431
        &sdhi1_device,
336
432
};
337
433
 
338
434
static struct map_desc ag5evm_io_desc[] __initdata = {
454
550
        /* MIPI-DSI clock setup */
455
551
        __raw_writel(0x2a809010, DSI0PHYCR);
456
552
 
 
553
        /* enable SDHI0 on CN15 [SD I/F] */
 
554
        gpio_request(GPIO_FN_SDHICD0, NULL);
 
555
        gpio_request(GPIO_FN_SDHIWP0, NULL);
 
556
        gpio_request(GPIO_FN_SDHICMD0, NULL);
 
557
        gpio_request(GPIO_FN_SDHICLK0, NULL);
 
558
        gpio_request(GPIO_FN_SDHID0_3, NULL);
 
559
        gpio_request(GPIO_FN_SDHID0_2, NULL);
 
560
        gpio_request(GPIO_FN_SDHID0_1, NULL);
 
561
        gpio_request(GPIO_FN_SDHID0_0, NULL);
 
562
 
 
563
        /* enable SDHI1 on CN4 [WLAN I/F] */
 
564
        gpio_request(GPIO_FN_SDHICLK1, NULL);
 
565
        gpio_request(GPIO_FN_SDHICMD1_PU, NULL);
 
566
        gpio_request(GPIO_FN_SDHID1_3_PU, NULL);
 
567
        gpio_request(GPIO_FN_SDHID1_2_PU, NULL);
 
568
        gpio_request(GPIO_FN_SDHID1_1_PU, NULL);
 
569
        gpio_request(GPIO_FN_SDHID1_0_PU, NULL);
 
570
        gpio_request(GPIO_PORT114, "sdhi1_power");
 
571
        gpio_direction_output(GPIO_PORT114, 0);
 
572
 
457
573
#ifdef CONFIG_CACHE_L2X0
458
574
        /* Shared attribute override enable, 64K*8way */
459
575
        l2x0_init(__io(0xf0100000), 0x00460000, 0xc2000fff);