.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Hardware definitions for PalmTX |
---|
3 | 4 | * |
---|
.. | .. |
---|
9 | 10 | * Jan Herman <2hp@seznam.cz> |
---|
10 | 11 | * Michal Hrusecky |
---|
11 | 12 | * |
---|
12 | | - * This program is free software; you can redistribute it and/or modify |
---|
13 | | - * it under the terms of the GNU General Public License version 2 as |
---|
14 | | - * published by the Free Software Foundation. |
---|
15 | | - * |
---|
16 | 13 | * (find more info at www.hackndev.com) |
---|
17 | | - * |
---|
18 | 14 | */ |
---|
19 | 15 | |
---|
20 | 16 | #include <linux/platform_device.h> |
---|
.. | .. |
---|
27 | 23 | #include <linux/gpio.h> |
---|
28 | 24 | #include <linux/wm97xx.h> |
---|
29 | 25 | #include <linux/power_supply.h> |
---|
30 | | -#include <linux/usb/gpio_vbus.h> |
---|
31 | | -#include <linux/mtd/rawnand.h> |
---|
32 | | -#include <linux/mtd/partitions.h> |
---|
| 26 | +#include <linux/mtd/platnand.h> |
---|
33 | 27 | #include <linux/mtd/mtd.h> |
---|
34 | 28 | #include <linux/mtd/physmap.h> |
---|
35 | 29 | |
---|
.. | .. |
---|
247 | 241 | ******************************************************************************/ |
---|
248 | 242 | #if defined(CONFIG_MTD_NAND_PLATFORM) || \ |
---|
249 | 243 | defined(CONFIG_MTD_NAND_PLATFORM_MODULE) |
---|
250 | | -static void palmtx_nand_cmd_ctl(struct mtd_info *mtd, int cmd, |
---|
251 | | - unsigned int ctrl) |
---|
| 244 | +static void palmtx_nand_cmd_ctl(struct nand_chip *this, int cmd, |
---|
| 245 | + unsigned int ctrl) |
---|
252 | 246 | { |
---|
253 | | - struct nand_chip *this = mtd_to_nand(mtd); |
---|
254 | | - char __iomem *nandaddr = this->IO_ADDR_W; |
---|
| 247 | + char __iomem *nandaddr = this->legacy.IO_ADDR_W; |
---|
255 | 248 | |
---|
256 | 249 | if (cmd == NAND_CMD_NONE) |
---|
257 | 250 | return; |
---|
.. | .. |
---|
339 | 332 | iotable_init(palmtx_io_desc, ARRAY_SIZE(palmtx_io_desc)); |
---|
340 | 333 | } |
---|
341 | 334 | |
---|
| 335 | +static struct gpiod_lookup_table palmtx_mci_gpio_table = { |
---|
| 336 | + .dev_id = "pxa2xx-mci.0", |
---|
| 337 | + .table = { |
---|
| 338 | + GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMTX_SD_DETECT_N, |
---|
| 339 | + "cd", GPIO_ACTIVE_LOW), |
---|
| 340 | + GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMTX_SD_READONLY, |
---|
| 341 | + "wp", GPIO_ACTIVE_LOW), |
---|
| 342 | + GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMTX_SD_POWER, |
---|
| 343 | + "power", GPIO_ACTIVE_HIGH), |
---|
| 344 | + { }, |
---|
| 345 | + }, |
---|
| 346 | +}; |
---|
| 347 | + |
---|
342 | 348 | static void __init palmtx_init(void) |
---|
343 | 349 | { |
---|
344 | 350 | pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtx_pin_config)); |
---|
.. | .. |
---|
346 | 352 | pxa_set_btuart_info(NULL); |
---|
347 | 353 | pxa_set_stuart_info(NULL); |
---|
348 | 354 | |
---|
349 | | - palm27x_mmc_init(GPIO_NR_PALMTX_SD_DETECT_N, GPIO_NR_PALMTX_SD_READONLY, |
---|
350 | | - GPIO_NR_PALMTX_SD_POWER, 0); |
---|
| 355 | + palm27x_mmc_init(&palmtx_mci_gpio_table); |
---|
351 | 356 | palm27x_pm_init(PALMTX_STR_BASE); |
---|
352 | 357 | palm27x_lcd_init(-1, &palm_320x480_lcd_mode); |
---|
353 | 358 | palm27x_udc_init(GPIO_NR_PALMTX_USB_DETECT_N, |
---|