.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * linux/arch/arm/mach-pxa/littleton.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
9 | 10 | * |
---|
10 | 11 | * 2007-11-22 modified to align with latest kernel |
---|
11 | 12 | * eric miao <eric.miao@marvell.com> |
---|
12 | | - * |
---|
13 | | - * This program is free software; you can redistribute it and/or modify |
---|
14 | | - * it under the terms of the GNU General Public License version 2 as |
---|
15 | | - * publishhed by the Free Software Foundation. |
---|
16 | 13 | */ |
---|
17 | 14 | |
---|
18 | 15 | #include <linux/init.h> |
---|
.. | .. |
---|
20 | 17 | #include <linux/delay.h> |
---|
21 | 18 | #include <linux/platform_device.h> |
---|
22 | 19 | #include <linux/clk.h> |
---|
23 | | -#include <linux/gpio.h> |
---|
| 20 | +#include <linux/gpio/machine.h> |
---|
24 | 21 | #include <linux/spi/spi.h> |
---|
25 | 22 | #include <linux/spi/pxa2xx_spi.h> |
---|
26 | 23 | #include <linux/smc91x.h> |
---|
.. | .. |
---|
50 | 47 | #include <linux/platform_data/mtd-nand-pxa3xx.h> |
---|
51 | 48 | |
---|
52 | 49 | #include "generic.h" |
---|
53 | | - |
---|
54 | | -#define GPIO_MMC1_CARD_DETECT mfp_to_gpio(MFP_PIN_GPIO15) |
---|
55 | 50 | |
---|
56 | 51 | /* Littleton MFP configurations */ |
---|
57 | 52 | static mfp_cfg_t littleton_mfp_cfg[] __initdata = { |
---|
.. | .. |
---|
193 | 188 | #endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULE */ |
---|
194 | 189 | |
---|
195 | 190 | #if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE) |
---|
196 | | -static struct pxa2xx_spi_master littleton_spi_info = { |
---|
| 191 | +static struct pxa2xx_spi_controller littleton_spi_info = { |
---|
197 | 192 | .num_chipselect = 1, |
---|
198 | 193 | }; |
---|
199 | 194 | |
---|
.. | .. |
---|
278 | 273 | static struct pxamci_platform_data littleton_mci_platform_data = { |
---|
279 | 274 | .detect_delay_ms = 200, |
---|
280 | 275 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
---|
281 | | - .gpio_card_detect = GPIO_MMC1_CARD_DETECT, |
---|
282 | | - .gpio_card_ro = -1, |
---|
283 | | - .gpio_power = -1, |
---|
| 276 | +}; |
---|
| 277 | + |
---|
| 278 | +static struct gpiod_lookup_table littleton_mci_gpio_table = { |
---|
| 279 | + .dev_id = "pxa2xx-mci.0", |
---|
| 280 | + .table = { |
---|
| 281 | + /* Card detect on MFP (gpio-pxa) GPIO 15 */ |
---|
| 282 | + GPIO_LOOKUP("gpio-pxa", MFP_PIN_GPIO15, |
---|
| 283 | + "cd", GPIO_ACTIVE_LOW), |
---|
| 284 | + { }, |
---|
| 285 | + }, |
---|
284 | 286 | }; |
---|
285 | 287 | |
---|
286 | 288 | static void __init littleton_init_mmc(void) |
---|
287 | 289 | { |
---|
| 290 | + gpiod_add_lookup_table(&littleton_mci_gpio_table); |
---|
288 | 291 | pxa_set_mci_info(&littleton_mci_platform_data); |
---|
289 | 292 | } |
---|
290 | 293 | #else |
---|