| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/arch/arm/mach-pxa/balloon3.c |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 7 | 8 | * Created: June, 2006 |
|---|
| 8 | 9 | * Copyright: Toby Churchill Ltd |
|---|
| 9 | 10 | * Derived from mainstone.c, by Nico Pitre |
|---|
| 10 | | - * |
|---|
| 11 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 12 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 13 | | - * published by the Free Software Foundation. |
|---|
| 14 | 11 | */ |
|---|
| 15 | 12 | |
|---|
| 16 | 13 | #include <linux/export.h> |
|---|
| .. | .. |
|---|
| 25 | 22 | #include <linux/ioport.h> |
|---|
| 26 | 23 | #include <linux/ucb1400.h> |
|---|
| 27 | 24 | #include <linux/mtd/mtd.h> |
|---|
| 28 | | -#include <linux/mtd/partitions.h> |
|---|
| 29 | 25 | #include <linux/types.h> |
|---|
| 30 | 26 | #include <linux/platform_data/pcf857x.h> |
|---|
| 31 | 27 | #include <linux/platform_data/i2c-pxa.h> |
|---|
| 32 | | -#include <linux/mtd/rawnand.h> |
|---|
| 28 | +#include <linux/mtd/platnand.h> |
|---|
| 33 | 29 | #include <linux/mtd/physmap.h> |
|---|
| 34 | 30 | #include <linux/regulator/max1586.h> |
|---|
| 35 | 31 | |
|---|
| 36 | 32 | #include <asm/setup.h> |
|---|
| 37 | 33 | #include <asm/mach-types.h> |
|---|
| 38 | 34 | #include <asm/irq.h> |
|---|
| 39 | | -#include <asm/sizes.h> |
|---|
| 35 | +#include <linux/sizes.h> |
|---|
| 40 | 36 | |
|---|
| 41 | 37 | #include <asm/mach/arch.h> |
|---|
| 42 | 38 | #include <asm/mach/map.h> |
|---|
| .. | .. |
|---|
| 291 | 287 | |
|---|
| 292 | 288 | static struct pxamci_platform_data balloon3_mci_platform_data = { |
|---|
| 293 | 289 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
|---|
| 294 | | - .gpio_card_detect = -1, |
|---|
| 295 | | - .gpio_card_ro = -1, |
|---|
| 296 | | - .gpio_power = -1, |
|---|
| 297 | 290 | .detect_delay_ms = 200, |
|---|
| 298 | 291 | }; |
|---|
| 299 | 292 | |
|---|
| .. | .. |
|---|
| 571 | 564 | * NAND |
|---|
| 572 | 565 | ******************************************************************************/ |
|---|
| 573 | 566 | #if defined(CONFIG_MTD_NAND_PLATFORM)||defined(CONFIG_MTD_NAND_PLATFORM_MODULE) |
|---|
| 574 | | -static void balloon3_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl) |
|---|
| 567 | +static void balloon3_nand_cmd_ctl(struct nand_chip *this, int cmd, |
|---|
| 568 | + unsigned int ctrl) |
|---|
| 575 | 569 | { |
|---|
| 576 | | - struct nand_chip *this = mtd_to_nand(mtd); |
|---|
| 577 | 570 | uint8_t balloon3_ctl_set = 0, balloon3_ctl_clr = 0; |
|---|
| 578 | 571 | |
|---|
| 579 | 572 | if (ctrl & NAND_CTRL_CHANGE) { |
|---|
| .. | .. |
|---|
| 597 | 590 | } |
|---|
| 598 | 591 | |
|---|
| 599 | 592 | if (cmd != NAND_CMD_NONE) |
|---|
| 600 | | - writeb(cmd, this->IO_ADDR_W); |
|---|
| 593 | + writeb(cmd, this->legacy.IO_ADDR_W); |
|---|
| 601 | 594 | } |
|---|
| 602 | 595 | |
|---|
| 603 | | -static void balloon3_nand_select_chip(struct mtd_info *mtd, int chip) |
|---|
| 596 | +static void balloon3_nand_select_chip(struct nand_chip *this, int chip) |
|---|
| 604 | 597 | { |
|---|
| 605 | 598 | if (chip < 0 || chip > 3) |
|---|
| 606 | 599 | return; |
|---|
| .. | .. |
|---|
| 616 | 609 | BALLOON3_NAND_CONTROL_REG); |
|---|
| 617 | 610 | } |
|---|
| 618 | 611 | |
|---|
| 619 | | -static int balloon3_nand_dev_ready(struct mtd_info *mtd) |
|---|
| 612 | +static int balloon3_nand_dev_ready(struct nand_chip *this) |
|---|
| 620 | 613 | { |
|---|
| 621 | 614 | return __raw_readl(BALLOON3_NAND_STAT_REG) & BALLOON3_NAND_STAT_RNB; |
|---|
| 622 | 615 | } |
|---|