.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * pci.c - Low-Level PCI Access in IA-64 |
---|
3 | 4 | * |
---|
.. | .. |
---|
20 | 21 | #include <linux/ioport.h> |
---|
21 | 22 | #include <linux/slab.h> |
---|
22 | 23 | #include <linux/spinlock.h> |
---|
23 | | -#include <linux/bootmem.h> |
---|
| 24 | +#include <linux/memblock.h> |
---|
24 | 25 | #include <linux/export.h> |
---|
25 | 26 | |
---|
26 | | -#include <asm/machvec.h> |
---|
27 | 27 | #include <asm/page.h> |
---|
28 | 28 | #include <asm/io.h> |
---|
29 | 29 | #include <asm/sal.h> |
---|
.. | .. |
---|
371 | 371 | } |
---|
372 | 372 | list_for_each_entry(dev, &b->devices, bus_list) |
---|
373 | 373 | pcibios_fixup_device_resources(dev); |
---|
374 | | - platform_pci_fixup_bus(b); |
---|
375 | 374 | } |
---|
376 | 375 | |
---|
377 | 376 | void pcibios_add_bus(struct pci_bus *bus) |
---|
.. | .. |
---|
412 | 411 | } |
---|
413 | 412 | |
---|
414 | 413 | /** |
---|
415 | | - * ia64_pci_get_legacy_mem - generic legacy mem routine |
---|
| 414 | + * pci_get_legacy_mem - generic legacy mem routine |
---|
416 | 415 | * @bus: bus to get legacy memory base address for |
---|
417 | 416 | * |
---|
418 | 417 | * Find the base of legacy memory for @bus. This is typically the first |
---|
.. | .. |
---|
423 | 422 | * This is the ia64 generic version of this routine. Other platforms |
---|
424 | 423 | * are free to override it with a machine vector. |
---|
425 | 424 | */ |
---|
426 | | -char *ia64_pci_get_legacy_mem(struct pci_bus *bus) |
---|
| 425 | +char *pci_get_legacy_mem(struct pci_bus *bus) |
---|
427 | 426 | { |
---|
428 | 427 | return (char *)__IA64_UNCACHED_OFFSET; |
---|
429 | 428 | } |
---|
.. | .. |
---|
449 | 448 | return -ENOSYS; |
---|
450 | 449 | |
---|
451 | 450 | /* |
---|
452 | | - * Avoid attribute aliasing. See Documentation/ia64/aliasing.txt |
---|
| 451 | + * Avoid attribute aliasing. See Documentation/ia64/aliasing.rst |
---|
453 | 452 | * for more details. |
---|
454 | 453 | */ |
---|
455 | 454 | if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size)) |
---|
.. | .. |
---|
472 | 471 | } |
---|
473 | 472 | |
---|
474 | 473 | /** |
---|
475 | | - * ia64_pci_legacy_read - read from legacy I/O space |
---|
| 474 | + * pci_legacy_read - read from legacy I/O space |
---|
476 | 475 | * @bus: bus to read |
---|
477 | 476 | * @port: legacy port value |
---|
478 | 477 | * @val: caller allocated storage for returned value |
---|
.. | .. |
---|
484 | 483 | * overridden by the platform. This is necessary on platforms that don't |
---|
485 | 484 | * support legacy I/O routing or that hard fail on legacy I/O timeouts. |
---|
486 | 485 | */ |
---|
487 | | -int ia64_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size) |
---|
| 486 | +int pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size) |
---|
488 | 487 | { |
---|
489 | 488 | int ret = size; |
---|
490 | 489 | |
---|
.. | .. |
---|
507 | 506 | } |
---|
508 | 507 | |
---|
509 | 508 | /** |
---|
510 | | - * ia64_pci_legacy_write - perform a legacy I/O write |
---|
| 509 | + * pci_legacy_write - perform a legacy I/O write |
---|
511 | 510 | * @bus: bus pointer |
---|
512 | 511 | * @port: port to write |
---|
513 | 512 | * @val: value to write |
---|
.. | .. |
---|
515 | 514 | * |
---|
516 | 515 | * Simply writes @size bytes of @val to @port. |
---|
517 | 516 | */ |
---|
518 | | -int ia64_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size) |
---|
| 517 | +int pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size) |
---|
519 | 518 | { |
---|
520 | 519 | int ret = size; |
---|
521 | 520 | |
---|
.. | .. |
---|
567 | 566 | } |
---|
568 | 567 | pci_dfl_cache_line_size = (1 << cci.pcci_line_size) / 4; |
---|
569 | 568 | } |
---|
570 | | - |
---|
571 | | -u64 ia64_dma_get_required_mask(struct device *dev) |
---|
572 | | -{ |
---|
573 | | - u32 low_totalram = ((max_pfn - 1) << PAGE_SHIFT); |
---|
574 | | - u32 high_totalram = ((max_pfn - 1) >> (32 - PAGE_SHIFT)); |
---|
575 | | - u64 mask; |
---|
576 | | - |
---|
577 | | - if (!high_totalram) { |
---|
578 | | - /* convert to mask just covering totalram */ |
---|
579 | | - low_totalram = (1 << (fls(low_totalram) - 1)); |
---|
580 | | - low_totalram += low_totalram - 1; |
---|
581 | | - mask = low_totalram; |
---|
582 | | - } else { |
---|
583 | | - high_totalram = (1 << (fls(high_totalram) - 1)); |
---|
584 | | - high_totalram += high_totalram - 1; |
---|
585 | | - mask = (((u64)high_totalram) << 32) + 0xffffffff; |
---|
586 | | - } |
---|
587 | | - return mask; |
---|
588 | | -} |
---|
589 | | -EXPORT_SYMBOL_GPL(ia64_dma_get_required_mask); |
---|
590 | | - |
---|
591 | | -u64 dma_get_required_mask(struct device *dev) |
---|
592 | | -{ |
---|
593 | | - return platform_dma_get_required_mask(dev); |
---|
594 | | -} |
---|
595 | | -EXPORT_SYMBOL_GPL(dma_get_required_mask); |
---|
596 | 569 | |
---|
597 | 570 | static int __init pcibios_init(void) |
---|
598 | 571 | { |
---|