@@ -92,6 +92,7 @@ static unsigned disk_led_active_low = 1;
9292static unsigned reboot_part = 0 ;
9393static unsigned w1_gpio_pin = W1_GPIO ;
9494static unsigned w1_gpio_pullup = W1_PULLUP ;
95+ static unsigned bcm2835_mmc = 0 ;
9596
9697static void __init bcm2708_init_led (void );
9798
@@ -442,6 +443,34 @@ struct platform_device bcm2708_emmc_device = {
442443};
443444#endif /* CONFIG_MMC_SDHCI_BCM2708 */
444445
446+ #ifdef CONFIG_MMC_BCM2835 /* Arasan emmc SD (new) */
447+ static struct resource bcm2835_emmc_resources [] = {
448+ [0 ] = {
449+ .start = EMMC_BASE ,
450+ .end = EMMC_BASE + SZ_256 - 1 , /* we only need this area */
451+ /* the memory map actually makes SZ_4K available */
452+ .flags = IORESOURCE_MEM ,
453+ },
454+ [1 ] = {
455+ .start = IRQ_ARASANSDIO ,
456+ .end = IRQ_ARASANSDIO ,
457+ .flags = IORESOURCE_IRQ ,
458+ },
459+ };
460+
461+ static u64 bcm2835_emmc_dmamask = 0xffffffffUL ;
462+
463+ struct platform_device bcm2835_emmc_device = {
464+ .name = "mmc-bcm2835" ,
465+ .id = 0 ,
466+ .num_resources = ARRAY_SIZE (bcm2835_emmc_resources ),
467+ .resource = bcm2835_emmc_resources ,
468+ .dev = {
469+ .dma_mask = & bcm2835_emmc_dmamask ,
470+ .coherent_dma_mask = 0xffffffffUL },
471+ };
472+ #endif /* CONFIG_MMC_BCM2835 */
473+
445474static struct resource bcm2708_powerman_resources [] = {
446475 [0 ] = {
447476 .start = PM_BASE ,
@@ -823,7 +852,12 @@ void __init bcm2708_init(void)
823852 bcm_register_device (& bcm2708_powerman_device );
824853
825854#ifdef CONFIG_MMC_SDHCI_BCM2708
826- bcm_register_device (& bcm2708_emmc_device );
855+ if (!bcm2835_mmc )
856+ bcm_register_device (& bcm2708_emmc_device );
857+ #endif
858+ #ifdef CONFIG_MMC_BCM2835
859+ if (bcm2835_mmc )
860+ bcm_register_device (& bcm2835_emmc_device );
827861#endif
828862 bcm2708_init_led ();
829863 for (i = 0 ; i < ARRAY_SIZE (bcm2708_alsa_devices ); i ++ )
@@ -1053,3 +1087,4 @@ module_param(disk_led_active_low, uint, 0644);
10531087module_param (reboot_part , uint , 0644 );
10541088module_param (w1_gpio_pin , uint , 0644 );
10551089module_param (w1_gpio_pullup , uint , 0644 );
1090+ module_param (bcm2835_mmc , uint , 0644 );
0 commit comments