hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/arch/arm/mach-omap1/board-palmte.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * linux/arch/arm/mach-omap1/board-palmte.c
34 *
....@@ -11,10 +12,6 @@
1112 * palmtelinux-developpers@lists.sf.net
1213 *
1314 * Copyright (c) 2006 Andrzej Zaborowski <balrog@zabor.org>
14
- *
15
- * This program is free software; you can redistribute it and/or modify
16
- * it under the terms of the GNU General Public License version 2 as
17
- * published by the Free Software Foundation.
1815 */
1916 #include <linux/gpio.h>
2017 #include <linux/kernel.h>
....@@ -43,6 +40,7 @@
4340 #include <mach/hardware.h>
4441 #include <mach/usb.h>
4542
43
+#include "mmc.h"
4644 #include "common.h"
4745
4846 #define PALMTE_USBDETECT_GPIO 0
....@@ -208,6 +206,33 @@
208206 gpio_direction_input(PALMTE_USB_OR_DC_GPIO);
209207 }
210208
209
+#if IS_ENABLED(CONFIG_MMC_OMAP)
210
+
211
+static struct omap_mmc_platform_data _palmte_mmc_config = {
212
+ .nr_slots = 1,
213
+ .slots[0] = {
214
+ .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
215
+ .name = "mmcblk",
216
+ },
217
+};
218
+
219
+static struct omap_mmc_platform_data *palmte_mmc_config[OMAP15XX_NR_MMC] = {
220
+ [0] = &_palmte_mmc_config,
221
+};
222
+
223
+static void palmte_mmc_init(void)
224
+{
225
+ omap1_init_mmc(palmte_mmc_config, OMAP15XX_NR_MMC);
226
+}
227
+
228
+#else /* CONFIG_MMC_OMAP */
229
+
230
+static void palmte_mmc_init(void)
231
+{
232
+}
233
+
234
+#endif /* CONFIG_MMC_OMAP */
235
+
211236 static void __init omap_palmte_init(void)
212237 {
213238 /* mux pins for uarts */
....@@ -228,6 +253,7 @@
228253 omap_register_i2c_bus(1, 100, NULL, 0);
229254
230255 omapfb_set_lcd_config(&palmte_lcd_config);
256
+ palmte_mmc_init();
231257 }
232258
233259 MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")