/* * puma7_mmc.c * * GPL LICENSE SUMMARY * * Copyright(c) 2015 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * The full GNU General Public License is included in this distribution * in the file called LICENSE.GPL. * * Contact Information: * Intel Corporation * 2200 Mission College Blvd. * Santa Clara, CA 97052 * */ #include #include #include #include #include #include #include #include #include #include /*********************************************************************** * Puma7 SD Host Controller section (eMMC Controller) ***********************************************************************/ struct avalanche_mmc_platform_data { /* board specific information */ u16 temp; /* for future usage */ }; /* Platform specifc information, can be changed from platform to platform */ static struct avalanche_mmc_platform_data puma7_mmc_platform_data = { .temp = 0, /* for future usage */ }; static struct resource puma7_mmc_resources[] = { [0] = { .start = (AVALANCHE_EMMC_HOST_MBAR_BASE), .end = (AVALANCHE_EMMC_HOST_MBAR_BASE) + 0x1FF, .flags = IORESOURCE_MEM, }, [1] = { .start = AVALANCHE_EMMC_INT, .end = AVALANCHE_EMMC_INT, .flags = IORESOURCE_IRQ, }, }; /* Flash eMMC Device */ static struct platform_device puma7_mmc_device = { .name = "sdhci-puma7", /* this name used to for driver matching */ .id = 0, /* the device instance number, or else "-1" to indicate there's only one. */ .dev = { .platform_data = &puma7_mmc_platform_data, }, .num_resources = ARRAY_SIZE(puma7_mmc_resources), .resource = puma7_mmc_resources, }; static struct platform_device *mmc_controller_devices[] = { &puma7_mmc_device, }; static int __init puma7_mmc_init(void) { /* Register the mmc controller with platform bus*/ platform_add_devices( mmc_controller_devices, ARRAY_SIZE(mmc_controller_devices)); return 0; } subsys_initcall(puma7_mmc_init);