static struct davinci_mmc_platform_data mmc0_platform_data ={
.mmc_clk = "MMCSDCLK0", // 用于获mmc取时钟
.rw_threshold = 32,
.use_4bit_mode = 1,
};
static struct platform_device mmc0_device = {
.name = "mmc",
.id = 0,
.dev = {
.platform_data = &mmc0_platform_data,
},
.num_resources = ARRAY_SIZE(mmc0_resources),
.resource = mmc0_resources,
};
static void setup_mmc(void)
{
board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_MMC_SD0,1);
}
#else
#define setup_mmc()
#endif
static struct platform_device *davinci_evm_devices[] __initdata ={
&serial_device,
&usb_dev,
#if defined (CONFIG_MTD_NAND_DAVINCI) ||defined(CONFIG_MTD_NAND_DAVINCI_MODULE)
&nand_device,
#endif
#if defined (CONFIG_MTD_DAVINCI_NOR) ||defined(CONFIG_MTD_DAVINCI_NOR_MODULE)
&davinci_evm_flash_device,
#endif
#if defined(CONFIG_MMC_DAVINCI) ||defined(CONFIG_MMC_DAVINCI_MODULE)
&mmc0_device,
#endif
};
static const u8 dm644x_default_priorities[DAVINCI_N_AINTC_IRQ] ={
[IRQ_VDINT0] = 2,
[IRQ_VDINT1] = 6,
[IRQ_VDINT2] = 6,
[IRQ_HISTINT] = 6,
[IRQ_H3AINT] = 6,
[IRQ_PRVUINT] = 6,
[IRQ_RSZINT] = 6,
[IRQ_VFOCINT] = 7,
[IRQ_VENCINT] = 6,
[IRQ_ASQINT] = 6,
[IRQ_IMXINT] = 6,
[IRQ_VLCDINT] = 6,
[IRQ_USBINT] = 4,
[IRQ_EMACINT] = 4,
[IRQ_IEEE1394INT] = 7,
[IRQ_IEEE1394WK] = 7,
[IRQ_CCINT0] = 5,
[IRQ_CCERRINT] = 5,
[IRQ_TCERRINT0] = 5,
[IRQ_TCERRINT] = 5,
[IRQ_PSCINT] = 7,
[21] = 7,
[IRQ_IDE] = 4,
[IRQ_HPIINT] = 7,
[IRQ_MBXINT] = 7,
[IRQ_MBRINT] = 7,
[IRQ_MMCINT] = 7,
[IRQ_SDIOINT] = 7,
[IRQ_HPIINT] = 7,
[IRQ_DDRINT] = 7,
[IRQ_AEMIFINT] = 7,
[IRQ_VLQINT] = 4,
[IRQ_TINT0_TINT12] = 2,
[IRQ_TINT0_TINT34] = 2,
[IRQ_TINT1_TINT12] = 7,
[IRQ_TINT1_TINT34] = 7,
[IRQ_PWMINT0] = 7,
[IRQ_PWMINT1] = 7,
[IRQ_PWMINT2] = 7,
[IRQ_I2C] = 3,
[IRQ_UARTINT0] = 3,
[IRQ_UARTINT1] = 3,
[IRQ_UARTINT2] = 3,
[IRQ_SPINT0] = 3,
[IRQ_SPINT1] = 3,
[45] = 7,
[IRQ_DSP2ARM0] = 4,
[IRQ_DSP2ARM1] = 4,
[IRQ_GPIO0] = 7,
[IRQ_GPIO1] = 7,
[IRQ_GPIO2] = 7,
[IRQ_GPIO3] = 7,
[IRQ_GPIO4] = 7,
[IRQ_GPIO5] = 7,
[IRQ_GPIO6] = 7,
[IRQ_GPIO7] = 7,
[IRQ_GPIOBNK0] = 7,
[IRQ_GPIOBNK1] = 7,
[IRQ_GPIOBNK2] = 7,
[IRQ_GPIOBNK3] = 7,
[IRQ_GPIOBNK4] = 7,
[IRQ_COMMTX] = 7,
[IRQ_COMMRX] = 7,
[IRQ_EMUINT] = 7,
};
static void board_init(void)
{
board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_VLYNQ,1);
board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_VPSSMSTR,1);
board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_VPSSSLV,1);
board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_TPCC,1);
board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_TPTC0,1);
board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_TPTC1,1);
board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_GPIO,1);
board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_TIMER2,1);
davinci_serial_init(&serial_device); // 初始化串口
} |