Skip to content

Commit

Permalink
Merge Ian's patch and fix some usage of PCI/PCIE defines in Orion/Kir…
Browse files Browse the repository at this point in the history
…kwood code

Submitted by:	Ian Lepore
  • Loading branch information
gonzoua committed Aug 13, 2012
1 parent 79084d1 commit 1dac19c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
12 changes: 6 additions & 6 deletions sys/arm/mv/mv_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,16 +240,16 @@ mv_pcib_attach(device_t self)
parnode = OF_parent(node);
if (fdt_is_compatible(node, "mrvl,pcie")) {
sc->sc_type = MV_TYPE_PCIE;
sc->sc_mem_win_target = MV_WIN_PCIE_MEM_TARGET;
sc->sc_mem_win_attr = MV_WIN_PCIE_MEM_ATTR;
sc->sc_io_win_target = MV_WIN_PCIE_IO_TARGET;
sc->sc_io_win_attr = MV_WIN_PCIE_IO_ATTR;
sc->sc_mem_win_target = MV_WIN_PCIE_TARGET(0);
sc->sc_mem_win_attr = MV_WIN_PCIE_MEM_ATTR(0);
sc->sc_io_win_target = MV_WIN_PCIE_TARGET(0);
sc->sc_io_win_attr = MV_WIN_PCIE_IO_ATTR(0);
#ifdef SOC_MV_ORION
} else if (fdt_is_compatible(node, "mrvl,pci")) {
sc->sc_type = MV_TYPE_PCI;
sc->sc_mem_win_target = MV_WIN_PCI_MEM_TARGET;
sc->sc_mem_win_target = MV_WIN_PCI_TARGET;
sc->sc_mem_win_attr = MV_WIN_PCI_MEM_ATTR;
sc->sc_io_win_target = MV_WIN_PCI_IO_TARGET;
sc->sc_io_win_target = MV_WIN_PCI_TARGET;
sc->sc_io_win_attr = MV_WIN_PCI_IO_ATTR;
#endif
} else
Expand Down
11 changes: 2 additions & 9 deletions sys/arm/mv/mvwin.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,6 @@
* External devices: 0x80000000, 1 GB (VA == PA)
* Includes Device Bus, PCI and PCIE.
*/
#define MV_PCIE_IO_PHYS_BASE (MV_PHYS_BASE + MV_SIZE)
#define MV_PCIE_IO_BASE MV_PCIE_IO_PHYS_BASE
#define MV_PCIE_IO_SIZE (1024 * 1024)
#define MV_PCI_IO_PHYS_BASE (MV_PCIE_IO_PHYS_BASE + MV_PCIE_IO_SIZE)
#define MV_PCI_IO_BASE MV_PCI_IO_PHYS_BASE
#define MV_PCI_IO_SIZE (1024 * 1024)

#if defined(SOC_MV_ORION)
#define MV_PCI_PORTS 2 /* 1x PCI + 1x PCIE */
#elif defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_FREY)
Expand Down Expand Up @@ -225,8 +218,8 @@
#define MV_WIN_CESA_ATTR 0
#endif

#define MV_WIN_USB_CTRL(n) (0x320 * (n) + 0x0)
#define MV_WIN_USB_BASE(n) (0x320 * (n) + 0x4)
#define MV_WIN_USB_CTRL(n) (0x10 * (n) + 0x320)
#define MV_WIN_USB_BASE(n) (0x10 * (n) + 0x324)
#define MV_WIN_USB_MAX 4

#define MV_WIN_ETH_BASE(n) (0x8 * (n) + 0x200)
Expand Down

0 comments on commit 1dac19c

Please sign in to comment.