diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-11-26 18:01:38 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-11-26 18:01:38 +0000 |
commit | ebf6331c10774ebc3ef70b0598871bcd42ac7417 (patch) | |
tree | 89910e5af2145f75fd081196f7a5089a525b33a5 /target/linux/cns3xxx/patches-3.14 | |
parent | 211669da3b1ca89da78afd32a7012c41958cc378 (diff) | |
download | upstream-ebf6331c10774ebc3ef70b0598871bcd42ac7417.tar.gz upstream-ebf6331c10774ebc3ef70b0598871bcd42ac7417.tar.bz2 upstream-ebf6331c10774ebc3ef70b0598871bcd42ac7417.zip |
cns3xxx: switch to using the upstream dwc2 driver instead of dwc_otg
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 43398
Diffstat (limited to 'target/linux/cns3xxx/patches-3.14')
-rw-r--r-- | target/linux/cns3xxx/patches-3.14/100-laguna_support.patch (renamed from target/linux/cns3xxx/patches-3.14/300-laguna_support.patch) | 0 | ||||
-rw-r--r-- | target/linux/cns3xxx/patches-3.14/101-laguna_sdhci_card_detect.patch (renamed from target/linux/cns3xxx/patches-3.14/305-laguna_sdhci_card_detect.patch) | 0 | ||||
-rw-r--r-- | target/linux/cns3xxx/patches-3.14/110-pci_isolated_interrupts.patch (renamed from target/linux/cns3xxx/patches-3.14/310-pci_isolated_interrupts.patch) | 0 | ||||
-rw-r--r-- | target/linux/cns3xxx/patches-3.14/200-broadcom_phy_reinit.patch (renamed from target/linux/cns3xxx/patches-3.14/400-broadcom_phy_reinit.patch) | 0 | ||||
-rw-r--r-- | target/linux/cns3xxx/patches-3.14/200-dwc_otg_support.patch | 48 | ||||
-rw-r--r-- | target/linux/cns3xxx/patches-3.14/210-dwc2_defaults.patch | 47 |
6 files changed, 47 insertions, 48 deletions
diff --git a/target/linux/cns3xxx/patches-3.14/300-laguna_support.patch b/target/linux/cns3xxx/patches-3.14/100-laguna_support.patch index d2338e23d1..d2338e23d1 100644 --- a/target/linux/cns3xxx/patches-3.14/300-laguna_support.patch +++ b/target/linux/cns3xxx/patches-3.14/100-laguna_support.patch diff --git a/target/linux/cns3xxx/patches-3.14/305-laguna_sdhci_card_detect.patch b/target/linux/cns3xxx/patches-3.14/101-laguna_sdhci_card_detect.patch index 2d287851bc..2d287851bc 100644 --- a/target/linux/cns3xxx/patches-3.14/305-laguna_sdhci_card_detect.patch +++ b/target/linux/cns3xxx/patches-3.14/101-laguna_sdhci_card_detect.patch diff --git a/target/linux/cns3xxx/patches-3.14/310-pci_isolated_interrupts.patch b/target/linux/cns3xxx/patches-3.14/110-pci_isolated_interrupts.patch index 3e4cc67979..3e4cc67979 100644 --- a/target/linux/cns3xxx/patches-3.14/310-pci_isolated_interrupts.patch +++ b/target/linux/cns3xxx/patches-3.14/110-pci_isolated_interrupts.patch diff --git a/target/linux/cns3xxx/patches-3.14/400-broadcom_phy_reinit.patch b/target/linux/cns3xxx/patches-3.14/200-broadcom_phy_reinit.patch index bfec081fbc..bfec081fbc 100644 --- a/target/linux/cns3xxx/patches-3.14/400-broadcom_phy_reinit.patch +++ b/target/linux/cns3xxx/patches-3.14/200-broadcom_phy_reinit.patch diff --git a/target/linux/cns3xxx/patches-3.14/200-dwc_otg_support.patch b/target/linux/cns3xxx/patches-3.14/200-dwc_otg_support.patch deleted file mode 100644 index 6b9243e572..0000000000 --- a/target/linux/cns3xxx/patches-3.14/200-dwc_otg_support.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- a/drivers/usb/Kconfig -+++ b/drivers/usb/Kconfig -@@ -96,6 +96,8 @@ source "drivers/usb/host/Kconfig" - - source "drivers/usb/renesas_usbhs/Kconfig" - -+source "drivers/usb/dwc/Kconfig" -+ - source "drivers/usb/class/Kconfig" - - source "drivers/usb/storage/Kconfig" ---- a/drivers/usb/core/urb.c -+++ b/drivers/usb/core/urb.c -@@ -17,7 +17,11 @@ static void urb_destroy(struct kref *kre - - if (urb->transfer_flags & URB_FREE_BUFFER) - kfree(urb->transfer_buffer); -- -+ if (urb->aligned_transfer_buffer) { -+ kfree(urb->aligned_transfer_buffer); -+ urb->aligned_transfer_buffer = 0; -+ urb->aligned_transfer_dma = 0; -+ } - kfree(urb); - } - ---- a/include/linux/usb.h -+++ b/include/linux/usb.h -@@ -1431,6 +1431,9 @@ struct urb { - unsigned int transfer_flags; /* (in) URB_SHORT_NOT_OK | ...*/ - void *transfer_buffer; /* (in) associated data buffer */ - dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */ -+ void *aligned_transfer_buffer; /* (in) associeated data buffer */ -+ dma_addr_t aligned_transfer_dma;/* (in) dma addr for transfer_buffer */ -+ u32 aligned_transfer_buffer_length; /* (in) data buffer length */ - struct scatterlist *sg; /* (in) scatter gather buffer list */ - int num_mapped_sgs; /* (internal) mapped sg entries */ - int num_sgs; /* (in) number of entries in the sg list */ ---- a/drivers/usb/Makefile -+++ b/drivers/usb/Makefile -@@ -8,6 +8,7 @@ obj-$(CONFIG_USB) += core/ - - obj-$(CONFIG_USB_DWC3) += dwc3/ - obj-$(CONFIG_USB_DWC2) += dwc2/ -+obj-$(CONFIG_USB_DWC_OTG) += dwc/ - - obj-$(CONFIG_USB_MON) += mon/ - diff --git a/target/linux/cns3xxx/patches-3.14/210-dwc2_defaults.patch b/target/linux/cns3xxx/patches-3.14/210-dwc2_defaults.patch new file mode 100644 index 0000000000..00081c49b6 --- /dev/null +++ b/target/linux/cns3xxx/patches-3.14/210-dwc2_defaults.patch @@ -0,0 +1,47 @@ +--- a/drivers/usb/dwc2/platform.c ++++ b/drivers/usb/dwc2/platform.c +@@ -75,6 +75,34 @@ static const struct dwc2_core_params par + .uframe_sched = 0, + }; + ++static const struct dwc2_core_params params_cns3xxx = { ++ .otg_cap = 2, /* non-HNP/non-SRP capable */ ++ .otg_ver = 0, /* 1.3 */ ++ .dma_enable = 1, ++ .dma_desc_enable = 0, ++ .speed = 0, /* High Speed */ ++ .enable_dynamic_fifo = 1, ++ .en_multiple_tx_fifo = 1, ++ .host_rx_fifo_size = 658, /* 774 DWORDs */ ++ .host_nperio_tx_fifo_size = 128, /* 256 DWORDs */ ++ .host_perio_tx_fifo_size = 658, /* 512 DWORDs */ ++ .max_transfer_size = 65535, ++ .max_packet_count = 511, ++ .host_channels = 16, ++ .phy_type = 1, /* UTMI */ ++ .phy_utmi_width = 16, /* 8 bits */ ++ .phy_ulpi_ddr = 0, /* Single */ ++ .phy_ulpi_ext_vbus = 0, ++ .i2c_enable = 0, ++ .ulpi_fs_ls = 0, ++ .host_support_fs_ls_low_power = 0, ++ .host_ls_low_power_phy_clk = 0, /* 48 MHz */ ++ .ts_dline = 0, ++ .reload_ctl = 0, ++ .ahbcfg = 0x10, ++ .uframe_sched = 0, ++}; ++ + /** + * dwc2_driver_remove() - Called when the DWC_otg core is unregistered with the + * DWC_otg driver +@@ -134,6 +162,9 @@ static int dwc2_driver_probe(struct plat + /* Default all params to autodetect */ + dwc2_set_all_params(&defparams, -1); + params = &defparams; ++#ifdef CONFIG_ARCH_CNS3XXX ++ params = ¶ms_cns3xxx; ++#endif + } + + hsotg = devm_kzalloc(&dev->dev, sizeof(*hsotg), GFP_KERNEL); |