| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/arch/arm/mach-omap1/board-palmte.c |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 11 | 12 | * palmtelinux-developpers@lists.sf.net |
|---|
| 12 | 13 | * |
|---|
| 13 | 14 | * 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. |
|---|
| 18 | 15 | */ |
|---|
| 19 | 16 | #include <linux/gpio.h> |
|---|
| 20 | 17 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 43 | 40 | #include <mach/hardware.h> |
|---|
| 44 | 41 | #include <mach/usb.h> |
|---|
| 45 | 42 | |
|---|
| 43 | +#include "mmc.h" |
|---|
| 46 | 44 | #include "common.h" |
|---|
| 47 | 45 | |
|---|
| 48 | 46 | #define PALMTE_USBDETECT_GPIO 0 |
|---|
| .. | .. |
|---|
| 208 | 206 | gpio_direction_input(PALMTE_USB_OR_DC_GPIO); |
|---|
| 209 | 207 | } |
|---|
| 210 | 208 | |
|---|
| 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 | + |
|---|
| 211 | 236 | static void __init omap_palmte_init(void) |
|---|
| 212 | 237 | { |
|---|
| 213 | 238 | /* mux pins for uarts */ |
|---|
| .. | .. |
|---|
| 228 | 253 | omap_register_i2c_bus(1, 100, NULL, 0); |
|---|
| 229 | 254 | |
|---|
| 230 | 255 | omapfb_set_lcd_config(&palmte_lcd_config); |
|---|
| 256 | + palmte_mmc_init(); |
|---|
| 231 | 257 | } |
|---|
| 232 | 258 | |
|---|
| 233 | 259 | MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E") |
|---|