.. | .. |
---|
19 | 19 | #include <linux/mmc/host.h> |
---|
20 | 20 | #include <linux/module.h> |
---|
21 | 21 | #include <linux/mtd/mtd.h> |
---|
22 | | -#include <linux/mtd/rawnand.h> |
---|
23 | | -#include <linux/mtd/partitions.h> |
---|
| 22 | +#include <linux/mtd/platnand.h> |
---|
24 | 23 | #include <linux/platform_device.h> |
---|
25 | 24 | #include <linux/smsc911x.h> |
---|
26 | 25 | #include <linux/wm97xx.h> |
---|
.. | .. |
---|
149 | 148 | |
---|
150 | 149 | /**********************************************************************/ |
---|
151 | 150 | |
---|
152 | | -static void au1300_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, |
---|
| 151 | +static u64 au1300_all_dmamask = DMA_BIT_MASK(32); |
---|
| 152 | + |
---|
| 153 | +static void au1300_nand_cmd_ctrl(struct nand_chip *this, int cmd, |
---|
153 | 154 | unsigned int ctrl) |
---|
154 | 155 | { |
---|
155 | | - struct nand_chip *this = mtd_to_nand(mtd); |
---|
156 | | - unsigned long ioaddr = (unsigned long)this->IO_ADDR_W; |
---|
| 156 | + unsigned long ioaddr = (unsigned long)this->legacy.IO_ADDR_W; |
---|
157 | 157 | |
---|
158 | 158 | ioaddr &= 0xffffff00; |
---|
159 | 159 | |
---|
.. | .. |
---|
165 | 165 | /* assume we want to r/w real data by default */ |
---|
166 | 166 | ioaddr += MEM_STNAND_DATA; |
---|
167 | 167 | } |
---|
168 | | - this->IO_ADDR_R = this->IO_ADDR_W = (void __iomem *)ioaddr; |
---|
| 168 | + this->legacy.IO_ADDR_R = this->legacy.IO_ADDR_W = (void __iomem *)ioaddr; |
---|
169 | 169 | if (cmd != NAND_CMD_NONE) { |
---|
170 | | - __raw_writeb(cmd, this->IO_ADDR_W); |
---|
| 170 | + __raw_writeb(cmd, this->legacy.IO_ADDR_W); |
---|
171 | 171 | wmb(); |
---|
172 | 172 | } |
---|
173 | 173 | } |
---|
174 | 174 | |
---|
175 | | -static int au1300_nand_device_ready(struct mtd_info *mtd) |
---|
| 175 | +static int au1300_nand_device_ready(struct nand_chip *this) |
---|
176 | 176 | { |
---|
177 | 177 | return alchemy_rdsmem(AU1000_MEM_STSTAT) & 1; |
---|
178 | 178 | } |
---|
.. | .. |
---|
440 | 440 | |
---|
441 | 441 | static struct platform_device db1300_ide_dev = { |
---|
442 | 442 | .dev = { |
---|
| 443 | + .dma_mask = &au1300_all_dmamask, |
---|
| 444 | + .coherent_dma_mask = DMA_BIT_MASK(32), |
---|
443 | 445 | .platform_data = &db1300_ide_info, |
---|
444 | 446 | }, |
---|
445 | 447 | .name = "pata_platform", |
---|
.. | .. |
---|
562 | 564 | |
---|
563 | 565 | static struct platform_device db1300_sd1_dev = { |
---|
564 | 566 | .dev = { |
---|
565 | | - .platform_data = &db1300_sd1_platdata, |
---|
| 567 | + .dma_mask = &au1300_all_dmamask, |
---|
| 568 | + .coherent_dma_mask = DMA_BIT_MASK(32), |
---|
| 569 | + .platform_data = &db1300_sd1_platdata, |
---|
566 | 570 | }, |
---|
567 | 571 | .name = "au1xxx-mmc", |
---|
568 | 572 | .id = 1, |
---|
.. | .. |
---|
627 | 631 | |
---|
628 | 632 | static struct platform_device db1300_sd0_dev = { |
---|
629 | 633 | .dev = { |
---|
630 | | - .platform_data = &db1300_sd0_platdata, |
---|
| 634 | + .dma_mask = &au1300_all_dmamask, |
---|
| 635 | + .coherent_dma_mask = DMA_BIT_MASK(32), |
---|
| 636 | + .platform_data = &db1300_sd0_platdata, |
---|
631 | 637 | }, |
---|
632 | 638 | .name = "au1xxx-mmc", |
---|
633 | 639 | .id = 0, |
---|
.. | .. |
---|
654 | 660 | |
---|
655 | 661 | static struct platform_device db1300_sndac97_dev = { |
---|
656 | 662 | .name = "db1300-ac97", |
---|
| 663 | + .dev = { |
---|
| 664 | + .dma_mask = &au1300_all_dmamask, |
---|
| 665 | + .coherent_dma_mask = DMA_BIT_MASK(32), |
---|
| 666 | + }, |
---|
657 | 667 | }; |
---|
658 | 668 | |
---|
659 | 669 | static struct platform_device db1300_sndi2s_dev = { |
---|
660 | 670 | .name = "db1300-i2s", |
---|
| 671 | + .dev = { |
---|
| 672 | + .dma_mask = &au1300_all_dmamask, |
---|
| 673 | + .coherent_dma_mask = DMA_BIT_MASK(32), |
---|
| 674 | + }, |
---|
661 | 675 | }; |
---|
662 | 676 | |
---|
663 | 677 | /**********************************************************************/ |
---|
.. | .. |
---|
702 | 716 | } |
---|
703 | 717 | }; |
---|
704 | 718 | |
---|
705 | | -static u64 au1300_lcd_dmamask = DMA_BIT_MASK(32); |
---|
706 | 719 | |
---|
707 | 720 | static struct platform_device db1300_lcd_dev = { |
---|
708 | 721 | .name = "au1200-lcd", |
---|
709 | 722 | .id = 0, |
---|
710 | 723 | .dev = { |
---|
711 | | - .dma_mask = &au1300_lcd_dmamask, |
---|
| 724 | + .dma_mask = &au1300_all_dmamask, |
---|
712 | 725 | .coherent_dma_mask = DMA_BIT_MASK(32), |
---|
713 | 726 | .platform_data = &db1300fb_pd, |
---|
714 | 727 | }, |
---|
.. | .. |
---|
718 | 731 | |
---|
719 | 732 | /**********************************************************************/ |
---|
720 | 733 | |
---|
| 734 | +#if IS_ENABLED(CONFIG_TOUCHSCREEN_WM97XX) |
---|
721 | 735 | static void db1300_wm97xx_irqen(struct wm97xx *wm, int enable) |
---|
722 | 736 | { |
---|
723 | 737 | if (enable) |
---|
.. | .. |
---|
749 | 763 | |
---|
750 | 764 | return wm97xx_register_mach_ops(wm, &db1300_wm97xx_ops); |
---|
751 | 765 | } |
---|
| 766 | +#else |
---|
| 767 | +static int db1300_wm97xx_probe(struct platform_device *pdev) |
---|
| 768 | +{ |
---|
| 769 | + return -ENODEV; |
---|
| 770 | +} |
---|
| 771 | +#endif |
---|
752 | 772 | |
---|
753 | 773 | static struct platform_driver db1300_wm97xx_driver = { |
---|
754 | 774 | .driver.name = "wm97xx-touch", |
---|