Changeset 42504


Ignore:
Timestamp:
2014-09-12T08:53:21+02:00 (3 years ago)
Author:
blogic
Message:

atheros: ar2315-pci: update DMA offset macroses

Remove duplicated macroses, which define DMA offset (SDRAM baseaddress).

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@…>

Location:
trunk/target/linux/atheros/patches-3.14
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/atheros/patches-3.14/100-board.patch

    r42503 r42504  
    525525--- /dev/null 
    526526+++ b/arch/mips/include/asm/mach-ar231x/dma-coherence.h 
    527 @@ -0,0 +1,77 @@ 
     527@@ -0,0 +1,76 @@ 
    528528+/* 
    529529+ * This file is subject to the terms and conditions of the GNU General Public 
     
    538538+#define __ASM_MACH_AR231X_DMA_COHERENCE_H 
    539539+ 
    540 +#define PCI_DMA_OFFSET 0x20000000 
    541 + 
    542540+#include <linux/device.h> 
     541+#include <ar2315_regs.h> 
    543542+ 
    544543+static inline dma_addr_t ar231x_dev_offset(struct device *dev) 
     
    548547+ 
    549548+       if (dev && dev->bus == &pci_bus_type) 
    550 +               return PCI_DMA_OFFSET; 
     549+               return AR2315_PCI_HOST_SDRAM_BASEADDR; 
    551550+#endif 
    552551+       return 0; 
     
    675674--- /dev/null 
    676675+++ b/arch/mips/include/asm/mach-ar231x/ar2315_regs.h 
    677 @@ -0,0 +1,625 @@ 
     676@@ -0,0 +1,631 @@ 
    678677+/* 
    679678+ * Register definitions for AR2315+ 
     
    12921291+#define AR2315_IRCFG_NUM_BACKOFF_WORDS 0x01e00000 
    12931292+ 
    1294 +#define HOST_PCI_DEV_ID         3 
    1295 +#define HOST_PCI_MBAR0          0x10000000 
    1296 +#define HOST_PCI_MBAR1          0x20000000 
    1297 +#define HOST_PCI_MBAR2          0x30000000 
    1298 + 
    1299 +#define HOST_PCI_SDRAM_BASEADDR HOST_PCI_MBAR1 
    1300 +#define PCI_DEVICE_MEM_SPACE    0x800000 
     1293+/* 
     1294+ * We need some arbitrary non-zero value to be programmed to the BAR1 register 
     1295+ * of PCI host controller to enable DMA. The same value should be used as the 
     1296+ * offset to calculate the physical address of DMA buffer for PCI devices. 
     1297+ */ 
     1298+#define AR2315_PCI_HOST_SDRAM_BASEADDR 0x20000000 
     1299+ 
     1300+/* ??? access BAR */ 
     1301+#define AR2315_PCI_HOST_MBAR0          0x10000000 
     1302+/* RAM access BAR */ 
     1303+#define AR2315_PCI_HOST_MBAR1          AR2315_PCI_HOST_SDRAM_BASEADDR 
     1304+/* ??? access BAR */ 
     1305+#define AR2315_PCI_HOST_MBAR2          0x30000000 
    13011306+ 
    13021307+#endif /* __ASM_MACH_AR231X_AR2315_REGS_H */ 
  • trunk/target/linux/atheros/patches-3.14/105-ar2315_pci.patch

    r42503 r42504  
    88--- /dev/null 
    99+++ b/arch/mips/ar231x/pci.c 
    10 @@ -0,0 +1,337 @@ 
     10@@ -0,0 +1,340 @@ 
    1111+/* 
    1212+ * This program is free software; you can redistribute it and/or 
     
    199199+ 
    200200+       /* Program MBARs */ 
    201 +       ar2315_pci_local_cfg_wr(devfn, PCI_BASE_ADDRESS_0, HOST_PCI_MBAR0); 
    202 +       ar2315_pci_local_cfg_wr(devfn, PCI_BASE_ADDRESS_1, HOST_PCI_MBAR1); 
    203 +       ar2315_pci_local_cfg_wr(devfn, PCI_BASE_ADDRESS_2, HOST_PCI_MBAR2); 
     201+       ar2315_pci_local_cfg_wr(devfn, PCI_BASE_ADDRESS_0, 
     202+                               AR2315_PCI_HOST_MBAR0); 
     203+       ar2315_pci_local_cfg_wr(devfn, PCI_BASE_ADDRESS_1, 
     204+                               AR2315_PCI_HOST_MBAR1); 
     205+       ar2315_pci_local_cfg_wr(devfn, PCI_BASE_ADDRESS_2, 
     206+                               AR2315_PCI_HOST_MBAR2); 
    204207+ 
    205208+       /* Run */ 
Note: See TracChangeset for help on using the changeset viewer.