blob: a6d4ed042c709f6c4ec75ecf0ca0a7cac53a50a9 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* pci.h: FR-V specific PCI declarations
2 *
3 * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 * - Derived from include/asm-m68k/pci.h
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
Arnd Bergmannd7c4f1b2009-05-13 22:56:31 +000013#ifndef _ASM_FRV_PCI_H
14#define _ASM_FRV_PCI_H
Linus Torvalds1da177e2005-04-16 15:20:36 -070015
Linus Torvalds1da177e2005-04-16 15:20:36 -070016#include <linux/mm.h>
17#include <asm/scatterlist.h>
18#include <asm-generic/pci-dma-compat.h>
19#include <asm-generic/pci.h>
20
21struct pci_dev;
22
23#define pcibios_assign_all_busses() 0
24
Linus Torvalds1da177e2005-04-16 15:20:36 -070025extern void pcibios_set_master(struct pci_dev *dev);
26
Linus Torvalds1da177e2005-04-16 15:20:36 -070027#ifdef CONFIG_MMU
Al Viroa5da7d32005-10-21 03:21:18 -040028extern void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *dma_handle);
Linus Torvalds1da177e2005-04-16 15:20:36 -070029extern void consistent_free(void *vaddr);
30extern void consistent_sync(void *vaddr, size_t size, int direction);
31extern void consistent_sync_page(struct page *page, unsigned long offset,
32 size_t size, int direction);
33#endif
34
35extern void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
36 dma_addr_t *dma_handle);
37
38extern void pci_free_consistent(struct pci_dev *hwdev, size_t size,
39 void *vaddr, dma_addr_t dma_handle);
40
Linus Torvalds1da177e2005-04-16 15:20:36 -070041/* Return the index of the PCI controller for device PDEV. */
42#define pci_controller_num(PDEV) (0)
43
Linus Torvalds1da177e2005-04-16 15:20:36 -070044/*
Lucas De Marchi25985ed2011-03-30 22:57:33 -030045 * These are pretty much arbitrary with the CoMEM implementation.
Linus Torvalds1da177e2005-04-16 15:20:36 -070046 * We have the whole address space to ourselves.
47 */
48#define PCIBIOS_MIN_IO 0x100
49#define PCIBIOS_MIN_MEM 0x00010000
50
Arnd Bergmannd7c4f1b2009-05-13 22:56:31 +000051#endif /* _ASM_FRV_PCI_H */