diff options
Diffstat (limited to 'target/linux/ramips')
4 files changed, 40 insertions, 37 deletions
diff --git a/target/linux/ramips/patches-3.18/0037-USB-phy-add-ralink-SoC-driver.patch b/target/linux/ramips/patches-3.18/0037-USB-phy-add-ralink-SoC-driver.patch index 4dc5a7528b..d4afb42eff 100644 --- a/target/linux/ramips/patches-3.18/0037-USB-phy-add-ralink-SoC-driver.patch +++ b/target/linux/ramips/patches-3.18/0037-USB-phy-add-ralink-SoC-driver.patch @@ -58,19 +58,19 @@ +#define RT_SYSC_REG_CLKCFG1 0x030 +#define RT_SYSC_REG_USB_PHY_CFG 0x05c + -+#define OFS_U2_PHY_AC0 0x00 -+#define OFS_U2_PHY_AC1 0x04 -+#define OFS_U2_PHY_AC2 0x08 -+#define OFS_U2_PHY_ACR0 0x10 -+#define OFS_U2_PHY_ACR1 0x14 -+#define OFS_U2_PHY_ACR2 0x18 -+#define OFS_U2_PHY_ACR3 0x1C -+#define OFS_U2_PHY_ACR4 0x20 -+#define OFS_U2_PHY_AMON0 0x24 -+#define OFS_U2_PHY_DCR0 0x60 -+#define OFS_U2_PHY_DCR1 0x64 -+#define OFS_U2_PHY_DTM0 0x68 -+#define OFS_U2_PHY_DTM1 0x6C ++#define OFS_U2_PHY_AC0 0x800 ++#define OFS_U2_PHY_AC1 0x804 ++#define OFS_U2_PHY_AC2 0x808 ++#define OFS_U2_PHY_ACR0 0x810 ++#define OFS_U2_PHY_ACR1 0x814 ++#define OFS_U2_PHY_ACR2 0x818 ++#define OFS_U2_PHY_ACR3 0x81C ++#define OFS_U2_PHY_ACR4 0x820 ++#define OFS_U2_PHY_AMON0 0x824 ++#define OFS_U2_PHY_DCR0 0x860 ++#define OFS_U2_PHY_DCR1 0x864 ++#define OFS_U2_PHY_DTM0 0x868 ++#define OFS_U2_PHY_DTM1 0x86C + +#define RT_RSTCTRL_UDEV BIT(25) +#define RT_RSTCTRL_UHST BIT(22) diff --git a/target/linux/ramips/patches-3.18/0052-i2c-MIPS-adds-ralink-I2C-driver.patch b/target/linux/ramips/patches-3.18/0052-i2c-MIPS-adds-ralink-I2C-driver.patch index 40c61072d1..b136b52b09 100644 --- a/target/linux/ramips/patches-3.18/0052-i2c-MIPS-adds-ralink-I2C-driver.patch +++ b/target/linux/ramips/patches-3.18/0052-i2c-MIPS-adds-ralink-I2C-driver.patch @@ -45,7 +45,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +}; --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig -@@ -711,6 +711,10 @@ +@@ -711,6 +711,10 @@ config I2C_RK3X This driver can also be built as a module. If so, the module will be called i2c-rk3x. @@ -58,7 +58,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> help --- a/drivers/i2c/busses/Makefile +++ b/drivers/i2c/busses/Makefile -@@ -66,6 +66,7 @@ +@@ -66,6 +66,7 @@ obj-$(CONFIG_I2C_PNX) += i2c-pnx.o obj-$(CONFIG_I2C_PUV3) += i2c-puv3.o obj-$(CONFIG_I2C_PXA) += i2c-pxa.o obj-$(CONFIG_I2C_PXA_PCI) += i2c-pxa-pci.o diff --git a/target/linux/ramips/patches-3.18/0061-SPI-ralink-add-mt7621-SoC-spi-driver.patch b/target/linux/ramips/patches-3.18/0061-SPI-ralink-add-mt7621-SoC-spi-driver.patch index d52cd2e09d..4fe9f4c89e 100644 --- a/target/linux/ramips/patches-3.18/0061-SPI-ralink-add-mt7621-SoC-spi-driver.patch +++ b/target/linux/ramips/patches-3.18/0061-SPI-ralink-add-mt7621-SoC-spi-driver.patch @@ -1,6 +1,6 @@ --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig -@@ -439,6 +439,12 @@ +@@ -439,6 +439,12 @@ config SPI_RT2880 help This selects a driver for the Ralink RT288x/RT305x SPI Controller. @@ -15,7 +15,7 @@ depends on ARCH_S3C24XX --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile -@@ -46,6 +46,7 @@ +@@ -46,6 +46,7 @@ obj-$(CONFIG_SPI_LM70_LLP) += spi-lm70l obj-$(CONFIG_SPI_MPC512x_PSC) += spi-mpc512x-psc.o obj-$(CONFIG_SPI_MPC52xx_PSC) += spi-mpc52xx-psc.o obj-$(CONFIG_SPI_MPC52xx) += spi-mpc52xx.o @@ -25,7 +25,7 @@ obj-$(CONFIG_SPI_OC_TINY) += spi-oc-tiny.o --- /dev/null +++ b/drivers/spi/spi-mt7621.c -@@ -0,0 +1,391 @@ +@@ -0,0 +1,394 @@ +/* + * spi-mt7621.c -- MediaTek MT7621 SPI controller driver + * @@ -225,6 +225,9 @@ + if (!buf) + continue; + ++ if (t->speed_hz < speed) ++ speed = t->speed_hz; ++ + if (WARN_ON(len + rlen > 36)) { + status = -EIO; + goto msg_done; diff --git a/target/linux/ramips/patches-3.18/0062-mt7621-add-ECHI-OCHI-XCHI-support.patch b/target/linux/ramips/patches-3.18/0062-mt7621-add-ECHI-OCHI-XCHI-support.patch index 4df5b3e7e5..3a8f47b104 100644 --- a/target/linux/ramips/patches-3.18/0062-mt7621-add-ECHI-OCHI-XCHI-support.patch +++ b/target/linux/ramips/patches-3.18/0062-mt7621-add-ECHI-OCHI-XCHI-support.patch @@ -1,6 +1,6 @@ --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c -@@ -214,8 +214,13 @@ int usb_hcd_pci_probe(struct pci_dev *de +@@ -223,8 +223,13 @@ int usb_hcd_pci_probe(struct pci_dev *de goto disable_pci; } @@ -5349,7 +5349,7 @@ /* TODO: copied from ehci-hcd.c - can this be refactored? */ /* * xhci_handshake - spin reading hc until handshake completes or fails -@@ -199,7 +221,7 @@ int xhci_reset(struct xhci_hcd *xhci) +@@ -200,7 +222,7 @@ int xhci_reset(struct xhci_hcd *xhci) return ret; } @@ -5358,7 +5358,7 @@ static int xhci_free_msi(struct xhci_hcd *xhci) { int i; -@@ -449,6 +471,11 @@ static void compliance_mode_recovery(uns +@@ -450,6 +472,11 @@ static void compliance_mode_recovery(uns "Attempting compliance mode recovery"); hcd = xhci->shared_hcd; @@ -5370,7 +5370,7 @@ if (hcd->state == HC_STATE_SUSPENDED) usb_hcd_resume_root_hub(hcd); -@@ -498,6 +525,9 @@ static bool xhci_compliance_mode_recover +@@ -499,6 +526,9 @@ static bool xhci_compliance_mode_recover { const char *dmi_product_name, *dmi_sys_vendor; @@ -5380,7 +5380,7 @@ dmi_product_name = dmi_get_system_info(DMI_PRODUCT_NAME); dmi_sys_vendor = dmi_get_system_info(DMI_SYS_VENDOR); if (!dmi_product_name || !dmi_sys_vendor) -@@ -543,6 +573,10 @@ int xhci_init(struct usb_hcd *hcd) +@@ -544,6 +574,10 @@ int xhci_init(struct usb_hcd *hcd) xhci_dbg_trace(xhci, trace_xhci_dbg_init, "xHCI doesn't need link TRB QUIRK"); } @@ -5391,7 +5391,7 @@ retval = xhci_mem_init(xhci, GFP_KERNEL); xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Finished xhci_init"); -@@ -627,7 +661,11 @@ int xhci_run(struct usb_hcd *hcd) +@@ -628,7 +662,11 @@ int xhci_run(struct usb_hcd *hcd) "// Set the interrupt modulation register"); temp = readl(&xhci->ir_set->irq_control); temp &= ~ER_IRQ_INTERVAL_MASK; @@ -5403,7 +5403,7 @@ writel(temp, &xhci->ir_set->irq_control); /* Set the HCD state before we enable the irqs */ -@@ -652,6 +690,9 @@ int xhci_run(struct usb_hcd *hcd) +@@ -653,6 +691,9 @@ int xhci_run(struct usb_hcd *hcd) xhci_queue_vendor_command(xhci, command, 0, 0, 0, TRB_TYPE(TRB_NEC_GET_FW)); } @@ -5413,7 +5413,7 @@ xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Finished xhci_run for USB2 roothub"); return 0; -@@ -1650,6 +1691,14 @@ int xhci_drop_endpoint(struct usb_hcd *h +@@ -1651,6 +1692,14 @@ int xhci_drop_endpoint(struct usb_hcd *h u32 drop_flag; u32 new_add_flags, new_drop_flags; int ret; @@ -5428,7 +5428,7 @@ ret = xhci_check_args(hcd, udev, ep, 1, true, __func__); if (ret <= 0) -@@ -1697,6 +1746,40 @@ int xhci_drop_endpoint(struct usb_hcd *h +@@ -1698,6 +1747,40 @@ int xhci_drop_endpoint(struct usb_hcd *h xhci_endpoint_zero(xhci, xhci->devs[udev->slot_id], ep); @@ -5469,7 +5469,7 @@ xhci_dbg(xhci, "drop ep 0x%x, slot id %d, new drop flags = %#x, new add flags = %#x\n", (unsigned int) ep->desc.bEndpointAddress, udev->slot_id, -@@ -1729,6 +1812,19 @@ int xhci_add_endpoint(struct usb_hcd *hc +@@ -1730,6 +1813,19 @@ int xhci_add_endpoint(struct usb_hcd *hc u32 new_add_flags, new_drop_flags; struct xhci_virt_device *virt_dev; int ret = 0; @@ -5489,7 +5489,7 @@ ret = xhci_check_args(hcd, udev, ep, 1, true, __func__); if (ret <= 0) { -@@ -1795,6 +1891,56 @@ int xhci_add_endpoint(struct usb_hcd *hc +@@ -1796,6 +1892,56 @@ int xhci_add_endpoint(struct usb_hcd *hc return -ENOMEM; } @@ -5546,7 +5546,7 @@ ctrl_ctx->add_flags |= cpu_to_le32(added_ctxs); new_add_flags = le32_to_cpu(ctrl_ctx->add_flags); -@@ -4465,8 +4611,14 @@ static u16 xhci_call_host_update_timeout +@@ -4467,8 +4613,14 @@ static u16 xhci_call_host_update_timeout u16 *timeout) { if (state == USB3_LPM_U1) @@ -5561,7 +5561,7 @@ return xhci_calculate_u2_timeout(xhci, udev, desc); return USB3_LPM_DISABLED; -@@ -4851,7 +5003,9 @@ int xhci_gen_setup(struct usb_hcd *hcd, +@@ -4853,7 +5005,9 @@ int xhci_gen_setup(struct usb_hcd *hcd, hcd->self.no_sg_constraint = 1; /* XHCI controllers don't stop the ep queue on short packets :| */ @@ -5571,9 +5571,9 @@ if (usb_hcd_is_primary_hcd(hcd)) { xhci = kzalloc(sizeof(struct xhci_hcd), GFP_KERNEL); -@@ -4914,6 +5068,10 @@ int xhci_gen_setup(struct usb_hcd *hcd, - goto error; - xhci_dbg(xhci, "Reset complete\n"); +@@ -4926,6 +5080,10 @@ int xhci_gen_setup(struct usb_hcd *hcd, + if (xhci->quirks & XHCI_NO_64BIT_SUPPORT) + xhci->hcc_params &= ~BIT(0); +#if defined (CONFIG_USB_MT7621_XHCI_PLATFORM) + setInitialReg(); @@ -5582,7 +5582,7 @@ /* Set dma_mask and coherent_dma_mask to 64-bits, * if xHC supports 64-bit addressing */ if (HCC_64BIT_ADDR(xhci->hcc_params) && -@@ -5008,8 +5166,57 @@ MODULE_DESCRIPTION(DRIVER_DESC); +@@ -5020,8 +5178,57 @@ MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_LICENSE("GPL"); @@ -5664,7 +5664,7 @@ /* xHCI PCI Configuration Registers */ #define XHCI_SBRN_OFFSET (0x60) -@@ -1588,8 +1603,12 @@ struct xhci_hcd { +@@ -1590,8 +1605,12 @@ struct xhci_hcd { /* Compliance Mode Recovery Data */ struct timer_list comp_mode_recovery_timer; u32 port_status_u0; @@ -5677,7 +5677,7 @@ }; /* convert between an HCD pointer and the corresponding EHCI_HCD */ -@@ -1737,6 +1756,26 @@ void xhci_urb_free_priv(struct xhci_hcd +@@ -1739,6 +1758,26 @@ void xhci_urb_free_priv(struct xhci_hcd void xhci_free_command(struct xhci_hcd *xhci, struct xhci_command *command); |