]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/mips/cavium-octeon/octeon-platform.c
Merge tag 'gpio-v4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux...
[karo-tx-linux.git] / arch / mips / cavium-octeon / octeon-platform.c
index 12410a2788d8299ab37edd1c604eb98543236320..d113c8ded6e2f33626ee531fca8d7af3b70c2b47 100644 (file)
@@ -325,8 +325,14 @@ static void __init octeon_ehci_hw_start(struct device *dev)
        /* Use 64-bit addressing. */
        ehci_ctl.s.ehci_64b_addr_en = 1;
        ehci_ctl.s.l2c_addr_msb = 0;
+#ifdef __BIG_ENDIAN
        ehci_ctl.s.l2c_buff_emod = 1; /* Byte swapped. */
        ehci_ctl.s.l2c_desc_emod = 1; /* Byte swapped. */
+#else
+       ehci_ctl.s.l2c_buff_emod = 0; /* not swapped. */
+       ehci_ctl.s.l2c_desc_emod = 0; /* not swapped. */
+       ehci_ctl.s.inv_reg_a2 = 1;
+#endif
        cvmx_write_csr(CVMX_UCTLX_EHCI_CTL(0), ehci_ctl.u64);
 
        octeon2_usb_clocks_stop();
@@ -381,8 +387,14 @@ static void __init octeon_ohci_hw_start(struct device *dev)
 
        ohci_ctl.u64 = cvmx_read_csr(CVMX_UCTLX_OHCI_CTL(0));
        ohci_ctl.s.l2c_addr_msb = 0;
+#ifdef __BIG_ENDIAN
        ohci_ctl.s.l2c_buff_emod = 1; /* Byte swapped. */
        ohci_ctl.s.l2c_desc_emod = 1; /* Byte swapped. */
+#else
+       ohci_ctl.s.l2c_buff_emod = 0; /* not swapped. */
+       ohci_ctl.s.l2c_desc_emod = 0; /* not swapped. */
+       ohci_ctl.s.inv_reg_a2 = 1;
+#endif
        cvmx_write_csr(CVMX_UCTLX_OHCI_CTL(0), ohci_ctl.u64);
 
        octeon2_usb_clocks_stop();
@@ -958,6 +970,13 @@ end_led:
                }
        }
 
+       if (octeon_bootinfo->board_type != CVMX_BOARD_TYPE_CUST_DSR1000N) {
+               int dsr1000n_leds = fdt_path_offset(initial_boot_params,
+                                                   "/dsr1000n-leds");
+               if (dsr1000n_leds >= 0)
+                       fdt_nop_node(initial_boot_params, dsr1000n_leds);
+       }
+
        return 0;
 }