mtd/nand: Fix denali build on ppc64
drivers/mtd/nand/denali.c:1427: error: conflicting types for ‘enable_dma’ arch/powerpc/include/asm/dma.h:189: note: previous definition of ‘enable_dma’ was here Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
ce082596ae
commit
aadff49c56
|
@ -1424,7 +1424,7 @@ static bool handle_ecc(struct denali_nand_info *denali, uint8_t *buf,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* programs the controller to either enable/disable DMA transfers */
|
/* programs the controller to either enable/disable DMA transfers */
|
||||||
static void enable_dma(struct denali_nand_info *denali, bool en)
|
static void denali_enable_dma(struct denali_nand_info *denali, bool en)
|
||||||
{
|
{
|
||||||
uint32_t reg_val = 0x0;
|
uint32_t reg_val = 0x0;
|
||||||
|
|
||||||
|
@ -1435,7 +1435,7 @@ static void enable_dma(struct denali_nand_info *denali, bool en)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* setups the HW to perform the data DMA */
|
/* setups the HW to perform the data DMA */
|
||||||
static void setup_dma(struct denali_nand_info *denali, int op)
|
static void denali_setup_dma(struct denali_nand_info *denali, int op)
|
||||||
{
|
{
|
||||||
uint32_t mode = 0x0;
|
uint32_t mode = 0x0;
|
||||||
const int page_count = 1;
|
const int page_count = 1;
|
||||||
|
@ -1494,9 +1494,9 @@ static void write_page(struct mtd_info *mtd, struct nand_chip *chip,
|
||||||
pci_dma_sync_single_for_device(pci_dev, addr, size, PCI_DMA_TODEVICE);
|
pci_dma_sync_single_for_device(pci_dev, addr, size, PCI_DMA_TODEVICE);
|
||||||
|
|
||||||
clear_interrupts(denali);
|
clear_interrupts(denali);
|
||||||
enable_dma(denali, true);
|
denali_enable_dma(denali, true);
|
||||||
|
|
||||||
setup_dma(denali, DENALI_WRITE);
|
denali_setup_dma(denali, DENALI_WRITE);
|
||||||
|
|
||||||
/* wait for operation to complete */
|
/* wait for operation to complete */
|
||||||
irq_status = wait_for_irq(denali, irq_mask);
|
irq_status = wait_for_irq(denali, irq_mask);
|
||||||
|
@ -1509,7 +1509,7 @@ static void write_page(struct mtd_info *mtd, struct nand_chip *chip,
|
||||||
PASS;
|
PASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
enable_dma(denali, false);
|
denali_enable_dma(denali, false);
|
||||||
pci_dma_sync_single_for_cpu(pci_dev, addr, size, PCI_DMA_TODEVICE);
|
pci_dma_sync_single_for_cpu(pci_dev, addr, size, PCI_DMA_TODEVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1569,11 +1569,11 @@ static int denali_read_page(struct mtd_info *mtd, struct nand_chip *chip,
|
||||||
|
|
||||||
setup_ecc_for_xfer(denali, true, false);
|
setup_ecc_for_xfer(denali, true, false);
|
||||||
|
|
||||||
enable_dma(denali, true);
|
denali_enable_dma(denali, true);
|
||||||
pci_dma_sync_single_for_device(pci_dev, addr, size, PCI_DMA_FROMDEVICE);
|
pci_dma_sync_single_for_device(pci_dev, addr, size, PCI_DMA_FROMDEVICE);
|
||||||
|
|
||||||
clear_interrupts(denali);
|
clear_interrupts(denali);
|
||||||
setup_dma(denali, DENALI_READ);
|
denali_setup_dma(denali, DENALI_READ);
|
||||||
|
|
||||||
/* wait for operation to complete */
|
/* wait for operation to complete */
|
||||||
irq_status = wait_for_irq(denali, irq_mask);
|
irq_status = wait_for_irq(denali, irq_mask);
|
||||||
|
@ -1583,7 +1583,7 @@ static int denali_read_page(struct mtd_info *mtd, struct nand_chip *chip,
|
||||||
memcpy(buf, denali->buf.buf, mtd->writesize);
|
memcpy(buf, denali->buf.buf, mtd->writesize);
|
||||||
|
|
||||||
check_erased_page = handle_ecc(denali, buf, chip->oob_poi, irq_status);
|
check_erased_page = handle_ecc(denali, buf, chip->oob_poi, irq_status);
|
||||||
enable_dma(denali, false);
|
denali_enable_dma(denali, false);
|
||||||
|
|
||||||
if (check_erased_page)
|
if (check_erased_page)
|
||||||
{
|
{
|
||||||
|
@ -1618,19 +1618,19 @@ static int denali_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
|
||||||
uint32_t irq_mask = INTR_STATUS0__DMA_CMD_COMP;
|
uint32_t irq_mask = INTR_STATUS0__DMA_CMD_COMP;
|
||||||
|
|
||||||
setup_ecc_for_xfer(denali, false, true);
|
setup_ecc_for_xfer(denali, false, true);
|
||||||
enable_dma(denali, true);
|
denali_enable_dma(denali, true);
|
||||||
|
|
||||||
pci_dma_sync_single_for_device(pci_dev, addr, size, PCI_DMA_FROMDEVICE);
|
pci_dma_sync_single_for_device(pci_dev, addr, size, PCI_DMA_FROMDEVICE);
|
||||||
|
|
||||||
clear_interrupts(denali);
|
clear_interrupts(denali);
|
||||||
setup_dma(denali, DENALI_READ);
|
denali_setup_dma(denali, DENALI_READ);
|
||||||
|
|
||||||
/* wait for operation to complete */
|
/* wait for operation to complete */
|
||||||
irq_status = wait_for_irq(denali, irq_mask);
|
irq_status = wait_for_irq(denali, irq_mask);
|
||||||
|
|
||||||
pci_dma_sync_single_for_cpu(pci_dev, addr, size, PCI_DMA_FROMDEVICE);
|
pci_dma_sync_single_for_cpu(pci_dev, addr, size, PCI_DMA_FROMDEVICE);
|
||||||
|
|
||||||
enable_dma(denali, false);
|
denali_enable_dma(denali, false);
|
||||||
|
|
||||||
memcpy(buf, denali->buf.buf, mtd->writesize);
|
memcpy(buf, denali->buf.buf, mtd->writesize);
|
||||||
memcpy(chip->oob_poi, denali->buf.buf + mtd->writesize, mtd->oobsize);
|
memcpy(chip->oob_poi, denali->buf.buf + mtd->writesize, mtd->oobsize);
|
||||||
|
|
Loading…
Reference in New Issue