source: rtems/cpukit/libpci/pci_access_mem_be.c @ a31845f7

4.11
Last change on this file since a31845f7 was a31845f7, checked in by Daniel Hellstrom <daniel@…>, on Nov 28, 2011 at 9:11:10 AM

LIBPCI: added PCI layer to cpukit/libpci

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*  PCI Access Library
2 *  Registers-over-Memory Space - Generic Big endian PCI bus definitions
3 *
4 *  COPYRIGHT (c) 2010.
5 *  Cobham Gaisler AB.
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 */
11
12#include <pci.h>
13
14uint16_t pci_mem_be_ld_le16(uint16_t *adr)
15{
16        return ld_be16(adr);
17}
18
19uint16_t pci_mem_be_ld_be16(uint16_t *adr)
20{
21        return ld_le16(adr);
22}
23
24uint32_t pci_mem_be_ld_le32(uint32_t *adr)
25{
26        return ld_be32(adr);
27}
28
29uint32_t pci_mem_be_ld_be32(uint32_t *adr)
30{
31        return ld_le32(adr);
32}
33
34void pci_mem_be_st_le16(uint16_t *adr, uint16_t data)
35{
36        st_be16(adr, data);
37}
38
39void pci_mem_be_st_be16(uint16_t *adr, uint16_t data)
40{
41        st_le16(adr, data);
42}
43
44void pci_mem_be_st_le32(uint32_t *adr, uint32_t data)
45{
46        st_be32(adr, data);
47}
48
49void pci_mem_be_st_be32(uint32_t *adr, uint32_t data)
50{
51        st_le32(adr, data);
52}
53
54struct pci_memreg_ops pci_mem_be_ops = {
55        .ld8    = pci_mem_ld8,
56        .st8    = pci_mem_st8,
57
58        .ld_le16 = pci_mem_be_ld_le16,
59        .st_le16 = pci_mem_be_st_le16,
60        .ld_be16 = pci_mem_be_ld_be16,
61        .st_be16 = pci_mem_be_st_be16,
62
63        .ld_le32 = pci_mem_be_ld_le32,
64        .st_le32 = pci_mem_be_st_le32,
65        .ld_be32 = pci_mem_be_ld_be32,
66        .st_be32 = pci_mem_be_st_be32,
67};
Note: See TracBrowser for help on using the repository browser.