From: Koen Vandeputte Date: Mon, 20 Nov 2017 09:51:09 +0000 (+0100) Subject: kernel: bump 4.9 to 4.9.63 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=62ede4f78389c313a8004e79330a7d055eda2f7d;p=openwrt%2Fstaging%2Faparcar.git kernel: bump 4.9 to 4.9.63 Refreshed all patches. Removed upstreamed parts. Compile-tested: cns3xxx, imx6, mvebu, layerscape Run-tested: cns3xxx, imx6 Signed-off-by: Koen Vandeputte --- diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 2bddc87109..8848439c91 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -4,11 +4,11 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .71 LINUX_VERSION-4.4 = .93 -LINUX_VERSION-4.9 = .58 +LINUX_VERSION-4.9 = .63 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240 LINUX_KERNEL_HASH-4.4.93 = ed349314f16e78a6571b5f8884f6452782aef6c26b81bcc7ccdac44ecd917c36 -LINUX_KERNEL_HASH-4.9.58 = 748f12a28689644b6a9102c67f8fa7938ca73823a949ba6f65024aecf2f221a7 +LINUX_KERNEL_HASH-4.9.63 = 21c9386f33fd3453ca67f7478b4c1ba34067645ef6d391871029cbd7f5df2ea3 ifdef KERNEL_PATCHVER LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER))) diff --git a/target/linux/ar7/patches-4.9/001-mips-ar7-fix-serial.patch b/target/linux/ar7/patches-4.9/001-mips-ar7-fix-serial.patch deleted file mode 100644 index 7567b848e0..0000000000 --- a/target/linux/ar7/patches-4.9/001-mips-ar7-fix-serial.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 443ab715a40881d6c9ba11b027ba154bac904cb0 Mon Sep 17 00:00:00 2001 -From: Oswald Buddenhagen -Date: Sat, 10 May 2014 23:19:08 +0200 -Subject: [PATCH] MIPS/AR7: ensure that serial ports are properly set up - -without UPF_FIXED_TYPE, the data from the PORT_AR7 uart_config entry is -never copied, resulting in a dead port. - -Signed-off-by: Oswald Buddenhagen ---- - arch/mips/ar7/platform.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/arch/mips/ar7/platform.c -+++ b/arch/mips/ar7/platform.c -@@ -576,6 +576,7 @@ static int __init ar7_register_uarts(voi - uart_port.type = PORT_AR7; - uart_port.uartclk = clk_get_rate(bus_clk) / 2; - uart_port.iotype = UPIO_MEM32; -+ uart_port.flags = UPF_FIXED_TYPE; - uart_port.regshift = 2; - - uart_port.line = 0; diff --git a/target/linux/ar7/patches-4.9/003-MIPS-AR7-defer-registration-of-GPIO.patch b/target/linux/ar7/patches-4.9/003-MIPS-AR7-defer-registration-of-GPIO.patch deleted file mode 100644 index f256665baf..0000000000 --- a/target/linux/ar7/patches-4.9/003-MIPS-AR7-defer-registration-of-GPIO.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 3a8d54573f9d187779d36d6b45e8e0288b82c31a Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Thu, 26 Oct 2017 23:25:44 +0200 -Subject: [PATCH 1/3] MIPS: AR7: defer registration of GPIO - -When called from prom init code, ar7_gpio_init() will fail as it will -call gpiochip_add() which relies on a working kmalloc() to alloc -the gpio_desc array and kmalloc is not useable yet at prom init time. - -Move ar7_gpio_init() to ar7_register_devices() (a device_initcall) -where kmalloc works. - -Fixes: 14e85c0e69d5 ("gpio: remove gpio_descs global array") -Signed-off-by: Jonas Gorski ---- -Text shamelessy stolen from commit 2ec459f2a77b8. - - arch/mips/ar7/platform.c | 4 ++++ - arch/mips/ar7/prom.c | 2 -- - 2 files changed, 4 insertions(+), 2 deletions(-) - ---- a/arch/mips/ar7/platform.c -+++ b/arch/mips/ar7/platform.c -@@ -655,6 +655,10 @@ static int __init ar7_register_devices(v - u32 val; - int res; - -+ res = ar7_gpio_init(); -+ if (res) -+ pr_warn("unable to register gpios: %d\n", res); -+ - res = ar7_register_uarts(); - if (res) - pr_err("unable to setup uart(s): %d\n", res); ---- a/arch/mips/ar7/prom.c -+++ b/arch/mips/ar7/prom.c -@@ -246,8 +246,6 @@ void __init prom_init(void) - ar7_init_cmdline(fw_arg0, (char **)fw_arg1); - ar7_init_env((struct env_var *)fw_arg2); - console_config(); -- -- ar7_gpio_init(); - } - - #define PORT(offset) (KSEG1ADDR(AR7_REGS_UART0 + (offset * 4))) diff --git a/target/linux/ar71xx/patches-4.9/450-gpio-nxp-74hc153-gpio-chip-driver.patch b/target/linux/ar71xx/patches-4.9/450-gpio-nxp-74hc153-gpio-chip-driver.patch index 41cf75a558..7ffdc769e3 100644 --- a/target/linux/ar71xx/patches-4.9/450-gpio-nxp-74hc153-gpio-chip-driver.patch +++ b/target/linux/ar71xx/patches-4.9/450-gpio-nxp-74hc153-gpio-chip-driver.patch @@ -1,6 +1,6 @@ --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -1211,4 +1211,12 @@ config GPIO_VIPERBOARD +@@ -1213,4 +1213,12 @@ config GPIO_VIPERBOARD endmenu diff --git a/target/linux/ar71xx/patches-4.9/452-gpio-add-gpio-latch-driver.patch b/target/linux/ar71xx/patches-4.9/452-gpio-add-gpio-latch-driver.patch index 5ddf6de928..a56226f095 100644 --- a/target/linux/ar71xx/patches-4.9/452-gpio-add-gpio-latch-driver.patch +++ b/target/linux/ar71xx/patches-4.9/452-gpio-add-gpio-latch-driver.patch @@ -1,6 +1,6 @@ --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -1218,4 +1218,9 @@ config GPIO_NXP_74HC153 +@@ -1220,4 +1220,9 @@ config GPIO_NXP_74HC153 Platform driver for NXP 74HC153 Dual 4-input Multiplexer. This provides a GPIO interface supporting input mode only. diff --git a/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch b/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch index 1932e3024d..c3862fc072 100644 --- a/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch +++ b/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch @@ -696,7 +696,7 @@ Signed-off-by: Noralf Trønnes } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5042,7 +5042,7 @@ static void port_event(struct usb_hub *h +@@ -5045,7 +5045,7 @@ static void port_event(struct usb_hub *h if (portchange & USB_PORT_STAT_C_OVERCURRENT) { u16 status = 0, unused; diff --git a/target/linux/generic/backport-4.9/024-3-tcp-tsq-add-shortcut-in-tcp_tasklet_func.patch b/target/linux/generic/backport-4.9/024-3-tcp-tsq-add-shortcut-in-tcp_tasklet_func.patch index d3db74252a..249a2ce27e 100644 --- a/target/linux/generic/backport-4.9/024-3-tcp-tsq-add-shortcut-in-tcp_tasklet_func.patch +++ b/target/linux/generic/backport-4.9/024-3-tcp-tsq-add-shortcut-in-tcp_tasklet_func.patch @@ -60,7 +60,7 @@ Signed-off-by: David S. Miller nval = cmpxchg(&tp->tsq_flags, oval, nval); if (nval != oval) continue; -@@ -2182,6 +2182,8 @@ static bool tcp_write_xmit(struct sock * +@@ -2183,6 +2183,8 @@ static bool tcp_write_xmit(struct sock * unlikely(tso_fragment(sk, skb, limit, mss_now, gfp))) break; diff --git a/target/linux/generic/backport-4.9/024-5-tcp-tsq-add-a-shortcut-in-tcp_small_queue_check.patch b/target/linux/generic/backport-4.9/024-5-tcp-tsq-add-a-shortcut-in-tcp_small_queue_check.patch index 925d2dcead..463b955341 100644 --- a/target/linux/generic/backport-4.9/024-5-tcp-tsq-add-a-shortcut-in-tcp_small_queue_check.patch +++ b/target/linux/generic/backport-4.9/024-5-tcp-tsq-add-a-shortcut-in-tcp_small_queue_check.patch @@ -19,7 +19,7 @@ Signed-off-by: David S. Miller --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c -@@ -2087,6 +2087,15 @@ static bool tcp_small_queue_check(struct +@@ -2088,6 +2088,15 @@ static bool tcp_small_queue_check(struct limit <<= factor; if (atomic_read(&sk->sk_wmem_alloc) > limit) { diff --git a/target/linux/generic/backport-4.9/024-8-tcp-tsq-move-tsq_flags-close-to-sk_wmem_alloc.patch b/target/linux/generic/backport-4.9/024-8-tcp-tsq-move-tsq_flags-close-to-sk_wmem_alloc.patch index 6604a20fca..8f4c5b2a0b 100644 --- a/target/linux/generic/backport-4.9/024-8-tcp-tsq-move-tsq_flags-close-to-sk_wmem_alloc.patch +++ b/target/linux/generic/backport-4.9/024-8-tcp-tsq-move-tsq_flags-close-to-sk_wmem_alloc.patch @@ -114,7 +114,7 @@ Signed-off-by: David S. Miller if (nval != oval) continue; -@@ -2096,7 +2096,7 @@ static bool tcp_small_queue_check(struct +@@ -2097,7 +2097,7 @@ static bool tcp_small_queue_check(struct skb->prev == sk->sk_write_queue.next) return false; @@ -123,7 +123,7 @@ Signed-off-by: David S. Miller /* It is possible TX completion already happened * before we set TSQ_THROTTLED, so we must * test again the condition. -@@ -2194,8 +2194,8 @@ static bool tcp_write_xmit(struct sock * +@@ -2195,8 +2195,8 @@ static bool tcp_write_xmit(struct sock * unlikely(tso_fragment(sk, skb, limit, mss_now, gfp))) break; @@ -134,7 +134,7 @@ Signed-off-by: David S. Miller if (tcp_small_queue_check(sk, skb, 0)) break; -@@ -3508,8 +3508,6 @@ void tcp_send_ack(struct sock *sk) +@@ -3509,8 +3509,6 @@ void tcp_send_ack(struct sock *sk) /* We do not want pure acks influencing TCP Small Queues or fq/pacing * too much. * SKB_TRUESIZE(max(1 .. 66, MAX_TCP_HEADER)) is unfortunately ~784 diff --git a/target/linux/generic/backport-4.9/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch b/target/linux/generic/backport-4.9/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch index 446730ed16..d92ce07478 100644 --- a/target/linux/generic/backport-4.9/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch +++ b/target/linux/generic/backport-4.9/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch @@ -55,7 +55,7 @@ Cc: Kir Kolyshkin rwlock_t sk_callback_lock; --- a/net/core/sock.c +++ b/net/core/sock.c -@@ -2478,6 +2478,7 @@ void sock_init_data(struct socket *sock, +@@ -2475,6 +2475,7 @@ void sock_init_data(struct socket *sock, sk->sk_max_pacing_rate = ~0U; sk->sk_pacing_rate = ~0U; @@ -74,7 +74,7 @@ Cc: Kir Kolyshkin sk->sk_gso_max_size - 1 - MAX_TCP_HEADER); /* Goal is to send at least one packet per ms, -@@ -2083,7 +2083,7 @@ static bool tcp_small_queue_check(struct +@@ -2084,7 +2084,7 @@ static bool tcp_small_queue_check(struct { unsigned int limit; diff --git a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch index d7b7b48979..d234651fdb 100644 --- a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch +++ b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch @@ -399,7 +399,7 @@ Signed-off-by: David S. Miller /* bnx2x_has_rx_work() reads the status block, --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c -@@ -1768,7 +1768,7 @@ static int bnxt_poll_nitroa0(struct napi +@@ -1774,7 +1774,7 @@ static int bnxt_poll_nitroa0(struct napi } if (!bnxt_has_work(bp, cpr) && rx_pkts < budget) { @@ -803,7 +803,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -2696,11 +2696,9 @@ static int mvneta_poll(struct napi_struc +@@ -2697,11 +2697,9 @@ static int mvneta_poll(struct napi_struc rx_done = mvneta_rx_swbm(pp, budget, &pp->rxqs[rx_queue]); } @@ -1346,7 +1346,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c -@@ -2800,7 +2800,7 @@ static int ath10k_pci_napi_poll(struct n +@@ -2804,7 +2804,7 @@ static int ath10k_pci_napi_poll(struct n done = ath10k_htt_txrx_compl_task(ar, budget); if (done < budget) { diff --git a/target/linux/generic/hack-4.9/214-spidev_h_portability.patch b/target/linux/generic/hack-4.9/214-spidev_h_portability.patch index 23914d633b..ad4706c821 100644 --- a/target/linux/generic/hack-4.9/214-spidev_h_portability.patch +++ b/target/linux/generic/hack-4.9/214-spidev_h_portability.patch @@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau --- a/include/uapi/linux/spi/spidev.h +++ b/include/uapi/linux/spi/spidev.h -@@ -111,7 +111,7 @@ struct spi_ioc_transfer { +@@ -112,7 +112,7 @@ struct spi_ioc_transfer { /* not all platforms use or _IOC_TYPECHECK() ... */ #define SPI_MSGSIZE(N) \ diff --git a/target/linux/generic/hack-4.9/661-use_fq_codel_by_default.patch b/target/linux/generic/hack-4.9/661-use_fq_codel_by_default.patch index be061fd4d2..7a249e37f3 100644 --- a/target/linux/generic/hack-4.9/661-use_fq_codel_by_default.patch +++ b/target/linux/generic/hack-4.9/661-use_fq_codel_by_default.patch @@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau device, it has to decide which ones to send first, which ones to --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c -@@ -1976,7 +1976,7 @@ static int __init pktsched_init(void) +@@ -1978,7 +1978,7 @@ static int __init pktsched_init(void) return err; } diff --git a/target/linux/generic/hack-4.9/702-phy_add_aneg_done_function.patch b/target/linux/generic/hack-4.9/702-phy_add_aneg_done_function.patch index cf798bc200..8a2b51a4f7 100644 --- a/target/linux/generic/hack-4.9/702-phy_add_aneg_done_function.patch +++ b/target/linux/generic/hack-4.9/702-phy_add_aneg_done_function.patch @@ -1,6 +1,6 @@ --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -499,6 +499,12 @@ struct phy_driver { +@@ -495,6 +495,12 @@ struct phy_driver { /* Determines the negotiated speed and duplex */ int (*read_status)(struct phy_device *phydev); diff --git a/target/linux/generic/hack-4.9/710-phy-add-mdio_register_board_info.patch b/target/linux/generic/hack-4.9/710-phy-add-mdio_register_board_info.patch index 838c73789c..55607bc6ea 100644 --- a/target/linux/generic/hack-4.9/710-phy-add-mdio_register_board_info.patch +++ b/target/linux/generic/hack-4.9/710-phy-add-mdio_register_board_info.patch @@ -50,7 +50,7 @@ phy_device_free(phydev); --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -863,6 +863,23 @@ void mdio_bus_exit(void); +@@ -859,6 +859,23 @@ void mdio_bus_exit(void); extern struct bus_type mdio_bus_type; diff --git a/target/linux/generic/pending-4.9/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch b/target/linux/generic/pending-4.9/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch index e1c1de3602..1c5b9c3b26 100644 --- a/target/linux/generic/pending-4.9/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch +++ b/target/linux/generic/pending-4.9/470-mtd-spi-nor-support-limiting-4K-sectors-support-base.patch @@ -39,7 +39,7 @@ Signed-off-by: Felix Fietkau depends on ARCH_AT91 || (ARM && COMPILE_TEST) --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -1642,10 +1642,12 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1640,10 +1640,12 @@ int spi_nor_scan(struct spi_nor *nor, co #ifdef CONFIG_MTD_SPI_NOR_USE_4K_SECTORS /* prefer "small sector" erase if possible */ diff --git a/target/linux/generic/pending-4.9/616-net_optimize_xfrm_calls.patch b/target/linux/generic/pending-4.9/616-net_optimize_xfrm_calls.patch index e627fa0ca0..a147f5f94f 100644 --- a/target/linux/generic/pending-4.9/616-net_optimize_xfrm_calls.patch +++ b/target/linux/generic/pending-4.9/616-net_optimize_xfrm_calls.patch @@ -8,7 +8,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_nat_core.c +++ b/net/netfilter/nf_nat_core.c -@@ -95,6 +95,9 @@ int nf_xfrm_me_harder(struct net *net, s +@@ -93,6 +93,9 @@ int nf_xfrm_me_harder(struct net *net, s struct dst_entry *dst; int err; diff --git a/target/linux/generic/pending-4.9/630-packet_socket_type.patch b/target/linux/generic/pending-4.9/630-packet_socket_type.patch index dea2e2ce76..e943a47a84 100644 --- a/target/linux/generic/pending-4.9/630-packet_socket_type.patch +++ b/target/linux/generic/pending-4.9/630-packet_socket_type.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau #define PACKET_FANOUT_LB 1 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c -@@ -1778,6 +1778,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1780,6 +1780,7 @@ static int packet_rcv_spkt(struct sk_buf { struct sock *sk; struct sockaddr_pkt *spkt; @@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau /* * When we registered the protocol we saved the socket in the data -@@ -1785,6 +1786,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1787,6 +1788,7 @@ static int packet_rcv_spkt(struct sk_buf */ sk = pt->af_packet_priv; @@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau /* * Yank back the headers [hope the device set this -@@ -1797,7 +1799,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1799,7 +1801,7 @@ static int packet_rcv_spkt(struct sk_buf * so that this procedure is noop. */ @@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau goto out; if (!net_eq(dev_net(dev), sock_net(sk))) -@@ -2035,12 +2037,12 @@ static int packet_rcv(struct sk_buff *sk +@@ -2037,12 +2039,12 @@ static int packet_rcv(struct sk_buff *sk unsigned int snaplen, res; bool is_drop_n_account = false; @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -2166,12 +2168,12 @@ static int tpacket_rcv(struct sk_buff *s +@@ -2168,12 +2170,12 @@ static int tpacket_rcv(struct sk_buff *s BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3250,6 +3252,7 @@ static int packet_create(struct net *net +@@ -3252,6 +3254,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3836,6 +3839,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3838,6 +3841,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -3888,6 +3901,13 @@ static int packet_getsockopt(struct sock +@@ -3891,6 +3904,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/generic/pending-4.9/701-phy_extension.patch b/target/linux/generic/pending-4.9/701-phy_extension.patch index 2b9e424055..b480b1d78d 100644 --- a/target/linux/generic/pending-4.9/701-phy_extension.patch +++ b/target/linux/generic/pending-4.9/701-phy_extension.patch @@ -62,7 +62,7 @@ Signed-off-by: John Crispin * @phydev: the phy_device struct --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -820,6 +820,7 @@ int phy_ethtool_ksettings_get(struct phy +@@ -816,6 +816,7 @@ int phy_ethtool_ksettings_get(struct phy struct ethtool_link_ksettings *cmd); int phy_ethtool_ksettings_set(struct phy_device *phydev, const struct ethtool_link_ksettings *cmd); diff --git a/target/linux/generic/pending-4.9/703-phy-add-detach-callback-to-struct-phy_driver.patch b/target/linux/generic/pending-4.9/703-phy-add-detach-callback-to-struct-phy_driver.patch index c64c3bea3e..7cc39dcb8a 100644 --- a/target/linux/generic/pending-4.9/703-phy-add-detach-callback-to-struct-phy_driver.patch +++ b/target/linux/generic/pending-4.9/703-phy-add-detach-callback-to-struct-phy_driver.patch @@ -23,7 +23,7 @@ Signed-off-by: Gabor Juhos phy_suspend(phydev); --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -511,6 +511,12 @@ struct phy_driver { +@@ -507,6 +507,12 @@ struct phy_driver { */ int (*did_interrupt)(struct phy_device *phydev); diff --git a/target/linux/ipq806x/patches-4.9/864-01-dts-ipq4019-ap-dk04-fix-pinctrl-node-name.patch b/target/linux/ipq806x/patches-4.9/864-01-dts-ipq4019-ap-dk04-fix-pinctrl-node-name.patch index a7717a665c..f2de6d618a 100644 --- a/target/linux/ipq806x/patches-4.9/864-01-dts-ipq4019-ap-dk04-fix-pinctrl-node-name.patch +++ b/target/linux/ipq806x/patches-4.9/864-01-dts-ipq4019-ap-dk04-fix-pinctrl-node-name.patch @@ -1,6 +1,6 @@ --- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1.dtsi +++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1.dtsi -@@ -40,7 +40,7 @@ +@@ -38,7 +38,7 @@ clock-frequency = <48000000>; }; diff --git a/target/linux/lantiq/patches-4.9/0026-NET-multi-phy-support.patch b/target/linux/lantiq/patches-4.9/0026-NET-multi-phy-support.patch index 9e71051d37..6046d6cde1 100644 --- a/target/linux/lantiq/patches-4.9/0026-NET-multi-phy-support.patch +++ b/target/linux/lantiq/patches-4.9/0026-NET-multi-phy-support.patch @@ -43,7 +43,7 @@ Signed-off-by: John Crispin } --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -373,6 +373,7 @@ struct phy_device { +@@ -369,6 +369,7 @@ struct phy_device { bool is_pseudo_fixed_link; bool has_fixups; bool suspended; diff --git a/target/linux/layerscape/patches-4.9/201-config-support-layerscape.patch b/target/linux/layerscape/patches-4.9/201-config-support-layerscape.patch index 4b4fd73c25..333a9d1212 100644 --- a/target/linux/layerscape/patches-4.9/201-config-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/201-config-support-layerscape.patch @@ -43,8 +43,6 @@ Signed-off-by: Yangbo Lu create mode 100644 drivers/staging/fsl-dpaa2/Kconfig create mode 100644 drivers/staging/fsl-dpaa2/Makefile -diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig -index e1c0e2e0..4211a7fd 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig @@ -237,6 +237,7 @@ config GENERIC_CPU_AUTOPROBE @@ -55,11 +53,9 @@ index e1c0e2e0..4211a7fd 100644 source "drivers/base/regmap/Kconfig" -diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile -index ad7250fa..6d788fd7 100644 --- a/drivers/crypto/Makefile +++ b/drivers/crypto/Makefile -@@ -3,7 +3,7 @@ obj-$(CONFIG_CRYPTO_DEV_ATMEL_SHA) += atmel-sha.o +@@ -3,7 +3,7 @@ obj-$(CONFIG_CRYPTO_DEV_ATMEL_SHA) += at obj-$(CONFIG_CRYPTO_DEV_ATMEL_TDES) += atmel-tdes.o obj-$(CONFIG_CRYPTO_DEV_BFIN_CRC) += bfin_crc.o obj-$(CONFIG_CRYPTO_DEV_CCP) += ccp/ @@ -68,8 +64,6 @@ index ad7250fa..6d788fd7 100644 obj-$(CONFIG_CRYPTO_DEV_GEODE) += geode-aes.o obj-$(CONFIG_CRYPTO_DEV_HIFN_795X) += hifn_795x.o obj-$(CONFIG_CRYPTO_DEV_IMGTEC_HASH) += img-hash.o -diff --git a/drivers/net/ethernet/freescale/Kconfig b/drivers/net/ethernet/freescale/Kconfig -index d1ca45fb..74a2864e 100644 --- a/drivers/net/ethernet/freescale/Kconfig +++ b/drivers/net/ethernet/freescale/Kconfig @@ -5,7 +5,7 @@ @@ -88,8 +82,6 @@ index d1ca45fb..74a2864e 100644 +source "drivers/net/ethernet/freescale/sdk_fman/Kconfig" +source "drivers/net/ethernet/freescale/sdk_dpaa/Kconfig" endif # NET_VENDOR_FREESCALE -diff --git a/drivers/net/ethernet/freescale/Makefile b/drivers/net/ethernet/freescale/Makefile -index cbe21dc7..a5d4405f 100644 --- a/drivers/net/ethernet/freescale/Makefile +++ b/drivers/net/ethernet/freescale/Makefile @@ -21,4 +21,6 @@ gianfar_driver-objs := gianfar.o \ @@ -99,8 +91,6 @@ index cbe21dc7..a5d4405f 100644 +obj-$(if $(CONFIG_FSL_SDK_FMAN),y) += sdk_fman/ +obj-$(if $(CONFIG_FSL_SDK_DPAA_ETH),y) += sdk_dpaa/ obj-$(CONFIG_FSL_FMAN) += fman/ -diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig -index ee3de342..4c45beda 100644 --- a/drivers/ptp/Kconfig +++ b/drivers/ptp/Kconfig @@ -39,6 +39,35 @@ config PTP_1588_CLOCK_GIANFAR @@ -139,8 +129,6 @@ index ee3de342..4c45beda 100644 config PTP_1588_CLOCK_IXP46X tristate "Intel IXP46x as PTP clock" depends on IXP4XX_ETH -diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig -index 0723c97e..df610dcd 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -414,6 +414,14 @@ config RTC_DRV_PCF85063 @@ -158,11 +146,9 @@ index 0723c97e..df610dcd 100644 config RTC_DRV_PCF8563 tristate "Philips PCF8563/Epson RTC8564" help -diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile -index 1ac694a3..7675b8a7 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile -@@ -111,6 +111,7 @@ obj-$(CONFIG_RTC_DRV_PCF2127) += rtc-pcf2127.o +@@ -111,6 +111,7 @@ obj-$(CONFIG_RTC_DRV_PCF2127) += rtc-pcf obj-$(CONFIG_RTC_DRV_PCF50633) += rtc-pcf50633.o obj-$(CONFIG_RTC_DRV_PCF85063) += rtc-pcf85063.o obj-$(CONFIG_RTC_DRV_PCF8523) += rtc-pcf8523.o @@ -170,8 +156,6 @@ index 1ac694a3..7675b8a7 100644 obj-$(CONFIG_RTC_DRV_PCF8563) += rtc-pcf8563.o obj-$(CONFIG_RTC_DRV_PCF8583) += rtc-pcf8583.o obj-$(CONFIG_RTC_DRV_PIC32) += rtc-pic32.o -diff --git a/drivers/soc/Kconfig b/drivers/soc/Kconfig -index e6e90e80..f31bceb6 100644 --- a/drivers/soc/Kconfig +++ b/drivers/soc/Kconfig @@ -1,8 +1,7 @@ @@ -184,9 +168,6 @@ index e6e90e80..f31bceb6 100644 source "drivers/soc/mediatek/Kconfig" source "drivers/soc/qcom/Kconfig" source "drivers/soc/rockchip/Kconfig" -diff --git a/drivers/soc/fsl/Kconfig b/drivers/soc/fsl/Kconfig -new file mode 100644 -index 00000000..d4cd25f1 --- /dev/null +++ b/drivers/soc/fsl/Kconfig @@ -0,0 +1,22 @@ @@ -212,9 +193,6 @@ index 00000000..d4cd25f1 +if ARM || ARM64 +source "drivers/soc/fsl/Kconfig.arm" +endif -diff --git a/drivers/soc/fsl/Kconfig.arm b/drivers/soc/fsl/Kconfig.arm -new file mode 100644 -index 00000000..106c9b98 --- /dev/null +++ b/drivers/soc/fsl/Kconfig.arm @@ -0,0 +1,16 @@ @@ -234,8 +212,6 @@ index 00000000..106c9b98 +if LS_SOC_DRIVERS + source "drivers/soc/fsl/layerscape/Kconfig" +endif -diff --git a/drivers/soc/fsl/Makefile b/drivers/soc/fsl/Makefile -index 75e1f533..b8708569 100644 --- a/drivers/soc/fsl/Makefile +++ b/drivers/soc/fsl/Makefile @@ -5,3 +5,7 @@ @@ -246,9 +222,6 @@ index 75e1f533..b8708569 100644 +obj-$(CONFIG_FSL_LS2_CONSOLE) += ls2-console/ +obj-$(CONFIG_SUSPEND) += rcpm.o +obj-$(CONFIG_LS_SOC_DRIVERS) += layerscape/ -diff --git a/drivers/soc/fsl/layerscape/Kconfig b/drivers/soc/fsl/layerscape/Kconfig -new file mode 100644 -index 00000000..e1373aa1 --- /dev/null +++ b/drivers/soc/fsl/layerscape/Kconfig @@ -0,0 +1,10 @@ @@ -262,16 +235,10 @@ index 00000000..e1373aa1 + Say y here to enable FTM alarm support. The FTM alarm provides + alarm functions for wakeup system from deep sleep. There is only + one FTM can be used in ALARM(FTM 0). -diff --git a/drivers/soc/fsl/layerscape/Makefile b/drivers/soc/fsl/layerscape/Makefile -new file mode 100644 -index 00000000..6299aa1d --- /dev/null +++ b/drivers/soc/fsl/layerscape/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_FTM_ALARM) += ftm_alarm.o -diff --git a/drivers/soc/fsl/rcpm.c b/drivers/soc/fsl/rcpm.c -new file mode 100644 -index 00000000..a6a31c87 --- /dev/null +++ b/drivers/soc/fsl/rcpm.c @@ -0,0 +1,154 @@ @@ -429,8 +396,6 @@ index 00000000..a6a31c87 +} + +subsys_initcall(layerscape_rcpm_init); -diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig -index 58a7b350..6c69e3bd 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -94,6 +94,8 @@ source "drivers/staging/fbtft/Kconfig" @@ -451,8 +416,6 @@ index 58a7b350..6c69e3bd 100644 +source "drivers/staging/fsl_ppfe/Kconfig" + endif # STAGING -diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile -index 2fa9745d..ee817a5e 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -36,9 +36,12 @@ obj-$(CONFIG_UNISYSSPAR) += unisys/ @@ -468,9 +431,6 @@ index 2fa9745d..ee817a5e 100644 obj-$(CONFIG_BCM2708_VCHIQ) += vc04_services/ +obj-$(CONFIG_FSL_SDK_DPA) += fsl_qbman/ +obj-$(CONFIG_FSL_PPFE) += fsl_ppfe/ -diff --git a/drivers/staging/fsl-dpaa2/Kconfig b/drivers/staging/fsl-dpaa2/Kconfig -new file mode 100644 -index 00000000..8042d9cc --- /dev/null +++ b/drivers/staging/fsl-dpaa2/Kconfig @@ -0,0 +1,41 @@ @@ -515,9 +475,6 @@ index 00000000..8042d9cc +source "drivers/staging/fsl-dpaa2/mac/Kconfig" +source "drivers/staging/fsl-dpaa2/evb/Kconfig" +source "drivers/staging/fsl-dpaa2/ethsw/Kconfig" -diff --git a/drivers/staging/fsl-dpaa2/Makefile b/drivers/staging/fsl-dpaa2/Makefile -new file mode 100644 -index 00000000..cbaa8c20 --- /dev/null +++ b/drivers/staging/fsl-dpaa2/Makefile @@ -0,0 +1,9 @@ @@ -530,6 +487,3 @@ index 00000000..cbaa8c20 +obj-$(CONFIG_FSL_DPAA2_EVB) += evb/ +obj-$(CONFIG_FSL_DPAA2_ETHSW) += ethsw/ +obj-$(CONFIG_PTP_1588_CLOCK_DPAA2) += rtc/ --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch b/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch index 6eeb6ffe77..45b3c7ae6d 100644 --- a/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/202-core-linux-support-layerscape.patch @@ -33,8 +33,6 @@ Signed-off-by: Yangbo Lu 13 files changed, 309 insertions(+), 3 deletions(-) create mode 100644 include/linux/fsl/svr.h -diff --git a/drivers/base/devres.c b/drivers/base/devres.c -index 8fc654f0..71d57702 100644 --- a/drivers/base/devres.c +++ b/drivers/base/devres.c @@ -10,6 +10,7 @@ @@ -45,7 +43,7 @@ index 8fc654f0..71d57702 100644 #include "base.h" -@@ -985,3 +986,68 @@ void devm_free_pages(struct device *dev, unsigned long addr) +@@ -985,3 +986,68 @@ void devm_free_pages(struct device *dev, &devres)); } EXPORT_SYMBOL_GPL(devm_free_pages); @@ -114,8 +112,6 @@ index 8fc654f0..71d57702 100644 + (void *)pdata)); +} +EXPORT_SYMBOL_GPL(devm_free_percpu); -diff --git a/drivers/base/soc.c b/drivers/base/soc.c -index b63f23e6..0c5cf872 100644 --- a/drivers/base/soc.c +++ b/drivers/base/soc.c @@ -13,6 +13,7 @@ @@ -195,11 +191,9 @@ index b63f23e6..0c5cf872 100644 + return NULL; +} +EXPORT_SYMBOL_GPL(soc_device_match); -diff --git a/include/linux/device.h b/include/linux/device.h -index 8d732965..6d206930 100644 --- a/include/linux/device.h +++ b/include/linux/device.h -@@ -688,6 +688,25 @@ void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res); +@@ -688,6 +688,25 @@ void __iomem *devm_ioremap_resource(stru int devm_add_action(struct device *dev, void (*action)(void *), void *data); void devm_remove_action(struct device *dev, void (*action)(void *), void *data); @@ -225,9 +219,6 @@ index 8d732965..6d206930 100644 static inline int devm_add_action_or_reset(struct device *dev, void (*action)(void *), void *data) { -diff --git a/include/linux/fsl/svr.h b/include/linux/fsl/svr.h -new file mode 100644 -index 00000000..e95c8f43 --- /dev/null +++ b/include/linux/fsl/svr.h @@ -0,0 +1,97 @@ @@ -328,8 +319,6 @@ index 00000000..e95c8f43 +#define SVR_Unknown 0xFFFFFF + +#endif -diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h -index f2912914..22308465 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h @@ -99,7 +99,10 @@ struct fsl_usb2_platform_data { @@ -343,8 +332,6 @@ index f2912914..22308465 100644 unsigned check_phy_clk_valid:1; /* register save area for suspend/resume */ -diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h -index 9c6c8ef2..90b4107e 100644 --- a/include/linux/netdev_features.h +++ b/include/linux/netdev_features.h @@ -74,6 +74,7 @@ enum { @@ -363,8 +350,6 @@ index 9c6c8ef2..90b4107e 100644 #define for_each_netdev_feature(mask_addr, bit) \ for_each_set_bit(bit, (unsigned long *)mask_addr, NETDEV_FEATURE_COUNT) -diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h -index c3a1537c..9740875b 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1509,6 +1509,8 @@ enum netdev_priv_flags { @@ -385,8 +370,6 @@ index c3a1537c..9740875b 100644 unsigned short type; unsigned short hard_header_len; unsigned short min_header_len; -diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h -index 9a0c945e..06f33c98 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -903,6 +903,7 @@ void kfree_skb(struct sk_buff *skb); @@ -397,7 +380,7 @@ index 9a0c945e..06f33c98 100644 void __kfree_skb(struct sk_buff *skb); extern struct kmem_cache *skbuff_head_cache; -@@ -3057,6 +3058,7 @@ static inline void skb_free_datagram_locked(struct sock *sk, +@@ -3057,6 +3058,7 @@ static inline void skb_free_datagram_loc } int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags); int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len); @@ -405,8 +388,6 @@ index 9a0c945e..06f33c98 100644 int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len); __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset, u8 *to, int len, __wsum csum); -diff --git a/include/linux/sys_soc.h b/include/linux/sys_soc.h -index 2739ccb6..9f5eb06f 100644 --- a/include/linux/sys_soc.h +++ b/include/linux/sys_soc.h @@ -13,6 +13,7 @@ struct soc_device_attribute { @@ -417,15 +398,13 @@ index 2739ccb6..9f5eb06f 100644 }; /** -@@ -34,4 +35,6 @@ void soc_device_unregister(struct soc_device *soc_dev); +@@ -34,4 +35,6 @@ void soc_device_unregister(struct soc_de */ struct device *soc_device_to_device(struct soc_device *soc); +const struct soc_device_attribute *soc_device_match( + const struct soc_device_attribute *matches); #endif /* __SOC_BUS_H */ -diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h -index 51f38442..5c01afbf 100644 --- a/include/uapi/linux/if_ether.h +++ b/include/uapi/linux/if_ether.h @@ -35,6 +35,7 @@ @@ -436,11 +415,9 @@ index 51f38442..5c01afbf 100644 /* * These are the defined Ethernet Protocol ID's. -diff --git a/net/core/dev.c b/net/core/dev.c -index 512086f2..6e3bb7bc 100644 --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6603,9 +6603,18 @@ int dev_set_mtu(struct net_device *dev, int new_mtu) +@@ -6603,9 +6603,18 @@ int dev_set_mtu(struct net_device *dev, if (new_mtu == dev->mtu) return 0; @@ -461,11 +438,9 @@ index 512086f2..6e3bb7bc 100644 if (!netif_device_present(dev)) return -ENODEV; -diff --git a/net/core/skbuff.c b/net/core/skbuff.c -index 7e7b7ce0..0f9c014a 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c -@@ -842,6 +842,32 @@ void napi_consume_skb(struct sk_buff *skb, int budget) +@@ -842,6 +842,32 @@ void napi_consume_skb(struct sk_buff *sk } EXPORT_SYMBOL(napi_consume_skb); @@ -498,7 +473,7 @@ index 7e7b7ce0..0f9c014a 100644 /* Make sure a field is enclosed inside headers_start/headers_end section */ #define CHECK_SKB_FIELD(field) \ BUILD_BUG_ON(offsetof(struct sk_buff, field) < \ -@@ -1073,7 +1099,7 @@ static void skb_headers_offset_update(struct sk_buff *skb, int off) +@@ -1073,7 +1099,7 @@ static void skb_headers_offset_update(st skb->inner_mac_header += off; } @@ -507,7 +482,7 @@ index 7e7b7ce0..0f9c014a 100644 { __copy_skb_header(new, old); -@@ -1081,6 +1107,7 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old) +@@ -1081,6 +1107,7 @@ static void copy_skb_header(struct sk_bu skb_shinfo(new)->gso_segs = skb_shinfo(old)->gso_segs; skb_shinfo(new)->gso_type = skb_shinfo(old)->gso_type; } @@ -515,11 +490,9 @@ index 7e7b7ce0..0f9c014a 100644 static inline int skb_alloc_rx_flag(const struct sk_buff *skb) { -diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c -index 8018dd3a..ea760b83 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c -@@ -309,6 +309,13 @@ static void dev_watchdog(unsigned long arg) +@@ -309,6 +309,13 @@ static void dev_watchdog(unsigned long a txq->trans_timeout++; break; } @@ -533,6 +506,3 @@ index 8018dd3a..ea760b83 100644 } if (some_queue_timedout) { --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/301-arch-support-layerscape.patch b/target/linux/layerscape/patches-4.9/301-arch-support-layerscape.patch index 1eca91a893..66860a0bb6 100644 --- a/target/linux/layerscape/patches-4.9/301-arch-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/301-arch-support-layerscape.patch @@ -37,8 +37,6 @@ Signed-off-by: Yangbo Lu arch/arm64/mm/dma-mapping.c | 23 ++++++++++--- 15 files changed, 209 insertions(+), 8 deletions(-) -diff --git a/arch/arm/include/asm/delay.h b/arch/arm/include/asm/delay.h -index b1ce037e..1445b0ca 100644 --- a/arch/arm/include/asm/delay.h +++ b/arch/arm/include/asm/delay.h @@ -57,6 +57,22 @@ extern void __bad_udelay(void); @@ -64,11 +62,9 @@ index b1ce037e..1445b0ca 100644 /* Loop-based definitions for assembly code. */ extern void __loop_delay(unsigned long loops); extern void __loop_udelay(unsigned long usecs); -diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h -index 021692c6..172a4f2e 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h -@@ -129,6 +129,7 @@ static inline u32 __raw_readl(const volatile void __iomem *addr) +@@ -129,6 +129,7 @@ static inline u32 __raw_readl(const vola #define MT_DEVICE_NONSHARED 1 #define MT_DEVICE_CACHED 2 #define MT_DEVICE_WC 3 @@ -76,7 +72,7 @@ index 021692c6..172a4f2e 100644 /* * types 4 onwards can be found in asm/mach/map.h and are undefined * for ioremap -@@ -220,6 +221,34 @@ extern int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr); +@@ -220,6 +221,34 @@ extern int pci_ioremap_io(unsigned int o #endif #endif @@ -111,7 +107,7 @@ index 021692c6..172a4f2e 100644 /* * IO port access primitives * ------------------------- -@@ -408,6 +437,8 @@ void __iomem *ioremap_wc(resource_size_t res_cookie, size_t size); +@@ -408,6 +437,8 @@ void __iomem *ioremap_wc(resource_size_t #define ioremap_wc ioremap_wc #define ioremap_wt ioremap_wc @@ -120,8 +116,6 @@ index 021692c6..172a4f2e 100644 void iounmap(volatile void __iomem *iomem_cookie); #define iounmap iounmap -diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h -index 9b7c328f..27f3df7d 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h @@ -21,9 +21,9 @@ struct map_desc { @@ -136,8 +130,6 @@ index 9b7c328f..27f3df7d 100644 MT_CACHECLEAN, MT_MINICLEAN, MT_LOW_VECTORS, -diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h -index a8d656d9..4ab57b37 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h @@ -118,6 +118,13 @@ extern pgprot_t pgprot_s2_device; @@ -154,8 +146,6 @@ index a8d656d9..4ab57b37 100644 #define pgprot_writecombine(prot) \ __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE) -diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c -index 2f0e0773..d2f4869a 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -11,6 +11,8 @@ @@ -167,11 +157,10 @@ index 2f0e0773..d2f4869a 100644 #include #include -@@ -63,6 +65,47 @@ void pcibios_report_status(u_int status_mask, int warn) - pcibios_bus_report_status(bus, status_mask, warn); +@@ -64,6 +66,47 @@ void pcibios_report_status(u_int status_ } -+/* + /* + * Check device tree if the service interrupts are there + */ +int pcibios_check_service_irqs(struct pci_dev *dev, int *irqs, int mask) @@ -212,14 +201,13 @@ index 2f0e0773..d2f4869a 100644 + return count; +} + - /* ++/* * We don't use this to fix the device, but initialisation of it. * It's not the correct use for this, but it works. -diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c -index ab771000..9b5f4465 100644 + * Note that the arbiter/ISA bridge appears to be buggy, specifically in --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c -@@ -2392,6 +2392,7 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, +@@ -2392,6 +2392,7 @@ void arch_setup_dma_ops(struct device *d set_dma_ops(dev, dma_ops); } @@ -227,11 +215,9 @@ index ab771000..9b5f4465 100644 void arch_teardown_dma_ops(struct device *dev) { -diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c -index ff0eed23..2f2f4269 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c -@@ -398,6 +398,13 @@ void __iomem *ioremap_wc(resource_size_t res_cookie, size_t size) +@@ -398,6 +398,13 @@ void __iomem *ioremap_wc(resource_size_t } EXPORT_SYMBOL(ioremap_wc); @@ -245,11 +231,9 @@ index ff0eed23..2f2f4269 100644 /* * Remap an arbitrary physical address space into the kernel virtual * address space as memory. Needed when the kernel wants to execute -diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c -index f7c74135..4a2fb704 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c -@@ -313,6 +313,13 @@ static struct mem_type mem_types[] __ro_after_init = { +@@ -313,6 +313,13 @@ static struct mem_type mem_types[] __ro_ .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, .domain = DOMAIN_KERNEL, }, @@ -263,7 +247,7 @@ index f7c74135..4a2fb704 100644 [MT_ROM] = { .prot_sect = PMD_TYPE_SECT, .domain = DOMAIN_KERNEL, -@@ -644,6 +651,7 @@ static void __init build_mem_type_table(void) +@@ -644,6 +651,7 @@ static void __init build_mem_type_table( } kern_pgprot |= PTE_EXT_AF; vecs_pgprot |= PTE_EXT_AF; @@ -271,7 +255,7 @@ index f7c74135..4a2fb704 100644 /* * Set PXN for user mappings -@@ -672,6 +680,7 @@ static void __init build_mem_type_table(void) +@@ -672,6 +680,7 @@ static void __init build_mem_type_table( mem_types[MT_MEMORY_RWX].prot_pte |= kern_pgprot; mem_types[MT_MEMORY_RW].prot_sect |= ecc_mask | cp->pmd; mem_types[MT_MEMORY_RW].prot_pte |= kern_pgprot; @@ -279,8 +263,6 @@ index f7c74135..4a2fb704 100644 mem_types[MT_MEMORY_DMA_READY].prot_pte |= kern_pgprot; mem_types[MT_MEMORY_RWX_NONCACHED].prot_sect |= ecc_mask; mem_types[MT_ROM].prot_sect |= cp->pmd; -diff --git a/arch/arm64/include/asm/cache.h b/arch/arm64/include/asm/cache.h -index 5082b30b..bde44993 100644 --- a/arch/arm64/include/asm/cache.h +++ b/arch/arm64/include/asm/cache.h @@ -18,7 +18,7 @@ @@ -292,11 +274,9 @@ index 5082b30b..bde44993 100644 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) /* -diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h -index 0bba427b..36c1fbf3 100644 --- a/arch/arm64/include/asm/io.h +++ b/arch/arm64/include/asm/io.h -@@ -171,6 +171,8 @@ extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size); +@@ -171,6 +171,8 @@ extern void __iomem *ioremap_cache(phys_ #define ioremap_nocache(addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE)) #define ioremap_wc(addr, size) __ioremap((addr), (size), __pgprot(PROT_NORMAL_NC)) #define ioremap_wt(addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE)) @@ -305,11 +285,9 @@ index 0bba427b..36c1fbf3 100644 #define iounmap __iounmap /* -diff --git a/arch/arm64/include/asm/pci.h b/arch/arm64/include/asm/pci.h -index b9a7ba9c..8a189159 100644 --- a/arch/arm64/include/asm/pci.h +++ b/arch/arm64/include/asm/pci.h -@@ -31,6 +31,10 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) +@@ -31,6 +31,10 @@ static inline int pci_get_legacy_ide_irq return -ENODEV; } @@ -320,8 +298,6 @@ index b9a7ba9c..8a189159 100644 static inline int pci_proc_domain(struct pci_bus *bus) { return 1; -diff --git a/arch/arm64/include/asm/pgtable-prot.h b/arch/arm64/include/asm/pgtable-prot.h -index 2142c772..cdf8b25d 100644 --- a/arch/arm64/include/asm/pgtable-prot.h +++ b/arch/arm64/include/asm/pgtable-prot.h @@ -42,6 +42,7 @@ @@ -332,11 +308,9 @@ index 2142c772..cdf8b25d 100644 #define PROT_SECT_DEVICE_nGnRE (PROT_SECT_DEFAULT | PMD_SECT_PXN | PMD_SECT_UXN | PMD_ATTRINDX(MT_DEVICE_nGnRE)) #define PROT_SECT_NORMAL (PROT_SECT_DEFAULT | PMD_SECT_PXN | PMD_SECT_UXN | PMD_ATTRINDX(MT_NORMAL)) -diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h -index 61e21401..b8c876fb 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h -@@ -356,6 +356,11 @@ static inline int pmd_protnone(pmd_t pmd) +@@ -356,6 +356,11 @@ static inline int pmd_protnone(pmd_t pmd __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN) #define pgprot_writecombine(prot) \ __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN) @@ -348,8 +322,6 @@ index 61e21401..b8c876fb 100644 #define pgprot_device(prot) \ __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRE) | PTE_PXN | PTE_UXN) #define __HAVE_PHYS_MEM_ACCESS_PROT -diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c -index 409abc45..0568ec3a 100644 --- a/arch/arm64/kernel/pci.c +++ b/arch/arm64/kernel/pci.c @@ -17,6 +17,8 @@ @@ -361,10 +333,11 @@ index 409abc45..0568ec3a 100644 #include #include #include -@@ -54,6 +56,66 @@ int pcibios_alloc_irq(struct pci_dev *dev) +@@ -53,6 +55,66 @@ int pcibios_alloc_irq(struct pci_dev *de + return 0; } - ++ +/* + * Check device tree if the service interrupts are there + */ @@ -424,12 +397,9 @@ index 409abc45..0568ec3a 100644 + + return 0; +} -+ + /* * raw_pci_read/write - Platform-specific PCI config space access. - */ -diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c -index b5bf46ce..5a010bcc 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -30,6 +30,7 @@ @@ -440,49 +410,19 @@ index b5bf46ce..5a010bcc 100644 static int swiotlb __ro_after_init; -@@ -836,14 +837,21 @@ static bool do_iommu_attach(struct device *dev, const struct iommu_ops *ops, - * then the IOMMU core will have already configured a group for this - * device, and allocated the default domain for that group. - */ -- if (!domain || iommu_dma_init_domain(domain, dma_base, size, dev)) { -- pr_warn("Failed to set up IOMMU for device %s; retaining platform DMA ops\n", -- dev_name(dev)); -- return false; -+ if (!domain) -+ goto out_err; -+ -+ if (domain->type == IOMMU_DOMAIN_DMA) { -+ if (iommu_dma_init_domain(domain, dma_base, size, dev)) -+ goto out_err; -+ -+ dev->archdata.dma_ops = &iommu_dma_ops; - } - -- dev->archdata.dma_ops = &iommu_dma_ops; - return true; -+out_err: -+ pr_warn("Failed to set up IOMMU for device %s; retaining platform DMA ops\n", -+ dev_name(dev)); -+ return false; - } - - static void queue_iommu_attach(struct device *dev, const struct iommu_ops *ops, -@@ -917,6 +925,10 @@ static int __init __iommu_dma_init(void) - #ifdef CONFIG_PCI +@@ -925,6 +926,10 @@ static int __init __iommu_dma_init(void) if (!ret) ret = register_iommu_dma_ops_notifier(&pci_bus_type); -+#endif + #endif +#ifdef CONFIG_FSL_MC_BUS + if (!ret) + ret = register_iommu_dma_ops_notifier(&fsl_mc_bus_type); - #endif ++#endif return ret; } -@@ -971,3 +983,4 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, + arch_initcall(__iommu_dma_init); +@@ -978,3 +983,4 @@ void arch_setup_dma_ops(struct device *d dev->archdata.dma_coherent = coherent; __iommu_setup_dma_ops(dev, dma_base, size, iommu); } +EXPORT_SYMBOL(arch_setup_dma_ops); --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/302-dts-support-layercape.patch b/target/linux/layerscape/patches-4.9/302-dts-support-layercape.patch index daca614193..7dae7d6aca 100644 --- a/target/linux/layerscape/patches-4.9/302-dts-support-layercape.patch +++ b/target/linux/layerscape/patches-4.9/302-dts-support-layercape.patch @@ -133,8 +133,6 @@ Signed-off-by: Yangbo Lu create mode 100644 arch/arm64/boot/dts/freescale/qoriq-fman3-0.dtsi create mode 100644 arch/arm64/boot/dts/freescale/qoriq-qman1-portals.dtsi -diff --git a/arch/arm/boot/dts/alpine.dtsi b/arch/arm/boot/dts/alpine.dtsi -index db8752fc..d0eefc3b 100644 --- a/arch/arm/boot/dts/alpine.dtsi +++ b/arch/arm/boot/dts/alpine.dtsi @@ -93,7 +93,7 @@ @@ -146,8 +144,6 @@ index db8752fc..d0eefc3b 100644 <0x0 0xfb006000 0x0 0x2000>; interrupts = ; -diff --git a/arch/arm/boot/dts/axm55xx.dtsi b/arch/arm/boot/dts/axm55xx.dtsi -index a9d6d593..47799f59 100644 --- a/arch/arm/boot/dts/axm55xx.dtsi +++ b/arch/arm/boot/dts/axm55xx.dtsi @@ -62,7 +62,7 @@ @@ -159,8 +155,6 @@ index a9d6d593..47799f59 100644 <0x20 0x01004000 0 0x2000>, <0x20 0x01006000 0 0x2000>; interrupts = , <0xfff16000 0x2000>; }; -diff --git a/arch/arm/boot/dts/imx6ul.dtsi b/arch/arm/boot/dts/imx6ul.dtsi -index c5c05fdc..c1396873 100644 --- a/arch/arm/boot/dts/imx6ul.dtsi +++ b/arch/arm/boot/dts/imx6ul.dtsi @@ -89,11 +89,11 @@ @@ -190,8 +182,6 @@ index c5c05fdc..c1396873 100644 <0x00a04000 0x2000>, <0x00a06000 0x2000>; }; -diff --git a/arch/arm/boot/dts/keystone.dtsi b/arch/arm/boot/dts/keystone.dtsi -index 02708ba2..e30c83fc 100644 --- a/arch/arm/boot/dts/keystone.dtsi +++ b/arch/arm/boot/dts/keystone.dtsi @@ -30,12 +30,12 @@ @@ -209,8 +199,6 @@ index 02708ba2..e30c83fc 100644 <0x0 0x02566000 0x0 0x2000>; interrupts = ; -diff --git a/arch/arm/boot/dts/ls1021a-qds.dts b/arch/arm/boot/dts/ls1021a-qds.dts -index 94087531..5611a9c9 100644 --- a/arch/arm/boot/dts/ls1021a-qds.dts +++ b/arch/arm/boot/dts/ls1021a-qds.dts @@ -124,6 +124,19 @@ @@ -233,8 +221,6 @@ index 94087531..5611a9c9 100644 &enet0 { tbi-handle = <&tbi0>; phy-handle = <&sgmii_phy1c>; -diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts -index a8b148ad..907e5392 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -142,6 +142,19 @@ @@ -257,8 +243,6 @@ index a8b148ad..907e5392 100644 &enet0 { tbi-handle = <&tbi1>; phy-handle = <&sgmii_phy2>; -diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi -index 368e2193..9d8d1fee 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -74,17 +74,24 @@ @@ -625,8 +609,6 @@ index 368e2193..9d8d1fee 100644 #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 7>; interrupt-map = <0000 0 0 1 &gic GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>, -diff --git a/arch/arm/boot/dts/mt6580.dtsi b/arch/arm/boot/dts/mt6580.dtsi -index 06fdf6c2..a349dba5 100644 --- a/arch/arm/boot/dts/mt6580.dtsi +++ b/arch/arm/boot/dts/mt6580.dtsi @@ -91,7 +91,7 @@ @@ -638,8 +620,6 @@ index 06fdf6c2..a349dba5 100644 <0x10214000 0x2000>, <0x10216000 0x2000>; }; -diff --git a/arch/arm/boot/dts/mt6589.dtsi b/arch/arm/boot/dts/mt6589.dtsi -index 88b3cb12..0d6f60af 100644 --- a/arch/arm/boot/dts/mt6589.dtsi +++ b/arch/arm/boot/dts/mt6589.dtsi @@ -102,7 +102,7 @@ @@ -651,8 +631,6 @@ index 88b3cb12..0d6f60af 100644 <0x10214000 0x2000>, <0x10216000 0x2000>; }; -diff --git a/arch/arm/boot/dts/mt8127.dtsi b/arch/arm/boot/dts/mt8127.dtsi -index 52086c80..916c095d 100644 --- a/arch/arm/boot/dts/mt8127.dtsi +++ b/arch/arm/boot/dts/mt8127.dtsi @@ -129,7 +129,7 @@ @@ -664,8 +642,6 @@ index 52086c80..916c095d 100644 <0 0x10214000 0 0x2000>, <0 0x10216000 0 0x2000>; }; -diff --git a/arch/arm/boot/dts/mt8135.dtsi b/arch/arm/boot/dts/mt8135.dtsi -index 1d7f92bd..a97b4ee4 100644 --- a/arch/arm/boot/dts/mt8135.dtsi +++ b/arch/arm/boot/dts/mt8135.dtsi @@ -221,7 +221,7 @@ @@ -677,8 +653,6 @@ index 1d7f92bd..a97b4ee4 100644 <0 0x10214000 0 0x2000>, <0 0x10216000 0 0x2000>; }; -diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi -index 17ec2e2d..559fc549 100644 --- a/arch/arm/boot/dts/rk3288.dtsi +++ b/arch/arm/boot/dts/rk3288.dtsi @@ -1109,7 +1109,7 @@ @@ -690,8 +664,6 @@ index 17ec2e2d..559fc549 100644 <0xffc04000 0x2000>, <0xffc06000 0x2000>; interrupts = ; -diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi -index ce196045..97f28399 100644 --- a/arch/arm/boot/dts/sun6i-a31.dtsi +++ b/arch/arm/boot/dts/sun6i-a31.dtsi @@ -791,7 +791,7 @@ @@ -703,8 +675,6 @@ index ce196045..97f28399 100644 <0x01c84000 0x2000>, <0x01c86000 0x2000>; interrupt-controller; -diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi -index 94cf5a1c..81e5a44c 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi @@ -1685,9 +1685,9 @@ @@ -719,8 +689,6 @@ index 94cf5a1c..81e5a44c 100644 <0x01c84000 0x2000>, <0x01c86000 0x2000>; interrupt-controller; -diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi -index 300a1bd5..cdff5888 100644 --- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi +++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi @@ -488,7 +488,7 @@ @@ -732,8 +700,6 @@ index 300a1bd5..cdff5888 100644 <0x01c84000 0x2000>, <0x01c86000 0x2000>; interrupt-controller; -diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/dts/sun9i-a80.dtsi -index 3c5214cb..ba7e7c71 100644 --- a/arch/arm/boot/dts/sun9i-a80.dtsi +++ b/arch/arm/boot/dts/sun9i-a80.dtsi @@ -613,7 +613,7 @@ @@ -745,8 +711,6 @@ index 3c5214cb..ba7e7c71 100644 <0x01c44000 0x2000>, <0x01c46000 0x2000>; interrupt-controller; -diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile -index 1b7783db..2d7986a1 100644 --- a/arch/arm64/boot/dts/freescale/Makefile +++ b/arch/arm64/boot/dts/freescale/Makefile @@ -1,8 +1,24 @@ @@ -774,9 +738,6 @@ index 1b7783db..2d7986a1 100644 always := $(dtb-y) subdir-y := $(dts-dirs) -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts b/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts -new file mode 100644 -index 00000000..de8ee499 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts @@ -0,0 +1,177 @@ @@ -957,9 +918,6 @@ index 00000000..de8ee499 +&sata { + status = "okay"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts -new file mode 100644 -index 00000000..edd87676 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts @@ -0,0 +1,198 @@ @@ -1161,9 +1119,6 @@ index 00000000..edd87676 +&esdhc1 { + status = "okay"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts -new file mode 100644 -index 00000000..88684eac --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts @@ -0,0 +1,134 @@ @@ -1301,9 +1256,6 @@ index 00000000..88684eac + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi -new file mode 100644 -index 00000000..0b11ece1 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi @@ -0,0 +1,594 @@ @@ -1901,9 +1853,6 @@ index 00000000..0b11ece1 + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043-post.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1043-post.dtsi -new file mode 100644 -index 00000000..169e1714 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043-post.dtsi @@ -0,0 +1,45 @@ @@ -1952,9 +1901,6 @@ index 00000000..169e1714 + enet6: ethernet@f0000 { + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds-sdk.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds-sdk.dts -new file mode 100644 -index 00000000..6c13b416 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds-sdk.dts @@ -0,0 +1,69 @@ @@ -2027,8 +1973,6 @@ index 00000000..6c13b416 +&fman0 { + compatible = "fsl,fman", "simple-bus"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts -index dd9e9194..08abff73 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts @@ -1,7 +1,7 @@ @@ -2235,9 +2179,6 @@ index dd9e9194..08abff73 100644 + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb-sdk.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb-sdk.dts -new file mode 100644 -index 00000000..ac4b9a41 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb-sdk.dts @@ -0,0 +1,69 @@ @@ -2310,9 +2251,6 @@ index 00000000..ac4b9a41 +&fman0 { + compatible = "fsl,fman", "simple-bus"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb-usdpaa.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb-usdpaa.dts -new file mode 100644 -index 00000000..4e46a0a5 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb-usdpaa.dts @@ -0,0 +1,117 @@ @@ -2433,8 +2371,6 @@ index 00000000..4e46a0a5 + reg = <0x83000 0x1000>; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts -index d2313e05..f92ae325 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts @@ -1,7 +1,7 @@ @@ -2582,8 +2518,6 @@ index d2313e05..f92ae325 100644 + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi -index 97d331ec..ef7c0a24 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi @@ -1,7 +1,7 @@ @@ -3079,9 +3013,6 @@ index 97d331ec..ef7c0a24 100644 + +#include "qoriq-qman1-portals.dtsi" +#include "qoriq-bman1-portals.dtsi" -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046-post.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1046-post.dtsi -new file mode 100644 -index 00000000..f5017dba --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046-post.dtsi @@ -0,0 +1,48 @@ @@ -3133,9 +3064,6 @@ index 00000000..f5017dba + enet7: ethernet@f2000 { + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds-sdk.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds-sdk.dts -new file mode 100644 -index 00000000..c375af47 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds-sdk.dts @@ -0,0 +1,109 @@ @@ -3248,9 +3176,6 @@ index 00000000..c375af47 + spi-max-frequency = <10000000>; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts -new file mode 100644 -index 00000000..3b8e9b7e --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts @@ -0,0 +1,363 @@ @@ -3617,9 +3542,6 @@ index 00000000..3b8e9b7e + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb-sdk.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb-sdk.dts -new file mode 100644 -index 00000000..bfe2f36c --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb-sdk.dts @@ -0,0 +1,76 @@ @@ -3699,9 +3621,6 @@ index 00000000..bfe2f36c +&fman0 { + compatible = "fsl,fman", "simple-bus"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb-usdpaa.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb-usdpaa.dts -new file mode 100644 -index 00000000..54336aa6 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb-usdpaa.dts @@ -0,0 +1,110 @@ @@ -3815,9 +3734,6 @@ index 00000000..54336aa6 + reg = <0x83000 0x1000>; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts -new file mode 100644 -index 00000000..be9b62ca --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts @@ -0,0 +1,218 @@ @@ -4039,9 +3955,6 @@ index 00000000..be9b62ca + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi -new file mode 100644 -index 00000000..f7fe73c4 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi @@ -0,0 +1,793 @@ @@ -4838,9 +4751,6 @@ index 00000000..f7fe73c4 + +#include "qoriq-qman1-portals.dtsi" +#include "qoriq-bman1-portals.dtsi" -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts -new file mode 100644 -index 00000000..f61ec261 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts @@ -0,0 +1,173 @@ @@ -5017,9 +4927,6 @@ index 00000000..f61ec261 +&sata { + status = "okay"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts -new file mode 100644 -index 00000000..a4cbc2d5 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1088a-rdb.dts @@ -0,0 +1,236 @@ @@ -5259,9 +5166,6 @@ index 00000000..a4cbc2d5 +&dpmac10 { + phy-handle = <&mdio1_phy4>; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi -new file mode 100644 -index 00000000..fd5f1e84 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi @@ -0,0 +1,818 @@ @@ -6083,8 +5987,6 @@ index 00000000..fd5f1e84 + }; + +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dts -index b0dd0109..ba1a79dd 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dts @@ -1,8 +1,10 @@ @@ -6316,8 +6218,6 @@ index b0dd0109..ba1a79dd 100644 +&dpmac12 { + phy-handle = <&mdio0_phy15>; }; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2080a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls2080a-rdb.dts -index ad0ebb8a..025f0f54 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls2080a-rdb.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls2080a-rdb.dts @@ -1,8 +1,10 @@ @@ -6373,29 +6273,17 @@ index ad0ebb8a..025f0f54 100644 - reg = <0x0 0x0 0x8000000>; - bank-width = <2>; - device-width = <1>; -+&emdio1 { -+ status = "disabled"; -+ /* CS4340 PHYs */ -+ mdio1_phy1: emdio1_phy@1 { -+ reg = <0x10>; -+ phy-connection-type = "xfi"; - }; +- }; - - nand@2,0 { - compatible = "fsl,ifc-nand"; - reg = <0x2 0x0 0x10000>; -+ mdio1_phy2: emdio1_phy@2 { -+ reg = <0x11>; -+ phy-connection-type = "xfi"; - }; +- }; - - cpld@3,0 { - reg = <0x3 0x0 0x10000>; - compatible = "fsl,ls2080aqds-fpga", "fsl,fpga-qixis"; -+ mdio1_phy3: emdio1_phy@3 { -+ reg = <0x12>; -+ phy-connection-type = "xfi"; - }; +- }; - -}; - @@ -6427,12 +6315,9 @@ index ad0ebb8a..025f0f54 100644 - reg = <0x4c>; - }; - }; -+ mdio1_phy4: emdio1_phy@4 { -+ reg = <0x13>; -+ phy-connection-type = "xfi"; - }; - }; - +- }; +-}; +- -&i2c1 { - status = "disabled"; -}; @@ -6442,9 +6327,27 @@ index ad0ebb8a..025f0f54 100644 -}; - -&i2c3 { -- status = "disabled"; --}; -- ++&emdio1 { + status = "disabled"; ++ /* CS4340 PHYs */ ++ mdio1_phy1: emdio1_phy@1 { ++ reg = <0x10>; ++ phy-connection-type = "xfi"; ++ }; ++ mdio1_phy2: emdio1_phy@2 { ++ reg = <0x11>; ++ phy-connection-type = "xfi"; ++ }; ++ mdio1_phy3: emdio1_phy@3 { ++ reg = <0x12>; ++ phy-connection-type = "xfi"; ++ }; ++ mdio1_phy4: emdio1_phy@4 { ++ reg = <0x13>; ++ phy-connection-type = "xfi"; ++ }; + }; + -&dspi { - status = "okay"; - dflash0: n25q512a { @@ -6525,8 +6428,6 @@ index ad0ebb8a..025f0f54 100644 +&dpmac8 { + phy-handle = <&mdio2_phy4>; }; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2080a-simu.dts b/arch/arm64/boot/dts/freescale/fsl-ls2080a-simu.dts -index 505d0380..fbbb73e5 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls2080a-simu.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls2080a-simu.dts @@ -1,7 +1,7 @@ @@ -6557,8 +6458,6 @@ index 505d0380..fbbb73e5 100644 ethernet@2210000 { compatible = "smsc,lan91c111"; reg = <0x0 0x2210000 0x0 0x100>; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi -index 7f0dc13b..71f15fab 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi @@ -1,8 +1,9 @@ @@ -6581,8 +6480,7 @@ index 7f0dc13b..71f15fab 100644 - interrupt-parent = <&gic>; - #address-cells = <2>; - #size-cells = <2>; -+#include "fsl-ls208xa.dtsi" - +- - cpus { - #address-cells = <1>; - #size-cells = <0>; @@ -6674,42 +6572,21 @@ index 7f0dc13b..71f15fab 100644 - cluster3_l2: l2-cache3 { - compatible = "cache"; - }; -+&cpu { -+ cpu0: cpu@0 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a57"; -+ reg = <0x0>; -+ clocks = <&clockgen 1 0>; -+ next-level-cache = <&cluster0_l2>; -+ #cooling-cells = <2>; - }; - +- }; +- - memory@80000000 { - device_type = "memory"; - reg = <0x00000000 0x80000000 0 0x80000000>; - /* DRAM space - 1, size : 2 GB DRAM */ -+ cpu1: cpu@1 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a57"; -+ reg = <0x1>; -+ clocks = <&clockgen 1 0>; -+ next-level-cache = <&cluster0_l2>; - }; - +- }; +- - sysclk: sysclk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <100000000>; - clock-output-names = "sysclk"; -+ cpu2: cpu@100 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a57"; -+ reg = <0x100>; -+ clocks = <&clockgen 1 1>; -+ next-level-cache = <&cluster1_l2>; -+ #cooling-cells = <2>; - }; - +- }; +- - gic: interrupt-controller@6000000 { - compatible = "arm,gic-v3"; - reg = <0x0 0x06000000 0 0x10000>, /* GIC Dist */ @@ -6729,39 +6606,20 @@ index 7f0dc13b..71f15fab 100644 - msi-controller; - reg = <0x0 0x6020000 0 0x20000>; - }; -+ cpu3: cpu@101 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a57"; -+ reg = <0x101>; -+ clocks = <&clockgen 1 1>; -+ next-level-cache = <&cluster1_l2>; - }; - +- }; +- - rstcr: syscon@1e60000 { - compatible = "fsl,ls2080a-rstcr", "syscon"; - reg = <0x0 0x1e60000 0x0 0x4>; -+ cpu4: cpu@200 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a57"; -+ reg = <0x200>; -+ clocks = <&clockgen 1 2>; -+ next-level-cache = <&cluster2_l2>; -+ #cooling-cells = <2>; - }; - +- }; +- - reboot { - compatible ="syscon-reboot"; - regmap = <&rstcr>; - offset = <0x0>; - mask = <0x2>; -+ cpu5: cpu@201 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a57"; -+ reg = <0x201>; -+ clocks = <&clockgen 1 2>; -+ next-level-cache = <&cluster2_l2>; - }; - +- }; +- - timer { - compatible = "arm,armv8-timer"; - interrupts = <1 13 4>, /* Physical Secure PPI, active-low */ @@ -6769,26 +6627,13 @@ index 7f0dc13b..71f15fab 100644 - <1 11 4>, /* Virtual PPI, active-low */ - <1 10 4>; /* Hypervisor PPI, active-low */ - fsl,erratum-a008585; -+ cpu6: cpu@300 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a57"; -+ reg = <0x300>; -+ clocks = <&clockgen 1 3>; -+ next-level-cache = <&cluster3_l2>; -+ #cooling-cells = <2>; - }; - +- }; +- - pmu { - compatible = "arm,armv8-pmuv3"; - interrupts = <1 7 0x8>; /* PMU PPI, Level low type */ -+ cpu7: cpu@301 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a57"; -+ reg = <0x301>; -+ clocks = <&clockgen 1 3>; -+ next-level-cache = <&cluster3_l2>; - }; - +- }; +- - soc { - compatible = "simple-bus"; - #address-cells = <2>; @@ -7145,18 +6990,12 @@ index 7f0dc13b..71f15fab 100644 - little-endian; - #address-cells = <2>; - #size-cells = <1>; -+ cluster0_l2: l2-cache0 { -+ compatible = "cache"; -+ }; - +- - ranges = <0 0 0x5 0x80000000 0x08000000 - 2 0 0x5 0x30000000 0x00010000 - 3 0 0x5 0x20000000 0x00010000>; - }; -+ cluster1_l2: l2-cache1 { -+ compatible = "cache"; -+ }; - +- - qspi: quadspi@20c0000 { - status = "disabled"; - compatible = "fsl,ls2080a-qspi", "fsl,ls1021a-qspi"; @@ -7169,10 +7008,7 @@ index 7f0dc13b..71f15fab 100644 - clocks = <&clockgen 4 3>, <&clockgen 4 3>; - clock-names = "qspi_en", "qspi"; - }; -+ cluster2_l2: l2-cache2 { -+ compatible = "cache"; -+ }; - +- - pcie@3400000 { - compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie", - "snps,dw-pcie"; @@ -7197,11 +7033,7 @@ index 7f0dc13b..71f15fab 100644 - <0000 0 0 3 &gic 0 0 0 111 4>, - <0000 0 0 4 &gic 0 0 0 112 4>; - }; -+ cluster3_l2: l2-cache3 { -+ compatible = "cache"; -+ }; -+}; - +- - pcie@3500000 { - compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie", - "snps,dw-pcie"; @@ -7226,11 +7058,7 @@ index 7f0dc13b..71f15fab 100644 - <0000 0 0 3 &gic 0 0 0 116 4>, - <0000 0 0 4 &gic 0 0 0 117 4>; - }; -+&usb0 { -+ snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; -+ snps,dma-snooping; -+}; - +- - pcie@3600000 { - compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie", - "snps,dw-pcie"; @@ -7255,11 +7083,7 @@ index 7f0dc13b..71f15fab 100644 - <0000 0 0 3 &gic 0 0 0 121 4>, - <0000 0 0 4 &gic 0 0 0 122 4>; - }; -+&usb1 { -+ snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; -+ snps,dma-snooping; -+}; - +- - pcie@3700000 { - compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie", - "snps,dw-pcie"; @@ -7284,10 +7108,7 @@ index 7f0dc13b..71f15fab 100644 - <0000 0 0 3 &gic 0 0 0 126 4>, - <0000 0 0 4 &gic 0 0 0 127 4>; - }; -+&pcie1 { -+ reg = <0x00 0x03400000 0x0 0x00100000 /* controller registers */ -+ 0x10 0x00000000 0x0 0x00002000>; /* configuration space */ - +- - sata0: sata@3200000 { - status = "disabled"; - compatible = "fsl,ls2080a-ahci"; @@ -7296,10 +7117,7 @@ index 7f0dc13b..71f15fab 100644 - clocks = <&clockgen 4 3>; - dma-coherent; - }; -+ ranges = <0x81000000 0x0 0x00000000 0x10 0x00010000 0x0 0x00010000 /* downstream I/O */ -+ 0x82000000 0x0 0x40000000 0x10 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ -+}; - +- - sata1: sata@3210000 { - status = "disabled"; - compatible = "fsl,ls2080a-ahci"; @@ -7308,10 +7126,7 @@ index 7f0dc13b..71f15fab 100644 - clocks = <&clockgen 4 3>; - dma-coherent; - }; -+&pcie2 { -+ reg = <0x00 0x03500000 0x0 0x00100000 /* controller registers */ -+ 0x12 0x00000000 0x0 0x00002000>; /* configuration space */ - +- - usb0: usb3@3100000 { - status = "disabled"; - compatible = "snps,dwc3"; @@ -7321,10 +7136,7 @@ index 7f0dc13b..71f15fab 100644 - snps,quirk-frame-length-adjustment = <0x20>; - snps,dis_rxdet_inp3_quirk; - }; -+ ranges = <0x81000000 0x0 0x00000000 0x12 0x00010000 0x0 0x00010000 /* downstream I/O */ -+ 0x82000000 0x0 0x40000000 0x12 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ -+}; - +- - usb1: usb3@3110000 { - status = "disabled"; - compatible = "snps,dwc3"; @@ -7334,42 +7146,155 @@ index 7f0dc13b..71f15fab 100644 - snps,quirk-frame-length-adjustment = <0x20>; - snps,dis_rxdet_inp3_quirk; - }; -+&pcie3 { -+ reg = <0x00 0x03600000 0x0 0x00100000 /* controller registers */ -+ 0x14 0x00000000 0x0 0x00002000>; /* configuration space */ - +- - ccn@4000000 { - compatible = "arm,ccn-504"; - reg = <0x0 0x04000000 0x0 0x01000000>; - interrupts = <0 12 4>; - }; - }; -+ ranges = <0x81000000 0x0 0x00000000 0x14 0x00010000 0x0 0x00010000 /* downstream I/O */ -+ 0x82000000 0x0 0x40000000 0x14 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ -+}; - +- - ddr1: memory-controller@1080000 { - compatible = "fsl,qoriq-memory-controller"; - reg = <0x0 0x1080000 0x0 0x1000>; - interrupts = <0 17 0x4>; - little-endian; - }; -+&pcie4 { -+ reg = <0x00 0x03700000 0x0 0x00100000 /* controller registers */ -+ 0x16 0x00000000 0x0 0x00002000>; /* configuration space */ - +- - ddr2: memory-controller@1090000 { - compatible = "fsl,qoriq-memory-controller"; - reg = <0x0 0x1090000 0x0 0x1000>; - interrupts = <0 18 0x4>; - little-endian; -- }; ++#include "fsl-ls208xa.dtsi" ++ ++&cpu { ++ cpu0: cpu@0 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a57"; ++ reg = <0x0>; ++ clocks = <&clockgen 1 0>; ++ next-level-cache = <&cluster0_l2>; ++ #cooling-cells = <2>; ++ }; ++ ++ cpu1: cpu@1 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a57"; ++ reg = <0x1>; ++ clocks = <&clockgen 1 0>; ++ next-level-cache = <&cluster0_l2>; ++ }; ++ ++ cpu2: cpu@100 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a57"; ++ reg = <0x100>; ++ clocks = <&clockgen 1 1>; ++ next-level-cache = <&cluster1_l2>; ++ #cooling-cells = <2>; ++ }; ++ ++ cpu3: cpu@101 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a57"; ++ reg = <0x101>; ++ clocks = <&clockgen 1 1>; ++ next-level-cache = <&cluster1_l2>; ++ }; ++ ++ cpu4: cpu@200 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a57"; ++ reg = <0x200>; ++ clocks = <&clockgen 1 2>; ++ next-level-cache = <&cluster2_l2>; ++ #cooling-cells = <2>; ++ }; ++ ++ cpu5: cpu@201 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a57"; ++ reg = <0x201>; ++ clocks = <&clockgen 1 2>; ++ next-level-cache = <&cluster2_l2>; ++ }; ++ ++ cpu6: cpu@300 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a57"; ++ reg = <0x300>; ++ clocks = <&clockgen 1 3>; ++ next-level-cache = <&cluster3_l2>; ++ #cooling-cells = <2>; ++ }; ++ ++ cpu7: cpu@301 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a57"; ++ reg = <0x301>; ++ clocks = <&clockgen 1 3>; ++ next-level-cache = <&cluster3_l2>; + }; ++ ++ cluster0_l2: l2-cache0 { ++ compatible = "cache"; ++ }; ++ ++ cluster1_l2: l2-cache1 { ++ compatible = "cache"; ++ }; ++ ++ cluster2_l2: l2-cache2 { ++ compatible = "cache"; ++ }; ++ ++ cluster3_l2: l2-cache3 { ++ compatible = "cache"; ++ }; ++}; ++ ++&usb0 { ++ snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; ++ snps,dma-snooping; ++}; ++ ++&usb1 { ++ snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; ++ snps,dma-snooping; ++}; ++ ++&pcie1 { ++ reg = <0x00 0x03400000 0x0 0x00100000 /* controller registers */ ++ 0x10 0x00000000 0x0 0x00002000>; /* configuration space */ ++ ++ ranges = <0x81000000 0x0 0x00000000 0x10 0x00010000 0x0 0x00010000 /* downstream I/O */ ++ 0x82000000 0x0 0x40000000 0x10 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ ++}; ++ ++&pcie2 { ++ reg = <0x00 0x03500000 0x0 0x00100000 /* controller registers */ ++ 0x12 0x00000000 0x0 0x00002000>; /* configuration space */ ++ ++ ranges = <0x81000000 0x0 0x00000000 0x12 0x00010000 0x0 0x00010000 /* downstream I/O */ ++ 0x82000000 0x0 0x40000000 0x12 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ ++}; ++ ++&pcie3 { ++ reg = <0x00 0x03600000 0x0 0x00100000 /* controller registers */ ++ 0x14 0x00000000 0x0 0x00002000>; /* configuration space */ ++ ++ ranges = <0x81000000 0x0 0x00000000 0x14 0x00010000 0x0 0x00010000 /* downstream I/O */ ++ 0x82000000 0x0 0x40000000 0x14 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ ++}; ++ ++&pcie4 { ++ reg = <0x00 0x03700000 0x0 0x00100000 /* controller registers */ ++ 0x16 0x00000000 0x0 0x00002000>; /* configuration space */ ++ + ranges = <0x81000000 0x0 0x00000000 0x16 0x00010000 0x0 0x00010000 /* downstream I/O */ + 0x82000000 0x0 0x40000000 0x16 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */ }; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2081a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls2081a-rdb.dts -new file mode 100644 -index 00000000..c3375bf7 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls2081a-rdb.dts @@ -0,0 +1,161 @@ @@ -7534,9 +7459,6 @@ index 00000000..c3375bf7 +&usb1 { + status = "okay"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2088a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls2088a-qds.dts -new file mode 100644 -index 00000000..1dbc7aa8 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls2088a-qds.dts @@ -0,0 +1,162 @@ @@ -7702,9 +7624,6 @@ index 00000000..1dbc7aa8 +&dpmac12 { + phy-handle = <&mdio0_phy15>; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2088a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls2088a-rdb.dts -new file mode 100644 -index 00000000..9300119b --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls2088a-rdb.dts @@ -0,0 +1,140 @@ @@ -7848,9 +7767,6 @@ index 00000000..9300119b +&dpmac8 { + phy-handle = <&mdio2_phy4>; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2088a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls2088a.dtsi -new file mode 100644 -index 00000000..833699ea --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls2088a.dtsi @@ -0,0 +1,195 @@ @@ -8049,9 +7965,6 @@ index 00000000..833699ea + ranges = <0x81000000 0x0 0x00000000 0x38 0x00010000 0x0 0x00010000 + 0x82000000 0x0 0x40000000 0x38 0x40000000 0x0 0x40000000>; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls208xa-qds.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls208xa-qds.dtsi -new file mode 100644 -index 00000000..b2374469 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa-qds.dtsi @@ -0,0 +1,198 @@ @@ -8253,9 +8166,6 @@ index 00000000..b2374469 +&usb1 { + status = "okay"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls208xa-rdb.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls208xa-rdb.dtsi -new file mode 100644 -index 00000000..8e919dc8 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa-rdb.dtsi @@ -0,0 +1,161 @@ @@ -8420,9 +8330,6 @@ index 00000000..8e919dc8 +&usb1 { + status = "okay"; +}; -diff --git a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi -new file mode 100644 -index 00000000..dbc3a3d0 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi @@ -0,0 +1,912 @@ @@ -9338,9 +9245,6 @@ index 00000000..dbc3a3d0 + little-endian; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-bman1-portals.dtsi b/arch/arm64/boot/dts/freescale/qoriq-bman1-portals.dtsi -new file mode 100644 -index 00000000..14680adb --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-bman1-portals.dtsi @@ -0,0 +1,81 @@ @@ -9425,9 +9329,6 @@ index 00000000..14680adb + fsl,bpid-range = <32 32>; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-dpaa-eth.dtsi b/arch/arm64/boot/dts/freescale/qoriq-dpaa-eth.dtsi -new file mode 100644 -index 00000000..eb5af912 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-dpaa-eth.dtsi @@ -0,0 +1,66 @@ @@ -9497,9 +9398,6 @@ index 00000000..eb5af912 + }; +}; + -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-10g-0.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-10g-0.dtsi -new file mode 100644 -index 00000000..474bff5e --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-10g-0.dtsi @@ -0,0 +1,43 @@ @@ -9546,9 +9444,6 @@ index 00000000..474bff5e + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-10g-1.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-10g-1.dtsi -new file mode 100644 -index 00000000..d4326f85 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-10g-1.dtsi @@ -0,0 +1,43 @@ @@ -9595,9 +9490,6 @@ index 00000000..d4326f85 + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-0.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-0.dtsi -new file mode 100644 -index 00000000..7170cab9 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-0.dtsi @@ -0,0 +1,42 @@ @@ -9643,9 +9535,6 @@ index 00000000..7170cab9 + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-1.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-1.dtsi -new file mode 100644 -index 00000000..c7eb8b6e --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-1.dtsi @@ -0,0 +1,42 @@ @@ -9691,9 +9580,6 @@ index 00000000..c7eb8b6e + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-2.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-2.dtsi -new file mode 100644 -index 00000000..56f9f0dd --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-2.dtsi @@ -0,0 +1,42 @@ @@ -9739,9 +9625,6 @@ index 00000000..56f9f0dd + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-3.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-3.dtsi -new file mode 100644 -index 00000000..bbe7dbaf --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-3.dtsi @@ -0,0 +1,42 @@ @@ -9787,9 +9670,6 @@ index 00000000..bbe7dbaf + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-4.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-4.dtsi -new file mode 100644 -index 00000000..ead4f062 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-4.dtsi @@ -0,0 +1,42 @@ @@ -9835,9 +9715,6 @@ index 00000000..ead4f062 + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-5.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-5.dtsi -new file mode 100644 -index 00000000..389eadaf --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-1g-5.dtsi @@ -0,0 +1,42 @@ @@ -9883,9 +9760,6 @@ index 00000000..389eadaf + }; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0-6oh.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-6oh.dtsi -new file mode 100644 -index 00000000..2d0df20d --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0-6oh.dtsi @@ -0,0 +1,47 @@ @@ -9936,9 +9810,6 @@ index 00000000..2d0df20d + }; + +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-fman3-0.dtsi b/arch/arm64/boot/dts/freescale/qoriq-fman3-0.dtsi -new file mode 100644 -index 00000000..8e089f0c --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-fman3-0.dtsi @@ -0,0 +1,130 @@ @@ -10072,9 +9943,6 @@ index 00000000..8e089f0c + reg = <0xfe000 0x1000>; + }; +}; -diff --git a/arch/arm64/boot/dts/freescale/qoriq-qman1-portals.dtsi b/arch/arm64/boot/dts/freescale/qoriq-qman1-portals.dtsi -new file mode 100644 -index 00000000..4f7edf48 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/qoriq-qman1-portals.dtsi @@ -0,0 +1,104 @@ @@ -10182,8 +10050,6 @@ index 00000000..4f7edf48 + fsl,ceetm-channel-range = <0 32>; + }; +}; -diff --git a/arch/powerpc/boot/dts/fsl/qoriq-bman1-portals.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-bman1-portals.dtsi -index 5022432e..65701ada 100644 --- a/arch/powerpc/boot/dts/fsl/qoriq-bman1-portals.dtsi +++ b/arch/powerpc/boot/dts/fsl/qoriq-bman1-portals.dtsi @@ -38,51 +38,61 @@ @@ -10248,8 +10114,6 @@ index 5022432e..65701ada 100644 compatible = "fsl,bman-portal"; reg = <0x24000 0x4000>, <0x109000 0x1000>; interrupts = <123 2 0 0>; -diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi -index c288f3c6..dd200e28 100644 --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi @@ -35,14 +35,14 @@ @@ -10269,8 +10133,6 @@ index c288f3c6..dd200e28 100644 reg = <0xb0000 0x1000>; fsl,fman-10g-port; }; -diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi -index 94a76982..365770c9 100644 --- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi +++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi @@ -35,14 +35,14 @@ @@ -10290,6 +10152,3 @@ index 94a76982..365770c9 100644 reg = <0xb1000 0x1000>; fsl,fman-10g-port; }; --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/303-arm-imx-select-ARCH_DMA_ADDR_T_64BIT-for-LPAE.patch b/target/linux/layerscape/patches-4.9/303-arm-imx-select-ARCH_DMA_ADDR_T_64BIT-for-LPAE.patch index 407eebd2ee..097c4320f2 100644 --- a/target/linux/layerscape/patches-4.9/303-arm-imx-select-ARCH_DMA_ADDR_T_64BIT-for-LPAE.patch +++ b/target/linux/layerscape/patches-4.9/303-arm-imx-select-ARCH_DMA_ADDR_T_64BIT-for-LPAE.patch @@ -11,8 +11,6 @@ Signed-off-by: Yangbo Lu arch/arm/mach-imx/Kconfig | 1 + 1 file changed, 1 insertion(+) -diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig -index 9155b639..3ded3f98 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -1,6 +1,7 @@ @@ -23,6 +21,3 @@ index 9155b639..3ded3f98 100644 select ARCH_SUPPORTS_BIG_ENDIAN select CLKSRC_IMX_GPT select GENERIC_IRQ_CHIP --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/401-mtd-spi-nor-support-layerscape.patch b/target/linux/layerscape/patches-4.9/401-mtd-spi-nor-support-layerscape.patch index 6dbd984f2f..3627773171 100644 --- a/target/linux/layerscape/patches-4.9/401-mtd-spi-nor-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/401-mtd-spi-nor-support-layerscape.patch @@ -23,11 +23,9 @@ Signed-off-by: Yangbo Lu include/linux/mtd/spi-nor.h | 14 +- 4 files changed, 409 insertions(+), 70 deletions(-) -diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c -index 2a47a3f0..4f21401d 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c -@@ -451,7 +451,7 @@ static int mtdchar_readoob(struct file *file, struct mtd_info *mtd, +@@ -451,7 +451,7 @@ static int mtdchar_readoob(struct file * * data. For our userspace tools it is important to dump areas * with ECC errors! * For kernel internal usage it also might return -EUCLEAN @@ -36,8 +34,6 @@ index 2a47a3f0..4f21401d 100644 * been corrected by the ECC algorithm. * * Note: currently the standard NAND function, nand_read_oob_std, -diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c -index 5c82e4ef..33ecc27a 100644 --- a/drivers/mtd/spi-nor/fsl-quadspi.c +++ b/drivers/mtd/spi-nor/fsl-quadspi.c @@ -41,6 +41,8 @@ @@ -90,7 +86,7 @@ index 5c82e4ef..33ecc27a 100644 .devtype = FSL_QUADSPI_VYBRID, .rxfifo = 128, .txfifo = 64, -@@ -232,7 +241,7 @@ static struct fsl_qspi_devtype_data vybrid_data = { +@@ -232,7 +241,7 @@ static struct fsl_qspi_devtype_data vybr .driver_data = QUADSPI_QUIRK_SWAP_ENDIAN, }; @@ -99,7 +95,7 @@ index 5c82e4ef..33ecc27a 100644 .devtype = FSL_QUADSPI_IMX6SX, .rxfifo = 128, .txfifo = 512, -@@ -241,7 +250,7 @@ static struct fsl_qspi_devtype_data imx6sx_data = { +@@ -241,7 +250,7 @@ static struct fsl_qspi_devtype_data imx6 | QUADSPI_QUIRK_TKT245618, }; @@ -108,7 +104,7 @@ index 5c82e4ef..33ecc27a 100644 .devtype = FSL_QUADSPI_IMX7D, .rxfifo = 512, .txfifo = 512, -@@ -250,7 +259,7 @@ static struct fsl_qspi_devtype_data imx7d_data = { +@@ -250,7 +259,7 @@ static struct fsl_qspi_devtype_data imx7 | QUADSPI_QUIRK_4X_INT_CLK, }; @@ -117,7 +113,7 @@ index 5c82e4ef..33ecc27a 100644 .devtype = FSL_QUADSPI_IMX6UL, .rxfifo = 128, .txfifo = 512, -@@ -267,6 +276,14 @@ static struct fsl_qspi_devtype_data ls1021a_data = { +@@ -267,6 +276,14 @@ static struct fsl_qspi_devtype_data ls10 .driver_data = 0, }; @@ -140,7 +136,7 @@ index 5c82e4ef..33ecc27a 100644 unsigned int chip_base_addr; /* We may support two chips. */ bool has_second_chip; bool big_endian; -@@ -309,6 +327,23 @@ static inline int needs_wakeup_wait_mode(struct fsl_qspi *q) +@@ -309,6 +327,23 @@ static inline int needs_wakeup_wait_mode return q->devtype_data->driver_data & QUADSPI_QUIRK_TKT245618; } @@ -164,7 +160,7 @@ index 5c82e4ef..33ecc27a 100644 /* * R/W functions for big- or little-endian registers: * The qSPI controller's endian is independent of the CPU core's endian. -@@ -331,6 +366,31 @@ static u32 qspi_readl(struct fsl_qspi *q, void __iomem *addr) +@@ -331,6 +366,31 @@ static u32 qspi_readl(struct fsl_qspi *q return ioread32(addr); } @@ -196,7 +192,7 @@ index 5c82e4ef..33ecc27a 100644 /* * An IC bug makes us to re-arrange the 32-bit data. * The following chips, such as IMX6SLX, have fixed this bug. -@@ -373,8 +433,15 @@ static void fsl_qspi_init_lut(struct fsl_qspi *q) +@@ -373,8 +433,15 @@ static void fsl_qspi_init_lut(struct fsl void __iomem *base = q->iobase; int rxfifo = q->devtype_data->rxfifo; u32 lut_base; @@ -213,13 +209,15 @@ index 5c82e4ef..33ecc27a 100644 fsl_qspi_unlock_lut(q); -@@ -382,25 +449,51 @@ static void fsl_qspi_init_lut(struct fsl_qspi *q) +@@ -382,24 +449,50 @@ static void fsl_qspi_init_lut(struct fsl for (i = 0; i < QUADSPI_LUT_NUM; i++) qspi_writel(q, 0, base + QUADSPI_LUT_BASE + i * 4); - /* Quad Read */ - lut_base = SEQID_QUAD_READ * 4; -- ++ /* Read */ ++ lut_base = SEQID_READ * 4; + - if (q->nor_size <= SZ_16M) { - cmd = SPINOR_OP_READ_1_1_4; - addrlen = ADDR24BIT; @@ -232,9 +230,6 @@ index 5c82e4ef..33ecc27a 100644 - } - - qspi_writel(q, LUT0(CMD, PAD1, cmd) | LUT1(ADDR, PAD1, addrlen), -+ /* Read */ -+ lut_base = SEQID_READ * 4; -+ + if (nor->flash_read == SPI_NOR_FAST) { + qspi_writel(q, LUT0(CMD, PAD1, read_op) | + LUT1(ADDR, PAD1, addrlen), @@ -247,10 +242,11 @@ index 5c82e4ef..33ecc27a 100644 + read_op = 0xEC; + qspi_writel(q, + LUT0(CMD, PAD1, read_op) | LUT1(ADDR, PAD4, addrlen), -+ base + QUADSPI_LUT(lut_base)); + base + QUADSPI_LUT(lut_base)); +- qspi_writel(q, LUT0(DUMMY, PAD1, dummy) | LUT1(FSL_READ, PAD4, rxfifo), + qspi_writel(q, + LUT0(MODE, PAD4, 0xff) | LUT1(DUMMY, PAD4, read_dm), -+ base + QUADSPI_LUT(lut_base + 1)); + base + QUADSPI_LUT(lut_base + 1)); + qspi_writel(q, + LUT0(FSL_READ, PAD4, rxfifo), + base + QUADSPI_LUT(lut_base + 2)); @@ -266,22 +262,20 @@ index 5c82e4ef..33ecc27a 100644 + /* read mode : 1-4-4, such as Spansion s25fl128s. */ + qspi_writel(q, LUT0(CMD, PAD1, read_op) + | LUT1(ADDR_DDR, PAD4, addrlen), - base + QUADSPI_LUT(lut_base)); -- qspi_writel(q, LUT0(DUMMY, PAD1, dummy) | LUT1(FSL_READ, PAD4, rxfifo), ++ base + QUADSPI_LUT(lut_base)); + + qspi_writel(q, LUT0(MODE_DDR, PAD4, 0xff) + | LUT1(DUMMY, PAD1, read_dm), - base + QUADSPI_LUT(lut_base + 1)); - ++ base + QUADSPI_LUT(lut_base + 1)); ++ + qspi_writel(q, LUT0(FSL_READ_DDR, PAD4, rxfifo) + | LUT1(JMP_ON_CS, PAD1, 0), + base + QUADSPI_LUT(lut_base + 2)); + } -+ + /* Write enable */ lut_base = SEQID_WREN * 4; - qspi_writel(q, LUT0(CMD, PAD1, SPINOR_OP_WREN), -@@ -409,16 +502,8 @@ static void fsl_qspi_init_lut(struct fsl_qspi *q) +@@ -409,16 +502,8 @@ static void fsl_qspi_init_lut(struct fsl /* Page Program */ lut_base = SEQID_PP * 4; @@ -300,7 +294,7 @@ index 5c82e4ef..33ecc27a 100644 base + QUADSPI_LUT(lut_base)); qspi_writel(q, LUT0(FSL_WRITE, PAD1, 0), base + QUADSPI_LUT(lut_base + 1)); -@@ -432,10 +517,8 @@ static void fsl_qspi_init_lut(struct fsl_qspi *q) +@@ -432,10 +517,8 @@ static void fsl_qspi_init_lut(struct fsl /* Erase a sector */ lut_base = SEQID_SE * 4; @@ -313,7 +307,7 @@ index 5c82e4ef..33ecc27a 100644 base + QUADSPI_LUT(lut_base)); /* Erase the whole chip */ -@@ -476,6 +559,44 @@ static void fsl_qspi_init_lut(struct fsl_qspi *q) +@@ -476,6 +559,44 @@ static void fsl_qspi_init_lut(struct fsl qspi_writel(q, LUT0(CMD, PAD1, SPINOR_OP_BRWR), base + QUADSPI_LUT(lut_base)); @@ -358,7 +352,7 @@ index 5c82e4ef..33ecc27a 100644 fsl_qspi_lock_lut(q); } -@@ -483,8 +604,24 @@ static void fsl_qspi_init_lut(struct fsl_qspi *q) +@@ -483,8 +604,24 @@ static void fsl_qspi_init_lut(struct fsl static int fsl_qspi_get_seqid(struct fsl_qspi *q, u8 cmd) { switch (cmd) { @@ -384,7 +378,7 @@ index 5c82e4ef..33ecc27a 100644 case SPINOR_OP_WREN: return SEQID_WREN; case SPINOR_OP_WRDI: -@@ -496,6 +633,7 @@ static int fsl_qspi_get_seqid(struct fsl_qspi *q, u8 cmd) +@@ -496,6 +633,7 @@ static int fsl_qspi_get_seqid(struct fsl case SPINOR_OP_CHIP_ERASE: return SEQID_CHIP_ERASE; case SPINOR_OP_PP: @@ -392,7 +386,7 @@ index 5c82e4ef..33ecc27a 100644 return SEQID_PP; case SPINOR_OP_RDID: return SEQID_RDID; -@@ -507,6 +645,8 @@ static int fsl_qspi_get_seqid(struct fsl_qspi *q, u8 cmd) +@@ -507,6 +645,8 @@ static int fsl_qspi_get_seqid(struct fsl return SEQID_EN4B; case SPINOR_OP_BRWR: return SEQID_BRWR; @@ -401,7 +395,7 @@ index 5c82e4ef..33ecc27a 100644 default: if (cmd == q->nor[0].erase_opcode) return SEQID_SE; -@@ -531,8 +671,11 @@ fsl_qspi_runcmd(struct fsl_qspi *q, u8 cmd, unsigned int addr, int len) +@@ -531,8 +671,11 @@ fsl_qspi_runcmd(struct fsl_qspi *q, u8 c /* save the reg */ reg = qspi_readl(q, base + QUADSPI_MCR); @@ -415,7 +409,7 @@ index 5c82e4ef..33ecc27a 100644 qspi_writel(q, QUADSPI_RBCT_WMRK_MASK | QUADSPI_RBCT_RXBRD_USEIPS, base + QUADSPI_RBCT); qspi_writel(q, reg | QUADSPI_MCR_CLR_RXF_MASK, base + QUADSPI_MCR); -@@ -582,10 +725,10 @@ static void fsl_qspi_read_data(struct fsl_qspi *q, int len, u8 *rxbuf) +@@ -582,10 +725,10 @@ static void fsl_qspi_read_data(struct fs q->chip_base_addr, tmp); if (len >= 4) { @@ -428,7 +422,7 @@ index 5c82e4ef..33ecc27a 100644 break; } -@@ -619,11 +762,12 @@ static inline void fsl_qspi_invalid(struct fsl_qspi *q) +@@ -619,11 +762,12 @@ static inline void fsl_qspi_invalid(stru } static ssize_t fsl_qspi_nor_write(struct fsl_qspi *q, struct spi_nor *nor, @@ -442,7 +436,7 @@ index 5c82e4ef..33ecc27a 100644 dev_dbg(q->dev, "to 0x%.8x:0x%.8x, len : %d\n", q->chip_base_addr, to, count); -@@ -633,10 +777,13 @@ static ssize_t fsl_qspi_nor_write(struct fsl_qspi *q, struct spi_nor *nor, +@@ -633,10 +777,13 @@ static ssize_t fsl_qspi_nor_write(struct qspi_writel(q, tmp | QUADSPI_MCR_CLR_TXF_MASK, q->iobase + QUADSPI_MCR); /* fill the TX data to the FIFO */ @@ -458,7 +452,7 @@ index 5c82e4ef..33ecc27a 100644 } /* fill the TXFIFO upto 16 bytes for i.MX7d */ -@@ -657,11 +804,43 @@ static void fsl_qspi_set_map_addr(struct fsl_qspi *q) +@@ -657,11 +804,43 @@ static void fsl_qspi_set_map_addr(struct { int nor_size = q->nor_size; void __iomem *base = q->iobase; @@ -506,7 +500,7 @@ index 5c82e4ef..33ecc27a 100644 } /* -@@ -704,6 +883,11 @@ static void fsl_qspi_init_abh_read(struct fsl_qspi *q) +@@ -704,6 +883,11 @@ static void fsl_qspi_init_abh_read(struc seqid = fsl_qspi_get_seqid(q, q->nor[0].read_opcode); qspi_writel(q, seqid << QUADSPI_BFGENCR_SEQID_SHIFT, q->iobase + QUADSPI_BFGENCR); @@ -518,7 +512,7 @@ index 5c82e4ef..33ecc27a 100644 } /* This function was used to prepare and enable QSPI clock */ -@@ -822,6 +1006,7 @@ static const struct of_device_id fsl_qspi_dt_ids[] = { +@@ -822,6 +1006,7 @@ static const struct of_device_id fsl_qsp { .compatible = "fsl,imx7d-qspi", .data = (void *)&imx7d_data, }, { .compatible = "fsl,imx6ul-qspi", .data = (void *)&imx6ul_data, }, { .compatible = "fsl,ls1021a-qspi", .data = (void *)&ls1021a_data, }, @@ -526,7 +520,7 @@ index 5c82e4ef..33ecc27a 100644 { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, fsl_qspi_dt_ids); -@@ -835,8 +1020,12 @@ static int fsl_qspi_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) +@@ -835,8 +1020,12 @@ static int fsl_qspi_read_reg(struct spi_ { int ret; struct fsl_qspi *q = nor->priv; @@ -540,7 +534,7 @@ index 5c82e4ef..33ecc27a 100644 if (ret) return ret; -@@ -848,9 +1037,13 @@ static int fsl_qspi_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) +@@ -848,9 +1037,13 @@ static int fsl_qspi_write_reg(struct spi { struct fsl_qspi *q = nor->priv; int ret; @@ -555,7 +549,7 @@ index 5c82e4ef..33ecc27a 100644 if (ret) return ret; -@@ -859,7 +1052,7 @@ static int fsl_qspi_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) +@@ -859,7 +1052,7 @@ static int fsl_qspi_write_reg(struct spi } else if (len > 0) { ret = fsl_qspi_nor_write(q, nor, opcode, 0, @@ -564,7 +558,7 @@ index 5c82e4ef..33ecc27a 100644 if (ret > 0) return 0; } else { -@@ -875,7 +1068,7 @@ static ssize_t fsl_qspi_write(struct spi_nor *nor, loff_t to, +@@ -875,7 +1068,7 @@ static ssize_t fsl_qspi_write(struct spi { struct fsl_qspi *q = nor->priv; ssize_t ret = fsl_qspi_nor_write(q, nor, nor->program_opcode, to, @@ -573,7 +567,7 @@ index 5c82e4ef..33ecc27a 100644 /* invalid the data in the AHB buffer. */ fsl_qspi_invalid(q); -@@ -922,7 +1115,7 @@ static ssize_t fsl_qspi_read(struct spi_nor *nor, loff_t from, +@@ -922,7 +1115,7 @@ static ssize_t fsl_qspi_read(struct spi_ len); /* Read out the data directly from the AHB buffer.*/ @@ -582,7 +576,7 @@ index 5c82e4ef..33ecc27a 100644 len); return len; -@@ -980,6 +1173,8 @@ static int fsl_qspi_probe(struct platform_device *pdev) +@@ -980,6 +1173,8 @@ static int fsl_qspi_probe(struct platfor struct spi_nor *nor; struct mtd_info *mtd; int ret, i = 0; @@ -591,7 +585,7 @@ index 5c82e4ef..33ecc27a 100644 q = devm_kzalloc(dev, sizeof(*q), GFP_KERNEL); if (!q) -@@ -1027,6 +1222,12 @@ static int fsl_qspi_probe(struct platform_device *pdev) +@@ -1027,6 +1222,12 @@ static int fsl_qspi_probe(struct platfor goto clk_failed; } @@ -604,7 +598,7 @@ index 5c82e4ef..33ecc27a 100644 /* find the irq */ ret = platform_get_irq(pdev, 0); if (ret < 0) { -@@ -1050,6 +1251,7 @@ static int fsl_qspi_probe(struct platform_device *pdev) +@@ -1050,6 +1251,7 @@ static int fsl_qspi_probe(struct platfor mutex_init(&q->lock); @@ -612,7 +606,7 @@ index 5c82e4ef..33ecc27a 100644 /* iterate the subnodes. */ for_each_available_child_of_node(dev->of_node, np) { /* skip the holes */ -@@ -1076,18 +1278,25 @@ static int fsl_qspi_probe(struct platform_device *pdev) +@@ -1076,18 +1278,25 @@ static int fsl_qspi_probe(struct platfor ret = of_property_read_u32(np, "spi-max-frequency", &q->clk_rate); if (ret < 0) @@ -642,7 +636,7 @@ index 5c82e4ef..33ecc27a 100644 /* Set the correct NOR size now. */ if (q->nor_size == 0) { -@@ -1110,8 +1319,12 @@ static int fsl_qspi_probe(struct platform_device *pdev) +@@ -1110,8 +1319,12 @@ static int fsl_qspi_probe(struct platfor nor->page_size = q->devtype_data->txfifo; i++; @@ -655,8 +649,6 @@ index 5c82e4ef..33ecc27a 100644 /* finish the rest init. */ ret = fsl_qspi_nor_setup_last(q); if (ret) -diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c -index 793d321d..190e0e45 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -40,6 +40,13 @@ @@ -704,7 +696,7 @@ index 793d321d..190e0e45 100644 */ static int read_cr(struct spi_nor *nor) { -@@ -160,6 +170,8 @@ static inline int spi_nor_read_dummy_cycles(struct spi_nor *nor) +@@ -160,6 +170,8 @@ static inline int spi_nor_read_dummy_cyc case SPI_NOR_DUAL: case SPI_NOR_QUAD: return 8; @@ -713,7 +705,7 @@ index 793d321d..190e0e45 100644 case SPI_NOR_NORMAL: return 0; } -@@ -961,6 +973,8 @@ static const struct flash_info spi_nor_ids[] = { +@@ -961,6 +973,8 @@ static const struct flash_info spi_nor_i /* ESMT */ { "f25l32pa", INFO(0x8c2016, 0, 64 * 1024, 64, SECT_4K | SPI_NOR_HAS_LOCK) }, @@ -722,7 +714,7 @@ index 793d321d..190e0e45 100644 /* Everspin */ { "mr25h256", CAT25_INFO( 32 * 1024, 1, 256, 2, SPI_NOR_NO_ERASE | SPI_NOR_NO_FR) }, -@@ -1014,12 +1028,15 @@ static const struct flash_info spi_nor_ids[] = { +@@ -1014,12 +1028,15 @@ static const struct flash_info spi_nor_i { "mx25l3205d", INFO(0xc22016, 0, 64 * 1024, 64, SECT_4K) }, { "mx25l3255e", INFO(0xc29e16, 0, 64 * 1024, 64, SECT_4K) }, { "mx25l6405d", INFO(0xc22017, 0, 64 * 1024, 128, SECT_4K) }, @@ -739,7 +731,7 @@ index 793d321d..190e0e45 100644 { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) }, { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_QUAD_READ) }, { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048, SPI_NOR_QUAD_READ) }, -@@ -1033,10 +1050,11 @@ static const struct flash_info spi_nor_ids[] = { +@@ -1033,10 +1050,11 @@ static const struct flash_info spi_nor_i { "n25q128a11", INFO(0x20bb18, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_QUAD_READ) }, { "n25q128a13", INFO(0x20ba18, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_QUAD_READ) }, { "n25q256a", INFO(0x20ba19, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_QUAD_READ) }, @@ -753,7 +745,7 @@ index 793d321d..190e0e45 100644 /* PMC */ { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) }, -@@ -1054,8 +1072,11 @@ static const struct flash_info spi_nor_ids[] = { +@@ -1054,8 +1072,11 @@ static const struct flash_info spi_nor_i { "s70fl01gs", INFO(0x010221, 0x4d00, 256 * 1024, 256, 0) }, { "s25sl12800", INFO(0x012018, 0x0300, 256 * 1024, 64, 0) }, { "s25sl12801", INFO(0x012018, 0x0301, 64 * 1024, 256, 0) }, @@ -766,7 +758,7 @@ index 793d321d..190e0e45 100644 { "s25fl129p1", INFO(0x012018, 0x4d01, 64 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { "s25sl004a", INFO(0x010212, 0, 64 * 1024, 8, 0) }, { "s25sl008a", INFO(0x010213, 0, 64 * 1024, 16, 0) }, -@@ -1130,6 +1151,9 @@ static const struct flash_info spi_nor_ids[] = { +@@ -1130,6 +1151,9 @@ static const struct flash_info spi_nor_i { "w25x80", INFO(0xef3014, 0, 64 * 1024, 16, SECT_4K) }, { "w25x16", INFO(0xef3015, 0, 64 * 1024, 32, SECT_4K) }, { "w25x32", INFO(0xef3016, 0, 64 * 1024, 64, SECT_4K) }, @@ -776,7 +768,7 @@ index 793d321d..190e0e45 100644 { "w25q32", INFO(0xef4016, 0, 64 * 1024, 64, SECT_4K) }, { "w25q32dw", INFO(0xef6016, 0, 64 * 1024, 64, -@@ -1192,6 +1216,53 @@ static const struct flash_info *spi_nor_read_id(struct spi_nor *nor) +@@ -1192,6 +1216,53 @@ static const struct flash_info *spi_nor_ id[0], id[1], id[2]); return ERR_PTR(-ENODEV); } @@ -830,7 +822,7 @@ index 793d321d..190e0e45 100644 static int spi_nor_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) -@@ -1411,7 +1482,7 @@ static int macronix_quad_enable(struct spi_nor *nor) +@@ -1411,7 +1482,7 @@ static int macronix_quad_enable(struct s * Write status Register and configuration register with 2 bytes * The first byte will be written to the status register, while the * second byte will be written to the configuration register. @@ -839,7 +831,7 @@ index 793d321d..190e0e45 100644 */ static int write_sr_cr(struct spi_nor *nor, u16 val) { -@@ -1459,6 +1530,24 @@ static int spansion_quad_enable(struct spi_nor *nor) +@@ -1459,6 +1530,24 @@ static int spansion_quad_enable(struct s return 0; } @@ -864,7 +856,7 @@ index 793d321d..190e0e45 100644 static int set_quad_mode(struct spi_nor *nor, const struct flash_info *info) { int status; -@@ -1604,9 +1693,25 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode) +@@ -1604,9 +1693,25 @@ int spi_nor_scan(struct spi_nor *nor, co write_sr(nor, 0); spi_nor_wait_till_ready(nor); } @@ -890,7 +882,7 @@ index 793d321d..190e0e45 100644 mtd->priv = nor; mtd->type = MTD_NORFLASH; mtd->writesize = 1; -@@ -1639,6 +1744,8 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode) +@@ -1639,6 +1744,8 @@ int spi_nor_scan(struct spi_nor *nor, co nor->flags |= SNOR_F_USE_FSR; if (info->flags & SPI_NOR_HAS_TB) nor->flags |= SNOR_F_HAS_SR_TB; @@ -899,7 +891,7 @@ index 793d321d..190e0e45 100644 #ifdef CONFIG_MTD_SPI_NOR_USE_4K_SECTORS /* prefer "small sector" erase if possible */ -@@ -1676,9 +1783,15 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode) +@@ -1678,9 +1785,15 @@ int spi_nor_scan(struct spi_nor *nor, co /* Some devices cannot do fast-read, no matter what DT tells us */ if (info->flags & SPI_NOR_NO_FR) nor->flash_read = SPI_NOR_NORMAL; @@ -918,7 +910,7 @@ index 793d321d..190e0e45 100644 ret = set_quad_mode(nor, info); if (ret) { dev_err(dev, "quad mode not supported\n"); -@@ -1691,6 +1804,9 @@ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode) +@@ -1693,6 +1806,9 @@ int spi_nor_scan(struct spi_nor *nor, co /* Default commands */ switch (nor->flash_read) { @@ -928,8 +920,6 @@ index 793d321d..190e0e45 100644 case SPI_NOR_QUAD: nor->read_opcode = SPINOR_OP_READ_1_1_4; break; -diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h -index f2a71803..5003ff64 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -31,10 +31,10 @@ @@ -994,6 +984,3 @@ index f2a71803..5003ff64 100644 int (*prepare)(struct spi_nor *nor, enum spi_nor_ops ops); void (*unprepare)(struct spi_nor *nor, enum spi_nor_ops ops); --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/701-sdk_dpaa-support-layerscape.patch b/target/linux/layerscape/patches-4.9/701-sdk_dpaa-support-layerscape.patch index f048788165..4ebcdc73a0 100644 --- a/target/linux/layerscape/patches-4.9/701-sdk_dpaa-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/701-sdk_dpaa-support-layerscape.patch @@ -527,9 +527,6 @@ Signed-off-by: Yangbo Lu create mode 100644 include/uapi/linux/fmd/ioctls.h create mode 100644 include/uapi/linux/fmd/net_ioctls.h -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/Kconfig b/drivers/net/ethernet/freescale/sdk_dpaa/Kconfig -new file mode 100644 -index 00000000..92118b76 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/Kconfig @@ -0,0 +1,173 @@ @@ -706,9 +703,6 @@ index 00000000..92118b76 + # cat /sys/kernel/debug/powerpc/fsl_dpa/eth4_loop + 4->5 +endif # FSL_SDK_DPAA_ETH -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/Makefile b/drivers/net/ethernet/freescale/sdk_dpaa/Makefile -new file mode 100644 -index 00000000..a0f4b190 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/Makefile @@ -0,0 +1,46 @@ @@ -758,9 +752,6 @@ index 00000000..a0f4b190 + +# Needed by the tracing framework +CFLAGS_dpaa_eth.o := -I$(src) -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_1588.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_1588.c -new file mode 100644 -index 00000000..3bf8cbca --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_1588.c @@ -0,0 +1,580 @@ @@ -1344,9 +1335,6 @@ index 00000000..3bf8cbca + kfree(tsu); +} +EXPORT_SYMBOL(dpa_ptp_cleanup); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_1588.h b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_1588.h -new file mode 100644 -index 00000000..73390168 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_1588.h @@ -0,0 +1,138 @@ @@ -1488,9 +1476,6 @@ index 00000000..73390168 + struct sk_buff *skb, void *data); +extern int dpa_ioctl_1588(struct net_device *dev, struct ifreq *ifr, int cmd); +#endif -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_debugfs.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_debugfs.c -new file mode 100644 -index 00000000..25d9f5f1 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_debugfs.c @@ -0,0 +1,180 @@ @@ -1674,9 +1659,6 @@ index 00000000..25d9f5f1 +{ + debugfs_remove(dpa_debugfs_root); +} -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_debugfs.h b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_debugfs.h -new file mode 100644 -index 00000000..63d35427 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_debugfs.h @@ -0,0 +1,43 @@ @@ -1723,9 +1705,6 @@ index 00000000..63d35427 +void __exit dpa_debugfs_module_exit(void); + +#endif /* DPAA_DEBUGFS_H_ */ -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.c -new file mode 100644 -index 00000000..7026f916 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.c @@ -0,0 +1,1213 @@ @@ -2942,9 +2921,6 @@ index 00000000..7026f916 + KBUILD_BASENAME".c", __func__); +} +module_exit(dpa_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.h b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.h -new file mode 100644 -index 00000000..57c9bef4 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth.h @@ -0,0 +1,687 @@ @@ -3635,9 +3611,6 @@ index 00000000..57c9bef4 +#endif /* !CONFIG_PPC */ + +#endif /* __DPA_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_base.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_base.c -new file mode 100644 -index 00000000..507e77c3 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_base.c @@ -0,0 +1,205 @@ @@ -3846,9 +3819,6 @@ index 00000000..507e77c3 + +} +module_exit(dpa_advanced_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_base.h b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_base.h -new file mode 100644 -index 00000000..6ec68c3c --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_base.h @@ -0,0 +1,49 @@ @@ -3901,9 +3871,6 @@ index 00000000..6ec68c3c + size_t count); + +#endif /* __DPAA_ETH_BASE_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.c -new file mode 100644 -index 00000000..cac613b7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.c @@ -0,0 +1,1992 @@ @@ -5899,9 +5866,6 @@ index 00000000..cac613b7 + +module_init(ceetm_register); +module_exit(ceetm_unregister); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.h b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.h -new file mode 100644 -index 00000000..63cc3475 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_ceetm.h @@ -0,0 +1,237 @@ @@ -6142,9 +6106,6 @@ index 00000000..63cc3475 + +int __hot ceetm_tx(struct sk_buff *skb, struct net_device *net_dev); +#endif -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_common.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_common.c -new file mode 100644 -index 00000000..19a8a3c3 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_common.c @@ -0,0 +1,1820 @@ @@ -7968,9 +7929,6 @@ index 00000000..19a8a3c3 +} +EXPORT_SYMBOL(dpa_disable_ceetm); +#endif -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_common.h b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_common.h -new file mode 100644 -index 00000000..41db4302 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_common.h @@ -0,0 +1,225 @@ @@ -8199,9 +8157,6 @@ index 00000000..41db4302 + struct net_device *net_dev); + +#endif /* __DPAA_ETH_COMMON_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_proxy.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_proxy.c -new file mode 100644 -index 00000000..994d38cd --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_proxy.c @@ -0,0 +1,381 @@ @@ -8586,9 +8541,6 @@ index 00000000..994d38cd + KBUILD_BASENAME".c", __func__); +} +module_exit(dpa_proxy_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sg.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sg.c -new file mode 100644 -index 00000000..32e62e6d --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sg.c @@ -0,0 +1,1168 @@ @@ -9760,9 +9712,6 @@ index 00000000..32e62e6d + return NETDEV_TX_OK; +} +EXPORT_SYMBOL(dpa_tx_extended); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sysfs.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sysfs.c -new file mode 100644 -index 00000000..3542d0b2 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sysfs.c @@ -0,0 +1,278 @@ @@ -10044,9 +9993,6 @@ index 00000000..3542d0b2 + for (i = 0; i < ARRAY_SIZE(dpaa_eth_attrs); i++) + device_remove_file(dev, &dpaa_eth_attrs[i]); +} -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_trace.h b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_trace.h -new file mode 100644 -index 00000000..30069ef9 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_trace.h @@ -0,0 +1,144 @@ @@ -10194,9 +10140,6 @@ index 00000000..30069ef9 +#undef TRACE_INCLUDE_FILE +#define TRACE_INCLUDE_FILE dpaa_eth_trace +#include -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_ethtool.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_ethtool.c -new file mode 100644 -index 00000000..4b784662 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_ethtool.c @@ -0,0 +1,544 @@ @@ -10744,9 +10687,6 @@ index 00000000..4b784662 + .set_wol = dpa_set_wol, +#endif +}; -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_ptp.c b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_ptp.c -new file mode 100644 -index 00000000..f54a3d67 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_ptp.c @@ -0,0 +1,291 @@ @@ -11041,9 +10981,6 @@ index 00000000..f54a3d67 + ptp_clock_unregister(clock); +} +module_exit(dpa_ptp_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c b/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c -new file mode 100644 -index 00000000..2c5652d9 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c @@ -0,0 +1,907 @@ @@ -11954,9 +11891,6 @@ index 00000000..2c5652d9 + [XGMAC] = setup_xgmac, + [MEMAC] = setup_memac +}; -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/mac.c b/drivers/net/ethernet/freescale/sdk_dpaa/mac.c -new file mode 100644 -index 00000000..60133b02 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/mac.c @@ -0,0 +1,489 @@ @@ -12449,9 +12383,6 @@ index 00000000..60133b02 + KBUILD_BASENAME".c", __func__); +} +module_exit(mac_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/mac.h b/drivers/net/ethernet/freescale/sdk_dpaa/mac.h -new file mode 100644 -index 00000000..b5288f2a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/mac.h @@ -0,0 +1,135 @@ @@ -12590,9 +12521,6 @@ index 00000000..b5288f2a +void get_pause_cfg(struct mac_device *mac_dev, bool *rx_pause, bool *tx_pause); + +#endif /* __MAC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/offline_port.c b/drivers/net/ethernet/freescale/sdk_dpaa/offline_port.c -new file mode 100644 -index 00000000..fb084af5 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/offline_port.c @@ -0,0 +1,848 @@ @@ -13444,9 +13372,6 @@ index 00000000..fb084af5 + KBUILD_BASENAME".c", __func__); +} +module_exit(oh_port_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_dpaa/offline_port.h b/drivers/net/ethernet/freescale/sdk_dpaa/offline_port.h -new file mode 100644 -index 00000000..432ee88d --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_dpaa/offline_port.h @@ -0,0 +1,59 @@ @@ -13509,9 +13434,6 @@ index 00000000..432ee88d +}; + +#endif /* __OFFLINE_PORT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Kconfig b/drivers/net/ethernet/freescale/sdk_fman/Kconfig -new file mode 100644 -index 00000000..d98c0989 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Kconfig @@ -0,0 +1,153 @@ @@ -13668,9 +13590,6 @@ index 00000000..d98c0989 +endif # FSL_SDK_FMAN + +endmenu -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Makefile -new file mode 100644 -index 00000000..25ce7e6a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Makefile @@ -0,0 +1,11 @@ @@ -13685,9 +13604,6 @@ index 00000000..25ce7e6a +obj-y += etc/ +obj-y += Peripherals/FM/ +obj-y += src/ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/HC/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/HC/Makefile -new file mode 100644 -index 00000000..d0e76727 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/HC/Makefile @@ -0,0 +1,15 @@ @@ -13706,9 +13622,6 @@ index 00000000..d0e76727 +obj-y += fsl-ncsw-Hc.o + +fsl-ncsw-Hc-objs := hc.o -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/HC/hc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/HC/hc.c -new file mode 100644 -index 00000000..363c8f95 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/HC/hc.c @@ -0,0 +1,1232 @@ @@ -14944,9 +14857,6 @@ index 00000000..363c8f95 + t_FmHc *p_FmHc = (t_FmHc*)h_FmHc; + return p_FmHc->h_HcPortDev; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/Makefile -new file mode 100644 -index 00000000..f6b090da --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/Makefile @@ -0,0 +1,28 @@ @@ -14978,9 +14888,6 @@ index 00000000..f6b090da +fsl-ncsw-MAC-objs += memac.o memac_mii_acc.o fman_memac_mii_acc.o +endif + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec.c -new file mode 100644 -index 00000000..38948f97 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec.c @@ -0,0 +1,1465 @@ @@ -16449,9 +16356,6 @@ index 00000000..38948f97 + + return p_Dtsec; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec.h -new file mode 100644 -index 00000000..c26f40cc --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec.h @@ -0,0 +1,228 @@ @@ -16683,9 +16587,6 @@ index 00000000..c26f40cc + + +#endif /* __DTSEC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec_mii_acc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec_mii_acc.c -new file mode 100644 -index 00000000..87da25ff --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec_mii_acc.c @@ -0,0 +1,97 @@ @@ -16786,9 +16687,6 @@ index 00000000..87da25ff + return E_OK; +} + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec_mii_acc.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec_mii_acc.h -new file mode 100644 -index 00000000..75cc658a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/dtsec_mii_acc.h @@ -0,0 +1,42 @@ @@ -16834,9 +16732,6 @@ index 00000000..75cc658a +t_Error DTSEC_MII_ReadPhyReg(t_Handle h_Dtsec, uint8_t phyAddr, uint8_t reg, uint16_t *p_Data); + +#endif /* __DTSEC_MII_ACC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fm_mac.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fm_mac.c -new file mode 100644 -index 00000000..caf3940a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fm_mac.c @@ -0,0 +1,674 @@ @@ -17514,9 +17409,6 @@ index 00000000..caf3940a + RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG); +} +#endif /* (defined(DEBUG_ERRORS) && ... */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fm_mac.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fm_mac.h -new file mode 100644 -index 00000000..ba3b9133 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fm_mac.h @@ -0,0 +1,226 @@ @@ -17746,9 +17638,6 @@ index 00000000..ba3b9133 + + +#endif /* __FM_MAC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_crc32.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_crc32.c -new file mode 100644 -index 00000000..b6a4ca25 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_crc32.c @@ -0,0 +1,119 @@ @@ -17871,9 +17760,6 @@ index 00000000..b6a4ca25 + crc = get_mirror32(crc); + return crc; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_crc32.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_crc32.h -new file mode 100644 -index 00000000..6e32fdc6 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_crc32.h @@ -0,0 +1,43 @@ @@ -17920,9 +17806,6 @@ index 00000000..6e32fdc6 + + +#endif /* __FMAN_CRC32_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_dtsec.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_dtsec.c -new file mode 100644 -index 00000000..5b092865 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_dtsec.c @@ -0,0 +1,845 @@ @@ -18771,9 +18654,6 @@ index 00000000..5b092865 + + return ret_val; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_dtsec_mii_acc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_dtsec_mii_acc.c -new file mode 100644 -index 00000000..8819f8fc --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_dtsec_mii_acc.c @@ -0,0 +1,163 @@ @@ -18940,9 +18820,6 @@ index 00000000..8819f8fc + return 0; +} + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_memac.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_memac.c -new file mode 100644 -index 00000000..f31a92a2 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_memac.c @@ -0,0 +1,532 @@ @@ -19478,9 +19355,6 @@ index 00000000..f31a92a2 + cfg->debug_mode = FALSE; + cfg->wake_on_lan = FALSE; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_memac_mii_acc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_memac_mii_acc.c -new file mode 100755 -index 00000000..ccda11ec --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_memac_mii_acc.c @@ -0,0 +1,213 @@ @@ -19697,9 +19571,6 @@ index 00000000..ccda11ec + +/* ......................................................................... */ + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_tgec.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_tgec.c -new file mode 100644 -index 00000000..fff9d5de --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/fman_tgec.c @@ -0,0 +1,367 @@ @@ -20070,9 +19941,6 @@ index 00000000..fff9d5de + + iowrite32be(tmp, ®s->tx_ipg_len); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac.c -new file mode 100644 -index 00000000..0f299e72 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac.c @@ -0,0 +1,1153 @@ @@ -21229,9 +21097,6 @@ index 00000000..0f299e72 + + return p_Memac; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac.h -new file mode 100644 -index 00000000..2fd89dae --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac.h @@ -0,0 +1,110 @@ @@ -21345,9 +21210,6 @@ index 00000000..2fd89dae + + +#endif /* __MEMAC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac_mii_acc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac_mii_acc.c -new file mode 100644 -index 00000000..56eaffbc --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac_mii_acc.c @@ -0,0 +1,78 @@ @@ -21429,9 +21291,6 @@ index 00000000..56eaffbc + p_Data, + (enum enet_speed)ENET_SPEED_FROM_MODE(p_Memac->enetMode)); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac_mii_acc.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac_mii_acc.h -new file mode 100644 -index 00000000..325ec082 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/memac_mii_acc.h @@ -0,0 +1,73 @@ @@ -21508,9 +21367,6 @@ index 00000000..325ec082 + + +#endif /* __MEMAC_MII_ACC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec.c -new file mode 100644 -index 00000000..eb00759f --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec.c @@ -0,0 +1,1017 @@ @@ -22531,9 +22387,6 @@ index 00000000..eb00759f + + return p_Tgec; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec.h -new file mode 100644 -index 00000000..2aa39238 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec.h @@ -0,0 +1,151 @@ @@ -22688,9 +22541,6 @@ index 00000000..2aa39238 + + +#endif /* __TGEC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec_mii_acc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec_mii_acc.c -new file mode 100644 -index 00000000..e0fafd1d --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec_mii_acc.c @@ -0,0 +1,139 @@ @@ -22833,9 +22683,6 @@ index 00000000..e0fafd1d + + return E_OK; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec_mii_acc.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec_mii_acc.h -new file mode 100644 -index 00000000..645cdde5 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MAC/tgec_mii_acc.h @@ -0,0 +1,80 @@ @@ -22919,9 +22766,6 @@ index 00000000..645cdde5 + + +#endif /* __TGEC_MII_ACC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/Makefile -new file mode 100644 -index 00000000..bfa02f5e --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/Makefile @@ -0,0 +1,15 @@ @@ -22940,9 +22784,6 @@ index 00000000..bfa02f5e +obj-y += fsl-ncsw-macsec.o + +fsl-ncsw-macsec-objs := fm_macsec.o fm_macsec_guest.o fm_macsec_master.o fm_macsec_secy.o -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec.c -new file mode 100644 -index 00000000..0a1b31f1 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec.c @@ -0,0 +1,237 @@ @@ -23183,9 +23024,6 @@ index 00000000..0a1b31f1 + RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG); +} + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec.h -new file mode 100644 -index 00000000..fbe51875 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec.h @@ -0,0 +1,203 @@ @@ -23392,9 +23230,6 @@ index 00000000..fbe51875 + + +#endif /* __FM_MACSEC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_guest.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_guest.c -new file mode 100644 -index 00000000..31d789d0 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_guest.c @@ -0,0 +1,59 @@ @@ -23457,9 +23292,6 @@ index 00000000..31d789d0 + UNUSED(p_FmMacsecParam); + return NULL; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_master.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_master.c -new file mode 100644 -index 00000000..623612ac --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_master.c @@ -0,0 +1,1031 @@ @@ -24494,9 +24326,6 @@ index 00000000..623612ac + } + return p_FmMacsec; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_master.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_master.h -new file mode 100644 -index 00000000..2296a0f1 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_master.h @@ -0,0 +1,479 @@ @@ -24979,9 +24808,6 @@ index 00000000..2296a0f1 + + +#endif /* __FM_MACSEC_MASTER_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_secy.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_secy.c -new file mode 100644 -index 00000000..7c72dc98 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_secy.c @@ -0,0 +1,883 @@ @@ -25868,9 +25694,6 @@ index 00000000..7c72dc98 + RETURN_ERROR(MINOR, E_NOT_SUPPORTED, NO_MSG); +} + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_secy.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_secy.h -new file mode 100644 -index 00000000..0cf624e6 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/MACSEC/fm_macsec_secy.h @@ -0,0 +1,144 @@ @@ -26018,9 +25841,6 @@ index 00000000..0cf624e6 + + +#endif /* __FM_MACSEC_SECY_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Makefile -new file mode 100644 -index 00000000..619f6608 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Makefile @@ -0,0 +1,23 @@ @@ -26047,9 +25867,6 @@ index 00000000..619f6608 +obj-y += HC/ +obj-y += Rtc/ +obj-y += MACSEC/ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/Makefile -new file mode 100644 -index 00000000..62fbd73c --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/Makefile @@ -0,0 +1,26 @@ @@ -26079,9 +25896,6 @@ index 00000000..62fbd73c +fsl-ncsw-Pcd-objs += fm_replic.o +endif + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/crc64.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/crc64.h -new file mode 100644 -index 00000000..335ee681 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/crc64.h @@ -0,0 +1,360 @@ @@ -26445,9 +26259,6 @@ index 00000000..335ee681 + + +#endif /* __CRC64_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_cc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_cc.c -new file mode 100644 -index 00000000..17c933b4 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_cc.c @@ -0,0 +1,7582 @@ @@ -34033,9 +33844,6 @@ index 00000000..17c933b4 + + return FM_PCD_MatchTableGetMissStatistics(h_HashBucket, p_MissStatistics); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_cc.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_cc.h -new file mode 100644 -index 00000000..3456bb56 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_cc.h @@ -0,0 +1,399 @@ @@ -34438,9 +34246,6 @@ index 00000000..3456bb56 + + +#endif /* __FM_CC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_kg.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_kg.c -new file mode 100644 -index 00000000..f183d2f9 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_kg.c @@ -0,0 +1,3242 @@ @@ -37686,9 +37491,6 @@ index 00000000..f183d2f9 + WRITE_UINT32(p_Regs->fmkg_gdv1r,value); + return E_OK; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_kg.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_kg.h -new file mode 100644 -index 00000000..cb7521a1 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_kg.h @@ -0,0 +1,206 @@ @@ -37898,9 +37700,6 @@ index 00000000..cb7521a1 + + +#endif /* __FM_KG_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_manip.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_manip.c -new file mode 100644 -index 00000000..113777e5 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_manip.c @@ -0,0 +1,5571 @@ @@ -43475,9 +43274,6 @@ index 00000000..113777e5 + return p_Manip; +} +#endif /* (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10)) */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_manip.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_manip.h -new file mode 100644 -index 00000000..853bb834 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_manip.h @@ -0,0 +1,555 @@ @@ -44036,9 +43832,6 @@ index 00000000..853bb834 + + +#endif /* __FM_MANIP_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd.c -new file mode 100644 -index 00000000..91f70a1a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd.c @@ -0,0 +1,2095 @@ @@ -46137,9 +45930,6 @@ index 00000000..91f70a1a + return FmHcGetPort(p_FmPcd->h_Hc); +} + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd.h -new file mode 100644 -index 00000000..27ec9c5b --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd.h @@ -0,0 +1,543 @@ @@ -46686,9 +46476,6 @@ index 00000000..27ec9c5b + + +#endif /* __FM_PCD_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd_ipc.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd_ipc.h -new file mode 100644 -index 00000000..325d3e33 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_pcd_ipc.h @@ -0,0 +1,280 @@ @@ -46972,9 +46759,6 @@ index 00000000..325d3e33 + + +#endif /* __FM_PCD_IPC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_plcr.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_plcr.c -new file mode 100644 -index 00000000..e3753305 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_plcr.c @@ -0,0 +1,1847 @@ @@ -48825,9 +48609,6 @@ index 00000000..e3753305 + + return E_OK; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_plcr.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_plcr.h -new file mode 100644 -index 00000000..2bb8b969 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_plcr.h @@ -0,0 +1,165 @@ @@ -48996,9 +48777,6 @@ index 00000000..2bb8b969 + + +#endif /* __FM_PLCR_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_prs.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_prs.c -new file mode 100644 -index 00000000..ff4f0a2f --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_prs.c @@ -0,0 +1,423 @@ @@ -49425,9 +49203,6 @@ index 00000000..ff4f0a2f + + return E_OK; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_prs.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_prs.h -new file mode 100644 -index 00000000..056f225e --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_prs.h @@ -0,0 +1,316 @@ @@ -49747,9 +49522,6 @@ index 00000000..056f225e + bitMask = 0x80000000>>prsPortId + +#endif /* __FM_PRS_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_replic.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_replic.c -new file mode 100644 -index 00000000..ee82f730 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_replic.c @@ -0,0 +1,984 @@ @@ -50737,9 +50509,6 @@ index 00000000..ee82f730 +/*********************** End of API routines ************************/ + + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_replic.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_replic.h -new file mode 100644 -index 00000000..0e8e8bc0 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fm_replic.h @@ -0,0 +1,101 @@ @@ -50844,9 +50613,6 @@ index 00000000..0e8e8bc0 + + +#endif /* __FM_REPLIC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fman_kg.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fman_kg.c -new file mode 100644 -index 00000000..49b86e8e --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fman_kg.c @@ -0,0 +1,888 @@ @@ -51738,9 +51504,6 @@ index 00000000..49b86e8e + err = fman_kg_write_ar_wait(regs, tmp_reg); + return err; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fman_prs.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fman_prs.c -new file mode 100644 -index 00000000..108779db --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Pcd/fman_prs.c @@ -0,0 +1,129 @@ @@ -51873,9 +51636,6 @@ index 00000000..108779db + else + iowrite32be(0, ®s->fmpr_ppsc); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/Makefile -new file mode 100644 -index 00000000..7d928e0a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/Makefile @@ -0,0 +1,15 @@ @@ -51894,9 +51654,6 @@ index 00000000..7d928e0a +obj-y += fsl-ncsw-Pcd.o + +fsl-ncsw-Pcd-objs := fm_port.o fm_port_im.o fman_port.o -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port.c -new file mode 100644 -index 00000000..ec6e0ed5 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port.c @@ -0,0 +1,6436 @@ @@ -58336,9 +58093,6 @@ index 00000000..ec6e0ed5 + stats->snmpGetNextCnt = snmp_stats->snmpGetNextReqCnt; + return E_OK; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port.h -new file mode 100644 -index 00000000..85986f55 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port.h @@ -0,0 +1,999 @@ @@ -59341,9 +59095,6 @@ index 00000000..85986f55 + + +#endif /* __FM_PORT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port_dsar.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port_dsar.h -new file mode 100755 -index 00000000..95619eff --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port_dsar.h @@ -0,0 +1,494 @@ @@ -59841,9 +59592,6 @@ index 00000000..95619eff + + +#endif /* __FM_PORT_DSAR_H_ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port_im.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port_im.c -new file mode 100644 -index 00000000..8de8f5fd --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port_im.c @@ -0,0 +1,753 @@ @@ -60600,9 +60348,6 @@ index 00000000..8de8f5fd + + return FmPortImRx(p_FmPort); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fman_port.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fman_port.c -new file mode 100755 -index 00000000..60acbf34 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fman_port.c @@ -0,0 +1,1568 @@ @@ -62174,9 +61919,6 @@ index 00000000..60acbf34 + } + return 0; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/Makefile -new file mode 100644 -index 00000000..d2c21d34 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/Makefile @@ -0,0 +1,15 @@ @@ -62195,9 +61937,6 @@ index 00000000..d2c21d34 +obj-y += fsl-ncsw-RTC.o + +fsl-ncsw-RTC-objs := fm_rtc.o fman_rtc.o -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fm_rtc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fm_rtc.c -new file mode 100644 -index 00000000..99de427b --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fm_rtc.c @@ -0,0 +1,692 @@ @@ -62893,9 +62632,6 @@ index 00000000..99de427b + return E_OK; +} +#endif -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fm_rtc.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fm_rtc.h -new file mode 100644 -index 00000000..843ca008 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fm_rtc.h @@ -0,0 +1,96 @@ @@ -62995,9 +62731,6 @@ index 00000000..843ca008 + + +#endif /* __FM_RTC_H__ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fman_rtc.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fman_rtc.c -new file mode 100755 -index 00000000..acdf507e --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Rtc/fman_rtc.c @@ -0,0 +1,334 @@ @@ -63335,9 +63068,6 @@ index 00000000..acdf507e + fman_rtc_set_timer_ctrl(regs, fman_rtc_get_timer_ctrl(regs) | tmpReg); + } +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/Makefile b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/Makefile -new file mode 100644 -index 00000000..fae50ce4 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/Makefile @@ -0,0 +1,15 @@ @@ -63356,9 +63086,6 @@ index 00000000..fae50ce4 +obj-y += fsl-ncsw-sp.o + +fsl-ncsw-sp-objs := fm_sp.o fman_sp.o -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fm_sp.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fm_sp.c -new file mode 100644 -index 00000000..0994f34d --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fm_sp.c @@ -0,0 +1,757 @@ @@ -64119,9 +63846,6 @@ index 00000000..0994f34d +} + +#endif /* (DPAA_VERSION >= 11) */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fm_sp.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fm_sp.h -new file mode 100644 -index 00000000..9c171d85 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fm_sp.h @@ -0,0 +1,85 @@ @@ -64210,9 +63934,6 @@ index 00000000..9c171d85 + + +#endif /* __FM_SP_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fman_sp.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fman_sp.c -new file mode 100755 -index 00000000..0f772e91 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/SP/fman_sp.c @@ -0,0 +1,197 @@ @@ -64413,9 +64134,6 @@ index 00000000..0f772e91 + /* buffer margins - fill spliodn register */ + iowrite32be(liodn_offset, &sp_regs->fm_sp_spliodn); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm.c -new file mode 100644 -index 00000000..a870b47e --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm.c @@ -0,0 +1,5216 @@ @@ -69635,9 +69353,6 @@ index 00000000..a870b47e + WRITE_UINT32(p_Fm->p_FmFpmRegs->fm_rcr, rcr); +} +#endif -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm.h -new file mode 100644 -index 00000000..0bded75d --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm.h @@ -0,0 +1,648 @@ @@ -70289,9 +70004,6 @@ index 00000000..0bded75d + + +#endif /* __FM_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm_ipc.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm_ipc.h -new file mode 100644 -index 00000000..7ce36a76 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm_ipc.h @@ -0,0 +1,465 @@ @@ -70760,9 +70472,6 @@ index 00000000..7ce36a76 + + +#endif /* __FM_IPC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm_muram.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm_muram.c -new file mode 100644 -index 00000000..0bc67cb7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fm_muram.c @@ -0,0 +1,174 @@ @@ -70940,9 +70649,6 @@ index 00000000..0bc67cb7 + + return MM_GetFreeMemSize(p_FmMuram->h_Mem); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fman.c b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fman.c -new file mode 100755 -index 00000000..a41ecd04 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/fman.c @@ -0,0 +1,1398 @@ @@ -72344,9 +72050,6 @@ index 00000000..a41ecd04 + + iowrite32be(tmp, &fpm_rg->fmfp_ee); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_common.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_common.h -new file mode 100644 -index 00000000..204840c9 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_common.h @@ -0,0 +1,1214 @@ @@ -73564,9 +73267,6 @@ index 00000000..204840c9 + + +#endif /* __FM_COMMON_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_hc.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_hc.h -new file mode 100644 -index 00000000..492aa8a3 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_hc.h @@ -0,0 +1,93 @@ @@ -73663,9 +73363,6 @@ index 00000000..492aa8a3 + + +#endif /* __FM_HC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_sp_common.h b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_sp_common.h -new file mode 100644 -index 00000000..f9dd384b --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/inc/fm_sp_common.h @@ -0,0 +1,117 @@ @@ -73786,9 +73483,6 @@ index 00000000..f9dd384b + + +#endif /* __FM_SP_COMMON_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/etc/Makefile b/drivers/net/ethernet/freescale/sdk_fman/etc/Makefile -new file mode 100644 -index 00000000..d03a519c --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/etc/Makefile @@ -0,0 +1,12 @@ @@ -73804,9 +73498,6 @@ index 00000000..d03a519c +obj-y += fsl-ncsw-etc.o + +fsl-ncsw-etc-objs := mm.o memcpy.o sprint.o list.o error.o -diff --git a/drivers/net/ethernet/freescale/sdk_fman/etc/error.c b/drivers/net/ethernet/freescale/sdk_fman/etc/error.c -new file mode 100644 -index 00000000..fead7f50 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/etc/error.c @@ -0,0 +1,95 @@ @@ -73905,9 +73596,6 @@ index 00000000..fead7f50 + return NULL; +} +#endif /* (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0)) */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/etc/list.c b/drivers/net/ethernet/freescale/sdk_fman/etc/list.c -new file mode 100644 -index 00000000..2d044be2 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/etc/list.c @@ -0,0 +1,71 @@ @@ -73982,9 +73670,6 @@ index 00000000..2d044be2 + + return numOfObjs; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/etc/memcpy.c b/drivers/net/ethernet/freescale/sdk_fman/etc/memcpy.c -new file mode 100644 -index 00000000..fa203ec7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/etc/memcpy.c @@ -0,0 +1,620 @@ @@ -74608,9 +74293,6 @@ index 00000000..fa203ec7 + XX_Print("\r\n"); + } +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/etc/mm.c b/drivers/net/ethernet/freescale/sdk_fman/etc/mm.c -new file mode 100644 -index 00000000..9fcc46e0 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/etc/mm.c @@ -0,0 +1,1155 @@ @@ -75769,9 +75451,6 @@ index 00000000..9fcc46e0 + XX_Print("\n"); + } +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/etc/mm.h b/drivers/net/ethernet/freescale/sdk_fman/etc/mm.h -new file mode 100644 -index 00000000..43b2298f --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/etc/mm.h @@ -0,0 +1,105 @@ @@ -75880,9 +75559,6 @@ index 00000000..43b2298f + + +#endif /* __MM_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/etc/sprint.c b/drivers/net/ethernet/freescale/sdk_fman/etc/sprint.c -new file mode 100644 -index 00000000..46d2956a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/etc/sprint.c @@ -0,0 +1,81 @@ @@ -75967,9 +75643,6 @@ index 00000000..46d2956a + return i; +} +#endif /* NCSW_VXWORKS */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/fmanv3h_dflags.h b/drivers/net/ethernet/freescale/sdk_fman/fmanv3h_dflags.h -new file mode 100644 -index 00000000..435b0d2b --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/fmanv3h_dflags.h @@ -0,0 +1,57 @@ @@ -76030,9 +75703,6 @@ index 00000000..435b0d2b +#define EVENT_GLOBAL_LEVEL REPORT_LEVEL_MINOR + +#endif /* __dflags_h */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/fmanv3l_dflags.h b/drivers/net/ethernet/freescale/sdk_fman/fmanv3l_dflags.h -new file mode 100644 -index 00000000..789eb879 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/fmanv3l_dflags.h @@ -0,0 +1,56 @@ @@ -76092,9 +75762,6 @@ index 00000000..789eb879 +#define EVENT_GLOBAL_LEVEL REPORT_LEVEL_MINOR + +#endif /* __dflags_h */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/crc_mac_addr_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/crc_mac_addr_ext.h -new file mode 100644 -index 00000000..a84d5631 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/crc_mac_addr_ext.h @@ -0,0 +1,364 @@ @@ -76462,9 +76129,6 @@ index 00000000..a84d5631 + + +#endif /* __crc_mac_addr_ext_h */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/dpaa_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/dpaa_ext.h -new file mode 100644 -index 00000000..e6d9e932 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/dpaa_ext.h @@ -0,0 +1,210 @@ @@ -76678,9 +76342,6 @@ index 00000000..e6d9e932 + + +#endif /* __DPAA_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_ext.h -new file mode 100644 -index 00000000..a8a64386 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_ext.h @@ -0,0 +1,1731 @@ @@ -78415,9 +78076,6 @@ index 00000000..a8a64386 + + +#endif /* __FM_EXT */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_mac_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_mac_ext.h -new file mode 100644 -index 00000000..be99b7c9 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_mac_ext.h @@ -0,0 +1,887 @@ @@ -79308,9 +78966,6 @@ index 00000000..be99b7c9 + + +#endif /* __FM_MAC_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_macsec_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_macsec_ext.h -new file mode 100644 -index 00000000..57925f10 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_macsec_ext.h @@ -0,0 +1,1271 @@ @@ -80585,9 +80240,6 @@ index 00000000..57925f10 + + +#endif /* __FM_MACSEC_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_muram_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_muram_ext.h -new file mode 100644 -index 00000000..ef62c8ef --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_muram_ext.h @@ -0,0 +1,170 @@ @@ -80761,9 +80413,6 @@ index 00000000..ef62c8ef + + +#endif /* __FM_MURAM_EXT */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_pcd_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_pcd_ext.h -new file mode 100644 -index 00000000..8d1c3d88 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_pcd_ext.h @@ -0,0 +1,3974 @@ @@ -84741,9 +84390,6 @@ index 00000000..8d1c3d88 + + +#endif /* __FM_PCD_EXT */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_port_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_port_ext.h -new file mode 100644 -index 00000000..08a5aa59 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_port_ext.h @@ -0,0 +1,2608 @@ @@ -87355,9 +87001,6 @@ index 00000000..08a5aa59 + + +#endif /* __FM_PORT_EXT */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_rtc_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_rtc_ext.h -new file mode 100644 -index 00000000..72078ac4 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_rtc_ext.h @@ -0,0 +1,619 @@ @@ -87980,9 +87623,6 @@ index 00000000..72078ac4 + + +#endif /* __FM_RTC_EXT_H__ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_vsp_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_vsp_ext.h -new file mode 100644 -index 00000000..f9aed036 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/fm_vsp_ext.h @@ -0,0 +1,411 @@ @@ -88397,9 +88037,6 @@ index 00000000..f9aed036 + + +#endif /* __FM_VSP_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/mii_acc_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/mii_acc_ext.h -new file mode 100644 -index 00000000..f635d3c2 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/Peripherals/mii_acc_ext.h @@ -0,0 +1,76 @@ @@ -88479,9 +88116,6 @@ index 00000000..f635d3c2 + + +#endif /* __MII_ACC_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/core_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/core_ext.h -new file mode 100644 -index 00000000..ec89a6dd --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/core_ext.h @@ -0,0 +1,90 @@ @@ -88575,9 +88209,6 @@ index 00000000..ec89a6dd +#define fsl_mem_core_barrier() CORE_MemoryBarrier() + +#endif /* __CORE_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/cores/arm_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/cores/arm_ext.h -new file mode 100644 -index 00000000..e63444a7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/cores/arm_ext.h @@ -0,0 +1,55 @@ @@ -88636,9 +88267,6 @@ index 00000000..e63444a7 +} + +#endif /* __PPC_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/cores/e500v2_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/cores/e500v2_ext.h -new file mode 100644 -index 00000000..e79b1ddf --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/cores/e500v2_ext.h @@ -0,0 +1,476 @@ @@ -89118,9 +88746,6 @@ index 00000000..e79b1ddf + + +#endif /* __E500V2_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/cores/ppc_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/cores/ppc_ext.h -new file mode 100644 -index 00000000..9344b3a1 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/cores/ppc_ext.h @@ -0,0 +1,141 @@ @@ -89265,9 +88890,6 @@ index 00000000..9344b3a1 + + +#endif /* __PPC_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/ddr_std_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/ddr_std_ext.h -new file mode 100644 -index 00000000..8bb343fc --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/ddr_std_ext.h @@ -0,0 +1,77 @@ @@ -89348,9 +88970,6 @@ index 00000000..8bb343fc + +#endif /* __DDR_SDT_EXT_H */ + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/debug_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/debug_ext.h -new file mode 100644 -index 00000000..57db0a14 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/debug_ext.h @@ -0,0 +1,233 @@ @@ -89587,9 +89206,6 @@ index 00000000..57db0a14 + +#endif /* __DEBUG_EXT_H */ + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/endian_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/endian_ext.h -new file mode 100644 -index 00000000..5cdec668 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/endian_ext.h @@ -0,0 +1,447 @@ @@ -90040,9 +89656,6 @@ index 00000000..5cdec668 + +#endif /* __ENDIAN_EXT_H */ + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/enet_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/enet_ext.h -new file mode 100644 -index 00000000..ef3bee55 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/enet_ext.h @@ -0,0 +1,205 @@ @@ -90251,9 +89864,6 @@ index 00000000..ef3bee55 + + +#endif /* __ENET_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/error_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/error_ext.h -new file mode 100644 -index 00000000..2a5ad67b --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/error_ext.h @@ -0,0 +1,529 @@ @@ -90786,9 +90396,6 @@ index 00000000..2a5ad67b +#endif /* __ERROR_EXT_H */ + + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/etc/list_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/list_ext.h -new file mode 100644 -index 00000000..ee6b9f29 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/list_ext.h @@ -0,0 +1,358 @@ @@ -91150,9 +90757,6 @@ index 00000000..ee6b9f29 + + +#endif /* __LIST_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/etc/mem_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/mem_ext.h -new file mode 100644 -index 00000000..d0565d41 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/mem_ext.h @@ -0,0 +1,318 @@ @@ -91474,9 +91078,6 @@ index 00000000..d0565d41 + + +#endif /* __MEM_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/etc/memcpy_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/memcpy_ext.h -new file mode 100644 -index 00000000..1b3a2fac --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/memcpy_ext.h @@ -0,0 +1,208 @@ @@ -91688,9 +91289,6 @@ index 00000000..1b3a2fac + + +#endif /* __MEMCPY_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/etc/mm_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/mm_ext.h -new file mode 100644 -index 00000000..fa7c85e3 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/mm_ext.h @@ -0,0 +1,310 @@ @@ -92004,9 +91602,6 @@ index 00000000..fa7c85e3 +/** @} */ /* end of etc_id group */ + +#endif /* __MM_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/etc/sprint_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/sprint_ext.h -new file mode 100644 -index 00000000..52f7a9dc --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/etc/sprint_ext.h @@ -0,0 +1,118 @@ @@ -92128,9 +91723,6 @@ index 00000000..52f7a9dc + + +#endif /* __SPRINT_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/common/arch/ppc_access.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/common/arch/ppc_access.h -new file mode 100644 -index 00000000..c7b9b46f --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/common/arch/ppc_access.h @@ -0,0 +1,37 @@ @@ -92171,9 +91763,6 @@ index 00000000..c7b9b46f + +#endif /* FL_E500_MACROS_H */ + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/common/general.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/common/general.h -new file mode 100644 -index 00000000..b3f516fb --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/common/general.h @@ -0,0 +1,52 @@ @@ -92229,9 +91818,6 @@ index 00000000..b3f516fb + + +#endif /* __GENERAL_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fman_common.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fman_common.h -new file mode 100755 -index 00000000..8b194e99 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fman_common.h @@ -0,0 +1,78 @@ @@ -92313,9 +91899,6 @@ index 00000000..8b194e99 +#define NIA_BMI_AC_FETCH_ALL_FRAME 0x0000020c + +#endif /* __FMAN_COMMON_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_enet.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_enet.h -new file mode 100644 -index 00000000..caa87fc6 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_enet.h @@ -0,0 +1,273 @@ @@ -92592,9 +92175,6 @@ index 00000000..caa87fc6 + } while (0) + +#endif /* __FSL_ENET_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman.h -new file mode 100755 -index 00000000..96a63fa7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman.h @@ -0,0 +1,825 @@ @@ -93423,9 +93003,6 @@ index 00000000..96a63fa7 + + +#endif /* __FSL_FMAN_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_dtsec.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_dtsec.h -new file mode 100644 -index 00000000..6004e478 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_dtsec.h @@ -0,0 +1,1096 @@ @@ -94525,9 +94102,6 @@ index 00000000..6004e478 + + +#endif /* __FSL_FMAN_DTSEC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_dtsec_mii_acc.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_dtsec_mii_acc.h -new file mode 100644 -index 00000000..0dda09c3 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_dtsec_mii_acc.h @@ -0,0 +1,107 @@ @@ -94638,9 +94212,6 @@ index 00000000..0dda09c3 + uint16_t dtsec_freq); + +#endif /* __FSL_FMAN_DTSEC_MII_ACC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_kg.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_kg.h -new file mode 100644 -index 00000000..010e4b70 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_kg.h @@ -0,0 +1,514 @@ @@ -95158,9 +94729,6 @@ index 00000000..010e4b70 +} + +#endif /* __FSL_FMAN_KG_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_memac.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_memac.h -new file mode 100644 -index 00000000..058da159 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_memac.h @@ -0,0 +1,434 @@ @@ -95598,9 +95166,6 @@ index 00000000..058da159 + + +#endif /*__FSL_FMAN_MEMAC_H*/ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_memac_mii_acc.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_memac_mii_acc.h -new file mode 100755 -index 00000000..b4304450 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_memac_mii_acc.h @@ -0,0 +1,78 @@ @@ -95682,9 +95247,6 @@ index 00000000..b4304450 + enum enet_speed enet_speed); + +#endif /* __MAC_API_MEMAC_MII_ACC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_port.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_port.h -new file mode 100755 -index 00000000..080a23e9 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_port.h @@ -0,0 +1,593 @@ @@ -96281,9 +95843,6 @@ index 00000000..080a23e9 + + +#endif /* __FSL_FMAN_PORT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_prs.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_prs.h -new file mode 100644 -index 00000000..b18997dc --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_prs.h @@ -0,0 +1,102 @@ @@ -96389,9 +95948,6 @@ index 00000000..b18997dc +void fman_prs_set_stst_port_msk(struct fman_prs_regs *regs, uint32_t pid_msk); +void fman_prs_set_stst(struct fman_prs_regs *regs, bool enable); +#endif /* __FSL_FMAN_PRS_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_rtc.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_rtc.h -new file mode 100755 -index 00000000..f6b69a1f --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_rtc.h @@ -0,0 +1,449 @@ @@ -96844,9 +96400,6 @@ index 00000000..f6b69a1f +}; + +#endif /* __FSL_FMAN_RTC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_sp.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_sp.h -new file mode 100755 -index 00000000..f8ef7d56 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_sp.h @@ -0,0 +1,138 @@ @@ -96988,9 +96541,6 @@ index 00000000..f8ef7d56 + + +#endif /* __FSL_FMAN_SP_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_tgec.h b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_tgec.h -new file mode 100644 -index 00000000..a0373141 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/flib/fsl_fman_tgec.h @@ -0,0 +1,479 @@ @@ -97473,9 +97023,6 @@ index 00000000..a0373141 + + +#endif /* __FSL_FMAN_TGEC_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/dpaa_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/dpaa_integration_ext.h -new file mode 100644 -index 00000000..0346cf60 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/dpaa_integration_ext.h @@ -0,0 +1,291 @@ @@ -97770,9 +97317,6 @@ index 00000000..0346cf60 +#define NUM_OF_SA_PER_TX_SC 2 + +#endif /* __DPAA_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/part_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/part_ext.h -new file mode 100644 -index 00000000..0d62dd15 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/part_ext.h @@ -0,0 +1,71 @@ @@ -97847,9 +97391,6 @@ index 00000000..0d62dd15 + + +#endif /* __PART_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/part_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/part_integration_ext.h -new file mode 100644 -index 00000000..3254c766 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3H/part_integration_ext.h @@ -0,0 +1,304 @@ @@ -98157,9 +97698,6 @@ index 00000000..3254c766 + + +#endif /* __PART_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/dpaa_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/dpaa_integration_ext.h -new file mode 100644 -index 00000000..f7f8eb07 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/dpaa_integration_ext.h @@ -0,0 +1,293 @@ @@ -98456,9 +97994,6 @@ index 00000000..f7f8eb07 +#define NUM_OF_SA_PER_TX_SC 2 + +#endif /* __DPAA_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/part_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/part_ext.h -new file mode 100644 -index 00000000..ba9732ee --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/part_ext.h @@ -0,0 +1,59 @@ @@ -98521,9 +98056,6 @@ index 00000000..ba9732ee + + +#endif /* __PART_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/part_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/part_integration_ext.h -new file mode 100644 -index 00000000..3254c766 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/FMANV3L/part_integration_ext.h @@ -0,0 +1,304 @@ @@ -98831,9 +98363,6 @@ index 00000000..3254c766 + + +#endif /* __PART_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/dpaa_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/dpaa_integration_ext.h -new file mode 100644 -index 00000000..5a8f3583 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/dpaa_integration_ext.h @@ -0,0 +1,291 @@ @@ -99128,9 +98657,6 @@ index 00000000..5a8f3583 +#define NUM_OF_SA_PER_TX_SC 2 + +#endif /* __DPAA_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/part_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/part_ext.h -new file mode 100644 -index 00000000..4787e19c --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/part_ext.h @@ -0,0 +1,64 @@ @@ -99198,9 +98724,6 @@ index 00000000..4787e19c + + +#endif /* __PART_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/part_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/part_integration_ext.h -new file mode 100644 -index 00000000..85ba2a47 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/LS1043/part_integration_ext.h @@ -0,0 +1,185 @@ @@ -99389,9 +98912,6 @@ index 00000000..85ba2a47 + + +#endif /* __PART_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/dpaa_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/dpaa_integration_ext.h -new file mode 100644 -index 00000000..7b5390de --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/dpaa_integration_ext.h @@ -0,0 +1,213 @@ @@ -99608,9 +99128,6 @@ index 00000000..7b5390de + + +#endif /* __DPAA_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/part_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/part_ext.h -new file mode 100644 -index 00000000..6814d5fb --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/part_ext.h @@ -0,0 +1,82 @@ @@ -99696,9 +99213,6 @@ index 00000000..6814d5fb + + +#endif /* __PART_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/part_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/part_integration_ext.h -new file mode 100644 -index 00000000..e838283d --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P1023/part_integration_ext.h @@ -0,0 +1,635 @@ @@ -100337,9 +99851,6 @@ index 00000000..e838283d + + +#endif /* __PART_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/dpaa_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/dpaa_integration_ext.h -new file mode 100644 -index 00000000..6e2b925f --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/dpaa_integration_ext.h @@ -0,0 +1,276 @@ @@ -100619,9 +100130,6 @@ index 00000000..6e2b925f + + +#endif /* __DPAA_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/part_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/part_ext.h -new file mode 100644 -index 00000000..512f0baf --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/part_ext.h @@ -0,0 +1,83 @@ @@ -100708,9 +100216,6 @@ index 00000000..512f0baf + + +#endif /* __PART_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/part_integration_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/part_integration_ext.h -new file mode 100644 -index 00000000..03c59b8b --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/integrations/P3040_P4080_P5020/part_integration_ext.h @@ -0,0 +1,336 @@ @@ -101050,9 +100555,6 @@ index 00000000..03c59b8b + { /* Port A */ 0xFFFFFFFF } + +#endif /* __PART_INTEGRATION_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/math_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/math_ext.h -new file mode 100644 -index 00000000..4ecfc6ed --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/math_ext.h @@ -0,0 +1,100 @@ @@ -101156,9 +100658,6 @@ index 00000000..4ecfc6ed + + +#endif /* __MATH_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/ncsw_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/ncsw_ext.h -new file mode 100644 -index 00000000..dc32e249 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/ncsw_ext.h @@ -0,0 +1,435 @@ @@ -101597,9 +101096,6 @@ index 00000000..dc32e249 + + +#endif /* __NCSW_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/net_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/net_ext.h -new file mode 100644 -index 00000000..8f3bc369 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/net_ext.h @@ -0,0 +1,430 @@ @@ -102033,9 +101529,6 @@ index 00000000..8f3bc369 + + +#endif /* __NET_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/std_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/std_ext.h -new file mode 100644 -index 00000000..d91e6fdd --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/std_ext.h @@ -0,0 +1,48 @@ @@ -102087,9 +101580,6 @@ index 00000000..d91e6fdd + + +#endif /* __STD_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/stdarg_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/stdarg_ext.h -new file mode 100644 -index 00000000..3c8bb0a0 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/stdarg_ext.h @@ -0,0 +1,49 @@ @@ -102142,9 +101632,6 @@ index 00000000..3c8bb0a0 + + +#endif /* __STDARG_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/stdlib_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/stdlib_ext.h -new file mode 100644 -index 00000000..a47860cf --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/stdlib_ext.h @@ -0,0 +1,162 @@ @@ -102310,9 +101797,6 @@ index 00000000..a47860cf + + +#endif /* __STDLIB_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/string_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/string_ext.h -new file mode 100644 -index 00000000..a5c6c7e0 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/string_ext.h @@ -0,0 +1,56 @@ @@ -102372,9 +101856,6 @@ index 00000000..a5c6c7e0 + + +#endif /* __STRING_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/types_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/types_ext.h -new file mode 100644 -index 00000000..8c87edb7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/types_ext.h @@ -0,0 +1,62 @@ @@ -102440,9 +101921,6 @@ index 00000000..8c87edb7 +#endif /* defined (__ROCOO__) */ + +#endif /* __TYPES_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/xx_common.h b/drivers/net/ethernet/freescale/sdk_fman/inc/xx_common.h -new file mode 100644 -index 00000000..8e81094b --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/xx_common.h @@ -0,0 +1,56 @@ @@ -102502,9 +101980,6 @@ index 00000000..8e81094b +#define MODULE_FM_SP 0x00080000 +#define MODULE_FM_MACSEC 0x00090000 +#endif /* __XX_COMMON_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/inc/xx_ext.h b/drivers/net/ethernet/freescale/sdk_fman/inc/xx_ext.h -new file mode 100644 -index 00000000..21b62d0a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/inc/xx_ext.h @@ -0,0 +1,791 @@ @@ -103299,9 +102774,6 @@ index 00000000..21b62d0a + + +#endif /* __XX_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/ls1043_dflags.h b/drivers/net/ethernet/freescale/sdk_fman/ls1043_dflags.h -new file mode 100644 -index 00000000..c3a5a623 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/ls1043_dflags.h @@ -0,0 +1,56 @@ @@ -103361,9 +102833,6 @@ index 00000000..c3a5a623 +#define EVENT_GLOBAL_LEVEL REPORT_LEVEL_MINOR + +#endif /* __dflags_h */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/ncsw_config.mk b/drivers/net/ethernet/freescale/sdk_fman/ncsw_config.mk -new file mode 100644 -index 00000000..586f9c79 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/ncsw_config.mk @@ -0,0 +1,53 @@ @@ -103420,9 +102889,6 @@ index 00000000..586f9c79 +ccflags-y += -I$(srctree)/include/uapi/linux/fmd +ccflags-y += -I$(srctree)/include/uapi/linux/fmd/Peripherals +ccflags-y += -I$(srctree)/include/uapi/linux/fmd/integrations -diff --git a/drivers/net/ethernet/freescale/sdk_fman/p1023_dflags.h b/drivers/net/ethernet/freescale/sdk_fman/p1023_dflags.h -new file mode 100644 -index 00000000..b48819d7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/p1023_dflags.h @@ -0,0 +1,65 @@ @@ -103491,9 +102957,6 @@ index 00000000..b48819d7 + + +#endif /* __dflags_h */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/p3040_4080_5020_dflags.h b/drivers/net/ethernet/freescale/sdk_fman/p3040_4080_5020_dflags.h -new file mode 100644 -index 00000000..74389742 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/p3040_4080_5020_dflags.h @@ -0,0 +1,62 @@ @@ -103559,9 +103022,6 @@ index 00000000..74389742 + + +#endif /* __dflags_h */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/Makefile b/drivers/net/ethernet/freescale/sdk_fman/src/Makefile -new file mode 100644 -index 00000000..49405d0e --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/Makefile @@ -0,0 +1,11 @@ @@ -103576,9 +103036,6 @@ index 00000000..49405d0e +obj-y += system/ +obj-y += wrapper/ +obj-y += xx/ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/inc/system/sys_ext.h b/drivers/net/ethernet/freescale/sdk_fman/src/inc/system/sys_ext.h -new file mode 100644 -index 00000000..20f27d29 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/inc/system/sys_ext.h @@ -0,0 +1,118 @@ @@ -103700,9 +103157,6 @@ index 00000000..20f27d29 + } else + +#endif /* __SYS_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/inc/system/sys_io_ext.h b/drivers/net/ethernet/freescale/sdk_fman/src/inc/system/sys_io_ext.h -new file mode 100644 -index 00000000..d6aa9d41 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/inc/system/sys_io_ext.h @@ -0,0 +1,46 @@ @@ -103752,9 +103206,6 @@ index 00000000..d6aa9d41 + + +#endif /* __SYS_IO_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/inc/types_linux.h b/drivers/net/ethernet/freescale/sdk_fman/src/inc/types_linux.h -new file mode 100644 -index 00000000..201ad699 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/inc/types_linux.h @@ -0,0 +1,208 @@ @@ -103966,9 +103417,6 @@ index 00000000..201ad699 + + +#endif /* __TYPES_LINUX_H__ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/fsl_fman_test.h b/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/fsl_fman_test.h -new file mode 100644 -index 00000000..0466a473 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/fsl_fman_test.h @@ -0,0 +1,84 @@ @@ -104056,9 +103504,6 @@ index 00000000..0466a473 +#define FMAN_TEST_MAX_TX_FQS 8 + +#endif /* __FSL_FMAN_TEST_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_exp_sym.h b/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_exp_sym.h -new file mode 100644 -index 00000000..dd0f03ac --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_exp_sym.h @@ -0,0 +1,130 @@ @@ -104192,9 +103637,6 @@ index 00000000..dd0f03ac +EXPORT_SYMBOL(FM_GetSpecialOperationCoding); + +#endif /* __LNXWRP_EXP_SYM_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_fm_ext.h b/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_fm_ext.h -new file mode 100644 -index 00000000..a72c8670 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_fm_ext.h @@ -0,0 +1,163 @@ @@ -104361,9 +103803,6 @@ index 00000000..a72c8670 + + +#endif /* __LNXWRP_FM_EXT_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_fsl_fman.h b/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_fsl_fman.h -new file mode 100644 -index 00000000..c50031cf --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/inc/wrapper/lnxwrp_fsl_fman.h @@ -0,0 +1,921 @@ @@ -105288,9 +104727,6 @@ index 00000000..c50031cf +#define DPA_PTP_NOMINAL_FREQ_PERIOD_NS (1 << DPA_PTP_NOMINAL_FREQ_PERIOD_SHIFT) /* 4ns,250MHz */ + +#endif /* __LNXWRP_FSL_FMAN_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/inc/xx/xx.h b/drivers/net/ethernet/freescale/sdk_fman/src/inc/xx/xx.h -new file mode 100644 -index 00000000..b183c86d --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/inc/xx/xx.h @@ -0,0 +1,50 @@ @@ -105344,9 +104780,6 @@ index 00000000..b183c86d + + +#endif /* __XX_H */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/system/Makefile b/drivers/net/ethernet/freescale/sdk_fman/src/system/Makefile -new file mode 100644 -index 00000000..667cd859 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/system/Makefile @@ -0,0 +1,10 @@ @@ -105360,9 +104793,6 @@ index 00000000..667cd859 +# + +obj-y += sys_io.o -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/system/sys_io.c b/drivers/net/ethernet/freescale/sdk_fman/src/system/sys_io.c -new file mode 100644 -index 00000000..c106a8b7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/system/sys_io.c @@ -0,0 +1,171 @@ @@ -105537,9 +104967,6 @@ index 00000000..c106a8b7 + return (uint64_t)(addr - p_IoMap->virtAddr + p_IoMap->physAddr); + return (uint64_t)virt_to_phys(UINT_TO_PTR(addr)); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/Makefile b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/Makefile -new file mode 100644 -index 00000000..62713d62 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/Makefile @@ -0,0 +1,19 @@ @@ -105562,9 +104989,6 @@ index 00000000..62713d62 +fsl-ncsw-PFM-objs := lnxwrp_fm.o lnxwrp_fm_port.o lnxwrp_ioctls_fm.o \ + lnxwrp_sysfs.o lnxwrp_sysfs_fm.o lnxwrp_sysfs_fm_port.o +obj-$(CONFIG_COMPAT) += lnxwrp_ioctls_fm_compat.o -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/fman_test.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/fman_test.c -new file mode 100644 -index 00000000..270d07b8 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/fman_test.c @@ -0,0 +1,1665 @@ @@ -107233,9 +106657,6 @@ index 00000000..270d07b8 + +module_init(fmt_load); +module_exit(fmt_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm.c -new file mode 100755 -index 00000000..31f654b4 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm.c @@ -0,0 +1,2908 @@ @@ -110147,9 +109568,6 @@ index 00000000..31f654b4 + +module_init (fm_load); +module_exit (fm_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm.h b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm.h -new file mode 100644 -index 00000000..09832563 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm.h @@ -0,0 +1,294 @@ @@ -110447,9 +109865,6 @@ index 00000000..09832563 +void LnxWrpPCDIOCTLEnumChecking(void); + +#endif /* __LNXWRP_FM_H__ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm_port.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm_port.c -new file mode 100644 -index 00000000..00ab4bcb --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_fm_port.c @@ -0,0 +1,1480 @@ @@ -111933,9 +111348,6 @@ index 00000000..00ab4bcb + +module_init(fm_port_load); +module_exit(fm_port_unload); -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm.c -new file mode 100644 -index 00000000..06833ba8 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm.c @@ -0,0 +1,4854 @@ @@ -116793,9 +116205,6 @@ index 00000000..06833ba8 + .open = fm_open, + .release = fm_close, +}; -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm_compat.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm_compat.c -new file mode 100644 -index 00000000..322ae9ef --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm_compat.c @@ -0,0 +1,1297 @@ @@ -118096,9 +117505,6 @@ index 00000000..322ae9ef + _fm_cpt_dbg (compat, " ...->}\n"); +} +#endif /* (DPAA_VERSION >= 11) */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm_compat.h b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm_compat.h -new file mode 100644 -index 00000000..187011f7 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_ioctls_fm_compat.h @@ -0,0 +1,755 @@ @@ -118857,9 +118263,6 @@ index 00000000..187011f7 + +/* } pcd compat functions */ +#endif -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources.h b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources.h -new file mode 100644 -index 00000000..1b72e1d5 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources.h @@ -0,0 +1,121 @@ @@ -118984,9 +118387,6 @@ index 00000000..1b72e1d5 +#endif + +#endif /* LNXWRP_RESOURCES_H_ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.c -new file mode 100644 -index 00000000..6c06a5a6 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.c @@ -0,0 +1,191 @@ @@ -119181,9 +118581,6 @@ index 00000000..6c06a5a6 + + return 0; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.h b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.h -new file mode 100644 -index 00000000..063946eb --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.h @@ -0,0 +1,144 @@ @@ -119331,9 +118728,6 @@ index 00000000..063946eb +} _PackedType t_FmPrsResult; + +#endif -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.make b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.make -new file mode 100644 -index 00000000..58009cd8 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_resources_ut.make @@ -0,0 +1,28 @@ @@ -119365,9 +118759,6 @@ index 00000000..58009cd8 +clean: + rm -f *.o + rm -f $(LNXWRP_RESS_UT) -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs.c -new file mode 100644 -index 00000000..813771bf --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs.c @@ -0,0 +1,60 @@ @@ -119431,9 +118822,6 @@ index 00000000..813771bf + WARN(1, "FMD: Should never get here!"); + return 0; +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs.h b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs.h -new file mode 100644 -index 00000000..2098b244 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs.h @@ -0,0 +1,60 @@ @@ -119497,9 +118885,6 @@ index 00000000..2098b244 + uint8_t *offset); + +#endif /* LNXWRP_SYSFS_H_ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm.c -new file mode 100644 -index 00000000..1badbf98 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm.c @@ -0,0 +1,1855 @@ @@ -121358,9 +120743,6 @@ index 00000000..1badbf98 + /* should never get here */ + return -EINVAL; /* counter not available */ +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm.h b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm.h -new file mode 100644 -index 00000000..137653e9 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm.h @@ -0,0 +1,136 @@ @@ -121500,9 +120882,6 @@ index 00000000..137653e9 + } while (0) + +#endif /* LNXWRP_SYSFS_FM_H_ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm_port.c b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm_port.c -new file mode 100644 -index 00000000..db8e824c --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm_port.c @@ -0,0 +1,1268 @@ @@ -122774,9 +122153,6 @@ index 00000000..db8e824c + return n; +} + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm_port.h b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm_port.h -new file mode 100644 -index 00000000..1e7636f4 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/wrapper/lnxwrp_sysfs_fm_port.h @@ -0,0 +1,56 @@ @@ -122836,9 +122212,6 @@ index 00000000..1e7636f4 +#endif + +#endif /* LNXWRP_SYSFS_FM_PORT_H_ */ -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/xx/Makefile b/drivers/net/ethernet/freescale/sdk_fman/src/xx/Makefile -new file mode 100644 -index 00000000..1071c22a --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/xx/Makefile @@ -0,0 +1,18 @@ @@ -122860,9 +122233,6 @@ index 00000000..1071c22a + module_strings.o +endif + -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/xx/module_strings.c b/drivers/net/ethernet/freescale/sdk_fman/src/xx/module_strings.c -new file mode 100644 -index 00000000..d7fed170 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/xx/module_strings.c @@ -0,0 +1,46 @@ @@ -122912,9 +122282,6 @@ index 00000000..d7fed170 + "FM-SP", /* MODULE_FM_SP */ + "FM-MACSEC" /* MODULE_FM_MACSEC */ +}; -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/xx/xx_arm_linux.c b/drivers/net/ethernet/freescale/sdk_fman/src/xx/xx_arm_linux.c -new file mode 100644 -index 00000000..dd3e376e --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/xx/xx_arm_linux.c @@ -0,0 +1,905 @@ @@ -123823,9 +123190,6 @@ index 00000000..dd3e376e +{ + xx_Free((void*)(*((uintptr_t *)(p) - 1))); +} -diff --git a/drivers/net/ethernet/freescale/sdk_fman/src/xx/xx_linux.c b/drivers/net/ethernet/freescale/sdk_fman/src/xx/xx_linux.c -new file mode 100644 -index 00000000..992757d4 --- /dev/null +++ b/drivers/net/ethernet/freescale/sdk_fman/src/xx/xx_linux.c @@ -0,0 +1,918 @@ @@ -124747,9 +124111,6 @@ index 00000000..992757d4 +{ + xx_Free((void*)(*((uintptr_t *)(p) - 1))); +} -diff --git a/drivers/staging/fsl_qbman/Kconfig b/drivers/staging/fsl_qbman/Kconfig -new file mode 100644 -index 00000000..93dcb7d3 --- /dev/null +++ b/drivers/staging/fsl_qbman/Kconfig @@ -0,0 +1,228 @@ @@ -124981,9 +124342,6 @@ index 00000000..93dcb7d3 + + +endmenu -diff --git a/drivers/staging/fsl_qbman/Makefile b/drivers/staging/fsl_qbman/Makefile -new file mode 100644 -index 00000000..777d7d34 --- /dev/null +++ b/drivers/staging/fsl_qbman/Makefile @@ -0,0 +1,28 @@ @@ -125015,9 +124373,6 @@ index 00000000..777d7d34 + +# USDPAA +obj-$(CONFIG_FSL_USDPAA) += fsl_usdpaa.o fsl_usdpaa_irq.o -diff --git a/drivers/staging/fsl_qbman/bman_config.c b/drivers/staging/fsl_qbman/bman_config.c -new file mode 100644 -index 00000000..bb397730 --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_config.c @@ -0,0 +1,720 @@ @@ -125741,9 +125096,6 @@ index 00000000..bb397730 +module_exit(bman_ctrl_exit); + +#endif /* CONFIG_SYSFS */ -diff --git a/drivers/staging/fsl_qbman/bman_debugfs.c b/drivers/staging/fsl_qbman/bman_debugfs.c -new file mode 100644 -index 00000000..96909348 --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_debugfs.c @@ -0,0 +1,119 @@ @@ -125866,9 +125218,6 @@ index 00000000..96909348 +module_init(bman_debugfs_module_init); +module_exit(bman_debugfs_module_exit); +MODULE_LICENSE("Dual BSD/GPL"); -diff --git a/drivers/staging/fsl_qbman/bman_driver.c b/drivers/staging/fsl_qbman/bman_driver.c -new file mode 100644 -index 00000000..86fabef6 --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_driver.c @@ -0,0 +1,575 @@ @@ -126447,9 +125796,6 @@ index 00000000..86fabef6 + return; +} +#endif -diff --git a/drivers/staging/fsl_qbman/bman_high.c b/drivers/staging/fsl_qbman/bman_high.c -new file mode 100644 -index 00000000..c066602d --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_high.c @@ -0,0 +1,1145 @@ @@ -127598,9 +126944,6 @@ index 00000000..c066602d +{ + return portal->sharing_redirect ? NULL : portal->config; +} -diff --git a/drivers/staging/fsl_qbman/bman_low.h b/drivers/staging/fsl_qbman/bman_low.h -new file mode 100644 -index 00000000..3da70571 --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_low.h @@ -0,0 +1,565 @@ @@ -128169,9 +127512,6 @@ index 00000000..3da70571 + } + return 0; +} -diff --git a/drivers/staging/fsl_qbman/bman_private.h b/drivers/staging/fsl_qbman/bman_private.h -new file mode 100644 -index 00000000..64eefe7d --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_private.h @@ -0,0 +1,166 @@ @@ -128341,9 +127681,6 @@ index 00000000..64eefe7d +#endif + +#endif /* CONFIG_FSL_BMAN_CONFIG */ -diff --git a/drivers/staging/fsl_qbman/bman_test.c b/drivers/staging/fsl_qbman/bman_test.c -new file mode 100644 -index 00000000..db5b7fd3 --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_test.c @@ -0,0 +1,56 @@ @@ -128403,9 +127740,6 @@ index 00000000..db5b7fd3 + +module_init(test_init); +module_exit(test_exit); -diff --git a/drivers/staging/fsl_qbman/bman_test.h b/drivers/staging/fsl_qbman/bman_test.h -new file mode 100644 -index 00000000..fcd65056 --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_test.h @@ -0,0 +1,44 @@ @@ -128453,9 +127787,6 @@ index 00000000..fcd65056 + +void bman_test_high(void); +void bman_test_thresh(void); -diff --git a/drivers/staging/fsl_qbman/bman_test_high.c b/drivers/staging/fsl_qbman/bman_test_high.c -new file mode 100644 -index 00000000..1617a531 --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_test_high.c @@ -0,0 +1,183 @@ @@ -128642,9 +127973,6 @@ index 00000000..1617a531 + bman_free_pool(pool); + pr_info("BMAN: --- finished high-level test ---\n"); +} -diff --git a/drivers/staging/fsl_qbman/bman_test_thresh.c b/drivers/staging/fsl_qbman/bman_test_thresh.c -new file mode 100644 -index 00000000..67093693 --- /dev/null +++ b/drivers/staging/fsl_qbman/bman_test_thresh.c @@ -0,0 +1,196 @@ @@ -128844,9 +128172,6 @@ index 00000000..67093693 + + pr_info("bman_test_thresh: done\n"); +} -diff --git a/drivers/staging/fsl_qbman/dpa_alloc.c b/drivers/staging/fsl_qbman/dpa_alloc.c -new file mode 100644 -index 00000000..44db3e1e --- /dev/null +++ b/drivers/staging/fsl_qbman/dpa_alloc.c @@ -0,0 +1,706 @@ @@ -129556,9 +128881,6 @@ index 00000000..44db3e1e + spin_unlock_irq(&list_head->lock); + return res; +} -diff --git a/drivers/staging/fsl_qbman/dpa_sys.h b/drivers/staging/fsl_qbman/dpa_sys.h -new file mode 100644 -index 00000000..e144f5a4 --- /dev/null +++ b/drivers/staging/fsl_qbman/dpa_sys.h @@ -0,0 +1,259 @@ @@ -129821,9 +129143,6 @@ index 00000000..e144f5a4 + void **iir_reg); +#endif +#endif /* DPA_SYS_H */ -diff --git a/drivers/staging/fsl_qbman/dpa_sys_arm.h b/drivers/staging/fsl_qbman/dpa_sys_arm.h -new file mode 100644 -index 00000000..17c5500e --- /dev/null +++ b/drivers/staging/fsl_qbman/dpa_sys_arm.h @@ -0,0 +1,95 @@ @@ -129922,9 +129241,6 @@ index 00000000..17c5500e + +#define hard_smp_processor_id() raw_smp_processor_id() +#endif -diff --git a/drivers/staging/fsl_qbman/dpa_sys_arm64.h b/drivers/staging/fsl_qbman/dpa_sys_arm64.h -new file mode 100644 -index 00000000..247c8d97 --- /dev/null +++ b/drivers/staging/fsl_qbman/dpa_sys_arm64.h @@ -0,0 +1,102 @@ @@ -130030,9 +129346,6 @@ index 00000000..247c8d97 + + +#endif -diff --git a/drivers/staging/fsl_qbman/dpa_sys_ppc32.h b/drivers/staging/fsl_qbman/dpa_sys_ppc32.h -new file mode 100644 -index 00000000..874616df --- /dev/null +++ b/drivers/staging/fsl_qbman/dpa_sys_ppc32.h @@ -0,0 +1,70 @@ @@ -130106,9 +129419,6 @@ index 00000000..874616df +} + +#endif -diff --git a/drivers/staging/fsl_qbman/dpa_sys_ppc64.h b/drivers/staging/fsl_qbman/dpa_sys_ppc64.h -new file mode 100644 -index 00000000..d9803199 --- /dev/null +++ b/drivers/staging/fsl_qbman/dpa_sys_ppc64.h @@ -0,0 +1,79 @@ @@ -130191,9 +129501,6 @@ index 00000000..d9803199 +} + +#endif -diff --git a/drivers/staging/fsl_qbman/fsl_usdpaa.c b/drivers/staging/fsl_qbman/fsl_usdpaa.c -new file mode 100644 -index 00000000..3a6d3722 --- /dev/null +++ b/drivers/staging/fsl_qbman/fsl_usdpaa.c @@ -0,0 +1,1983 @@ @@ -132180,9 +131487,6 @@ index 00000000..3a6d3722 +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Freescale Semiconductor"); +MODULE_DESCRIPTION("Freescale USDPAA process driver"); -diff --git a/drivers/staging/fsl_qbman/fsl_usdpaa_irq.c b/drivers/staging/fsl_qbman/fsl_usdpaa_irq.c -new file mode 100644 -index 00000000..914c7471 --- /dev/null +++ b/drivers/staging/fsl_qbman/fsl_usdpaa_irq.c @@ -0,0 +1,289 @@ @@ -132475,9 +131779,6 @@ index 00000000..914c7471 +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Freescale Semiconductor"); +MODULE_DESCRIPTION("Freescale USDPAA process IRQ driver"); -diff --git a/drivers/staging/fsl_qbman/qbman_driver.c b/drivers/staging/fsl_qbman/qbman_driver.c -new file mode 100644 -index 00000000..ab487d5f --- /dev/null +++ b/drivers/staging/fsl_qbman/qbman_driver.c @@ -0,0 +1,88 @@ @@ -132569,9 +131870,6 @@ index 00000000..ab487d5f + return 0; +} +subsys_initcall(qbman_init); -diff --git a/drivers/staging/fsl_qbman/qman_config.c b/drivers/staging/fsl_qbman/qman_config.c -new file mode 100644 -index 00000000..9bb1e11a --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_config.c @@ -0,0 +1,1224 @@ @@ -133799,9 +133097,6 @@ index 00000000..9bb1e11a +module_exit(qman_ctrl_exit); + +#endif /* CONFIG_SYSFS */ -diff --git a/drivers/staging/fsl_qbman/qman_debugfs.c b/drivers/staging/fsl_qbman/qman_debugfs.c -new file mode 100644 -index 00000000..fb8ecba1 --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_debugfs.c @@ -0,0 +1,1594 @@ @@ -135399,9 +134694,6 @@ index 00000000..fb8ecba1 +module_init(qman_debugfs_module_init); +module_exit(qman_debugfs_module_exit); +MODULE_LICENSE("Dual BSD/GPL"); -diff --git a/drivers/staging/fsl_qbman/qman_driver.c b/drivers/staging/fsl_qbman/qman_driver.c -new file mode 100644 -index 00000000..857ecd62 --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_driver.c @@ -0,0 +1,977 @@ @@ -136382,9 +135674,6 @@ index 00000000..857ecd62 + return; +} +#endif -diff --git a/drivers/staging/fsl_qbman/qman_high.c b/drivers/staging/fsl_qbman/qman_high.c -new file mode 100644 -index 00000000..1651e62c --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_high.c @@ -0,0 +1,5669 @@ @@ -142057,9 +141346,6 @@ index 00000000..1651e62c +{ + return portal->sharing_redirect ? NULL : portal->config; +} -diff --git a/drivers/staging/fsl_qbman/qman_low.h b/drivers/staging/fsl_qbman/qman_low.h -new file mode 100644 -index 00000000..547b5fa2 --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_low.h @@ -0,0 +1,1427 @@ @@ -143490,9 +142776,6 @@ index 00000000..547b5fa2 + } + return -1; +} -diff --git a/drivers/staging/fsl_qbman/qman_private.h b/drivers/staging/fsl_qbman/qman_private.h -new file mode 100644 -index 00000000..ee025cff --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_private.h @@ -0,0 +1,398 @@ @@ -143894,9 +143177,6 @@ index 00000000..ee025cff +void suspend_unused_qportal(void); +void resume_unused_qportal(void); +#endif -diff --git a/drivers/staging/fsl_qbman/qman_test.c b/drivers/staging/fsl_qbman/qman_test.c -new file mode 100644 -index 00000000..7995dd8c --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_test.c @@ -0,0 +1,57 @@ @@ -143957,9 +143237,6 @@ index 00000000..7995dd8c + +module_init(test_init); +module_exit(test_exit); -diff --git a/drivers/staging/fsl_qbman/qman_test.h b/drivers/staging/fsl_qbman/qman_test.h -new file mode 100644 -index 00000000..8c4181c7 --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_test.h @@ -0,0 +1,45 @@ @@ -144008,9 +143285,6 @@ index 00000000..8c4181c7 +void qman_test_hotpotato(void); +void qman_test_high(void); + -diff --git a/drivers/staging/fsl_qbman/qman_test_high.c b/drivers/staging/fsl_qbman/qman_test_high.c -new file mode 100644 -index 00000000..65ee270e --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_test_high.c @@ -0,0 +1,216 @@ @@ -144230,9 +143504,6 @@ index 00000000..65ee270e + retire_complete = 1; + wake_up(&waitqueue); +} -diff --git a/drivers/staging/fsl_qbman/qman_test_hotpotato.c b/drivers/staging/fsl_qbman/qman_test_hotpotato.c -new file mode 100644 -index 00000000..899d2aa9 --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_test_hotpotato.c @@ -0,0 +1,502 @@ @@ -144738,9 +144009,6 @@ index 00000000..899d2aa9 + kmem_cache_destroy(hp_handler_slab); + pr_info("qman_test_hotpotato finished\n"); +} -diff --git a/drivers/staging/fsl_qbman/qman_utility.c b/drivers/staging/fsl_qbman/qman_utility.c -new file mode 100644 -index 00000000..f1e39023 --- /dev/null +++ b/drivers/staging/fsl_qbman/qman_utility.c @@ -0,0 +1,129 @@ @@ -144873,9 +144141,6 @@ index 00000000..f1e39023 + return pool->used; +} +EXPORT_SYMBOL(qman_fqid_pool_used); -diff --git a/include/linux/fsl_bman.h b/include/linux/fsl_bman.h -new file mode 100644 -index 00000000..43942221 --- /dev/null +++ b/include/linux/fsl_bman.h @@ -0,0 +1,532 @@ @@ -145411,9 +144676,6 @@ index 00000000..43942221 +#endif + +#endif /* FSL_BMAN_H */ -diff --git a/include/linux/fsl_qman.h b/include/linux/fsl_qman.h -new file mode 100644 -index 00000000..4e4b21d5 --- /dev/null +++ b/include/linux/fsl_qman.h @@ -0,0 +1,3888 @@ @@ -149305,9 +148567,6 @@ index 00000000..4e4b21d5 +#endif + +#endif /* FSL_QMAN_H */ -diff --git a/include/linux/fsl_usdpaa.h b/include/linux/fsl_usdpaa.h -new file mode 100644 -index 00000000..381853de --- /dev/null +++ b/include/linux/fsl_usdpaa.h @@ -0,0 +1,372 @@ @@ -149683,9 +148942,6 @@ index 00000000..381853de +#endif + +#endif /* FSL_USDPAA_H */ -diff --git a/include/uapi/linux/fmd/Kbuild b/include/uapi/linux/fmd/Kbuild -new file mode 100644 -index 00000000..56a20401 --- /dev/null +++ b/include/uapi/linux/fmd/Kbuild @@ -0,0 +1,5 @@ @@ -149694,9 +148950,6 @@ index 00000000..56a20401 + +header-y += ioctls.h +header-y += net_ioctls.h -diff --git a/include/uapi/linux/fmd/Peripherals/Kbuild b/include/uapi/linux/fmd/Peripherals/Kbuild -new file mode 100644 -index 00000000..43883efe --- /dev/null +++ b/include/uapi/linux/fmd/Peripherals/Kbuild @@ -0,0 +1,4 @@ @@ -149704,9 +148957,6 @@ index 00000000..43883efe +header-y += fm_port_ioctls.h +header-y += fm_pcd_ioctls.h +header-y += fm_test_ioctls.h -diff --git a/include/uapi/linux/fmd/Peripherals/fm_ioctls.h b/include/uapi/linux/fmd/Peripherals/fm_ioctls.h -new file mode 100644 -index 00000000..e0c2dd31 --- /dev/null +++ b/include/uapi/linux/fmd/Peripherals/fm_ioctls.h @@ -0,0 +1,628 @@ @@ -150338,9 +149588,6 @@ index 00000000..e0c2dd31 +#define FMD_API_VERSION_RESPIN 0 + +#endif /* __FM_IOCTLS_H */ -diff --git a/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h b/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h -new file mode 100644 -index 00000000..d13e878d --- /dev/null +++ b/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h @@ -0,0 +1,3084 @@ @@ -153428,9 +152675,6 @@ index 00000000..d13e878d +/** @} */ /* end of lnx_ioctl_FM_PCD_Runtime_grp group */ +/** @} */ /* end of lnx_ioctl_FM_PCD_grp group */ +/** @} */ /* end of lnx_ioctl_FM_grp group */ -diff --git a/include/uapi/linux/fmd/Peripherals/fm_port_ioctls.h b/include/uapi/linux/fmd/Peripherals/fm_port_ioctls.h -new file mode 100644 -index 00000000..eb9bd9a7 --- /dev/null +++ b/include/uapi/linux/fmd/Peripherals/fm_port_ioctls.h @@ -0,0 +1,973 @@ @@ -154407,9 +153651,6 @@ index 00000000..eb9bd9a7 +/** @} */ /* end of lnx_ioctl_FM_PORT_grp group */ +/** @} */ /* end of lnx_ioctl_FM_grp group */ +#endif /* __FM_PORT_IOCTLS_H */ -diff --git a/include/uapi/linux/fmd/Peripherals/fm_test_ioctls.h b/include/uapi/linux/fmd/Peripherals/fm_test_ioctls.h -new file mode 100644 -index 00000000..207ed1eb --- /dev/null +++ b/include/uapi/linux/fmd/Peripherals/fm_test_ioctls.h @@ -0,0 +1,208 @@ @@ -154621,16 +153862,10 @@ index 00000000..207ed1eb + + +#endif /* __FM_TEST_IOCTLS_H */ -diff --git a/include/uapi/linux/fmd/integrations/Kbuild b/include/uapi/linux/fmd/integrations/Kbuild -new file mode 100644 -index 00000000..e548d676 --- /dev/null +++ b/include/uapi/linux/fmd/integrations/Kbuild @@ -0,0 +1 @@ +header-y += integration_ioctls.h -diff --git a/include/uapi/linux/fmd/integrations/integration_ioctls.h b/include/uapi/linux/fmd/integrations/integration_ioctls.h -new file mode 100644 -index 00000000..61d696e2 --- /dev/null +++ b/include/uapi/linux/fmd/integrations/integration_ioctls.h @@ -0,0 +1,56 @@ @@ -154690,9 +153925,6 @@ index 00000000..61d696e2 +#endif + +#endif /* __INTG_IOCTLS_H */ -diff --git a/include/uapi/linux/fmd/ioctls.h b/include/uapi/linux/fmd/ioctls.h -new file mode 100644 -index 00000000..4f36cb05 --- /dev/null +++ b/include/uapi/linux/fmd/ioctls.h @@ -0,0 +1,96 @@ @@ -154792,9 +154024,6 @@ index 00000000..4f36cb05 + + +#endif /* __IOCTLS_H__ */ -diff --git a/include/uapi/linux/fmd/net_ioctls.h b/include/uapi/linux/fmd/net_ioctls.h -new file mode 100644 -index 00000000..c99d64cf --- /dev/null +++ b/include/uapi/linux/fmd/net_ioctls.h @@ -0,0 +1,430 @@ @@ -155228,6 +154457,3 @@ index 00000000..c99d64cf + + +#endif /* __NET_IOCTLS_H */ --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/702-pci-support-layerscape.patch b/target/linux/layerscape/patches-4.9/702-pci-support-layerscape.patch index 946a1c5c13..65243518ae 100644 --- a/target/linux/layerscape/patches-4.9/702-pci-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/702-pci-support-layerscape.patch @@ -30,8 +30,6 @@ Signed-off-by: Yangbo Lu create mode 100644 drivers/pci/host/pci-layerscape-ep.c create mode 100644 drivers/pci/host/pci-layerscape-ep.h -diff --git a/drivers/irqchip/irq-ls-scfg-msi.c b/drivers/irqchip/irq-ls-scfg-msi.c -index 02cca74c..57e3d900 100644 --- a/drivers/irqchip/irq-ls-scfg-msi.c +++ b/drivers/irqchip/irq-ls-scfg-msi.c @@ -17,13 +17,32 @@ @@ -84,7 +82,7 @@ index 02cca74c..57e3d900 100644 }; static struct irq_chip ls_scfg_msi_irq_chip = { -@@ -49,19 +71,56 @@ static struct msi_domain_info ls_scfg_msi_domain_info = { +@@ -49,19 +71,56 @@ static struct msi_domain_info ls_scfg_ms .chip = &ls_scfg_msi_irq_chip, }; @@ -143,7 +141,7 @@ index 02cca74c..57e3d900 100644 } static struct irq_chip ls_scfg_msi_parent_chip = { -@@ -81,8 +140,8 @@ static int ls_scfg_msi_domain_irq_alloc(struct irq_domain *domain, +@@ -81,8 +140,8 @@ static int ls_scfg_msi_domain_irq_alloc( WARN_ON(nr_irqs != 1); spin_lock(&msi_data->lock); @@ -154,7 +152,7 @@ index 02cca74c..57e3d900 100644 __set_bit(pos, msi_data->used); else err = -ENOSPC; -@@ -106,7 +165,7 @@ static void ls_scfg_msi_domain_irq_free(struct irq_domain *domain, +@@ -106,7 +165,7 @@ static void ls_scfg_msi_domain_irq_free( int pos; pos = d->hwirq; @@ -163,7 +161,7 @@ index 02cca74c..57e3d900 100644 pr_err("failed to teardown msi. Invalid hwirq %d\n", pos); return; } -@@ -123,15 +182,22 @@ static const struct irq_domain_ops ls_scfg_msi_domain_ops = { +@@ -123,15 +182,22 @@ static const struct irq_domain_ops ls_sc static void ls_scfg_msi_irq_handler(struct irq_desc *desc) { @@ -191,7 +189,7 @@ index 02cca74c..57e3d900 100644 if (virq) generic_handle_irq(virq); } -@@ -143,7 +209,7 @@ static int ls_scfg_msi_domains_init(struct ls_scfg_msi *msi_data) +@@ -143,7 +209,7 @@ static int ls_scfg_msi_domains_init(stru { /* Initialize MSI domain parent */ msi_data->parent = irq_domain_add_linear(NULL, @@ -200,7 +198,7 @@ index 02cca74c..57e3d900 100644 &ls_scfg_msi_domain_ops, msi_data); if (!msi_data->parent) { -@@ -164,16 +230,118 @@ static int ls_scfg_msi_domains_init(struct ls_scfg_msi *msi_data) +@@ -164,16 +230,118 @@ static int ls_scfg_msi_domains_init(stru return 0; } @@ -320,7 +318,7 @@ index 02cca74c..57e3d900 100644 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); msi_data->regs = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(msi_data->regs)) { -@@ -182,23 +350,48 @@ static int ls_scfg_msi_probe(struct platform_device *pdev) +@@ -182,23 +350,48 @@ static int ls_scfg_msi_probe(struct plat } msi_data->msiir_addr = res->start; @@ -379,7 +377,7 @@ index 02cca74c..57e3d900 100644 platform_set_drvdata(pdev, msi_data); return 0; -@@ -207,8 +400,10 @@ static int ls_scfg_msi_probe(struct platform_device *pdev) +@@ -207,8 +400,10 @@ static int ls_scfg_msi_probe(struct plat static int ls_scfg_msi_remove(struct platform_device *pdev) { struct ls_scfg_msi *msi_data = platform_get_drvdata(pdev); @@ -391,7 +389,7 @@ index 02cca74c..57e3d900 100644 irq_domain_remove(msi_data->msi_domain); irq_domain_remove(msi_data->parent); -@@ -218,12 +413,6 @@ static int ls_scfg_msi_remove(struct platform_device *pdev) +@@ -218,12 +413,6 @@ static int ls_scfg_msi_remove(struct pla return 0; } @@ -404,11 +402,9 @@ index 02cca74c..57e3d900 100644 static struct platform_driver ls_scfg_msi_driver = { .driver = { .name = "ls-scfg-msi", -diff --git a/drivers/pci/host/Makefile b/drivers/pci/host/Makefile -index 084cb498..88e87704 100644 --- a/drivers/pci/host/Makefile +++ b/drivers/pci/host/Makefile -@@ -17,7 +17,7 @@ obj-$(CONFIG_PCIE_XILINX) += pcie-xilinx.o +@@ -17,7 +17,7 @@ obj-$(CONFIG_PCIE_XILINX) += pcie-xilinx obj-$(CONFIG_PCIE_XILINX_NWL) += pcie-xilinx-nwl.o obj-$(CONFIG_PCI_XGENE) += pci-xgene.o obj-$(CONFIG_PCI_XGENE_MSI) += pci-xgene-msi.o @@ -417,9 +413,6 @@ index 084cb498..88e87704 100644 obj-$(CONFIG_PCI_VERSATILE) += pci-versatile.o obj-$(CONFIG_PCIE_IPROC) += pcie-iproc.o obj-$(CONFIG_PCIE_IPROC_MSI) += pcie-iproc-msi.o -diff --git a/drivers/pci/host/pci-layerscape-ep-debugfs.c b/drivers/pci/host/pci-layerscape-ep-debugfs.c -new file mode 100644 -index 00000000..5f4870ba --- /dev/null +++ b/drivers/pci/host/pci-layerscape-ep-debugfs.c @@ -0,0 +1,758 @@ @@ -1181,9 +1174,6 @@ index 00000000..5f4870ba +MODULE_AUTHOR("Minghuan Lian "); +MODULE_DESCRIPTION("Freescale Layerscape PCIe EP controller driver"); +MODULE_LICENSE("GPL v2"); -diff --git a/drivers/pci/host/pci-layerscape-ep.c b/drivers/pci/host/pci-layerscape-ep.c -new file mode 100644 -index 00000000..8f1cca6e --- /dev/null +++ b/drivers/pci/host/pci-layerscape-ep.c @@ -0,0 +1,309 @@ @@ -1496,9 +1486,6 @@ index 00000000..8f1cca6e +MODULE_AUTHOR("Minghuan Lian "); +MODULE_DESCRIPTION("Freescale Layerscape PCIe EP driver"); +MODULE_LICENSE("GPL v2"); -diff --git a/drivers/pci/host/pci-layerscape-ep.h b/drivers/pci/host/pci-layerscape-ep.h -new file mode 100644 -index 00000000..990c0ff5 --- /dev/null +++ b/drivers/pci/host/pci-layerscape-ep.h @@ -0,0 +1,115 @@ @@ -1617,8 +1604,6 @@ index 00000000..990c0ff5 +int ls_pcie_ep_dbgfs_remove(struct ls_pcie *pcie); + +#endif /* _PCIE_LAYERSCAPE_EP_H */ -diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c -index 65370799..7ce32ff0 100644 --- a/drivers/pci/host/pci-layerscape.c +++ b/drivers/pci/host/pci-layerscape.c @@ -35,12 +35,14 @@ @@ -1638,7 +1623,7 @@ index 65370799..7ce32ff0 100644 struct pcie_host_ops *ops; }; -@@ -86,6 +88,14 @@ static void ls_pcie_drop_msg_tlp(struct ls_pcie *pcie) +@@ -86,6 +88,14 @@ static void ls_pcie_drop_msg_tlp(struct iowrite32(val, pcie->pp.dbi_base + PCIE_STRFMR1); } @@ -1653,7 +1638,7 @@ index 65370799..7ce32ff0 100644 static int ls1021_pcie_link_up(struct pcie_port *pp) { u32 state; -@@ -134,7 +144,7 @@ static int ls_pcie_link_up(struct pcie_port *pp) +@@ -134,7 +144,7 @@ static int ls_pcie_link_up(struct pcie_p struct ls_pcie *pcie = to_ls_pcie(pp); u32 state; @@ -1662,7 +1647,7 @@ index 65370799..7ce32ff0 100644 pcie->drvdata->ltssm_shift) & LTSSM_STATE_MASK; -@@ -153,6 +163,9 @@ static void ls_pcie_host_init(struct pcie_port *pp) +@@ -153,6 +163,9 @@ static void ls_pcie_host_init(struct pci ls_pcie_clear_multifunction(pcie); ls_pcie_drop_msg_tlp(pcie); iowrite32(0, pcie->pp.dbi_base + PCIE_DBI_RO_WR_EN); @@ -1672,7 +1657,7 @@ index 65370799..7ce32ff0 100644 } static int ls_pcie_msi_host_init(struct pcie_port *pp, -@@ -196,20 +209,39 @@ static struct ls_pcie_drvdata ls1021_drvdata = { +@@ -196,20 +209,39 @@ static struct ls_pcie_drvdata ls1021_drv static struct ls_pcie_drvdata ls1043_drvdata = { .lut_offset = 0x10000, .ltssm_shift = 24, @@ -1712,11 +1697,9 @@ index 65370799..7ce32ff0 100644 { }, }; -diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c -index af8f6e92..2358e049 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c -@@ -478,6 +478,12 @@ int dw_pcie_wait_for_link(struct pcie_port *pp) +@@ -478,6 +478,12 @@ int dw_pcie_wait_for_link(struct pcie_po return -ETIMEDOUT; } @@ -1729,22 +1712,18 @@ index af8f6e92..2358e049 100644 int dw_pcie_link_up(struct pcie_port *pp) { u32 val; -diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h -index a567ea28..4e6672b2 100644 --- a/drivers/pci/host/pcie-designware.h +++ b/drivers/pci/host/pcie-designware.h -@@ -82,5 +82,6 @@ int dw_pcie_wait_for_link(struct pcie_port *pp); +@@ -82,5 +82,6 @@ int dw_pcie_wait_for_link(struct pcie_po int dw_pcie_link_up(struct pcie_port *pp); void dw_pcie_setup_rc(struct pcie_port *pp); int dw_pcie_host_init(struct pcie_port *pp); +void dw_pcie_disable_outbound_atu(struct pcie_port *pp, int index); #endif /* _PCIE_DESIGNWARE_H */ -diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c -index e9270b40..1bad877a 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c -@@ -44,52 +44,30 @@ static void release_pcie_device(struct device *dev) +@@ -44,52 +44,30 @@ static void release_pcie_device(struct d } /** @@ -1808,7 +1787,7 @@ index e9270b40..1bad877a 100644 /* * Allocate as many entries as the port wants, so that we can check -@@ -97,20 +75,13 @@ static int pcie_port_enable_msix(struct pci_dev *dev, int *vectors, int mask) +@@ -97,20 +75,13 @@ static int pcie_port_enable_msix(struct * equal to the number of entries this port actually uses, we'll happily * go through without any tricks. */ @@ -1834,7 +1813,7 @@ index e9270b40..1bad877a 100644 /* * The code below follows the PCI Express Base Specification 2.0 -@@ -125,18 +96,16 @@ static int pcie_port_enable_msix(struct pci_dev *dev, int *vectors, int mask) +@@ -125,18 +96,16 @@ static int pcie_port_enable_msix(struct pcie_capability_read_word(dev, PCI_EXP_FLAGS, ®16); entry = (reg16 & PCI_EXP_FLAGS_IRQ) >> 9; if (entry >= nr_entries) @@ -1858,7 +1837,7 @@ index e9270b40..1bad877a 100644 /* * The code below follows Section 7.10.10 of the PCI Express -@@ -151,13 +120,11 @@ static int pcie_port_enable_msix(struct pci_dev *dev, int *vectors, int mask) +@@ -151,13 +120,11 @@ static int pcie_port_enable_msix(struct pci_read_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, ®32); entry = reg32 >> 27; if (entry >= nr_entries) @@ -1875,7 +1854,7 @@ index e9270b40..1bad877a 100644 } /* -@@ -165,41 +132,54 @@ static int pcie_port_enable_msix(struct pci_dev *dev, int *vectors, int mask) +@@ -165,41 +132,54 @@ static int pcie_port_enable_msix(struct * what we have. Otherwise, the port has some extra entries not for the * services we know and we need to work around that. */ @@ -1949,7 +1928,7 @@ index e9270b40..1bad877a 100644 /* * If MSI cannot be used for PCIe PME or hotplug, we have to use -@@ -207,41 +187,25 @@ static int init_service_irqs(struct pci_dev *dev, int *irqs, int mask) +@@ -207,41 +187,25 @@ static int init_service_irqs(struct pci_ */ if (((mask & PCIE_PORT_SERVICE_PME) && pcie_pme_no_msi()) || ((mask & PCIE_PORT_SERVICE_HP) && pciehp_no_msi())) { @@ -2003,7 +1982,7 @@ index e9270b40..1bad877a 100644 /** * get_port_device_capability - discover capabilities of a PCI Express port * @dev: PCI Express port to examine -@@ -378,7 +342,7 @@ int pcie_port_device_register(struct pci_dev *dev) +@@ -378,7 +342,7 @@ int pcie_port_device_register(struct pci * that can be used in the absence of irqs. Allow them to determine * if that is to be used. */ @@ -2012,7 +1991,7 @@ index e9270b40..1bad877a 100644 if (status) { capabilities &= PCIE_PORT_SERVICE_VC | PCIE_PORT_SERVICE_HP; if (!capabilities) -@@ -401,7 +365,7 @@ int pcie_port_device_register(struct pci_dev *dev) +@@ -401,7 +365,7 @@ int pcie_port_device_register(struct pci return 0; error_cleanup_irqs: @@ -2021,7 +2000,7 @@ index e9270b40..1bad877a 100644 error_disable: pci_disable_device(dev); return status; -@@ -469,7 +433,7 @@ static int remove_iter(struct device *dev, void *data) +@@ -469,7 +433,7 @@ static int remove_iter(struct device *de void pcie_port_device_remove(struct pci_dev *dev) { device_for_each_child(&dev->dev, NULL, remove_iter); @@ -2030,7 +2009,7 @@ index e9270b40..1bad877a 100644 pci_disable_device(dev); } -@@ -499,7 +463,6 @@ static int pcie_port_probe_service(struct device *dev) +@@ -499,7 +463,6 @@ static int pcie_port_probe_service(struc if (status) return status; @@ -2038,7 +2017,7 @@ index e9270b40..1bad877a 100644 get_device(dev); return 0; } -@@ -524,8 +487,6 @@ static int pcie_port_remove_service(struct device *dev) +@@ -524,8 +487,6 @@ static int pcie_port_remove_service(stru pciedev = to_pcie_device(dev); driver = to_service_driver(dev->driver); if (driver && driver->remove) { @@ -2047,11 +2026,9 @@ index e9270b40..1bad877a 100644 driver->remove(pciedev); put_device(dev); } -diff --git a/include/linux/pci.h b/include/linux/pci.h -index 1b711796..6738d816 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h -@@ -1823,6 +1823,7 @@ void pcibios_release_device(struct pci_dev *dev); +@@ -1823,6 +1823,7 @@ void pcibios_release_device(struct pci_d void pcibios_penalize_isa_irq(int irq, int active); int pcibios_alloc_irq(struct pci_dev *dev); void pcibios_free_irq(struct pci_dev *dev); @@ -2059,6 +2036,3 @@ index 1b711796..6738d816 100644 #ifdef CONFIG_HIBERNATE_CALLBACKS extern struct dev_pm_ops pcibios_pm_ops; --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch b/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch index 312faf2c5b..81c473c4d2 100644 --- a/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch @@ -1741,7 +1741,7 @@ Signed-off-by: Yangbo Lu PHY_INTERFACE_MODE_MAX, } phy_interface_t; -@@ -784,6 +785,9 @@ int phy_stop_interrupts(struct phy_devic +@@ -780,6 +781,9 @@ int phy_stop_interrupts(struct phy_devic static inline int phy_read_status(struct phy_device *phydev) { diff --git a/target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch b/target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch index ab0afad4f3..a35e593105 100644 --- a/target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch +++ b/target/linux/layerscape/patches-4.9/704-fsl-mc-layerscape-support.patch @@ -94,8 +94,6 @@ Signed-off-by: Yangbo Lu create mode 100644 drivers/staging/fsl-mc/include/dpcon.h create mode 100644 drivers/staging/fsl-mc/include/dpopr.h -diff --git a/drivers/staging/fsl-mc/bus/Kconfig b/drivers/staging/fsl-mc/bus/Kconfig -index 1f959339..67847c0e 100644 --- a/drivers/staging/fsl-mc/bus/Kconfig +++ b/drivers/staging/fsl-mc/bus/Kconfig @@ -1,25 +1,40 @@ @@ -152,8 +150,6 @@ index 1f959339..67847c0e 100644 + help + Driver that provides kernel support for the Freescale Management + Complex resource manager user-space tool. -diff --git a/drivers/staging/fsl-mc/bus/Makefile b/drivers/staging/fsl-mc/bus/Makefile -index 38716fd5..e7e2239c 100644 --- a/drivers/staging/fsl-mc/bus/Makefile +++ b/drivers/staging/fsl-mc/bus/Makefile @@ -17,4 +17,12 @@ mc-bus-driver-objs := fsl-mc-bus.o \ @@ -170,9 +166,6 @@ index 38716fd5..e7e2239c 100644 + +# MC restool kernel support +obj-$(CONFIG_FSL_MC_RESTOOL) += mc-restool.o -diff --git a/drivers/staging/fsl-mc/bus/dpbp-cmd.h b/drivers/staging/fsl-mc/bus/dpbp-cmd.h -new file mode 100644 -index 00000000..8aa65452 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpbp-cmd.h @@ -0,0 +1,80 @@ @@ -256,8 +249,6 @@ index 00000000..8aa65452 +}; + +#endif /* _FSL_DPBP_CMD_H */ -diff --git a/drivers/staging/fsl-mc/bus/dpbp.c b/drivers/staging/fsl-mc/bus/dpbp.c -index 5d4cd812..d9e450a6 100644 --- a/drivers/staging/fsl-mc/bus/dpbp.c +++ b/drivers/staging/fsl-mc/bus/dpbp.c @@ -1,4 +1,5 @@ @@ -285,11 +276,10 @@ index 5d4cd812..d9e450a6 100644 /** * dpbp_open() - Open a control session for the specified object. -@@ -104,74 +105,6 @@ int dpbp_close(struct fsl_mc_io *mc_io, - } +@@ -105,74 +106,6 @@ int dpbp_close(struct fsl_mc_io *mc_io, EXPORT_SYMBOL(dpbp_close); --/** + /** - * dpbp_create() - Create the DPBP object. - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' @@ -357,10 +347,11 @@ index 5d4cd812..d9e450a6 100644 - return mc_send_command(mc_io, &cmd); -} - - /** +-/** * dpbp_enable() - Enable the DPBP. * @mc_io: Pointer to MC portal's I/O object -@@ -250,6 +183,7 @@ int dpbp_is_enabled(struct fsl_mc_io *mc_io, + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' +@@ -250,6 +183,7 @@ int dpbp_is_enabled(struct fsl_mc_io *mc return 0; } @@ -680,7 +671,7 @@ index 5d4cd812..d9e450a6 100644 /** * dpbp_get_attributes - Retrieve DPBP attributes. -@@ -609,83 +240,40 @@ int dpbp_get_attributes(struct fsl_mc_io *mc_io, +@@ -609,83 +240,40 @@ int dpbp_get_attributes(struct fsl_mc_io rsp_params = (struct dpbp_rsp_get_attributes *)cmd.params; attr->bpid = le16_to_cpu(rsp_params->bpid); attr->id = le32_to_cpu(rsp_params->id); @@ -777,9 +768,6 @@ index 5d4cd812..d9e450a6 100644 return 0; } +EXPORT_SYMBOL(dpbp_get_api_version); -diff --git a/drivers/staging/fsl-mc/bus/dpcon-cmd.h b/drivers/staging/fsl-mc/bus/dpcon-cmd.h -new file mode 100644 -index 00000000..2bb66988 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpcon-cmd.h @@ -0,0 +1,85 @@ @@ -868,9 +856,6 @@ index 00000000..2bb66988 +}; + +#endif /* _FSL_DPCON_CMD_H */ -diff --git a/drivers/staging/fsl-mc/bus/dpcon.c b/drivers/staging/fsl-mc/bus/dpcon.c -new file mode 100644 -index 00000000..eb713578 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpcon.c @@ -0,0 +1,317 @@ @@ -1191,9 +1176,6 @@ index 00000000..eb713578 + return 0; +} +EXPORT_SYMBOL(dpcon_get_api_version); -diff --git a/drivers/staging/fsl-mc/bus/dpio/Makefile b/drivers/staging/fsl-mc/bus/dpio/Makefile -new file mode 100644 -index 00000000..1c28794e --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/Makefile @@ -0,0 +1,11 @@ @@ -1208,53 +1190,48 @@ index 00000000..1c28794e +fsl-mc-dpio-objs := dpio.o qbman-portal.o dpio-service.o dpio-driver.o + +obj-$(CONFIG_FSL_QBMAN_DEBUG) += qbman_debug.o -diff --git a/drivers/staging/fsl-mc/include/dpcon-cmd.h b/drivers/staging/fsl-mc/bus/dpio/dpio-cmd.h -similarity index 64% -rename from drivers/staging/fsl-mc/include/dpcon-cmd.h -rename to drivers/staging/fsl-mc/bus/dpio/dpio-cmd.h -index 536b2ef1..b2dc6e76 100644 --- a/drivers/staging/fsl-mc/include/dpcon-cmd.h -+++ b/drivers/staging/fsl-mc/bus/dpio/dpio-cmd.h -@@ -1,4 +1,6 @@ ++++ /dev/null +@@ -1,62 +0,0 @@ -/* Copyright 2013-2015 Freescale Semiconductor Inc. -+/* -+ * Copyright 2013-2016 Freescale Semiconductor Inc. -+ * Copyright 2016 NXP - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: -@@ -11,7 +13,6 @@ - * names of any contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * - * ALTERNATIVELY, this software may be distributed under the terms of the - * GNU General Public License ("GPL") as published by the Free Software - * Foundation, either version 2 of that License or (at your option) any -@@ -29,34 +30,46 @@ - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions are met: +- * * Redistributions of source code must retain the above copyright +- * notice, this list of conditions and the following disclaimer. +- * * Redistributions in binary form must reproduce the above copyright +- * notice, this list of conditions and the following disclaimer in the +- * documentation and/or other materials provided with the distribution. +- * * Neither the name of the above-listed copyright holders nor the +- * names of any contributors may be used to endorse or promote products +- * derived from this software without specific prior written permission. +- * +- * +- * ALTERNATIVELY, this software may be distributed under the terms of the +- * GNU General Public License ("GPL") as published by the Free Software +- * Foundation, either version 2 of that License or (at your option) any +- * later version. +- * +- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE +- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +- * POSSIBILITY OF SUCH DAMAGE. +- */ -#ifndef _FSL_DPCON_CMD_H -#define _FSL_DPCON_CMD_H -+#ifndef _FSL_DPIO_CMD_H -+#define _FSL_DPIO_CMD_H -+ -+/* DPIO Version */ -+#define DPIO_VER_MAJOR 4 -+#define DPIO_VER_MINOR 2 -+ -+/* Command Versioning */ -+ -+#define DPIO_CMD_ID_OFFSET 4 -+#define DPIO_CMD_BASE_VERSION 1 - +- -/* DPCON Version */ -#define DPCON_VER_MAJOR 2 -#define DPCON_VER_MINOR 1 -+#define DPIO_CMD(id) (((id) << DPIO_CMD_ID_OFFSET) | DPIO_CMD_BASE_VERSION) - - /* Command IDs */ +- +-/* Command IDs */ -#define DPCON_CMDID_CLOSE 0x800 -#define DPCON_CMDID_OPEN 0x808 -#define DPCON_CMDID_CREATE 0x908 @@ -1278,6 +1255,56 @@ index 536b2ef1..b2dc6e76 100644 -#define DPCON_CMDID_SET_NOTIFICATION 0x100 - -#endif /* _FSL_DPCON_CMD_H */ +--- /dev/null ++++ b/drivers/staging/fsl-mc/bus/dpio/dpio-cmd.h +@@ -0,0 +1,75 @@ ++/* ++ * Copyright 2013-2016 Freescale Semiconductor Inc. ++ * Copyright 2016 NXP ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * * Neither the name of the above-listed copyright holders nor the ++ * names of any contributors may be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * ALTERNATIVELY, this software may be distributed under the terms of the ++ * GNU General Public License ("GPL") as published by the Free Software ++ * Foundation, either version 2 of that License or (at your option) any ++ * later version. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++#ifndef _FSL_DPIO_CMD_H ++#define _FSL_DPIO_CMD_H ++ ++/* DPIO Version */ ++#define DPIO_VER_MAJOR 4 ++#define DPIO_VER_MINOR 2 ++ ++/* Command Versioning */ ++ ++#define DPIO_CMD_ID_OFFSET 4 ++#define DPIO_CMD_BASE_VERSION 1 ++ ++#define DPIO_CMD(id) (((id) << DPIO_CMD_ID_OFFSET) | DPIO_CMD_BASE_VERSION) ++ ++/* Command IDs */ +#define DPIO_CMDID_CLOSE DPIO_CMD(0x800) +#define DPIO_CMDID_OPEN DPIO_CMD(0x803) +#define DPIO_CMDID_GET_API_VERSION DPIO_CMD(0xa03) @@ -1306,9 +1333,6 @@ index 536b2ef1..b2dc6e76 100644 +}; + +#endif /* _FSL_DPIO_CMD_H */ -diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c -new file mode 100644 -index 00000000..8c8244a1 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c @@ -0,0 +1,296 @@ @@ -1608,9 +1632,6 @@ index 00000000..8c8244a1 +} +module_init(dpio_driver_init); +module_exit(dpio_driver_exit); -diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt -new file mode 100644 -index 00000000..0ba67716 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt @@ -0,0 +1,135 @@ @@ -1749,9 +1770,6 @@ index 00000000..0ba67716 + manipulate them are defined in dpaa2-fd.h. + + Dequeue result struct and parsing APIs are defined in dpaa2-global.h. -diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c -new file mode 100644 -index 00000000..8449d988 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c @@ -0,0 +1,693 @@ @@ -2448,9 +2466,6 @@ index 00000000..8449d988 +} +EXPORT_SYMBOL(dpaa2_io_query_bp_count); +#endif -diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio.c b/drivers/staging/fsl-mc/bus/dpio/dpio.c -new file mode 100644 -index 00000000..d81e0232 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/dpio.c @@ -0,0 +1,224 @@ @@ -2678,9 +2693,6 @@ index 00000000..d81e0232 + + return 0; +} -diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio.h b/drivers/staging/fsl-mc/bus/dpio/dpio.h -new file mode 100644 -index 00000000..ced1103d --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/dpio.h @@ -0,0 +1,109 @@ @@ -2793,9 +2805,6 @@ index 00000000..ced1103d + u16 *minor_ver); + +#endif /* __FSL_DPIO_H */ -diff --git a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c -new file mode 100644 -index 00000000..e14fb65b --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c @@ -0,0 +1,1049 @@ @@ -3848,9 +3857,6 @@ index 00000000..e14fb65b + + return 0; +} -diff --git a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.h b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.h -new file mode 100644 -index 00000000..4254034c --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.h @@ -0,0 +1,662 @@ @@ -4516,9 +4522,6 @@ index 00000000..4254034c +#define qb_cl(d) (&(d)->dont_manipulate_directly[0]) + +#endif /* __FSL_QBMAN_PORTAL_H */ -diff --git a/drivers/staging/fsl-mc/bus/dpio/qbman_debug.c b/drivers/staging/fsl-mc/bus/dpio/qbman_debug.c -new file mode 100644 -index 00000000..1c77fa6a --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/qbman_debug.c @@ -0,0 +1,853 @@ @@ -5375,9 +5378,6 @@ index 00000000..1c77fa6a + return qbman_cgr_statistics_query(s, cgid, clear, 0, + frame_cnt, byte_cnt); +} -diff --git a/drivers/staging/fsl-mc/bus/dpio/qbman_debug.h b/drivers/staging/fsl-mc/bus/dpio/qbman_debug.h -new file mode 100644 -index 00000000..0a247a49 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/qbman_debug.h @@ -0,0 +1,136 @@ @@ -5517,9 +5517,6 @@ index 00000000..0a247a49 + u64 *frame_cnt, u64 *byte_cnt); +int qbman_cq_dequeue_statistics(struct qbman_swp *s, u32 cgid, int clear, + u64 *frame_cnt, u64 *byte_cnt); -diff --git a/drivers/staging/fsl-mc/bus/dpio/qbman_private.h b/drivers/staging/fsl-mc/bus/dpio/qbman_private.h -new file mode 100644 -index 00000000..98a64be2 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/qbman_private.h @@ -0,0 +1,171 @@ @@ -5694,8 +5691,6 @@ index 00000000..98a64be2 + + __hexdump(start, end, p, sz, c); +} -diff --git a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h b/drivers/staging/fsl-mc/bus/dpmcp-cmd.h -index d098a6d8..384a13d0 100644 --- a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h +++ b/drivers/staging/fsl-mc/bus/dpmcp-cmd.h @@ -1,4 +1,5 @@ @@ -5719,27 +5714,16 @@ index d098a6d8..384a13d0 100644 /* Minimal supported DPMCP Version */ -#define DPMCP_MIN_VER_MAJOR 3 -#define DPMCP_MIN_VER_MINOR 0 -+#define DPMCP_MIN_VER_MAJOR 3 -+#define DPMCP_MIN_VER_MINOR 0 - +- -/* Command IDs */ -#define DPMCP_CMDID_CLOSE 0x800 -#define DPMCP_CMDID_OPEN 0x80b -#define DPMCP_CMDID_CREATE 0x90b -#define DPMCP_CMDID_DESTROY 0x900 -+/* Command versioning */ -+#define DPMCP_CMD_BASE_VERSION 1 -+#define DPMCP_CMD_ID_OFFSET 4 - +- -#define DPMCP_CMDID_GET_ATTR 0x004 -#define DPMCP_CMDID_RESET 0x005 -+#define DPMCP_CMD(id) ((id << DPMCP_CMD_ID_OFFSET) | DPMCP_CMD_BASE_VERSION) -+ -+/* Command IDs */ -+#define DPMCP_CMDID_CLOSE DPMCP_CMD(0x800) -+#define DPMCP_CMDID_OPEN DPMCP_CMD(0x80b) -+#define DPMCP_CMDID_GET_API_VERSION DPMCP_CMD(0xa0b) - +- -#define DPMCP_CMDID_SET_IRQ 0x010 -#define DPMCP_CMDID_GET_IRQ 0x011 -#define DPMCP_CMDID_SET_IRQ_ENABLE 0x012 @@ -5747,12 +5731,11 @@ index d098a6d8..384a13d0 100644 -#define DPMCP_CMDID_SET_IRQ_MASK 0x014 -#define DPMCP_CMDID_GET_IRQ_MASK 0x015 -#define DPMCP_CMDID_GET_IRQ_STATUS 0x016 -+#define DPMCP_CMDID_RESET DPMCP_CMD(0x005) - - struct dpmcp_cmd_open { - __le32 dpmcp_id; - }; - +- +-struct dpmcp_cmd_open { +- __le32 dpmcp_id; +-}; +- -struct dpmcp_cmd_create { - __le32 portal_id; -}; @@ -5783,15 +5766,21 @@ index d098a6d8..384a13d0 100644 - __le32 irq_num; - __le32 type; -}; -- ++#define DPMCP_MIN_VER_MAJOR 3 ++#define DPMCP_MIN_VER_MINOR 0 + -#define DPMCP_ENABLE 0x1 -- ++/* Command versioning */ ++#define DPMCP_CMD_BASE_VERSION 1 ++#define DPMCP_CMD_ID_OFFSET 4 + -struct dpmcp_cmd_set_irq_enable { - u8 enable; - u8 pad[3]; - u8 irq_index; -}; -- ++#define DPMCP_CMD(id) ((id << DPMCP_CMD_ID_OFFSET) | DPMCP_CMD_BASE_VERSION) + -struct dpmcp_cmd_get_irq_enable { - __le32 pad; - u8 irq_index; @@ -5814,12 +5803,17 @@ index d098a6d8..384a13d0 100644 -struct dpmcp_rsp_get_irq_mask { - __le32 mask; -}; -- ++/* Command IDs */ ++#define DPMCP_CMDID_CLOSE DPMCP_CMD(0x800) ++#define DPMCP_CMDID_OPEN DPMCP_CMD(0x80b) ++#define DPMCP_CMDID_GET_API_VERSION DPMCP_CMD(0xa0b) + -struct dpmcp_cmd_get_irq_status { - __le32 status; - u8 irq_index; -}; -- ++#define DPMCP_CMDID_RESET DPMCP_CMD(0x005) + -struct dpmcp_rsp_get_irq_status { - __le32 status; -}; @@ -5831,11 +5825,11 @@ index d098a6d8..384a13d0 100644 - /* response word 1 */ - __le16 version_major; - __le16 version_minor; --}; -- ++struct dpmcp_cmd_open { ++ __le32 dpmcp_id; + }; + #endif /* _FSL_DPMCP_CMD_H */ -diff --git a/drivers/staging/fsl-mc/bus/dpmcp.c b/drivers/staging/fsl-mc/bus/dpmcp.c -index 55766f78..ad4c8b43 100644 --- a/drivers/staging/fsl-mc/bus/dpmcp.c +++ b/drivers/staging/fsl-mc/bus/dpmcp.c @@ -1,4 +1,5 @@ @@ -5853,11 +5847,10 @@ index 55766f78..ad4c8b43 100644 * ALTERNATIVELY, this software may be distributed under the terms of the * GNU General Public License ("GPL") as published by the Free Software * Foundation, either version 2 of that License or (at your option) any -@@ -103,76 +103,6 @@ int dpmcp_close(struct fsl_mc_io *mc_io, - return mc_send_command(mc_io, &cmd); +@@ -104,76 +104,6 @@ int dpmcp_close(struct fsl_mc_io *mc_io, } --/** + /** - * dpmcp_create() - Create the DPMCP object. - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' @@ -5927,9 +5920,10 @@ index 55766f78..ad4c8b43 100644 - return mc_send_command(mc_io, &cmd); -} - - /** +-/** * dpmcp_reset() - Reset the DPMCP, returns the object to initial state. * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' @@ -196,309 +126,33 @@ int dpmcp_reset(struct fsl_mc_io *mc_io, } @@ -6252,8 +6246,6 @@ index 55766f78..ad4c8b43 100644 return 0; } -diff --git a/drivers/staging/fsl-mc/bus/dpmcp.h b/drivers/staging/fsl-mc/bus/dpmcp.h -index fe79d4d9..f616031e 100644 --- a/drivers/staging/fsl-mc/bus/dpmcp.h +++ b/drivers/staging/fsl-mc/bus/dpmcp.h @@ -1,4 +1,5 @@ @@ -6296,7 +6288,9 @@ index fe79d4d9..f616031e 100644 int dpmcp_close(struct fsl_mc_io *mc_io, - uint32_t cmd_flags, - uint16_t token); -- ++ u32 cmd_flags, ++ u16 token); + -/** - * struct dpmcp_cfg - Structure representing DPMCP configuration - * @portal_id: Portal ID; 'DPMCP_GET_PORTAL_ID_FROM_POOL' to get the portal ID @@ -6310,9 +6304,7 @@ index fe79d4d9..f616031e 100644 - uint32_t cmd_flags, - const struct dpmcp_cfg *cfg, - uint16_t *token); -+ u32 cmd_flags, -+ u16 token); - +- -int dpmcp_destroy(struct fsl_mc_io *mc_io, - uint32_t cmd_flags, - uint16_t token); @@ -6412,8 +6404,6 @@ index fe79d4d9..f616031e 100644 + u16 token); #endif /* __FSL_DPMCP_H */ -diff --git a/drivers/staging/fsl-mc/bus/dpmng-cmd.h b/drivers/staging/fsl-mc/bus/dpmng-cmd.h -index a7b77d58..cdddfb80 100644 --- a/drivers/staging/fsl-mc/bus/dpmng-cmd.h +++ b/drivers/staging/fsl-mc/bus/dpmng-cmd.h @@ -12,7 +12,6 @@ @@ -6445,8 +6435,6 @@ index a7b77d58..cdddfb80 100644 struct dpmng_rsp_get_version { __le32 revision; -diff --git a/drivers/staging/fsl-mc/bus/dpmng.c b/drivers/staging/fsl-mc/bus/dpmng.c -index 96b1d677..ad5d5bbe 100644 --- a/drivers/staging/fsl-mc/bus/dpmng.c +++ b/drivers/staging/fsl-mc/bus/dpmng.c @@ -1,4 +1,5 @@ @@ -6464,7 +6452,7 @@ index 96b1d677..ad5d5bbe 100644 * ALTERNATIVELY, this software may be distributed under the terms of the * GNU General Public License ("GPL") as published by the Free Software * Foundation, either version 2 of that License or (at your option) any -@@ -72,36 +72,3 @@ int mc_get_version(struct fsl_mc_io *mc_io, +@@ -72,36 +72,3 @@ int mc_get_version(struct fsl_mc_io *mc_ } EXPORT_SYMBOL(mc_get_version); @@ -6501,8 +6489,6 @@ index 96b1d677..ad5d5bbe 100644 - return 0; -} - -diff --git a/drivers/staging/fsl-mc/bus/dprc-cmd.h b/drivers/staging/fsl-mc/bus/dprc-cmd.h -index 009d6567..b7d8c345 100644 --- a/drivers/staging/fsl-mc/bus/dprc-cmd.h +++ b/drivers/staging/fsl-mc/bus/dprc-cmd.h @@ -12,7 +12,6 @@ @@ -6521,13 +6507,7 @@ index 009d6567..b7d8c345 100644 +#define DPRC_MIN_VER_MAJOR 6 #define DPRC_MIN_VER_MINOR 0 -+/* Command versioning */ -+#define DPRC_CMD_BASE_VERSION 1 -+#define DPRC_CMD_ID_OFFSET 4 -+ -+#define DPRC_CMD(id) ((id << DPRC_CMD_ID_OFFSET) | DPRC_CMD_BASE_VERSION) -+ - /* Command IDs */ +-/* Command IDs */ -#define DPRC_CMDID_CLOSE 0x800 -#define DPRC_CMDID_OPEN 0x805 -#define DPRC_CMDID_CREATE 0x905 @@ -6564,8 +6544,14 @@ index 009d6567..b7d8c345 100644 -#define DPRC_CMDID_DISCONNECT 0x168 -#define DPRC_CMDID_GET_POOL 0x169 -#define DPRC_CMDID_GET_POOL_COUNT 0x16A -- ++/* Command versioning */ ++#define DPRC_CMD_BASE_VERSION 1 ++#define DPRC_CMD_ID_OFFSET 4 + -#define DPRC_CMDID_GET_CONNECTION 0x16C ++#define DPRC_CMD(id) ((id << DPRC_CMD_ID_OFFSET) | DPRC_CMD_BASE_VERSION) ++ ++/* Command IDs */ +#define DPRC_CMDID_CLOSE DPRC_CMD(0x800) +#define DPRC_CMDID_OPEN DPRC_CMD(0x805) +#define DPRC_CMDID_GET_API_VERSION DPRC_CMD(0xa05) @@ -6621,8 +6607,6 @@ index 009d6567..b7d8c345 100644 }; struct dprc_cmd_set_obj_label { -diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c -index c5ee4639..f6e6211b 100644 --- a/drivers/staging/fsl-mc/bus/dprc-driver.c +++ b/drivers/staging/fsl-mc/bus/dprc-driver.c @@ -1,7 +1,7 @@ @@ -6634,7 +6618,7 @@ index c5ee4639..f6e6211b 100644 * Author: German Rivera * * This file is licensed under the terms of the GNU General Public -@@ -160,6 +160,8 @@ static void check_plugged_state_change(struct fsl_mc_device *mc_dev, +@@ -160,6 +160,8 @@ static void check_plugged_state_change(s * dprc_add_new_devices - Adds devices to the logical bus for a DPRC * * @mc_bus_dev: pointer to the fsl-mc device that represents a DPRC object @@ -6643,7 +6627,7 @@ index c5ee4639..f6e6211b 100644 * @obj_desc_array: array of device descriptors for child devices currently * present in the physical DPRC. * @num_child_objects_in_mc: number of entries in obj_desc_array -@@ -169,6 +171,7 @@ static void check_plugged_state_change(struct fsl_mc_device *mc_dev, +@@ -169,6 +171,7 @@ static void check_plugged_state_change(s * in the physical DPRC. */ static void dprc_add_new_devices(struct fsl_mc_device *mc_bus_dev, @@ -6651,7 +6635,7 @@ index c5ee4639..f6e6211b 100644 struct dprc_obj_desc *obj_desc_array, int num_child_objects_in_mc) { -@@ -188,11 +191,12 @@ static void dprc_add_new_devices(struct fsl_mc_device *mc_bus_dev, +@@ -188,11 +191,12 @@ static void dprc_add_new_devices(struct child_dev = fsl_mc_device_lookup(obj_desc, mc_bus_dev); if (child_dev) { check_plugged_state_change(child_dev, obj_desc); @@ -6665,7 +6649,7 @@ index c5ee4639..f6e6211b 100644 if (error < 0) continue; } -@@ -202,6 +206,8 @@ static void dprc_add_new_devices(struct fsl_mc_device *mc_bus_dev, +@@ -202,6 +206,8 @@ static void dprc_add_new_devices(struct * dprc_scan_objects - Discover objects in a DPRC * * @mc_bus_dev: pointer to the fsl-mc device that represents a DPRC object @@ -6674,7 +6658,7 @@ index c5ee4639..f6e6211b 100644 * @total_irq_count: total number of IRQs needed by objects in the DPRC. * * Detects objects added and removed from a DPRC and synchronizes the -@@ -217,6 +223,7 @@ static void dprc_add_new_devices(struct fsl_mc_device *mc_bus_dev, +@@ -217,6 +223,7 @@ static void dprc_add_new_devices(struct * of the device drivers for the non-allocatable devices. */ int dprc_scan_objects(struct fsl_mc_device *mc_bus_dev, @@ -6682,7 +6666,7 @@ index c5ee4639..f6e6211b 100644 unsigned int *total_irq_count) { int num_child_objects; -@@ -297,7 +304,7 @@ int dprc_scan_objects(struct fsl_mc_device *mc_bus_dev, +@@ -297,7 +304,7 @@ int dprc_scan_objects(struct fsl_mc_devi dprc_remove_devices(mc_bus_dev, child_obj_desc_array, num_child_objects); @@ -6691,7 +6675,7 @@ index c5ee4639..f6e6211b 100644 num_child_objects); if (child_obj_desc_array) -@@ -328,7 +335,7 @@ int dprc_scan_container(struct fsl_mc_device *mc_bus_dev) +@@ -328,7 +335,7 @@ int dprc_scan_container(struct fsl_mc_de * Discover objects in the DPRC: */ mutex_lock(&mc_bus->scan_mutex); @@ -6700,7 +6684,7 @@ index c5ee4639..f6e6211b 100644 mutex_unlock(&mc_bus->scan_mutex); if (error < 0) goto error; -@@ -415,7 +422,7 @@ static irqreturn_t dprc_irq0_handler_thread(int irq_num, void *arg) +@@ -415,7 +422,7 @@ static irqreturn_t dprc_irq0_handler_thr DPRC_IRQ_EVENT_OBJ_CREATED)) { unsigned int irq_count; @@ -6709,7 +6693,7 @@ index c5ee4639..f6e6211b 100644 if (error < 0) { /* * If the error is -ENXIO, we ignore it, as it indicates -@@ -505,7 +512,7 @@ static int register_dprc_irq_handler(struct fsl_mc_device *mc_dev) +@@ -505,7 +512,7 @@ static int register_dprc_irq_handler(str dprc_irq0_handler, dprc_irq0_handler_thread, IRQF_NO_SUSPEND | IRQF_ONESHOT, @@ -6718,7 +6702,7 @@ index c5ee4639..f6e6211b 100644 &mc_dev->dev); if (error < 0) { dev_err(&mc_dev->dev, -@@ -597,6 +604,7 @@ static int dprc_probe(struct fsl_mc_device *mc_dev) +@@ -597,6 +604,7 @@ static int dprc_probe(struct fsl_mc_devi struct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_dev); bool mc_io_created = false; bool msi_domain_set = false; @@ -6726,7 +6710,7 @@ index c5ee4639..f6e6211b 100644 if (WARN_ON(strcmp(mc_dev->obj_desc.type, "dprc") != 0)) return -EINVAL; -@@ -669,13 +677,21 @@ static int dprc_probe(struct fsl_mc_device *mc_dev) +@@ -669,13 +677,21 @@ static int dprc_probe(struct fsl_mc_devi goto error_cleanup_open; } @@ -6753,8 +6737,6 @@ index c5ee4639..f6e6211b 100644 error = -ENOTSUPP; goto error_cleanup_open; } -diff --git a/drivers/staging/fsl-mc/bus/dprc.c b/drivers/staging/fsl-mc/bus/dprc.c -index 9fea3def..764cd3fb 100644 --- a/drivers/staging/fsl-mc/bus/dprc.c +++ b/drivers/staging/fsl-mc/bus/dprc.c @@ -1,4 +1,5 @@ @@ -6772,11 +6754,10 @@ index 9fea3def..764cd3fb 100644 * ALTERNATIVELY, this software may be distributed under the terms of the * GNU General Public License ("GPL") as published by the Free Software * Foundation, either version 2 of that License or (at your option) any -@@ -99,93 +99,6 @@ int dprc_close(struct fsl_mc_io *mc_io, - } +@@ -100,93 +100,6 @@ int dprc_close(struct fsl_mc_io *mc_io, EXPORT_SYMBOL(dprc_close); --/** + /** - * dprc_create_container() - Create child container - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' @@ -6863,10 +6844,11 @@ index 9fea3def..764cd3fb 100644 - return mc_send_command(mc_io, &cmd); -} - - /** +-/** * dprc_reset_container - Reset child container. * @mc_io: Pointer to MC portal's I/O object -@@ -565,279 +478,6 @@ int dprc_get_attributes(struct fsl_mc_io *mc_io, + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' +@@ -565,279 +478,6 @@ int dprc_get_attributes(struct fsl_mc_io attr->icid = le16_to_cpu(rsp_params->icid); attr->options = le32_to_cpu(rsp_params->options); attr->portal_id = le32_to_cpu(rsp_params->portal_id); @@ -7146,11 +7128,10 @@ index 9fea3def..764cd3fb 100644 return 0; } -@@ -933,64 +573,6 @@ int dprc_get_obj(struct fsl_mc_io *mc_io, - } +@@ -934,64 +574,6 @@ int dprc_get_obj(struct fsl_mc_io *mc_io EXPORT_SYMBOL(dprc_get_obj); --/** + /** - * dprc_get_obj_desc() - Get object descriptor. - * - * @mc_io: Pointer to MC portal's I/O object @@ -7208,14 +7189,14 @@ index 9fea3def..764cd3fb 100644 -} -EXPORT_SYMBOL(dprc_get_obj_desc); - - /** +-/** * dprc_set_obj_irq() - Set IRQ information for object to trigger an interrupt. * @mc_io: Pointer to MC portal's I/O object -@@ -1129,52 +711,6 @@ int dprc_get_res_count(struct fsl_mc_io *mc_io, - } + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' +@@ -1130,52 +712,6 @@ int dprc_get_res_count(struct fsl_mc_io EXPORT_SYMBOL(dprc_get_res_count); --/** + /** - * dprc_get_res_ids() - Obtains IDs of free resources in the container - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' @@ -7261,10 +7242,11 @@ index 9fea3def..764cd3fb 100644 -} -EXPORT_SYMBOL(dprc_get_res_ids); - - /** +-/** * dprc_get_obj_region() - Get region information for a specified object. * @mc_io: Pointer to MC portal's I/O object -@@ -1216,160 +752,66 @@ int dprc_get_obj_region(struct fsl_mc_io *mc_io, + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' +@@ -1216,160 +752,66 @@ int dprc_get_obj_region(struct fsl_mc_io /* retrieve response parameters */ rsp_params = (struct dprc_rsp_get_obj_region *)cmd.params; @@ -7455,7 +7437,7 @@ index 9fea3def..764cd3fb 100644 /* send command to mc*/ err = mc_send_command(mc_io, &cmd); -@@ -1377,12 +819,7 @@ int dprc_get_connection(struct fsl_mc_io *mc_io, +@@ -1377,12 +819,7 @@ int dprc_get_connection(struct fsl_mc_io return err; /* retrieve response parameters */ @@ -7469,8 +7451,6 @@ index 9fea3def..764cd3fb 100644 return 0; } -diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c -index e93ab53b..ce07096c 100644 --- a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c +++ b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c @@ -1,7 +1,7 @@ @@ -7516,7 +7496,7 @@ index e93ab53b..ce07096c 100644 */ static int __must_check fsl_mc_resource_pool_add_device(struct fsl_mc_bus *mc_bus, -@@ -95,10 +92,10 @@ static int __must_check fsl_mc_resource_pool_add_device(struct fsl_mc_bus +@@ -95,10 +92,10 @@ out: * fsl_mc_resource_pool_remove_device - remove an allocatable device from a * resource pool * @@ -7530,7 +7510,7 @@ index e93ab53b..ce07096c 100644 */ static int __must_check fsl_mc_resource_pool_remove_device(struct fsl_mc_device *mc_dev) -@@ -255,17 +252,18 @@ void fsl_mc_resource_free(struct fsl_mc_resource *resource) +@@ -255,17 +252,18 @@ out_unlock: EXPORT_SYMBOL_GPL(fsl_mc_resource_free); /** @@ -7558,7 +7538,7 @@ index e93ab53b..ce07096c 100644 * * NOTE: pool_type must be different from FSL_MC_POOL_MCP, since MC * portals are allocated using fsl_mc_portal_allocate(), instead of -@@ -312,10 +310,9 @@ int __must_check fsl_mc_object_allocate(struct fsl_mc_device *mc_dev, +@@ -312,10 +310,9 @@ error: EXPORT_SYMBOL_GPL(fsl_mc_object_allocate); /** @@ -7572,7 +7552,7 @@ index e93ab53b..ce07096c 100644 */ void fsl_mc_object_free(struct fsl_mc_device *mc_adev) { -@@ -332,8 +329,14 @@ void fsl_mc_object_free(struct fsl_mc_device *mc_adev) +@@ -332,8 +329,14 @@ void fsl_mc_object_free(struct fsl_mc_de EXPORT_SYMBOL_GPL(fsl_mc_object_free); /* @@ -7589,7 +7569,7 @@ index e93ab53b..ce07096c 100644 */ int fsl_mc_populate_irq_pool(struct fsl_mc_bus *mc_bus, unsigned int irq_count) -@@ -395,7 +398,7 @@ int fsl_mc_populate_irq_pool(struct fsl_mc_bus *mc_bus, +@@ -395,7 +398,7 @@ cleanup_msi_irqs: EXPORT_SYMBOL_GPL(fsl_mc_populate_irq_pool); /** @@ -7598,7 +7578,7 @@ index e93ab53b..ce07096c 100644 * It frees the IRQs that were allocated to the pool, back to the GIC-ITS. */ void fsl_mc_cleanup_irq_pool(struct fsl_mc_bus *mc_bus) -@@ -422,11 +425,7 @@ void fsl_mc_cleanup_irq_pool(struct fsl_mc_bus *mc_bus) +@@ -422,11 +425,7 @@ void fsl_mc_cleanup_irq_pool(struct fsl_ EXPORT_SYMBOL_GPL(fsl_mc_cleanup_irq_pool); /** @@ -7611,7 +7591,7 @@ index e93ab53b..ce07096c 100644 */ int __must_check fsl_mc_allocate_irqs(struct fsl_mc_device *mc_dev) { -@@ -495,8 +494,7 @@ int __must_check fsl_mc_allocate_irqs(struct fsl_mc_device *mc_dev) +@@ -495,8 +494,7 @@ error_resource_alloc: EXPORT_SYMBOL_GPL(fsl_mc_allocate_irqs); /* @@ -7621,7 +7601,7 @@ index e93ab53b..ce07096c 100644 */ void fsl_mc_free_irqs(struct fsl_mc_device *mc_dev) { -@@ -605,7 +603,7 @@ static int fsl_mc_allocator_probe(struct fsl_mc_device *mc_dev) +@@ -605,7 +603,7 @@ static int fsl_mc_allocator_probe(struct return error; dev_dbg(&mc_dev->dev, @@ -7630,7 +7610,7 @@ index e93ab53b..ce07096c 100644 return 0; } -@@ -627,7 +625,7 @@ static int fsl_mc_allocator_remove(struct fsl_mc_device *mc_dev) +@@ -627,7 +625,7 @@ static int fsl_mc_allocator_remove(struc } dev_dbg(&mc_dev->dev, @@ -7639,8 +7619,6 @@ index e93ab53b..ce07096c 100644 return 0; } -diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c -index 44f64b6f..30a48df3 100644 --- a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c +++ b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c @@ -1,7 +1,7 @@ @@ -7690,7 +7668,7 @@ index 44f64b6f..30a48df3 100644 * structures * * Returns 1 on success, 0 otherwise. -@@ -75,8 +75,11 @@ static int fsl_mc_bus_match(struct device *dev, struct device_driver *drv) +@@ -75,8 +75,11 @@ static int fsl_mc_bus_match(struct devic struct fsl_mc_driver *mc_drv = to_fsl_mc_driver(drv); bool found = false; @@ -7703,7 +7681,7 @@ index 44f64b6f..30a48df3 100644 if (!mc_drv->match_id_table) goto out; -@@ -91,7 +94,7 @@ static int fsl_mc_bus_match(struct device *dev, struct device_driver *drv) +@@ -91,7 +94,7 @@ static int fsl_mc_bus_match(struct devic /* * Traverse the match_id table of the given driver, trying to find @@ -7712,7 +7690,7 @@ index 44f64b6f..30a48df3 100644 */ for (id = mc_drv->match_id_table; id->vendor != 0x0; id++) { if (id->vendor == mc_dev->obj_desc.vendor && -@@ -132,23 +135,141 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, +@@ -132,23 +135,141 @@ static ssize_t modalias_show(struct devi } static DEVICE_ATTR_RO(modalias); @@ -7856,7 +7834,7 @@ index 44f64b6f..30a48df3 100644 static int fsl_mc_driver_probe(struct device *dev) { struct fsl_mc_driver *mc_drv; -@@ -164,8 +285,7 @@ static int fsl_mc_driver_probe(struct device *dev) +@@ -164,8 +285,7 @@ static int fsl_mc_driver_probe(struct de error = mc_drv->probe(mc_dev); if (error < 0) { @@ -7866,7 +7844,7 @@ index 44f64b6f..30a48df3 100644 return error; } -@@ -183,9 +303,7 @@ static int fsl_mc_driver_remove(struct device *dev) +@@ -183,9 +303,7 @@ static int fsl_mc_driver_remove(struct d error = mc_drv->remove(mc_dev); if (error < 0) { @@ -7877,7 +7855,7 @@ index 44f64b6f..30a48df3 100644 return error; } -@@ -232,8 +350,6 @@ int __fsl_mc_driver_register(struct fsl_mc_driver *mc_driver, +@@ -232,8 +350,6 @@ int __fsl_mc_driver_register(struct fsl_ return error; } @@ -7886,11 +7864,10 @@ index 44f64b6f..30a48df3 100644 return 0; } EXPORT_SYMBOL_GPL(__fsl_mc_driver_register); -@@ -248,15 +364,6 @@ void fsl_mc_driver_unregister(struct fsl_mc_driver *mc_driver) - } +@@ -249,15 +365,6 @@ void fsl_mc_driver_unregister(struct fsl EXPORT_SYMBOL_GPL(fsl_mc_driver_unregister); --/** + /** - * fsl_mc_bus_exists - check if a root dprc exists - */ -bool fsl_mc_bus_exists(void) @@ -7899,10 +7876,11 @@ index 44f64b6f..30a48df3 100644 -} -EXPORT_SYMBOL_GPL(fsl_mc_bus_exists); - - /** +-/** * fsl_mc_get_root_dprc - function to traverse to the root dprc */ -@@ -315,21 +422,6 @@ static int get_dprc_icid(struct fsl_mc_io *mc_io, + void fsl_mc_get_root_dprc(struct device *dev, +@@ -315,21 +422,6 @@ static int get_dprc_icid(struct fsl_mc_i return error; } @@ -7924,7 +7902,7 @@ index 44f64b6f..30a48df3 100644 static int translate_mc_addr(struct fsl_mc_device *mc_dev, enum dprc_region_type mc_region_type, u64 mc_offset, phys_addr_t *phys_addr) -@@ -451,18 +543,37 @@ bool fsl_mc_is_root_dprc(struct device *dev) +@@ -451,18 +543,37 @@ bool fsl_mc_is_root_dprc(struct device * return dev == root_dprc_dev; } @@ -7963,7 +7941,7 @@ index 44f64b6f..30a48df3 100644 if (dev_is_fsl_mc(parent_dev)) parent_mc_dev = to_fsl_mc_device(parent_dev); -@@ -473,7 +584,7 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc, +@@ -473,7 +584,7 @@ int fsl_mc_device_add(struct dprc_obj_de /* * Allocate an MC bus device object: */ @@ -7972,7 +7950,7 @@ index 44f64b6f..30a48df3 100644 if (!mc_bus) return -ENOMEM; -@@ -482,16 +593,30 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc, +@@ -482,16 +593,30 @@ int fsl_mc_device_add(struct dprc_obj_de /* * Allocate a regular fsl_mc_device object: */ @@ -8004,7 +7982,7 @@ index 44f64b6f..30a48df3 100644 dev_set_name(&mc_dev->dev, "%s.%d", obj_desc->type, obj_desc->id); if (strcmp(obj_desc->type, "dprc") == 0) { -@@ -524,8 +649,6 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc, +@@ -524,8 +649,6 @@ int fsl_mc_device_add(struct dprc_obj_de } mc_io2 = mc_io; @@ -8013,7 +7991,7 @@ index 44f64b6f..30a48df3 100644 } error = get_dprc_icid(mc_io2, obj_desc->id, &mc_dev->icid); -@@ -533,8 +656,8 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc, +@@ -533,8 +656,8 @@ int fsl_mc_device_add(struct dprc_obj_de goto error_cleanup_dev; } else { /* @@ -8024,7 +8002,7 @@ index 44f64b6f..30a48df3 100644 */ mc_dev->icid = parent_mc_dev->icid; mc_dev->dma_mask = FSL_MC_DEFAULT_DMA_MASK; -@@ -556,9 +679,14 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc, +@@ -556,9 +679,14 @@ int fsl_mc_device_add(struct dprc_obj_de goto error_cleanup_dev; } @@ -8042,7 +8020,7 @@ index 44f64b6f..30a48df3 100644 /* * The device-specific probe callback will get invoked by device_add() -@@ -571,9 +699,7 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc, +@@ -571,9 +699,7 @@ int fsl_mc_device_add(struct dprc_obj_de goto error_cleanup_dev; } @@ -8053,7 +8031,7 @@ index 44f64b6f..30a48df3 100644 *new_mc_dev = mc_dev; return 0; -@@ -581,47 +707,34 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc, +@@ -581,47 +707,34 @@ int fsl_mc_device_add(struct dprc_obj_de error_cleanup_dev: kfree(mc_dev->regions); if (mc_bus) @@ -8091,9 +8069,7 @@ index 44f64b6f..30a48df3 100644 - if (strcmp(mc_dev->obj_desc.type, "dprc") == 0) { - mc_bus = to_fsl_mc_bus(mc_dev); -+ if (strcmp(mc_dev->obj_desc.type, "dprc") != 0) -+ mc_dev->dev.iommu_fwspec = NULL; - +- - if (fsl_mc_is_root_dprc(&mc_dev->dev)) { - if (atomic_read(&root_dprc_count) > 0) - atomic_dec(&root_dprc_count); @@ -8101,7 +8077,9 @@ index 44f64b6f..30a48df3 100644 - WARN_ON(1); - } - } -- ++ if (strcmp(mc_dev->obj_desc.type, "dprc") != 0) ++ mc_dev->dev.iommu_fwspec = NULL; + - if (mc_bus) - devm_kfree(mc_dev->dev.parent, mc_bus); - else @@ -8110,7 +8088,7 @@ index 44f64b6f..30a48df3 100644 } EXPORT_SYMBOL_GPL(fsl_mc_device_remove); -@@ -629,8 +742,7 @@ static int parse_mc_ranges(struct device *dev, +@@ -629,8 +742,7 @@ static int parse_mc_ranges(struct device int *paddr_cells, int *mc_addr_cells, int *mc_size_cells, @@ -8120,7 +8098,7 @@ index 44f64b6f..30a48df3 100644 { const __be32 *prop; int range_tuple_cell_count; -@@ -643,8 +755,6 @@ static int parse_mc_ranges(struct device *dev, +@@ -643,8 +755,6 @@ static int parse_mc_ranges(struct device dev_warn(dev, "missing or empty ranges property for device tree node '%s'\n", mc_node->name); @@ -8129,7 +8107,7 @@ index 44f64b6f..30a48df3 100644 return 0; } -@@ -671,8 +781,7 @@ static int parse_mc_ranges(struct device *dev, +@@ -671,8 +781,7 @@ static int parse_mc_ranges(struct device return -EINVAL; } @@ -8139,7 +8117,7 @@ index 44f64b6f..30a48df3 100644 } static int get_mc_addr_translation_ranges(struct device *dev, -@@ -680,7 +789,7 @@ static int get_mc_addr_translation_ranges(struct device *dev, +@@ -680,7 +789,7 @@ static int get_mc_addr_translation_range **ranges, u8 *num_ranges) { @@ -8148,7 +8126,7 @@ index 44f64b6f..30a48df3 100644 int paddr_cells; int mc_addr_cells; int mc_size_cells; -@@ -688,16 +797,16 @@ static int get_mc_addr_translation_ranges(struct device *dev, +@@ -688,16 +797,16 @@ static int get_mc_addr_translation_range const __be32 *ranges_start; const __be32 *cell; @@ -8171,7 +8149,7 @@ index 44f64b6f..30a48df3 100644 /* * Missing or empty ranges property ("ranges;") for the * 'fsl,qoriq-mc' node. In this case, identity mapping -@@ -749,8 +858,6 @@ static int fsl_mc_bus_probe(struct platform_device *pdev) +@@ -749,8 +858,6 @@ static int fsl_mc_bus_probe(struct platf struct mc_version mc_version; struct resource res; @@ -8180,7 +8158,7 @@ index 44f64b6f..30a48df3 100644 mc = devm_kzalloc(&pdev->dev, sizeof(*mc), GFP_KERNEL); if (!mc) return -ENOMEM; -@@ -783,8 +890,7 @@ static int fsl_mc_bus_probe(struct platform_device *pdev) +@@ -783,8 +890,7 @@ static int fsl_mc_bus_probe(struct platf goto error_cleanup_mc_io; } @@ -8190,7 +8168,7 @@ index 44f64b6f..30a48df3 100644 mc_version.major, mc_version.minor, mc_version.revision); error = get_mc_addr_translation_ranges(&pdev->dev, -@@ -793,16 +899,17 @@ static int fsl_mc_bus_probe(struct platform_device *pdev) +@@ -793,16 +899,17 @@ static int fsl_mc_bus_probe(struct platf if (error < 0) goto error_cleanup_mc_io; @@ -8212,7 +8190,7 @@ index 44f64b6f..30a48df3 100644 if (error < 0) goto error_cleanup_mc_io; -@@ -812,7 +919,8 @@ static int fsl_mc_bus_probe(struct platform_device *pdev) +@@ -812,7 +919,8 @@ static int fsl_mc_bus_probe(struct platf obj_desc.irq_count = 1; obj_desc.region_count = 0; @@ -8222,7 +8200,7 @@ index 44f64b6f..30a48df3 100644 if (error < 0) goto error_cleanup_mc_io; -@@ -840,7 +948,6 @@ static int fsl_mc_bus_remove(struct platform_device *pdev) +@@ -840,7 +948,6 @@ static int fsl_mc_bus_remove(struct plat fsl_destroy_mc_io(mc->root_mc_bus_dev->mc_io); mc->root_mc_bus_dev->mc_io = NULL; @@ -8230,7 +8208,7 @@ index 44f64b6f..30a48df3 100644 return 0; } -@@ -865,22 +972,12 @@ static int __init fsl_mc_bus_driver_init(void) +@@ -865,22 +972,12 @@ static int __init fsl_mc_bus_driver_init { int error; @@ -8254,7 +8232,7 @@ index 44f64b6f..30a48df3 100644 error = platform_driver_register(&fsl_mc_bus_driver); if (error < 0) { pr_err("platform_driver_register() failed: %d\n", error); -@@ -914,7 +1011,6 @@ static int __init fsl_mc_bus_driver_init(void) +@@ -914,7 +1011,6 @@ error_cleanup_bus: bus_unregister(&fsl_mc_bus_type); error_cleanup_cache: @@ -8262,9 +8240,6 @@ index 44f64b6f..30a48df3 100644 return error; } postcore_initcall(fsl_mc_bus_driver_init); -diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-iommu.c b/drivers/staging/fsl-mc/bus/fsl-mc-iommu.c -new file mode 100644 -index 00000000..86b2cd84 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/fsl-mc-iommu.c @@ -0,0 +1,104 @@ @@ -8372,8 +8347,6 @@ index 00000000..86b2cd84 + + return group; +} -diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/fsl-mc-msi.c -index 3d46b1b1..b8b2c86e 100644 --- a/drivers/staging/fsl-mc/bus/fsl-mc-msi.c +++ b/drivers/staging/fsl-mc/bus/fsl-mc-msi.c @@ -1,7 +1,7 @@ @@ -8385,16 +8358,6 @@ index 3d46b1b1..b8b2c86e 100644 * Author: German Rivera * * This file is licensed under the terms of the GNU General Public -@@ -17,6 +17,7 @@ - #include - #include - #include "../include/mc-bus.h" -+#include "fsl-mc-private.h" - - /* - * Generate a unique ID identifying the interrupt (only used within the MSI -diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-private.h b/drivers/staging/fsl-mc/bus/fsl-mc-private.h -index d459c267..e08b8843 100644 --- a/drivers/staging/fsl-mc/bus/fsl-mc-private.h +++ b/drivers/staging/fsl-mc/bus/fsl-mc-private.h @@ -10,13 +10,15 @@ @@ -8415,8 +8378,6 @@ index d459c267..e08b8843 100644 int __init dprc_driver_init(void); void dprc_driver_exit(void); -diff --git a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c -index 7a6ac640..49127acb 100644 --- a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c +++ b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c @@ -1,7 +1,7 @@ @@ -8428,11 +8389,8 @@ index 7a6ac640..49127acb 100644 * Author: German Rivera * * This file is licensed under the terms of the GNU General Public -@@ -17,9 +17,10 @@ - #include - #include - #include "../include/mc-bus.h" -+#include "fsl-mc-private.h" +@@ -20,7 +20,7 @@ + #include "fsl-mc-private.h" static struct irq_chip its_msi_irq_chip = { - .name = "fsl-mc-bus-msi", @@ -8440,7 +8398,7 @@ index 7a6ac640..49127acb 100644 .irq_mask = irq_chip_mask_parent, .irq_unmask = irq_chip_unmask_parent, .irq_eoi = irq_chip_eoi_parent, -@@ -51,7 +52,7 @@ static int its_fsl_mc_msi_prepare(struct irq_domain *msi_domain, +@@ -52,7 +52,7 @@ static int its_fsl_mc_msi_prepare(struct return msi_info->ops->msi_prepare(msi_domain->parent, dev, nvec, info); } @@ -8449,7 +8407,7 @@ index 7a6ac640..49127acb 100644 .msi_prepare = its_fsl_mc_msi_prepare, }; -@@ -94,8 +95,8 @@ int __init its_fsl_mc_msi_init(void) +@@ -95,8 +95,8 @@ int __init its_fsl_mc_msi_init(void) continue; } @@ -8460,8 +8418,6 @@ index 7a6ac640..49127acb 100644 pr_info("fsl-mc MSI: %s domain created\n", np->full_name); } -diff --git a/drivers/staging/fsl-mc/bus/mc-io.c b/drivers/staging/fsl-mc/bus/mc-io.c -index 798c965f..d66b87f0 100644 --- a/drivers/staging/fsl-mc/bus/mc-io.c +++ b/drivers/staging/fsl-mc/bus/mc-io.c @@ -1,4 +1,5 @@ @@ -8479,9 +8435,6 @@ index 798c965f..d66b87f0 100644 * ALTERNATIVELY, this software may be distributed under the terms of the * GNU General Public License ("GPL") as published by the Free Software * Foundation, either version 2 of that License or (at your option) any -diff --git a/drivers/staging/fsl-mc/bus/mc-ioctl.h b/drivers/staging/fsl-mc/bus/mc-ioctl.h -new file mode 100644 -index 00000000..8ac502a1 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/mc-ioctl.h @@ -0,0 +1,22 @@ @@ -8507,9 +8460,6 @@ index 00000000..8ac502a1 + _IOWR(RESTOOL_IOCTL_TYPE, 0xE0, struct mc_command) + +#endif /* _FSL_MC_IOCTL_H_ */ -diff --git a/drivers/staging/fsl-mc/bus/mc-restool.c b/drivers/staging/fsl-mc/bus/mc-restool.c -new file mode 100644 -index 00000000..d5330b68 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/mc-restool.c @@ -0,0 +1,405 @@ @@ -8918,8 +8868,6 @@ index 00000000..d5330b68 +MODULE_AUTHOR("Freescale Semiconductor Inc."); +MODULE_DESCRIPTION("Freescale's MC restool driver"); +MODULE_LICENSE("GPL"); -diff --git a/drivers/staging/fsl-mc/bus/mc-sys.c b/drivers/staging/fsl-mc/bus/mc-sys.c -index 285917c7..cf63c7b6 100644 --- a/drivers/staging/fsl-mc/bus/mc-sys.c +++ b/drivers/staging/fsl-mc/bus/mc-sys.c @@ -1,4 +1,5 @@ @@ -8946,7 +8894,7 @@ index 285917c7..cf63c7b6 100644 /* * usleep_range() min and max values used to throttle down polling -@@ -67,7 +67,7 @@ static u16 mc_cmd_hdr_read_cmdid(struct mc_command *cmd) +@@ -67,7 +67,7 @@ static u16 mc_cmd_hdr_read_cmdid(struct struct mc_cmd_header *hdr = (struct mc_cmd_header *)&cmd->header; u16 cmd_id = le16_to_cpu(hdr->cmd_id); @@ -8955,7 +8903,7 @@ index 285917c7..cf63c7b6 100644 } static int mc_status_to_error(enum mc_cmd_status status) -@@ -200,7 +200,7 @@ static int mc_polling_wait_preemptible(struct fsl_mc_io *mc_io, +@@ -200,7 +200,7 @@ static int mc_polling_wait_preemptible(s if (time_after_eq(jiffies, jiffies_until_timeout)) { dev_dbg(mc_io->dev, @@ -8964,7 +8912,7 @@ index 285917c7..cf63c7b6 100644 mc_io->portal_phys_addr, (unsigned int)mc_cmd_hdr_read_token(cmd), (unsigned int)mc_cmd_hdr_read_cmdid(cmd)); -@@ -240,7 +240,7 @@ static int mc_polling_wait_atomic(struct fsl_mc_io *mc_io, +@@ -240,7 +240,7 @@ static int mc_polling_wait_atomic(struct timeout_usecs -= MC_CMD_COMPLETION_POLLING_MAX_SLEEP_USECS; if (timeout_usecs == 0) { dev_dbg(mc_io->dev, @@ -8973,7 +8921,7 @@ index 285917c7..cf63c7b6 100644 mc_io->portal_phys_addr, (unsigned int)mc_cmd_hdr_read_token(cmd), (unsigned int)mc_cmd_hdr_read_cmdid(cmd)); -@@ -294,7 +294,7 @@ int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd) +@@ -294,7 +294,7 @@ int mc_send_command(struct fsl_mc_io *mc if (status != MC_CMD_STATUS_OK) { dev_dbg(mc_io->dev, @@ -8982,9 +8930,6 @@ index 285917c7..cf63c7b6 100644 mc_io->portal_phys_addr, (unsigned int)mc_cmd_hdr_read_token(cmd), (unsigned int)mc_cmd_hdr_read_cmdid(cmd), -diff --git a/drivers/staging/fsl-mc/include/dpaa2-fd.h b/drivers/staging/fsl-mc/include/dpaa2-fd.h -new file mode 100644 -index 00000000..72328415 --- /dev/null +++ b/drivers/staging/fsl-mc/include/dpaa2-fd.h @@ -0,0 +1,706 @@ @@ -9694,9 +9639,6 @@ index 00000000..72328415 +} + +#endif /* __FSL_DPAA2_FD_H */ -diff --git a/drivers/staging/fsl-mc/include/dpaa2-global.h b/drivers/staging/fsl-mc/include/dpaa2-global.h -new file mode 100644 -index 00000000..0326447f --- /dev/null +++ b/drivers/staging/fsl-mc/include/dpaa2-global.h @@ -0,0 +1,202 @@ @@ -9902,9 +9844,6 @@ index 00000000..0326447f +} + +#endif /* __FSL_DPAA2_GLOBAL_H */ -diff --git a/drivers/staging/fsl-mc/include/dpaa2-io.h b/drivers/staging/fsl-mc/include/dpaa2-io.h -new file mode 100644 -index 00000000..c7d1d997 --- /dev/null +++ b/drivers/staging/fsl-mc/include/dpaa2-io.h @@ -0,0 +1,190 @@ @@ -10098,9 +10037,6 @@ index 00000000..c7d1d997 +} + +#endif /* __FSL_DPAA2_IO_H */ -diff --git a/drivers/staging/fsl-mc/include/dpbp-cmd.h b/drivers/staging/fsl-mc/include/dpbp-cmd.h -deleted file mode 100644 -index 2860411d..00000000 --- a/drivers/staging/fsl-mc/include/dpbp-cmd.h +++ /dev/null @@ -1,185 +0,0 @@ @@ -10289,8 +10225,6 @@ index 2860411d..00000000 -}; - -#endif /* _FSL_DPBP_CMD_H */ -diff --git a/drivers/staging/fsl-mc/include/dpbp.h b/drivers/staging/fsl-mc/include/dpbp.h -index e14e85a5..e9e04cce 100644 --- a/drivers/staging/fsl-mc/include/dpbp.h +++ b/drivers/staging/fsl-mc/include/dpbp.h @@ -1,4 +1,5 @@ @@ -10338,11 +10272,10 @@ index e14e85a5..e9e04cce 100644 int dpbp_enable(struct fsl_mc_io *mc_io, u32 cmd_flags, -@@ -81,140 +66,25 @@ int dpbp_reset(struct fsl_mc_io *mc_io, - u32 cmd_flags, +@@ -82,139 +67,24 @@ int dpbp_reset(struct fsl_mc_io *mc_io, u16 token); --/** + /** - * struct dpbp_irq_cfg - IRQ configuration - * @addr: Address that must be written to signal a message-based interrupt - * @val: Value to write into irq_addr address @@ -10403,7 +10336,7 @@ index e14e85a5..e9e04cce 100644 - u8 irq_index, - u32 status); - - /** +-/** * struct dpbp_attr - Structure representing DPBP attributes * @id: DPBP object ID - * @version: DPBP version @@ -10475,21 +10408,19 @@ index e14e85a5..e9e04cce 100644 - u32 cmd_flags, - u16 token, - struct dpbp_notification_cfg *cfg); +- +-/** @} */ +int dpbp_get_attributes(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token, + struct dpbp_attr *attr); - --/** @} */ ++ +int dpbp_get_api_version(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 *major_ver, + u16 *minor_ver); #endif /* __FSL_DPBP_H */ -diff --git a/drivers/staging/fsl-mc/include/dpcon.h b/drivers/staging/fsl-mc/include/dpcon.h -new file mode 100644 -index 00000000..efa23906 --- /dev/null +++ b/drivers/staging/fsl-mc/include/dpcon.h @@ -0,0 +1,115 @@ @@ -10608,8 +10539,6 @@ index 00000000..efa23906 + u16 *minor_ver); + +#endif /* __FSL_DPCON_H */ -diff --git a/drivers/staging/fsl-mc/include/dpmng.h b/drivers/staging/fsl-mc/include/dpmng.h -index e5cfd017..170c07dd 100644 --- a/drivers/staging/fsl-mc/include/dpmng.h +++ b/drivers/staging/fsl-mc/include/dpmng.h @@ -1,4 +1,5 @@ @@ -10645,9 +10574,6 @@ index e5cfd017..170c07dd 100644 + struct mc_version *mc_ver_info); #endif /* __FSL_DPMNG_H */ -diff --git a/drivers/staging/fsl-mc/include/dpopr.h b/drivers/staging/fsl-mc/include/dpopr.h -new file mode 100644 -index 00000000..e1110af2 --- /dev/null +++ b/drivers/staging/fsl-mc/include/dpopr.h @@ -0,0 +1,110 @@ @@ -10761,8 +10687,6 @@ index 00000000..e1110af2 +}; + +#endif /* __FSL_DPOPR_H_ */ -diff --git a/drivers/staging/fsl-mc/include/dprc.h b/drivers/staging/fsl-mc/include/dprc.h -index 593b2bbe..8dc411ec 100644 --- a/drivers/staging/fsl-mc/include/dprc.h +++ b/drivers/staging/fsl-mc/include/dprc.h @@ -1,4 +1,5 @@ @@ -10877,7 +10801,7 @@ index 593b2bbe..8dc411ec 100644 /* IRQ */ -@@ -139,7 +58,7 @@ int dprc_reset_container(struct fsl_mc_io *mc_io, +@@ -139,7 +58,7 @@ int dprc_reset_container(struct fsl_mc_i #define DPRC_IRQ_INDEX 0 /* Number of dprc's IRQs */ @@ -10886,7 +10810,7 @@ index 593b2bbe..8dc411ec 100644 /* DPRC IRQ events */ -@@ -151,12 +70,14 @@ int dprc_reset_container(struct fsl_mc_io *mc_io, +@@ -151,12 +70,14 @@ int dprc_reset_container(struct fsl_mc_i #define DPRC_IRQ_EVENT_RES_ADDED 0x00000004 /* IRQ event - Indicates that resources removed from the container */ #define DPRC_IRQ_EVENT_RES_REMOVED 0x00000008 @@ -10903,18 +10827,15 @@ index 593b2bbe..8dc411ec 100644 * destroyed */ #define DPRC_IRQ_EVENT_OBJ_DESTROYED 0x00000020 -@@ -171,59 +92,59 @@ int dprc_reset_container(struct fsl_mc_io *mc_io, +@@ -171,59 +92,59 @@ int dprc_reset_container(struct fsl_mc_i * @irq_num: A user defined number associated with this IRQ */ struct dprc_irq_cfg { - phys_addr_t paddr; - u32 val; - int irq_num; -+ phys_addr_t paddr; -+ u32 val; -+ int irq_num; - }; - +-}; +- -int dprc_set_irq(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, @@ -10963,6 +10884,11 @@ index 593b2bbe..8dc411ec 100644 - u16 token, - u8 irq_index, - u32 status); ++ phys_addr_t paddr; ++ u32 val; ++ int irq_num; ++}; ++ +int dprc_set_irq(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token, @@ -11014,7 +10940,7 @@ index 593b2bbe..8dc411ec 100644 /** * struct dprc_attributes - Container attributes -@@ -231,114 +152,23 @@ int dprc_clear_irq_status(struct fsl_mc_io *mc_io, +@@ -231,114 +152,23 @@ int dprc_clear_irq_status(struct fsl_mc_ * @icid: Container's ICID * @portal_id: Container's portal ID * @options: Container's options as set at container's creation @@ -11034,8 +10960,8 @@ index 593b2bbe..8dc411ec 100644 - u16 major; - u16 minor; - } version; --}; -- + }; + -int dprc_get_attributes(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, @@ -11097,8 +11023,8 @@ index 593b2bbe..8dc411ec 100644 - u32 num; - u32 options; - int id_base_align; - }; - +-}; +- -int dprc_assign(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, @@ -11136,7 +11062,7 @@ index 593b2bbe..8dc411ec 100644 /* Objects Attributes Flags */ -@@ -353,7 +183,7 @@ int dprc_get_obj_count(struct fsl_mc_io *mc_io, +@@ -353,7 +183,7 @@ int dprc_get_obj_count(struct fsl_mc_io * masters; * user is responsible for proper memory handling through IOMMU configuration. */ @@ -11333,8 +11259,6 @@ index 593b2bbe..8dc411ec 100644 #endif /* _FSL_DPRC_H */ -diff --git a/drivers/staging/fsl-mc/include/mc-bus.h b/drivers/staging/fsl-mc/include/mc-bus.h -index 170684a5..4d1f2d3e 100644 --- a/drivers/staging/fsl-mc/include/mc-bus.h +++ b/drivers/staging/fsl-mc/include/mc-bus.h @@ -1,7 +1,7 @@ @@ -11365,8 +11289,6 @@ index 170684a5..4d1f2d3e 100644 unsigned int *total_irq_count); int __init dprc_driver_init(void); -diff --git a/drivers/staging/fsl-mc/include/mc-cmd.h b/drivers/staging/fsl-mc/include/mc-cmd.h -index 5decb989..2e08aa31 100644 --- a/drivers/staging/fsl-mc/include/mc-cmd.h +++ b/drivers/staging/fsl-mc/include/mc-cmd.h @@ -1,4 +1,5 @@ @@ -11404,7 +11326,7 @@ index 5decb989..2e08aa31 100644 static inline u64 mc_encode_cmd_header(u16 cmd_id, u32 cmd_flags, u16 token) -@@ -84,10 +89,8 @@ static inline u64 mc_encode_cmd_header(u16 cmd_id, +@@ -84,10 +89,8 @@ static inline u64 mc_encode_cmd_header(u u64 header = 0; struct mc_cmd_header *hdr = (struct mc_cmd_header *)&header; @@ -11417,7 +11339,7 @@ index 5decb989..2e08aa31 100644 hdr->status = MC_CMD_STATUS_READY; if (cmd_flags & MC_CMD_FLAG_PRI) hdr->flags_hw = MC_CMD_FLAG_PRI; -@@ -102,7 +105,26 @@ static inline u16 mc_cmd_hdr_read_token(struct mc_command *cmd) +@@ -102,7 +105,26 @@ static inline u16 mc_cmd_hdr_read_token( struct mc_cmd_header *hdr = (struct mc_cmd_header *)&cmd->header; u16 token = le16_to_cpu(hdr->token); @@ -11445,8 +11367,6 @@ index 5decb989..2e08aa31 100644 } #endif /* __FSL_MC_CMD_H */ -diff --git a/drivers/staging/fsl-mc/include/mc-sys.h b/drivers/staging/fsl-mc/include/mc-sys.h -index 89ad0cf5..dca7f908 100644 --- a/drivers/staging/fsl-mc/include/mc-sys.h +++ b/drivers/staging/fsl-mc/include/mc-sys.h @@ -1,4 +1,5 @@ @@ -11456,8 +11376,6 @@ index 89ad0cf5..dca7f908 100644 * * Interface of the I/O services to send MC commands to the MC hardware * -diff --git a/drivers/staging/fsl-mc/include/mc.h b/drivers/staging/fsl-mc/include/mc.h -index f6e720e8..c23b78a4 100644 --- a/drivers/staging/fsl-mc/include/mc.h +++ b/drivers/staging/fsl-mc/include/mc.h @@ -1,7 +1,7 @@ @@ -11503,7 +11421,7 @@ index f6e720e8..c23b78a4 100644 int __must_check __fsl_mc_driver_register(struct fsl_mc_driver *fsl_mc_driver, struct module *owner); -@@ -198,4 +202,13 @@ int __must_check fsl_mc_allocate_irqs(struct fsl_mc_device *mc_dev); +@@ -198,4 +202,13 @@ int __must_check fsl_mc_allocate_irqs(st void fsl_mc_free_irqs(struct fsl_mc_device *mc_dev); @@ -11517,6 +11435,3 @@ index f6e720e8..c23b78a4 100644 +#endif + #endif /* _FSL_MC_H_ */ --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/706-fsl_ppfe-support-layercape.patch b/target/linux/layerscape/patches-4.9/706-fsl_ppfe-support-layercape.patch index 844475adfe..4104272eff 100644 --- a/target/linux/layerscape/patches-4.9/706-fsl_ppfe-support-layercape.patch +++ b/target/linux/layerscape/patches-4.9/706-fsl_ppfe-support-layercape.patch @@ -78,9 +78,6 @@ Signed-off-by: Yangbo Lu create mode 100644 drivers/staging/fsl_ppfe/pfe_sysfs.c create mode 100644 drivers/staging/fsl_ppfe/pfe_sysfs.h -diff --git a/drivers/staging/fsl_ppfe/Kconfig b/drivers/staging/fsl_ppfe/Kconfig -new file mode 100644 -index 00000000..e4096435 --- /dev/null +++ b/drivers/staging/fsl_ppfe/Kconfig @@ -0,0 +1,20 @@ @@ -104,9 +101,6 @@ index 00000000..e4096435 + UTIL PE has to be enabled only if required. + +endif # FSL_PPFE -diff --git a/drivers/staging/fsl_ppfe/Makefile b/drivers/staging/fsl_ppfe/Makefile -new file mode 100644 -index 00000000..07cd351b --- /dev/null +++ b/drivers/staging/fsl_ppfe/Makefile @@ -0,0 +1,19 @@ @@ -129,17 +123,11 @@ index 00000000..07cd351b + pfe_debugfs.o \ + pfe_ls1012a_platform.o \ + pfe_hal.o -diff --git a/drivers/staging/fsl_ppfe/TODO b/drivers/staging/fsl_ppfe/TODO -new file mode 100644 -index 00000000..43c48ccd --- /dev/null +++ b/drivers/staging/fsl_ppfe/TODO @@ -0,0 +1,2 @@ +TODO: + - provide pfe pe monitoring support -diff --git a/drivers/staging/fsl_ppfe/include/pfe/cbus.h b/drivers/staging/fsl_ppfe/include/pfe/cbus.h -new file mode 100644 -index 00000000..04503d28 --- /dev/null +++ b/drivers/staging/fsl_ppfe/include/pfe/cbus.h @@ -0,0 +1,78 @@ @@ -221,9 +209,6 @@ index 00000000..04503d28 +#define DDR_BUF_SIZE BIT(DDR_BUF_SIZE_LN2) + +#endif /* _CBUS_H_ */ -diff --git a/drivers/staging/fsl_ppfe/include/pfe/cbus/bmu.h b/drivers/staging/fsl_ppfe/include/pfe/cbus/bmu.h -new file mode 100644 -index 00000000..87738ca3 --- /dev/null +++ b/drivers/staging/fsl_ppfe/include/pfe/cbus/bmu.h @@ -0,0 +1,55 @@ @@ -282,9 +267,6 @@ index 00000000..87738ca3 +#define BMU2_MCAST_ALLOC_CTRL (BMU2_BASE_ADDR + BMU_MCAST_ALLOC_CTRL) + +#endif /* _BMU_H_ */ -diff --git a/drivers/staging/fsl_ppfe/include/pfe/cbus/class_csr.h b/drivers/staging/fsl_ppfe/include/pfe/cbus/class_csr.h -new file mode 100644 -index 00000000..e4dadff5 --- /dev/null +++ b/drivers/staging/fsl_ppfe/include/pfe/cbus/class_csr.h @@ -0,0 +1,289 @@ @@ -577,9 +559,6 @@ index 00000000..e4dadff5 +}; + +#endif /* _CLASS_CSR_H_ */ -diff --git a/drivers/staging/fsl_ppfe/include/pfe/cbus/emac_mtip.h b/drivers/staging/fsl_ppfe/include/pfe/cbus/emac_mtip.h -new file mode 100644 -index 00000000..9c5d7919 --- /dev/null +++ b/drivers/staging/fsl_ppfe/include/pfe/cbus/emac_mtip.h @@ -0,0 +1,242 @@ @@ -825,9 +804,6 @@ index 00000000..9c5d7919 +#define EMAC_SPEC_ADDR_MAX 4 + +#endif /* _EMAC_H_ */ -diff --git a/drivers/staging/fsl_ppfe/include/pfe/cbus/gpi.h b/drivers/staging/fsl_ppfe/include/pfe/cbus/gpi.h -new file mode 100644 -index 00000000..7b295830 --- /dev/null +++ b/drivers/staging/fsl_ppfe/include/pfe/cbus/gpi.h @@ -0,0 +1,86 @@ @@ -917,9 +893,6 @@ index 00000000..7b295830 +#define EGPI_PAUSE_TIME 0x000007D0 +#define EGPI_PAUSE_ENABLE 0x40000000 +#endif /* _GPI_H_ */ -diff --git a/drivers/staging/fsl_ppfe/include/pfe/cbus/hif.h b/drivers/staging/fsl_ppfe/include/pfe/cbus/hif.h -new file mode 100644 -index 00000000..71cf81a7 --- /dev/null +++ b/drivers/staging/fsl_ppfe/include/pfe/cbus/hif.h @@ -0,0 +1,100 @@ @@ -1023,9 +996,6 @@ index 00000000..71cf81a7 +#define PROC_ID(id) ((id) << 18) + +#endif /* _HIF_H_ */ -diff --git a/drivers/staging/fsl_ppfe/include/pfe/cbus/hif_nocpy.h b/drivers/staging/fsl_ppfe/include/pfe/cbus/hif_nocpy.h -new file mode 100644 -index 00000000..3d4d43ce --- /dev/null +++ b/drivers/staging/fsl_ppfe/include/pfe/cbus/hif_nocpy.h @@ -0,0 +1,50 @@ @@ -1079,9 +1049,6 @@ index 00000000..3d4d43ce +#define HIF_NOCPY_INT_COAL (HIF_NOCPY_BASE_ADDR + 0x90) + +#endif /* _HIF_NOCPY_H_ */ -diff --git a/drivers/staging/fsl_ppfe/include/pfe/cbus/tmu_csr.h b/drivers/staging/fsl_ppfe/include/pfe/cbus/tmu_csr.h -new file mode 100644 -index 00000000..05f3d681 --- /dev/null +++ b/drivers/staging/fsl_ppfe/include/pfe/cbus/tmu_csr.h @@ -0,0 +1,168 @@ @@ -1253,9 +1220,6 @@ index 00000000..05f3d681 +#define DEFAULT_TMU3_QDEPTH 127 + +#endif /* _TMU_CSR_H_ */ -diff --git a/drivers/staging/fsl_ppfe/include/pfe/cbus/util_csr.h b/drivers/staging/fsl_ppfe/include/pfe/cbus/util_csr.h -new file mode 100644 -index 00000000..ae623cda --- /dev/null +++ b/drivers/staging/fsl_ppfe/include/pfe/cbus/util_csr.h @@ -0,0 +1,61 @@ @@ -1320,9 +1284,6 @@ index 00000000..ae623cda +}; + +#endif /* _UTIL_CSR_H_ */ -diff --git a/drivers/staging/fsl_ppfe/include/pfe/pfe.h b/drivers/staging/fsl_ppfe/include/pfe/pfe.h -new file mode 100644 -index 00000000..d93ae4c6 --- /dev/null +++ b/drivers/staging/fsl_ppfe/include/pfe/pfe.h @@ -0,0 +1,372 @@ @@ -1698,9 +1659,6 @@ index 00000000..d93ae4c6 +} + +#endif /* _PFE_H_ */ -diff --git a/drivers/staging/fsl_ppfe/pfe_ctrl.c b/drivers/staging/fsl_ppfe/pfe_ctrl.c -new file mode 100644 -index 00000000..dfa8547c --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_ctrl.c @@ -0,0 +1,238 @@ @@ -1942,9 +1900,6 @@ index 00000000..dfa8547c +{ + pr_info("%s\n", __func__); +} -diff --git a/drivers/staging/fsl_ppfe/pfe_ctrl.h b/drivers/staging/fsl_ppfe/pfe_ctrl.h -new file mode 100644 -index 00000000..22115c76 --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_ctrl.h @@ -0,0 +1,112 @@ @@ -2060,9 +2015,6 @@ index 00000000..22115c76 +int relax(unsigned long end); + +#endif /* _PFE_CTRL_H_ */ -diff --git a/drivers/staging/fsl_ppfe/pfe_debugfs.c b/drivers/staging/fsl_ppfe/pfe_debugfs.c -new file mode 100644 -index 00000000..4156610d --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_debugfs.c @@ -0,0 +1,111 @@ @@ -2177,9 +2129,6 @@ index 00000000..4156610d +{ + debugfs_remove_recursive(pfe->dentry); +} -diff --git a/drivers/staging/fsl_ppfe/pfe_debugfs.h b/drivers/staging/fsl_ppfe/pfe_debugfs.h -new file mode 100644 -index 00000000..301d9fc2 --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_debugfs.h @@ -0,0 +1,25 @@ @@ -2208,9 +2157,6 @@ index 00000000..301d9fc2 +void pfe_debugfs_exit(struct pfe *pfe); + +#endif /* _PFE_DEBUGFS_H_ */ -diff --git a/drivers/staging/fsl_ppfe/pfe_eth.c b/drivers/staging/fsl_ppfe/pfe_eth.c -new file mode 100644 -index 00000000..02cd7c52 --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_eth.c @@ -0,0 +1,2434 @@ @@ -4648,9 +4594,6 @@ index 00000000..02cd7c52 + for (ii = NUM_GEMAC_SUPPORT - 1; ii >= 0; ii--) + pfe_eth_exit_one(pfe->eth.eth_priv[ii]); +} -diff --git a/drivers/staging/fsl_ppfe/pfe_eth.h b/drivers/staging/fsl_ppfe/pfe_eth.h -new file mode 100644 -index 00000000..721bef3e --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_eth.h @@ -0,0 +1,184 @@ @@ -4838,9 +4781,6 @@ index 00000000..721bef3e +int pfe_eth_mdio_reset(struct mii_bus *bus); + +#endif /* _PFE_ETH_H_ */ -diff --git a/drivers/staging/fsl_ppfe/pfe_firmware.c b/drivers/staging/fsl_ppfe/pfe_firmware.c -new file mode 100644 -index 00000000..47462b9f --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_firmware.c @@ -0,0 +1,314 @@ @@ -5158,9 +5098,6 @@ index 00000000..47462b9f + util_disable(); +#endif +} -diff --git a/drivers/staging/fsl_ppfe/pfe_firmware.h b/drivers/staging/fsl_ppfe/pfe_firmware.h -new file mode 100644 -index 00000000..5ade848b --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_firmware.h @@ -0,0 +1,32 @@ @@ -5196,9 +5133,6 @@ index 00000000..5ade848b +void pfe_firmware_exit(struct pfe *pfe); + +#endif /* _PFE_FIRMWARE_H_ */ -diff --git a/drivers/staging/fsl_ppfe/pfe_hal.c b/drivers/staging/fsl_ppfe/pfe_hal.c -new file mode 100644 -index 00000000..0915034b --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_hal.c @@ -0,0 +1,1516 @@ @@ -6718,9 +6652,6 @@ index 00000000..0915034b + hif_int &= HIF_RXPKT_INT_EN; + writel(hif_int, HIF_INT_ENABLE); +} -diff --git a/drivers/staging/fsl_ppfe/pfe_hif.c b/drivers/staging/fsl_ppfe/pfe_hif.c -new file mode 100644 -index 00000000..6835e140 --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_hif.c @@ -0,0 +1,1072 @@ @@ -7796,9 +7727,6 @@ index 00000000..6835e140 + pfe_hif_release_buffers(hif); + pfe_hif_free_descr(hif); +} -diff --git a/drivers/staging/fsl_ppfe/pfe_hif.h b/drivers/staging/fsl_ppfe/pfe_hif.h -new file mode 100644 -index 00000000..6e36f0c1 --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_hif.h @@ -0,0 +1,211 @@ @@ -8013,9 +7941,6 @@ index 00000000..6e36f0c1 +#define __memcpy(dst, src, len) memcpy(dst, src, len) + +#endif /* _PFE_HIF_H_ */ -diff --git a/drivers/staging/fsl_ppfe/pfe_hif_lib.c b/drivers/staging/fsl_ppfe/pfe_hif_lib.c -new file mode 100644 -index 00000000..837eaa24 --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_hif_lib.c @@ -0,0 +1,601 @@ @@ -8620,9 +8545,6 @@ index 00000000..837eaa24 + + pfe_hif_shm_clean(pfe->hif.shm); +} -diff --git a/drivers/staging/fsl_ppfe/pfe_hif_lib.h b/drivers/staging/fsl_ppfe/pfe_hif_lib.h -new file mode 100644 -index 00000000..49e7b5f1 --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_hif_lib.h @@ -0,0 +1,239 @@ @@ -8865,9 +8787,6 @@ index 00000000..49e7b5f1 + }) + +#endif /* _PFE_HIF_LIB_H_ */ -diff --git a/drivers/staging/fsl_ppfe/pfe_hw.c b/drivers/staging/fsl_ppfe/pfe_hw.c -new file mode 100644 -index 00000000..16ea2c65 --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_hw.c @@ -0,0 +1,176 @@ @@ -9047,9 +8966,6 @@ index 00000000..16ea2c65 + bmu_disable(BMU2_BASE_ADDR); + bmu_reset(BMU2_BASE_ADDR); +} -diff --git a/drivers/staging/fsl_ppfe/pfe_hw.h b/drivers/staging/fsl_ppfe/pfe_hw.h -new file mode 100644 -index 00000000..53b5fe14 --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_hw.h @@ -0,0 +1,27 @@ @@ -9080,9 +8996,6 @@ index 00000000..53b5fe14 +void pfe_hw_exit(struct pfe *pfe); + +#endif /* _PFE_HW_H_ */ -diff --git a/drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c b/drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c -new file mode 100644 -index 00000000..c579eb58 --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c @@ -0,0 +1,394 @@ @@ -9480,9 +9393,6 @@ index 00000000..c579eb58 +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("PFE Ethernet driver"); +MODULE_AUTHOR("NXP DNCPE"); -diff --git a/drivers/staging/fsl_ppfe/pfe_mod.c b/drivers/staging/fsl_ppfe/pfe_mod.c -new file mode 100644 -index 00000000..d5ba56a3 --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_mod.c @@ -0,0 +1,141 @@ @@ -9627,9 +9537,6 @@ index 00000000..d5ba56a3 + + return 0; +} -diff --git a/drivers/staging/fsl_ppfe/pfe_mod.h b/drivers/staging/fsl_ppfe/pfe_mod.h -new file mode 100644 -index 00000000..3012f17f --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_mod.h @@ -0,0 +1,112 @@ @@ -9745,9 +9652,6 @@ index 00000000..3012f17f +#define BMU1_LMEM_SIZE (LMEM_BUF_SIZE * BMU1_BUF_COUNT) + +#endif /* _PFE_MOD_H */ -diff --git a/drivers/staging/fsl_ppfe/pfe_perfmon.h b/drivers/staging/fsl_ppfe/pfe_perfmon.h -new file mode 100644 -index 00000000..84908121 --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_perfmon.h @@ -0,0 +1,38 @@ @@ -9789,9 +9693,6 @@ index 00000000..84908121 +void pfe_perfmon_exit(struct pfe *pfe); + +#endif /* _PFE_PERFMON_H_ */ -diff --git a/drivers/staging/fsl_ppfe/pfe_sysfs.c b/drivers/staging/fsl_ppfe/pfe_sysfs.c -new file mode 100644 -index 00000000..2a763844 --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_sysfs.c @@ -0,0 +1,818 @@ @@ -10613,9 +10514,6 @@ index 00000000..2a763844 + device_remove_file(pfe->dev, &dev_attr_tmu); + device_remove_file(pfe->dev, &dev_attr_class); +} -diff --git a/drivers/staging/fsl_ppfe/pfe_sysfs.h b/drivers/staging/fsl_ppfe/pfe_sysfs.h -new file mode 100644 -index 00000000..4fb39c93 --- /dev/null +++ b/drivers/staging/fsl_ppfe/pfe_sysfs.h @@ -0,0 +1,29 @@ @@ -10648,6 +10546,3 @@ index 00000000..4fb39c93 +void pfe_sysfs_exit(struct pfe *pfe); + +#endif /* _PFE_SYSFS_H_ */ --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/804-crypto-support-layerscape.patch b/target/linux/layerscape/patches-4.9/804-crypto-support-layerscape.patch index 6b6104dd05..f6a7bca7cb 100644 --- a/target/linux/layerscape/patches-4.9/804-crypto-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/804-crypto-support-layerscape.patch @@ -104,8 +104,6 @@ Signed-off-by: Yangbo Lu create mode 100644 include/crypto/internal/acompress.h create mode 100644 include/crypto/internal/scompress.h -diff --git a/crypto/Kconfig b/crypto/Kconfig -index 17be110a..00e145e2 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -102,6 +102,15 @@ config CRYPTO_KPP @@ -159,8 +157,6 @@ index 17be110a..00e145e2 100644 comment "Block modes" config CRYPTO_CBC -diff --git a/crypto/Makefile b/crypto/Makefile -index 9e52b3c5..936d2b73 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -51,6 +51,9 @@ rsa_generic-y += rsa_helper.o @@ -173,7 +169,7 @@ index 9e52b3c5..936d2b73 100644 cryptomgr-y := algboss.o testmgr.o obj-$(CONFIG_CRYPTO_MANAGER2) += cryptomgr.o -@@ -115,6 +118,7 @@ obj-$(CONFIG_CRYPTO_CRC32C) += crc32c_generic.o +@@ -115,6 +118,7 @@ obj-$(CONFIG_CRYPTO_CRC32C) += crc32c_ge obj-$(CONFIG_CRYPTO_CRC32) += crc32_generic.o obj-$(CONFIG_CRYPTO_CRCT10DIF) += crct10dif_common.o crct10dif_generic.o obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o authencesn.o @@ -181,9 +177,6 @@ index 9e52b3c5..936d2b73 100644 obj-$(CONFIG_CRYPTO_LZO) += lzo.o obj-$(CONFIG_CRYPTO_LZ4) += lz4.o obj-$(CONFIG_CRYPTO_LZ4HC) += lz4hc.o -diff --git a/crypto/acompress.c b/crypto/acompress.c -new file mode 100644 -index 00000000..887783d8 --- /dev/null +++ b/crypto/acompress.c @@ -0,0 +1,169 @@ @@ -356,11 +349,9 @@ index 00000000..887783d8 + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Asynchronous compression type"); -diff --git a/crypto/algboss.c b/crypto/algboss.c -index 4bde25d6..ccb85e17 100644 --- a/crypto/algboss.c +++ b/crypto/algboss.c -@@ -247,17 +247,9 @@ static int cryptomgr_schedule_test(struct crypto_alg *alg) +@@ -247,17 +247,9 @@ static int cryptomgr_schedule_test(struc memcpy(param->alg, alg->cra_name, sizeof(param->alg)); type = alg->cra_flags; @@ -380,11 +371,9 @@ index 4bde25d6..ccb85e17 100644 param->type = type; -diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c -index 1c570548..a90404a0 100644 --- a/crypto/crypto_user.c +++ b/crypto/crypto_user.c -@@ -112,6 +112,21 @@ static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) +@@ -112,6 +112,21 @@ nla_put_failure: return -EMSGSIZE; } @@ -406,7 +395,7 @@ index 1c570548..a90404a0 100644 static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_akcipher rakcipher; -@@ -186,7 +201,11 @@ static int crypto_report_one(struct crypto_alg *alg, +@@ -186,7 +201,11 @@ static int crypto_report_one(struct cryp goto nla_put_failure; break; @@ -418,9 +407,6 @@ index 1c570548..a90404a0 100644 case CRYPTO_ALG_TYPE_AKCIPHER: if (crypto_report_akcipher(skb, alg)) goto nla_put_failure; -diff --git a/crypto/scompress.c b/crypto/scompress.c -new file mode 100644 -index 00000000..35e396d1 --- /dev/null +++ b/crypto/scompress.c @@ -0,0 +1,356 @@ @@ -780,8 +766,6 @@ index 00000000..35e396d1 + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Synchronous compression type"); -diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c -index ae22f05d..bbb35eed 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -74,7 +74,7 @@ static char *check[] = { @@ -793,7 +777,7 @@ index ae22f05d..bbb35eed 100644 }; struct tcrypt_result { -@@ -1329,6 +1329,10 @@ static int do_test(const char *alg, u32 type, u32 mask, int m) +@@ -1329,6 +1329,10 @@ static int do_test(const char *alg, u32 ret += tcrypt_test("hmac(sha3-512)"); break; @@ -804,7 +788,7 @@ index ae22f05d..bbb35eed 100644 case 150: ret += tcrypt_test("ansi_cprng"); break; -@@ -1390,6 +1394,9 @@ static int do_test(const char *alg, u32 type, u32 mask, int m) +@@ -1390,6 +1394,9 @@ static int do_test(const char *alg, u32 case 190: ret += tcrypt_test("authenc(hmac(sha512),cbc(des3_ede))"); break; @@ -814,7 +798,7 @@ index ae22f05d..bbb35eed 100644 case 200: test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, speed_template_16_24_32); -@@ -1404,9 +1411,9 @@ static int do_test(const char *alg, u32 type, u32 mask, int m) +@@ -1404,9 +1411,9 @@ static int do_test(const char *alg, u32 test_cipher_speed("lrw(aes)", DECRYPT, sec, NULL, 0, speed_template_32_40_48); test_cipher_speed("xts(aes)", ENCRYPT, sec, NULL, 0, @@ -826,7 +810,7 @@ index ae22f05d..bbb35eed 100644 test_cipher_speed("cts(cbc(aes))", ENCRYPT, sec, NULL, 0, speed_template_16_24_32); test_cipher_speed("cts(cbc(aes))", DECRYPT, sec, NULL, 0, -@@ -1837,9 +1844,9 @@ static int do_test(const char *alg, u32 type, u32 mask, int m) +@@ -1837,9 +1844,9 @@ static int do_test(const char *alg, u32 test_acipher_speed("lrw(aes)", DECRYPT, sec, NULL, 0, speed_template_32_40_48); test_acipher_speed("xts(aes)", ENCRYPT, sec, NULL, 0, @@ -838,8 +822,6 @@ index ae22f05d..bbb35eed 100644 test_acipher_speed("cts(cbc(aes))", ENCRYPT, sec, NULL, 0, speed_template_16_24_32); test_acipher_speed("cts(cbc(aes))", DECRYPT, sec, NULL, 0, -diff --git a/crypto/testmgr.c b/crypto/testmgr.c -index 62dffa00..73d91fba 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -33,6 +33,7 @@ @@ -850,7 +832,7 @@ index 62dffa00..73d91fba 100644 #include "internal.h" -@@ -62,7 +63,7 @@ int alg_test(const char *driver, const char *alg, u32 type, u32 mask) +@@ -62,7 +63,7 @@ int alg_test(const char *driver, const c */ #define IDX1 32 #define IDX2 32400 @@ -938,7 +920,7 @@ index 62dffa00..73d91fba 100644 static void hexdump(unsigned char *buf, unsigned int len) { -@@ -202,7 +212,7 @@ static int wait_async_op(struct tcrypt_result *tr, int ret) +@@ -202,7 +212,7 @@ static int wait_async_op(struct tcrypt_r } static int ahash_partial_update(struct ahash_request **preq, @@ -947,7 +929,7 @@ index 62dffa00..73d91fba 100644 void *hash_buff, int k, int temp, struct scatterlist *sg, const char *algo, char *result, struct tcrypt_result *tresult) { -@@ -259,11 +269,12 @@ static int ahash_partial_update(struct ahash_request **preq, +@@ -259,11 +269,12 @@ out_nostate: return ret; } @@ -963,7 +945,7 @@ index 62dffa00..73d91fba 100644 unsigned int i, j, k, temp; struct scatterlist sg[8]; char *result; -@@ -274,7 +285,7 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template, +@@ -274,7 +285,7 @@ static int __test_hash(struct crypto_aha char *xbuf[XBUFSIZE]; int ret = -ENOMEM; @@ -972,7 +954,7 @@ index 62dffa00..73d91fba 100644 if (!result) return ret; key = kmalloc(MAX_KEYLEN, GFP_KERNEL); -@@ -304,7 +315,7 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template, +@@ -304,7 +315,7 @@ static int __test_hash(struct crypto_aha goto out; j++; @@ -981,7 +963,7 @@ index 62dffa00..73d91fba 100644 hash_buff = xbuf[0]; hash_buff += align_offset; -@@ -379,7 +390,7 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template, +@@ -379,7 +390,7 @@ static int __test_hash(struct crypto_aha continue; j++; @@ -990,7 +972,7 @@ index 62dffa00..73d91fba 100644 temp = 0; sg_init_table(sg, template[i].np); -@@ -457,7 +468,7 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template, +@@ -457,7 +468,7 @@ static int __test_hash(struct crypto_aha continue; j++; @@ -999,7 +981,7 @@ index 62dffa00..73d91fba 100644 ret = -EINVAL; hash_buff = xbuf[0]; -@@ -536,7 +547,8 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template, +@@ -536,7 +547,8 @@ out_nobuf: return ret; } @@ -1009,7 +991,7 @@ index 62dffa00..73d91fba 100644 unsigned int tcount, bool use_digest) { unsigned int alignmask; -@@ -564,7 +576,7 @@ static int test_hash(struct crypto_ahash *tfm, struct hash_testvec *template, +@@ -564,7 +576,7 @@ static int test_hash(struct crypto_ahash } static int __test_aead(struct crypto_aead *tfm, int enc, @@ -1018,7 +1000,7 @@ index 62dffa00..73d91fba 100644 const bool diff_dst, const int align_offset) { const char *algo = crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)); -@@ -955,7 +967,7 @@ static int __test_aead(struct crypto_aead *tfm, int enc, +@@ -955,7 +967,7 @@ out_noxbuf: } static int test_aead(struct crypto_aead *tfm, int enc, @@ -1027,7 +1009,7 @@ index 62dffa00..73d91fba 100644 { unsigned int alignmask; int ret; -@@ -987,8 +999,236 @@ static int test_aead(struct crypto_aead *tfm, int enc, +@@ -987,8 +999,236 @@ static int test_aead(struct crypto_aead return 0; } @@ -1265,7 +1247,7 @@ index 62dffa00..73d91fba 100644 { const char *algo = crypto_tfm_alg_driver_name(crypto_cipher_tfm(tfm)); unsigned int i, j, k; -@@ -1066,7 +1306,8 @@ static int test_cipher(struct crypto_cipher *tfm, int enc, +@@ -1066,7 +1306,8 @@ out_nobuf: } static int __test_skcipher(struct crypto_skcipher *tfm, int enc, @@ -1275,7 +1257,7 @@ index 62dffa00..73d91fba 100644 const bool diff_dst, const int align_offset) { const char *algo = -@@ -1330,7 +1571,8 @@ static int __test_skcipher(struct crypto_skcipher *tfm, int enc, +@@ -1330,7 +1571,8 @@ out_nobuf: } static int test_skcipher(struct crypto_skcipher *tfm, int enc, @@ -1285,7 +1267,7 @@ index 62dffa00..73d91fba 100644 { unsigned int alignmask; int ret; -@@ -1362,8 +1604,10 @@ static int test_skcipher(struct crypto_skcipher *tfm, int enc, +@@ -1362,8 +1604,10 @@ static int test_skcipher(struct crypto_s return 0; } @@ -1298,7 +1280,7 @@ index 62dffa00..73d91fba 100644 { const char *algo = crypto_tfm_alg_driver_name(crypto_comp_tfm(tfm)); unsigned int i; -@@ -1442,7 +1686,154 @@ static int test_comp(struct crypto_comp *tfm, struct comp_testvec *ctemplate, +@@ -1442,7 +1686,154 @@ out: return ret; } @@ -1454,7 +1436,7 @@ index 62dffa00..73d91fba 100644 unsigned int tcount) { const char *algo = crypto_tfm_alg_driver_name(crypto_rng_tfm(tfm)); -@@ -1509,7 +1900,7 @@ static int alg_test_aead(const struct alg_test_desc *desc, const char *driver, +@@ -1509,7 +1900,7 @@ static int alg_test_aead(const struct al struct crypto_aead *tfm; int err = 0; @@ -1463,7 +1445,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(tfm)) { printk(KERN_ERR "alg: aead: Failed to load transform for %s: " "%ld\n", driver, PTR_ERR(tfm)); -@@ -1538,7 +1929,7 @@ static int alg_test_cipher(const struct alg_test_desc *desc, +@@ -1538,7 +1929,7 @@ static int alg_test_cipher(const struct struct crypto_cipher *tfm; int err = 0; @@ -1472,7 +1454,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(tfm)) { printk(KERN_ERR "alg: cipher: Failed to load transform for " "%s: %ld\n", driver, PTR_ERR(tfm)); -@@ -1567,7 +1958,7 @@ static int alg_test_skcipher(const struct alg_test_desc *desc, +@@ -1567,7 +1958,7 @@ static int alg_test_skcipher(const struc struct crypto_skcipher *tfm; int err = 0; @@ -1481,7 +1463,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(tfm)) { printk(KERN_ERR "alg: skcipher: Failed to load transform for " "%s: %ld\n", driver, PTR_ERR(tfm)); -@@ -1593,22 +1984,38 @@ static int alg_test_skcipher(const struct alg_test_desc *desc, +@@ -1593,22 +1984,38 @@ out: static int alg_test_comp(const struct alg_test_desc *desc, const char *driver, u32 type, u32 mask) { @@ -1490,7 +1472,13 @@ index 62dffa00..73d91fba 100644 + struct crypto_acomp *acomp; int err; + u32 algo_type = type & CRYPTO_ALG_TYPE_ACOMPRESS_MASK; -+ + +- tfm = crypto_alloc_comp(driver, type, mask); +- if (IS_ERR(tfm)) { +- printk(KERN_ERR "alg: comp: Failed to load transform for %s: " +- "%ld\n", driver, PTR_ERR(tfm)); +- return PTR_ERR(tfm); +- } + if (algo_type == CRYPTO_ALG_TYPE_ACOMPRESS) { + acomp = crypto_alloc_acomp(driver, type, mask); + if (IS_ERR(acomp)) { @@ -1511,13 +1499,6 @@ index 62dffa00..73d91fba 100644 + return PTR_ERR(comp); + } -- tfm = crypto_alloc_comp(driver, type, mask); -- if (IS_ERR(tfm)) { -- printk(KERN_ERR "alg: comp: Failed to load transform for %s: " -- "%ld\n", driver, PTR_ERR(tfm)); -- return PTR_ERR(tfm); -- } -- - err = test_comp(tfm, desc->suite.comp.comp.vecs, - desc->suite.comp.decomp.vecs, - desc->suite.comp.comp.count, @@ -1533,7 +1514,7 @@ index 62dffa00..73d91fba 100644 return err; } -@@ -1618,7 +2025,7 @@ static int alg_test_hash(const struct alg_test_desc *desc, const char *driver, +@@ -1618,7 +2025,7 @@ static int alg_test_hash(const struct al struct crypto_ahash *tfm; int err; @@ -1542,7 +1523,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(tfm)) { printk(KERN_ERR "alg: hash: Failed to load transform for %s: " "%ld\n", driver, PTR_ERR(tfm)); -@@ -1646,7 +2053,7 @@ static int alg_test_crc32c(const struct alg_test_desc *desc, +@@ -1646,7 +2053,7 @@ static int alg_test_crc32c(const struct if (err) goto out; @@ -1551,7 +1532,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(tfm)) { printk(KERN_ERR "alg: crc32c: Failed to load transform for %s: " "%ld\n", driver, PTR_ERR(tfm)); -@@ -1688,7 +2095,7 @@ static int alg_test_cprng(const struct alg_test_desc *desc, const char *driver, +@@ -1688,7 +2095,7 @@ static int alg_test_cprng(const struct a struct crypto_rng *rng; int err; @@ -1560,7 +1541,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(rng)) { printk(KERN_ERR "alg: cprng: Failed to load transform for %s: " "%ld\n", driver, PTR_ERR(rng)); -@@ -1703,7 +2110,7 @@ static int alg_test_cprng(const struct alg_test_desc *desc, const char *driver, +@@ -1703,7 +2110,7 @@ static int alg_test_cprng(const struct a } @@ -1569,7 +1550,7 @@ index 62dffa00..73d91fba 100644 const char *driver, u32 type, u32 mask) { int ret = -EAGAIN; -@@ -1715,7 +2122,7 @@ static int drbg_cavs_test(struct drbg_testvec *test, int pr, +@@ -1715,7 +2122,7 @@ static int drbg_cavs_test(struct drbg_te if (!buf) return -ENOMEM; @@ -1578,7 +1559,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(drng)) { printk(KERN_ERR "alg: drbg: could not allocate DRNG handle for " "%s\n", driver); -@@ -1777,7 +2184,7 @@ static int alg_test_drbg(const struct alg_test_desc *desc, const char *driver, +@@ -1777,7 +2184,7 @@ static int alg_test_drbg(const struct al int err = 0; int pr = 0; int i = 0; @@ -1587,7 +1568,7 @@ index 62dffa00..73d91fba 100644 unsigned int tcount = desc->suite.drbg.count; if (0 == memcmp(driver, "drbg_pr_", 8)) -@@ -1796,7 +2203,7 @@ static int alg_test_drbg(const struct alg_test_desc *desc, const char *driver, +@@ -1796,7 +2203,7 @@ static int alg_test_drbg(const struct al } @@ -1596,7 +1577,7 @@ index 62dffa00..73d91fba 100644 const char *alg) { struct kpp_request *req; -@@ -1888,7 +2295,7 @@ static int do_test_kpp(struct crypto_kpp *tfm, struct kpp_testvec *vec, +@@ -1888,7 +2295,7 @@ free_req: } static int test_kpp(struct crypto_kpp *tfm, const char *alg, @@ -1605,7 +1586,7 @@ index 62dffa00..73d91fba 100644 { int ret, i; -@@ -1909,7 +2316,7 @@ static int alg_test_kpp(const struct alg_test_desc *desc, const char *driver, +@@ -1909,7 +2316,7 @@ static int alg_test_kpp(const struct alg struct crypto_kpp *tfm; int err = 0; @@ -1614,7 +1595,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(tfm)) { pr_err("alg: kpp: Failed to load tfm for %s: %ld\n", driver, PTR_ERR(tfm)); -@@ -1924,7 +2331,7 @@ static int alg_test_kpp(const struct alg_test_desc *desc, const char *driver, +@@ -1924,7 +2331,7 @@ static int alg_test_kpp(const struct alg } static int test_akcipher_one(struct crypto_akcipher *tfm, @@ -1623,7 +1604,7 @@ index 62dffa00..73d91fba 100644 { char *xbuf[XBUFSIZE]; struct akcipher_request *req; -@@ -2044,7 +2451,8 @@ static int test_akcipher_one(struct crypto_akcipher *tfm, +@@ -2044,7 +2451,8 @@ free_xbuf: } static int test_akcipher(struct crypto_akcipher *tfm, const char *alg, @@ -1633,7 +1614,7 @@ index 62dffa00..73d91fba 100644 { const char *algo = crypto_tfm_alg_driver_name(crypto_akcipher_tfm(tfm)); -@@ -2068,7 +2476,7 @@ static int alg_test_akcipher(const struct alg_test_desc *desc, +@@ -2068,7 +2476,7 @@ static int alg_test_akcipher(const struc struct crypto_akcipher *tfm; int err = 0; @@ -1642,7 +1623,7 @@ index 62dffa00..73d91fba 100644 if (IS_ERR(tfm)) { pr_err("alg: akcipher: Failed to load tfm for %s: %ld\n", driver, PTR_ERR(tfm)); -@@ -2088,112 +2496,23 @@ static int alg_test_null(const struct alg_test_desc *desc, +@@ -2088,112 +2496,23 @@ static int alg_test_null(const struct al return 0; } @@ -1760,7 +1741,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2201,12 +2520,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2201,12 +2520,7 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -1774,7 +1755,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2214,12 +2528,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2214,12 +2528,7 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -1788,7 +1769,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2228,12 +2537,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2228,12 +2537,7 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -1802,7 +1783,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2245,18 +2549,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2245,18 +2549,8 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -1823,7 +1804,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2268,12 +2562,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2268,12 +2562,7 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -1837,7 +1818,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2282,12 +2571,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2282,12 +2571,7 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -1851,7 +1832,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2296,12 +2580,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2296,12 +2580,7 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -1865,7 +1846,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2309,12 +2588,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2309,12 +2588,7 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -1879,7 +1860,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2323,12 +2597,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2323,12 +2597,7 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -1893,7 +1874,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2344,12 +2613,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2344,12 +2613,7 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -1907,7 +1888,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2358,12 +2622,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2358,12 +2622,7 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -1921,7 +1902,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2380,12 +2639,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2380,12 +2639,7 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -1935,7 +1916,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2393,12 +2647,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2393,12 +2647,7 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -1949,7 +1930,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2407,12 +2656,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2407,12 +2656,7 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -1963,7 +1944,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2429,14 +2673,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2429,14 +2673,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .cipher = { @@ -1980,7 +1961,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2444,14 +2682,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2444,14 +2682,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -1997,7 +1978,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2459,14 +2691,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2459,14 +2691,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2014,7 +1995,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2474,14 +2700,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2474,14 +2700,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2031,7 +2012,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2489,14 +2709,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2489,14 +2709,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2048,7 +2029,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2504,14 +2718,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2504,14 +2718,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2065,7 +2046,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2519,14 +2727,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2519,14 +2727,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2082,7 +2063,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2535,14 +2737,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2535,14 +2737,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .cipher = { @@ -2099,7 +2080,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2550,14 +2746,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2550,14 +2746,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2116,7 +2097,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2565,30 +2755,25 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2565,30 +2755,25 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2132,14 +2113,14 @@ index 62dffa00..73d91fba 100644 + .dec = __VECS(tf_cbc_dec_tv_template) } } -+ }, { + }, { + .alg = "cbcmac(aes)", + .fips_allowed = 1, + .test = alg_test_hash, + .suite = { + .hash = __VECS(aes_cbcmac_tv_template) + } - }, { ++ }, { .alg = "ccm(aes)", .test = alg_test_aead, .fips_allowed = 1, @@ -2158,7 +2139,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2596,14 +2781,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2596,14 +2781,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2175,7 +2156,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2611,20 +2790,14 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2611,20 +2790,14 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .test = alg_test_hash, .suite = { @@ -2198,7 +2179,7 @@ index 62dffa00..73d91fba 100644 } }, { .alg = "compress_null", -@@ -2633,94 +2806,30 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2633,94 +2806,30 @@ static const struct alg_test_desc alg_te .alg = "crc32", .test = alg_test_hash, .suite = { @@ -2230,7 +2211,7 @@ index 62dffa00..73d91fba 100644 - } + .hash = __VECS(crct10dif_tv_template) } -- }, { + }, { - .alg = "cryptd(__driver-cbc-aes-aesni)", - .test = alg_test_null, - .fips_allowed = 1, @@ -2279,7 +2260,7 @@ index 62dffa00..73d91fba 100644 - .alg = "cryptd(__ghash-pclmulqdqni)", - .test = alg_test_null, - .fips_allowed = 1, - }, { +- }, { .alg = "ctr(aes)", .test = alg_test_skcipher, .fips_allowed = 1, @@ -2298,7 +2279,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2728,14 +2837,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2728,14 +2837,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2315,7 +2296,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2743,14 +2846,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2743,14 +2846,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2332,7 +2313,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2758,14 +2855,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2758,14 +2855,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2349,7 +2330,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2773,14 +2864,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2773,14 +2864,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2366,7 +2347,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2788,29 +2873,18 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2788,29 +2873,18 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2401,7 +2382,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2818,14 +2892,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2818,14 +2892,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2418,7 +2399,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2833,14 +2901,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2833,14 +2901,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2435,7 +2416,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2848,14 +2910,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2848,14 +2910,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2452,7 +2433,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2864,14 +2920,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2864,14 +2920,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .comp = { @@ -2469,7 +2450,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -2879,10 +2929,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2879,10 +2929,7 @@ static const struct alg_test_desc alg_te .test = alg_test_kpp, .fips_allowed = 1, .suite = { @@ -2481,7 +2462,7 @@ index 62dffa00..73d91fba 100644 } }, { .alg = "digest_null", -@@ -2892,30 +2939,21 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2892,30 +2939,21 @@ static const struct alg_test_desc alg_te .test = alg_test_drbg, .fips_allowed = 1, .suite = { @@ -2515,7 +2496,7 @@ index 62dffa00..73d91fba 100644 } }, { /* -@@ -2930,11 +2968,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2930,11 +2968,7 @@ static const struct alg_test_desc alg_te .test = alg_test_drbg, .fips_allowed = 1, .suite = { @@ -2528,7 +2509,7 @@ index 62dffa00..73d91fba 100644 } }, { /* covered by drbg_nopr_hmac_sha256 test */ -@@ -2954,10 +2988,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2954,10 +2988,7 @@ static const struct alg_test_desc alg_te .test = alg_test_drbg, .fips_allowed = 1, .suite = { @@ -2540,7 +2521,7 @@ index 62dffa00..73d91fba 100644 } }, { /* covered by drbg_nopr_sha256 test */ -@@ -2973,10 +3004,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2973,10 +3004,7 @@ static const struct alg_test_desc alg_te .test = alg_test_drbg, .fips_allowed = 1, .suite = { @@ -2552,7 +2533,7 @@ index 62dffa00..73d91fba 100644 } }, { /* covered by drbg_pr_ctr_aes128 test */ -@@ -2996,10 +3024,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -2996,10 +3024,7 @@ static const struct alg_test_desc alg_te .test = alg_test_drbg, .fips_allowed = 1, .suite = { @@ -2564,7 +2545,7 @@ index 62dffa00..73d91fba 100644 } }, { /* covered by drbg_pr_hmac_sha256 test */ -@@ -3019,10 +3044,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3019,10 +3044,7 @@ static const struct alg_test_desc alg_te .test = alg_test_drbg, .fips_allowed = 1, .suite = { @@ -2576,15 +2557,14 @@ index 62dffa00..73d91fba 100644 } }, { /* covered by drbg_pr_sha256 test */ -@@ -3033,24 +3055,14 @@ static const struct alg_test_desc alg_test_descs[] = { - .alg = "drbg_pr_sha512", +@@ -3034,23 +3056,13 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .test = alg_test_null, -- }, { + }, { - .alg = "ecb(__aes-aesni)", - .test = alg_test_null, - .fips_allowed = 1, - }, { +- }, { .alg = "ecb(aes)", .test = alg_test_skcipher, .fips_allowed = 1, @@ -2603,7 +2583,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3058,14 +3070,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3058,14 +3070,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2620,7 +2600,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3073,14 +3079,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3073,14 +3079,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2637,7 +2617,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3088,14 +3088,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3088,14 +3088,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2654,7 +2634,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3103,14 +3097,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3103,14 +3097,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2671,7 +2651,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3118,14 +3106,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3118,14 +3106,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2688,7 +2668,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3133,14 +3115,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3133,14 +3115,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2705,7 +2685,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3151,14 +3127,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3151,14 +3127,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2722,7 +2702,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3167,14 +3137,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3167,14 +3137,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .cipher = { @@ -2739,7 +2719,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3197,14 +3161,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3197,14 +3161,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2756,7 +2736,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3212,14 +3170,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3212,14 +3170,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2773,7 +2753,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3227,14 +3179,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3227,14 +3179,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2790,7 +2770,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3242,14 +3188,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3242,14 +3188,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2807,7 +2787,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3257,14 +3197,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3257,14 +3197,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2824,7 +2804,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3272,14 +3206,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3272,14 +3206,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2841,7 +2821,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3287,14 +3215,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3287,14 +3215,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2858,7 +2838,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3302,14 +3224,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3302,14 +3224,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -2875,7 +2855,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3317,10 +3233,7 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3317,10 +3233,7 @@ static const struct alg_test_desc alg_te .test = alg_test_kpp, .fips_allowed = 1, .suite = { @@ -2887,7 +2867,7 @@ index 62dffa00..73d91fba 100644 } }, { .alg = "gcm(aes)", -@@ -3328,14 +3241,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3328,14 +3241,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -2904,7 +2884,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3343,136 +3250,94 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3343,136 +3250,94 @@ static const struct alg_test_desc alg_te .test = alg_test_hash, .fips_allowed = 1, .suite = { @@ -3055,7 +3035,7 @@ index 62dffa00..73d91fba 100644 } }, { .alg = "jitterentropy_rng", -@@ -3484,14 +3349,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3484,14 +3349,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .cipher = { @@ -3072,7 +3052,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3499,14 +3358,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3499,14 +3358,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3089,7 +3069,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3514,14 +3367,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3514,14 +3367,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3106,7 +3086,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3529,14 +3376,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3529,14 +3376,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3123,7 +3103,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3544,14 +3385,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3544,14 +3385,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3140,7 +3120,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3559,14 +3394,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3559,14 +3394,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3157,7 +3137,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3575,14 +3404,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3575,14 +3404,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .comp = { @@ -3174,7 +3154,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3591,14 +3414,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3591,14 +3414,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .comp = { @@ -3191,7 +3171,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3607,42 +3424,27 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3607,42 +3424,27 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .comp = { @@ -3239,7 +3219,7 @@ index 62dffa00..73d91fba 100644 } }, { .alg = "ofb(aes)", -@@ -3650,14 +3452,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3650,14 +3452,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .cipher = { @@ -3256,7 +3236,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3665,24 +3461,15 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3665,24 +3461,15 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3284,7 +3264,7 @@ index 62dffa00..73d91fba 100644 } }, { .alg = "rfc3686(ctr(aes))", -@@ -3690,14 +3477,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3690,14 +3477,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .cipher = { @@ -3301,7 +3281,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3706,14 +3487,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3706,14 +3487,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -3318,7 +3298,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3722,14 +3497,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3722,14 +3497,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .aead = { @@ -3335,7 +3315,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3737,14 +3506,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3737,14 +3506,8 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -3352,7 +3332,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3752,14 +3515,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3752,14 +3515,8 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -3369,7 +3349,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3767,71 +3524,47 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3767,71 +3524,47 @@ static const struct alg_test_desc alg_te .test = alg_test_aead, .suite = { .aead = { @@ -3449,7 +3429,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -3839,162 +3572,120 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -3839,162 +3572,120 @@ static const struct alg_test_desc alg_te .test = alg_test_hash, .fips_allowed = 1, .suite = { @@ -3637,7 +3617,7 @@ index 62dffa00..73d91fba 100644 } }, { .alg = "xts(aes)", -@@ -4002,14 +3693,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -4002,14 +3693,8 @@ static const struct alg_test_desc alg_te .fips_allowed = 1, .suite = { .cipher = { @@ -3654,7 +3634,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -4017,14 +3702,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -4017,14 +3702,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3671,7 +3651,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -4032,14 +3711,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -4032,14 +3711,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3688,7 +3668,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -4047,14 +3720,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -4047,14 +3720,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3705,7 +3685,7 @@ index 62dffa00..73d91fba 100644 } } }, { -@@ -4062,14 +3729,8 @@ static const struct alg_test_desc alg_test_descs[] = { +@@ -4062,14 +3729,8 @@ static const struct alg_test_desc alg_te .test = alg_test_skcipher, .suite = { .cipher = { @@ -3722,8 +3702,6 @@ index 62dffa00..73d91fba 100644 } } } -diff --git a/crypto/testmgr.h b/crypto/testmgr.h -index 9033088c..ce9f4334 100644 --- a/crypto/testmgr.h +++ b/crypto/testmgr.h @@ -34,9 +34,9 @@ @@ -3893,12 +3871,10 @@ index 9033088c..ce9f4334 100644 +#ifdef __LITTLE_ENDIAN + .key = "\x08\x00" /* rta length */ + "\x01\x00" /* rta type */ - #else --#define RSA_TEST_VECTORS 5 ++#else + .key = "\x00\x08" /* rta length */ + "\x00\x01" /* rta type */ - #endif --static struct akcipher_testvec rsa_tv_template[] = { ++#endif + "\x00\x00\x00\x10" /* enc key length */ + "authenticationkey20benckeyis16_bytes", + .klen = 8 + 20 + 16, @@ -3996,10 +3972,12 @@ index 9033088c..ce9f4334 100644 +#ifdef __LITTLE_ENDIAN + .key = "\x08\x00" /* rta length */ + "\x01\x00" /* rta type */ -+#else + #else +-#define RSA_TEST_VECTORS 5 + .key = "\x00\x08" /* rta length */ + "\x00\x01" /* rta type */ -+#endif + #endif +-static struct akcipher_testvec rsa_tv_template[] = { + "\x00\x00\x00\x10" /* enc key length */ + "authenticationkey20benckeyis16_bytes", + .klen = 8 + 20 + 16, @@ -4075,7 +4053,7 @@ index 9033088c..ce9f4334 100644 { #ifndef CONFIG_CRYPTO_FIPS .key = -@@ -340,6 +554,7 @@ static struct akcipher_testvec rsa_tv_template[] = { +@@ -340,6 +554,7 @@ static struct akcipher_testvec rsa_tv_te .m_size = 8, .c_size = 256, .public_key_vec = true, @@ -4083,7 +4061,7 @@ index 9033088c..ce9f4334 100644 }, { .key = "\x30\x82\x09\x29" /* sequence of 2345 bytes */ -@@ -538,12 +753,11 @@ static struct akcipher_testvec rsa_tv_template[] = { +@@ -538,12 +753,11 @@ static struct akcipher_testvec rsa_tv_te .key_len = 2349, .m_size = 8, .c_size = 512, @@ -4112,7 +4090,7 @@ index 9033088c..ce9f4334 100644 { #ifndef CONFIG_CRYPTO_FIPS .secret = -@@ -856,9 +1065,7 @@ struct kpp_testvec ecdh_tv_template[] = { +@@ -856,9 +1065,7 @@ struct kpp_testvec ecdh_tv_template[] = /* * MD4 test vectors from RFC1320 */ @@ -4123,7 +4101,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31" -@@ -899,8 +1106,7 @@ static struct hash_testvec md4_tv_template [] = { +@@ -899,8 +1106,7 @@ static struct hash_testvec md4_tv_templa }, }; @@ -4133,7 +4111,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .digest = "\x6b\x4e\x03\x42\x36\x67\xdb\xb7" -@@ -925,8 +1131,7 @@ static struct hash_testvec sha3_224_tv_template[] = { +@@ -925,8 +1131,7 @@ static struct hash_testvec sha3_224_tv_t }, }; @@ -4143,7 +4121,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .digest = "\xa7\xff\xc6\xf8\xbf\x1e\xd7\x66" -@@ -952,8 +1157,7 @@ static struct hash_testvec sha3_256_tv_template[] = { +@@ -952,8 +1157,7 @@ static struct hash_testvec sha3_256_tv_t }; @@ -4153,7 +4131,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .digest = "\x0c\x63\xa7\x5b\x84\x5e\x4f\x7d" -@@ -985,8 +1189,7 @@ static struct hash_testvec sha3_384_tv_template[] = { +@@ -985,8 +1189,7 @@ static struct hash_testvec sha3_384_tv_t }; @@ -4163,7 +4141,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .digest = "\xa6\x9f\x73\xcc\xa2\x3a\x9a\xc5" -@@ -1027,9 +1230,7 @@ static struct hash_testvec sha3_512_tv_template[] = { +@@ -1027,9 +1230,7 @@ static struct hash_testvec sha3_512_tv_t /* * MD5 test vectors from RFC1321 */ @@ -4174,7 +4152,7 @@ index 9033088c..ce9f4334 100644 { .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04" "\xe9\x80\x09\x98\xec\xf8\x42\x7e", -@@ -1073,9 +1274,7 @@ static struct hash_testvec md5_tv_template[] = { +@@ -1073,9 +1274,7 @@ static struct hash_testvec md5_tv_templa /* * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E) */ @@ -4185,7 +4163,7 @@ index 9033088c..ce9f4334 100644 { .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e" "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46", -@@ -1137,9 +1336,7 @@ static struct hash_testvec rmd128_tv_template[] = { +@@ -1137,9 +1336,7 @@ static struct hash_testvec rmd128_tv_tem /* * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E) */ @@ -4196,7 +4174,7 @@ index 9033088c..ce9f4334 100644 { .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28" "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31", -@@ -1201,9 +1398,7 @@ static struct hash_testvec rmd160_tv_template[] = { +@@ -1201,9 +1398,7 @@ static struct hash_testvec rmd160_tv_tem /* * RIPEMD-256 test vectors */ @@ -4207,7 +4185,7 @@ index 9033088c..ce9f4334 100644 { .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18" "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a" -@@ -1269,9 +1464,7 @@ static struct hash_testvec rmd256_tv_template[] = { +@@ -1269,9 +1464,7 @@ static struct hash_testvec rmd256_tv_tem /* * RIPEMD-320 test vectors */ @@ -4218,7 +4196,7 @@ index 9033088c..ce9f4334 100644 { .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1" "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25" -@@ -1334,36 +1527,49 @@ static struct hash_testvec rmd320_tv_template[] = { +@@ -1334,36 +1527,49 @@ static struct hash_testvec rmd320_tv_tem } }; @@ -4297,7 +4275,7 @@ index 9033088c..ce9f4334 100644 } }; -@@ -1371,9 +1577,7 @@ static struct hash_testvec crct10dif_tv_template[] = { +@@ -1371,9 +1577,7 @@ static struct hash_testvec crct10dif_tv_ * SHA1 test vectors from from FIPS PUB 180-1 * Long vector from CAVS 5.0 */ @@ -4308,7 +4286,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -1563,9 +1767,7 @@ static struct hash_testvec sha1_tv_template[] = { +@@ -1563,9 +1767,7 @@ static struct hash_testvec sha1_tv_templ /* * SHA224 test vectors from from FIPS PUB 180-2 */ @@ -4319,7 +4297,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -1737,9 +1939,7 @@ static struct hash_testvec sha224_tv_template[] = { +@@ -1737,9 +1939,7 @@ static struct hash_testvec sha224_tv_tem /* * SHA256 test vectors from from NIST */ @@ -4330,7 +4308,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -1910,9 +2110,7 @@ static struct hash_testvec sha256_tv_template[] = { +@@ -1910,9 +2110,7 @@ static struct hash_testvec sha256_tv_tem /* * SHA384 test vectors from from NIST and kerneli */ @@ -4341,7 +4319,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -2104,9 +2302,7 @@ static struct hash_testvec sha384_tv_template[] = { +@@ -2104,9 +2302,7 @@ static struct hash_testvec sha384_tv_tem /* * SHA512 test vectors from from NIST and kerneli */ @@ -4352,7 +4330,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -2313,9 +2509,7 @@ static struct hash_testvec sha512_tv_template[] = { +@@ -2313,9 +2509,7 @@ static struct hash_testvec sha512_tv_tem * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE * submission */ @@ -4363,7 +4341,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -2411,9 +2605,7 @@ static struct hash_testvec wp512_tv_template[] = { +@@ -2411,9 +2605,7 @@ static struct hash_testvec wp512_tv_temp }, }; @@ -4374,7 +4352,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -2493,9 +2685,7 @@ static struct hash_testvec wp384_tv_template[] = { +@@ -2493,9 +2685,7 @@ static struct hash_testvec wp384_tv_temp }, }; @@ -4385,7 +4363,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -2562,9 +2752,7 @@ static struct hash_testvec wp256_tv_template[] = { +@@ -2562,9 +2752,7 @@ static struct hash_testvec wp256_tv_temp /* * TIGER test vectors from Tiger website */ @@ -4396,7 +4374,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -2607,9 +2795,7 @@ static struct hash_testvec tgr192_tv_template[] = { +@@ -2607,9 +2795,7 @@ static struct hash_testvec tgr192_tv_tem }, }; @@ -4407,7 +4385,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -2652,9 +2838,7 @@ static struct hash_testvec tgr160_tv_template[] = { +@@ -2652,9 +2838,7 @@ static struct hash_testvec tgr160_tv_tem }, }; @@ -4418,7 +4396,7 @@ index 9033088c..ce9f4334 100644 { .plaintext = "", .psize = 0, -@@ -2691,9 +2875,7 @@ static struct hash_testvec tgr128_tv_template[] = { +@@ -2691,9 +2875,7 @@ static struct hash_testvec tgr128_tv_tem }, }; @@ -4429,7 +4407,7 @@ index 9033088c..ce9f4334 100644 { { .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03" -@@ -2808,9 +2990,7 @@ static struct hash_testvec ghash_tv_template[] = +@@ -2808,9 +2990,7 @@ static struct hash_testvec ghash_tv_temp * HMAC-MD5 test vectors from RFC2202 * (These need to be fixed to not use strlen). */ @@ -4440,7 +4418,7 @@ index 9033088c..ce9f4334 100644 { { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", -@@ -2890,9 +3070,7 @@ static struct hash_testvec hmac_md5_tv_template[] = +@@ -2890,9 +3070,7 @@ static struct hash_testvec hmac_md5_tv_t /* * HMAC-RIPEMD128 test vectors from RFC2286 */ @@ -4451,7 +4429,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", .ksize = 16, -@@ -2971,9 +3149,7 @@ static struct hash_testvec hmac_rmd128_tv_template[] = { +@@ -2971,9 +3149,7 @@ static struct hash_testvec hmac_rmd128_t /* * HMAC-RIPEMD160 test vectors from RFC2286 */ @@ -4462,7 +4440,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", .ksize = 20, -@@ -3052,9 +3228,7 @@ static struct hash_testvec hmac_rmd160_tv_template[] = { +@@ -3052,9 +3228,7 @@ static struct hash_testvec hmac_rmd160_t /* * HMAC-SHA1 test vectors from RFC2202 */ @@ -4473,7 +4451,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", .ksize = 20, -@@ -3135,9 +3309,7 @@ static struct hash_testvec hmac_sha1_tv_template[] = { +@@ -3135,9 +3309,7 @@ static struct hash_testvec hmac_sha1_tv_ /* * SHA224 HMAC test vectors from RFC4231 */ @@ -4484,7 +4462,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" -@@ -3250,9 +3422,7 @@ static struct hash_testvec hmac_sha224_tv_template[] = { +@@ -3250,9 +3422,7 @@ static struct hash_testvec hmac_sha224_t * HMAC-SHA256 test vectors from * draft-ietf-ipsec-ciph-sha-256-01.txt */ @@ -4495,7 +4473,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x01\x02\x03\x04\x05\x06\x07\x08" "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10" -@@ -3387,9 +3557,7 @@ static struct hash_testvec hmac_sha256_tv_template[] = { +@@ -3387,9 +3557,7 @@ static struct hash_testvec hmac_sha256_t }, }; @@ -4506,7 +4484,7 @@ index 9033088c..ce9f4334 100644 { /* From NIST Special Publication 800-38B, AES-128 */ .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6" "\xab\xf7\x15\x88\x09\xcf\x4f\x3c", -@@ -3464,9 +3632,67 @@ static struct hash_testvec aes_cmac128_tv_template[] = { +@@ -3464,9 +3632,67 @@ static struct hash_testvec aes_cmac128_t } }; @@ -4576,7 +4554,7 @@ index 9033088c..ce9f4334 100644 /* * From NIST Special Publication 800-38B, Three Key TDEA * Corrected test vectors from: -@@ -3512,9 +3738,7 @@ static struct hash_testvec des3_ede_cmac64_tv_template[] = { +@@ -3512,9 +3738,7 @@ static struct hash_testvec des3_ede_cmac } }; @@ -4587,7 +4565,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", -@@ -3580,36 +3804,35 @@ static struct hash_testvec aes_xcbc128_tv_template[] = { +@@ -3580,36 +3804,35 @@ static struct hash_testvec aes_xcbc128_t } }; @@ -4619,8 +4597,6 @@ index 9033088c..ce9f4334 100644 -static char vmac_string6[129] = {'p', 't', '*', '7', 'l', - 'i', '!', '#', 'w', '0', - 'z', '/', '4', 'A', 'n'}; -- --static struct hash_testvec aes_vmac128_tv_template[] = { +static const char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01', + '\x02', '\x03', '\x02', '\x02', + '\x02', '\x04', '\x01', '\x07', @@ -4648,12 +4624,13 @@ index 9033088c..ce9f4334 100644 +static const char vmac_string6[129] = {'p', 't', '*', '7', 'l', + 'i', '!', '#', 'w', '0', + 'z', '/', '4', 'A', 'n'}; -+ + +-static struct hash_testvec aes_vmac128_tv_template[] = { +static const struct hash_testvec aes_vmac128_tv_template[] = { { .key = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", -@@ -3687,9 +3910,7 @@ static struct hash_testvec aes_vmac128_tv_template[] = { +@@ -3687,9 +3910,7 @@ static struct hash_testvec aes_vmac128_t * SHA384 HMAC test vectors from RFC4231 */ @@ -4664,7 +4641,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" -@@ -3787,9 +4008,7 @@ static struct hash_testvec hmac_sha384_tv_template[] = { +@@ -3787,9 +4008,7 @@ static struct hash_testvec hmac_sha384_t * SHA512 HMAC test vectors from RFC4231 */ @@ -4675,7 +4652,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" -@@ -3894,9 +4113,7 @@ static struct hash_testvec hmac_sha512_tv_template[] = { +@@ -3894,9 +4113,7 @@ static struct hash_testvec hmac_sha512_t }, }; @@ -4686,7 +4663,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" -@@ -3985,9 +4202,7 @@ static struct hash_testvec hmac_sha3_224_tv_template[] = { +@@ -3985,9 +4202,7 @@ static struct hash_testvec hmac_sha3_224 }, }; @@ -4697,7 +4674,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" -@@ -4076,9 +4291,7 @@ static struct hash_testvec hmac_sha3_256_tv_template[] = { +@@ -4076,9 +4291,7 @@ static struct hash_testvec hmac_sha3_256 }, }; @@ -4708,7 +4685,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" -@@ -4175,9 +4388,7 @@ static struct hash_testvec hmac_sha3_384_tv_template[] = { +@@ -4175,9 +4388,7 @@ static struct hash_testvec hmac_sha3_384 }, }; @@ -4719,7 +4696,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b" -@@ -4286,9 +4497,7 @@ static struct hash_testvec hmac_sha3_512_tv_template[] = { +@@ -4286,9 +4497,7 @@ static struct hash_testvec hmac_sha3_512 * Poly1305 test vectors from RFC7539 A.3. */ @@ -4730,7 +4707,7 @@ index 9033088c..ce9f4334 100644 { /* Test Vector #1 */ .plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" -@@ -4533,20 +4742,7 @@ static struct hash_testvec poly1305_tv_template[] = { +@@ -4533,20 +4742,7 @@ static struct hash_testvec poly1305_tv_t /* * DES test vectors. */ @@ -4752,7 +4729,7 @@ index 9033088c..ce9f4334 100644 { /* From Applied Cryptography */ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", .klen = 8, -@@ -4720,7 +4916,7 @@ static struct cipher_testvec des_enc_tv_template[] = { +@@ -4720,7 +4916,7 @@ static struct cipher_testvec des_enc_tv_ }, }; @@ -4761,7 +4738,7 @@ index 9033088c..ce9f4334 100644 { /* From Applied Cryptography */ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", .klen = 8, -@@ -4830,7 +5026,7 @@ static struct cipher_testvec des_dec_tv_template[] = { +@@ -4830,7 +5026,7 @@ static struct cipher_testvec des_dec_tv_ }, }; @@ -4770,7 +4747,7 @@ index 9033088c..ce9f4334 100644 { /* From OpenSSL */ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", .klen = 8, -@@ -4956,7 +5152,7 @@ static struct cipher_testvec des_cbc_enc_tv_template[] = { +@@ -4956,7 +5152,7 @@ static struct cipher_testvec des_cbc_enc }, }; @@ -4779,7 +4756,7 @@ index 9033088c..ce9f4334 100644 { /* FIPS Pub 81 */ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", .klen = 8, -@@ -5065,7 +5261,7 @@ static struct cipher_testvec des_cbc_dec_tv_template[] = { +@@ -5065,7 +5261,7 @@ static struct cipher_testvec des_cbc_dec }, }; @@ -4788,7 +4765,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55", .klen = 8, -@@ -5211,7 +5407,7 @@ static struct cipher_testvec des_ctr_enc_tv_template[] = { +@@ -5211,7 +5407,7 @@ static struct cipher_testvec des_ctr_enc }, }; @@ -4797,7 +4774,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55", .klen = 8, -@@ -5357,7 +5553,7 @@ static struct cipher_testvec des_ctr_dec_tv_template[] = { +@@ -5357,7 +5553,7 @@ static struct cipher_testvec des_ctr_dec }, }; @@ -4806,7 +4783,7 @@ index 9033088c..ce9f4334 100644 { /* These are from openssl */ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef" "\x55\x55\x55\x55\x55\x55\x55\x55" -@@ -5522,7 +5718,7 @@ static struct cipher_testvec des3_ede_enc_tv_template[] = { +@@ -5522,7 +5718,7 @@ static struct cipher_testvec des3_ede_en }, }; @@ -4815,7 +4792,7 @@ index 9033088c..ce9f4334 100644 { /* These are from openssl */ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef" "\x55\x55\x55\x55\x55\x55\x55\x55" -@@ -5687,7 +5883,7 @@ static struct cipher_testvec des3_ede_dec_tv_template[] = { +@@ -5687,7 +5883,7 @@ static struct cipher_testvec des3_ede_de }, }; @@ -4824,7 +4801,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from openssl */ .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24" "\x44\x4D\x99\x5A\x12\xD6\x40\xC0" -@@ -5867,7 +6063,7 @@ static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = { +@@ -5867,7 +6063,7 @@ static struct cipher_testvec des3_ede_cb }, }; @@ -4833,7 +4810,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from openssl */ .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24" "\x44\x4D\x99\x5A\x12\xD6\x40\xC0" -@@ -6047,7 +6243,7 @@ static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = { +@@ -6047,7 +6243,7 @@ static struct cipher_testvec des3_ede_cb }, }; @@ -4842,7 +4819,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00" "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE" -@@ -6325,7 +6521,7 @@ static struct cipher_testvec des3_ede_ctr_enc_tv_template[] = { +@@ -6325,7 +6521,7 @@ static struct cipher_testvec des3_ede_ct }, }; @@ -4851,7 +4828,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00" "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE" -@@ -6606,14 +6802,7 @@ static struct cipher_testvec des3_ede_ctr_dec_tv_template[] = { +@@ -6606,14 +6802,7 @@ static struct cipher_testvec des3_ede_ct /* * Blowfish test vectors. */ @@ -4867,7 +4844,7 @@ index 9033088c..ce9f4334 100644 { /* DES test vectors from OpenSSL */ .key = "\x00\x00\x00\x00\x00\x00\x00\x00", .klen = 8, -@@ -6805,7 +6994,7 @@ static struct cipher_testvec bf_enc_tv_template[] = { +@@ -6805,7 +6994,7 @@ static struct cipher_testvec bf_enc_tv_t }, }; @@ -4876,7 +4853,7 @@ index 9033088c..ce9f4334 100644 { /* DES test vectors from OpenSSL */ .key = "\x00\x00\x00\x00\x00\x00\x00\x00", .klen = 8, -@@ -6997,7 +7186,7 @@ static struct cipher_testvec bf_dec_tv_template[] = { +@@ -6997,7 +7186,7 @@ static struct cipher_testvec bf_dec_tv_t }, }; @@ -4885,7 +4862,7 @@ index 9033088c..ce9f4334 100644 { /* From OpenSSL */ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef" "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87", -@@ -7154,7 +7343,7 @@ static struct cipher_testvec bf_cbc_enc_tv_template[] = { +@@ -7154,7 +7343,7 @@ static struct cipher_testvec bf_cbc_enc_ }, }; @@ -4894,7 +4871,7 @@ index 9033088c..ce9f4334 100644 { /* From OpenSSL */ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef" "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87", -@@ -7311,7 +7500,7 @@ static struct cipher_testvec bf_cbc_dec_tv_template[] = { +@@ -7311,7 +7500,7 @@ static struct cipher_testvec bf_cbc_dec_ }, }; @@ -4903,7 +4880,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -7723,7 +7912,7 @@ static struct cipher_testvec bf_ctr_enc_tv_template[] = { +@@ -7723,7 +7912,7 @@ static struct cipher_testvec bf_ctr_enc_ }, }; @@ -4912,7 +4889,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -8138,18 +8327,7 @@ static struct cipher_testvec bf_ctr_dec_tv_template[] = { +@@ -8138,18 +8327,7 @@ static struct cipher_testvec bf_ctr_dec_ /* * Twofish test vectors. */ @@ -4932,7 +4909,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -8317,7 +8495,7 @@ static struct cipher_testvec tf_enc_tv_template[] = { +@@ -8317,7 +8495,7 @@ static struct cipher_testvec tf_enc_tv_t }, }; @@ -4941,7 +4918,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -8485,7 +8663,7 @@ static struct cipher_testvec tf_dec_tv_template[] = { +@@ -8485,7 +8663,7 @@ static struct cipher_testvec tf_dec_tv_t }, }; @@ -4950,7 +4927,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Nettle */ .key = zeroed_string, .klen = 16, -@@ -8668,7 +8846,7 @@ static struct cipher_testvec tf_cbc_enc_tv_template[] = { +@@ -8668,7 +8846,7 @@ static struct cipher_testvec tf_cbc_enc_ }, }; @@ -4959,7 +4936,7 @@ index 9033088c..ce9f4334 100644 { /* Reverse of the first four above */ .key = zeroed_string, .klen = 16, -@@ -8851,7 +9029,7 @@ static struct cipher_testvec tf_cbc_dec_tv_template[] = { +@@ -8851,7 +9029,7 @@ static struct cipher_testvec tf_cbc_dec_ }, }; @@ -4968,7 +4945,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -9262,7 +9440,7 @@ static struct cipher_testvec tf_ctr_enc_tv_template[] = { +@@ -9262,7 +9440,7 @@ static struct cipher_testvec tf_ctr_enc_ }, }; @@ -4977,7 +4954,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -9673,7 +9851,7 @@ static struct cipher_testvec tf_ctr_dec_tv_template[] = { +@@ -9673,7 +9851,7 @@ static struct cipher_testvec tf_ctr_dec_ }, }; @@ -4986,7 +4963,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-LRW test vectors */ { .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d" -@@ -9925,7 +10103,7 @@ static struct cipher_testvec tf_lrw_enc_tv_template[] = { +@@ -9925,7 +10103,7 @@ static struct cipher_testvec tf_lrw_enc_ }, }; @@ -4995,7 +4972,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-LRW test vectors */ /* same as enc vectors with input and result reversed */ { -@@ -10178,7 +10356,7 @@ static struct cipher_testvec tf_lrw_dec_tv_template[] = { +@@ -10178,7 +10356,7 @@ static struct cipher_testvec tf_lrw_dec_ }, }; @@ -5004,7 +4981,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-XTS test vectors */ { .key = "\x00\x00\x00\x00\x00\x00\x00\x00" -@@ -10520,7 +10698,7 @@ static struct cipher_testvec tf_xts_enc_tv_template[] = { +@@ -10520,7 +10698,7 @@ static struct cipher_testvec tf_xts_enc_ }, }; @@ -5013,7 +4990,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-XTS test vectors */ /* same as enc vectors with input and result reversed */ { -@@ -10867,25 +11045,7 @@ static struct cipher_testvec tf_xts_dec_tv_template[] = { +@@ -10867,25 +11045,7 @@ static struct cipher_testvec tf_xts_dec_ * Serpent test vectors. These are backwards because Serpent writes * octet sequences in right-to-left mode. */ @@ -5040,7 +5017,7 @@ index 9033088c..ce9f4334 100644 { .input = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", -@@ -11061,7 +11221,7 @@ static struct cipher_testvec serpent_enc_tv_template[] = { +@@ -11061,7 +11221,7 @@ static struct cipher_testvec serpent_enc }, }; @@ -5049,7 +5026,7 @@ index 9033088c..ce9f4334 100644 { /* KeySize=128, PT=0, I=1 */ .input = "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00", -@@ -11111,7 +11271,7 @@ static struct cipher_testvec tnepres_enc_tv_template[] = { +@@ -11111,7 +11271,7 @@ static struct cipher_testvec tnepres_enc }; @@ -5058,7 +5035,7 @@ index 9033088c..ce9f4334 100644 { .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47" "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2", -@@ -11287,7 +11447,7 @@ static struct cipher_testvec serpent_dec_tv_template[] = { +@@ -11287,7 +11447,7 @@ static struct cipher_testvec serpent_dec }, }; @@ -5067,7 +5044,7 @@ index 9033088c..ce9f4334 100644 { .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97" "\x6d\x6f\xbb\x38\x4b\x37\x21\x28", -@@ -11328,7 +11488,7 @@ static struct cipher_testvec tnepres_dec_tv_template[] = { +@@ -11328,7 +11488,7 @@ static struct cipher_testvec tnepres_dec }, }; @@ -5076,7 +5053,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -11469,7 +11629,7 @@ static struct cipher_testvec serpent_cbc_enc_tv_template[] = { +@@ -11469,7 +11629,7 @@ static struct cipher_testvec serpent_cbc }, }; @@ -5085,7 +5062,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -11610,7 +11770,7 @@ static struct cipher_testvec serpent_cbc_dec_tv_template[] = { +@@ -11610,7 +11770,7 @@ static struct cipher_testvec serpent_cbc }, }; @@ -5094,7 +5071,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -12021,7 +12181,7 @@ static struct cipher_testvec serpent_ctr_enc_tv_template[] = { +@@ -12021,7 +12181,7 @@ static struct cipher_testvec serpent_ctr }, }; @@ -5103,7 +5080,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -12432,7 +12592,7 @@ static struct cipher_testvec serpent_ctr_dec_tv_template[] = { +@@ -12432,7 +12592,7 @@ static struct cipher_testvec serpent_ctr }, }; @@ -5112,7 +5089,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-LRW test vectors */ { .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d" -@@ -12684,7 +12844,7 @@ static struct cipher_testvec serpent_lrw_enc_tv_template[] = { +@@ -12684,7 +12844,7 @@ static struct cipher_testvec serpent_lrw }, }; @@ -5121,7 +5098,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-LRW test vectors */ /* same as enc vectors with input and result reversed */ { -@@ -12937,7 +13097,7 @@ static struct cipher_testvec serpent_lrw_dec_tv_template[] = { +@@ -12937,7 +13097,7 @@ static struct cipher_testvec serpent_lrw }, }; @@ -5130,7 +5107,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-XTS test vectors */ { .key = "\x00\x00\x00\x00\x00\x00\x00\x00" -@@ -13279,7 +13439,7 @@ static struct cipher_testvec serpent_xts_enc_tv_template[] = { +@@ -13279,7 +13439,7 @@ static struct cipher_testvec serpent_xts }, }; @@ -5139,7 +5116,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-XTS test vectors */ /* same as enc vectors with input and result reversed */ { -@@ -13623,18 +13783,7 @@ static struct cipher_testvec serpent_xts_dec_tv_template[] = { +@@ -13623,18 +13783,7 @@ static struct cipher_testvec serpent_xts }; /* Cast6 test vectors from RFC 2612 */ @@ -5159,7 +5136,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c" "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d", -@@ -13805,7 +13954,7 @@ static struct cipher_testvec cast6_enc_tv_template[] = { +@@ -13805,7 +13954,7 @@ static struct cipher_testvec cast6_enc_t }, }; @@ -5168,7 +5145,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c" "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d", -@@ -13976,7 +14125,7 @@ static struct cipher_testvec cast6_dec_tv_template[] = { +@@ -13976,7 +14125,7 @@ static struct cipher_testvec cast6_dec_t }, }; @@ -5177,7 +5154,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -14117,7 +14266,7 @@ static struct cipher_testvec cast6_cbc_enc_tv_template[] = { +@@ -14117,7 +14266,7 @@ static struct cipher_testvec cast6_cbc_e }, }; @@ -5186,7 +5163,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -14258,7 +14407,7 @@ static struct cipher_testvec cast6_cbc_dec_tv_template[] = { +@@ -14258,7 +14407,7 @@ static struct cipher_testvec cast6_cbc_d }, }; @@ -5195,7 +5172,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -14415,7 +14564,7 @@ static struct cipher_testvec cast6_ctr_enc_tv_template[] = { +@@ -14415,7 +14564,7 @@ static struct cipher_testvec cast6_ctr_e }, }; @@ -5204,7 +5181,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -14572,7 +14721,7 @@ static struct cipher_testvec cast6_ctr_dec_tv_template[] = { +@@ -14572,7 +14721,7 @@ static struct cipher_testvec cast6_ctr_d }, }; @@ -5213,7 +5190,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c" "\x23\x84\xcb\x1c\x77\xd6\x19\x5d" -@@ -14719,7 +14868,7 @@ static struct cipher_testvec cast6_lrw_enc_tv_template[] = { +@@ -14719,7 +14868,7 @@ static struct cipher_testvec cast6_lrw_e }, }; @@ -5222,7 +5199,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c" "\x23\x84\xcb\x1c\x77\xd6\x19\x5d" -@@ -14866,7 +15015,7 @@ static struct cipher_testvec cast6_lrw_dec_tv_template[] = { +@@ -14866,7 +15015,7 @@ static struct cipher_testvec cast6_lrw_d }, }; @@ -5231,7 +5208,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x27\x18\x28\x18\x28\x45\x90\x45" "\x23\x53\x60\x28\x74\x71\x35\x26" -@@ -15015,7 +15164,7 @@ static struct cipher_testvec cast6_xts_enc_tv_template[] = { +@@ -15015,7 +15164,7 @@ static struct cipher_testvec cast6_xts_e }, }; @@ -5240,7 +5217,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x27\x18\x28\x18\x28\x45\x90\x45" "\x23\x53\x60\x28\x74\x71\x35\x26" -@@ -15168,39 +15317,7 @@ static struct cipher_testvec cast6_xts_dec_tv_template[] = { +@@ -15168,39 +15317,7 @@ static struct cipher_testvec cast6_xts_d /* * AES test vectors. */ @@ -5281,7 +5258,7 @@ index 9033088c..ce9f4334 100644 { /* From FIPS-197 */ .key = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", -@@ -15372,7 +15489,7 @@ static struct cipher_testvec aes_enc_tv_template[] = { +@@ -15372,7 +15489,7 @@ static struct cipher_testvec aes_enc_tv_ }, }; @@ -5290,7 +5267,7 @@ index 9033088c..ce9f4334 100644 { /* From FIPS-197 */ .key = "\x00\x01\x02\x03\x04\x05\x06\x07" "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", -@@ -15544,7 +15661,7 @@ static struct cipher_testvec aes_dec_tv_template[] = { +@@ -15544,7 +15661,7 @@ static struct cipher_testvec aes_dec_tv_ }, }; @@ -5299,7 +5276,7 @@ index 9033088c..ce9f4334 100644 { /* From RFC 3602 */ .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b" "\x51\x2e\x03\xd5\x34\x12\x00\x06", -@@ -15766,7 +15883,7 @@ static struct cipher_testvec aes_cbc_enc_tv_template[] = { +@@ -15766,7 +15883,7 @@ static struct cipher_testvec aes_cbc_enc }, }; @@ -5308,7 +5285,7 @@ index 9033088c..ce9f4334 100644 { /* From RFC 3602 */ .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b" "\x51\x2e\x03\xd5\x34\x12\x00\x06", -@@ -15988,7 +16105,7 @@ static struct cipher_testvec aes_cbc_dec_tv_template[] = { +@@ -15988,7 +16105,7 @@ static struct cipher_testvec aes_cbc_dec }, }; @@ -5317,7 +5294,7 @@ index 9033088c..ce9f4334 100644 { /* Input data from RFC 2410 Case 1 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -16030,7 +16147,7 @@ static struct aead_testvec hmac_md5_ecb_cipher_null_enc_tv_template[] = { +@@ -16030,7 +16147,7 @@ static struct aead_testvec hmac_md5_ecb_ }, }; @@ -5326,7 +5303,7 @@ index 9033088c..ce9f4334 100644 { #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -16072,7 +16189,7 @@ static struct aead_testvec hmac_md5_ecb_cipher_null_dec_tv_template[] = { +@@ -16072,7 +16189,7 @@ static struct aead_testvec hmac_md5_ecb_ }, }; @@ -5335,7 +5312,7 @@ index 9033088c..ce9f4334 100644 { /* RFC 3602 Case 1 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -16341,7 +16458,7 @@ static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { +@@ -16341,7 +16458,7 @@ static struct aead_testvec hmac_sha1_aes }, }; @@ -5344,7 +5321,7 @@ index 9033088c..ce9f4334 100644 { /* Input data from RFC 2410 Case 1 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -16387,7 +16504,7 @@ static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_temp[] = { +@@ -16387,7 +16504,7 @@ static struct aead_testvec hmac_sha1_ecb }, }; @@ -5353,7 +5330,7 @@ index 9033088c..ce9f4334 100644 { #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -16433,7 +16550,7 @@ static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_temp[] = { +@@ -16433,7 +16550,7 @@ static struct aead_testvec hmac_sha1_ecb }, }; @@ -5362,7 +5339,7 @@ index 9033088c..ce9f4334 100644 { /* RFC 3602 Case 1 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -16716,7 +16833,7 @@ static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { +@@ -16716,7 +16833,7 @@ static struct aead_testvec hmac_sha256_a }, }; @@ -5371,7 +5348,7 @@ index 9033088c..ce9f4334 100644 { /* RFC 3602 Case 1 */ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17055,9 +17172,7 @@ static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { +@@ -17055,9 +17172,7 @@ static struct aead_testvec hmac_sha512_a }, }; @@ -5382,7 +5359,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17116,9 +17231,7 @@ static struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = { +@@ -17116,9 +17231,7 @@ static struct aead_testvec hmac_sha1_des }, }; @@ -5393,7 +5370,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17177,9 +17290,7 @@ static struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = { +@@ -17177,9 +17290,7 @@ static struct aead_testvec hmac_sha224_d }, }; @@ -5404,7 +5381,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17240,9 +17351,7 @@ static struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = { +@@ -17240,9 +17351,7 @@ static struct aead_testvec hmac_sha256_d }, }; @@ -5415,7 +5392,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17307,9 +17416,7 @@ static struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = { +@@ -17307,9 +17416,7 @@ static struct aead_testvec hmac_sha384_d }, }; @@ -5426,7 +5403,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17378,9 +17485,7 @@ static struct aead_testvec hmac_sha512_des_cbc_enc_tv_temp[] = { +@@ -17378,9 +17485,7 @@ static struct aead_testvec hmac_sha512_d }, }; @@ -5437,7 +5414,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17441,9 +17546,7 @@ static struct aead_testvec hmac_sha1_des3_ede_cbc_enc_tv_temp[] = { +@@ -17441,9 +17546,7 @@ static struct aead_testvec hmac_sha1_des }, }; @@ -5448,7 +5425,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17504,9 +17607,7 @@ static struct aead_testvec hmac_sha224_des3_ede_cbc_enc_tv_temp[] = { +@@ -17504,9 +17607,7 @@ static struct aead_testvec hmac_sha224_d }, }; @@ -5459,7 +5436,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17569,9 +17670,7 @@ static struct aead_testvec hmac_sha256_des3_ede_cbc_enc_tv_temp[] = { +@@ -17569,9 +17670,7 @@ static struct aead_testvec hmac_sha256_d }, }; @@ -5470,7 +5447,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17638,9 +17737,7 @@ static struct aead_testvec hmac_sha384_des3_ede_cbc_enc_tv_temp[] = { +@@ -17638,9 +17737,7 @@ static struct aead_testvec hmac_sha384_d }, }; @@ -5481,7 +5458,7 @@ index 9033088c..ce9f4334 100644 { /*Generated with cryptopp*/ #ifdef __LITTLE_ENDIAN .key = "\x08\x00" /* rta length */ -@@ -17711,7 +17808,7 @@ static struct aead_testvec hmac_sha512_des3_ede_cbc_enc_tv_temp[] = { +@@ -17711,7 +17808,7 @@ static struct aead_testvec hmac_sha512_d }, }; @@ -5490,7 +5467,7 @@ index 9033088c..ce9f4334 100644 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */ { /* LRW-32-AES 1 */ .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d" -@@ -17964,7 +18061,7 @@ static struct cipher_testvec aes_lrw_enc_tv_template[] = { +@@ -17964,7 +18061,7 @@ static struct cipher_testvec aes_lrw_enc } }; @@ -5499,7 +5476,7 @@ index 9033088c..ce9f4334 100644 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */ /* same as enc vectors with input and result reversed */ { /* LRW-32-AES 1 */ -@@ -18218,7 +18315,7 @@ static struct cipher_testvec aes_lrw_dec_tv_template[] = { +@@ -18218,7 +18315,7 @@ static struct cipher_testvec aes_lrw_dec } }; @@ -5508,7 +5485,7 @@ index 9033088c..ce9f4334 100644 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */ { /* XTS-AES 1 */ .key = "\x00\x00\x00\x00\x00\x00\x00\x00" -@@ -18561,7 +18658,7 @@ static struct cipher_testvec aes_xts_enc_tv_template[] = { +@@ -18561,7 +18658,7 @@ static struct cipher_testvec aes_xts_enc } }; @@ -5517,7 +5494,7 @@ index 9033088c..ce9f4334 100644 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */ { /* XTS-AES 1 */ .key = "\x00\x00\x00\x00\x00\x00\x00\x00" -@@ -18905,7 +19002,7 @@ static struct cipher_testvec aes_xts_dec_tv_template[] = { +@@ -18905,7 +19002,7 @@ static struct cipher_testvec aes_xts_dec }; @@ -5526,7 +5503,7 @@ index 9033088c..ce9f4334 100644 { /* From NIST Special Publication 800-38A, Appendix F.5 */ .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6" "\xab\xf7\x15\x88\x09\xcf\x4f\x3c", -@@ -19260,7 +19357,7 @@ static struct cipher_testvec aes_ctr_enc_tv_template[] = { +@@ -19260,7 +19357,7 @@ static struct cipher_testvec aes_ctr_enc }, }; @@ -5535,7 +5512,7 @@ index 9033088c..ce9f4334 100644 { /* From NIST Special Publication 800-38A, Appendix F.5 */ .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6" "\xab\xf7\x15\x88\x09\xcf\x4f\x3c", -@@ -19615,7 +19712,7 @@ static struct cipher_testvec aes_ctr_dec_tv_template[] = { +@@ -19615,7 +19712,7 @@ static struct cipher_testvec aes_ctr_dec }, }; @@ -5544,7 +5521,7 @@ index 9033088c..ce9f4334 100644 { /* From RFC 3686 */ .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc" "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e" -@@ -20747,7 +20844,7 @@ static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = { +@@ -20747,7 +20844,7 @@ static struct cipher_testvec aes_ctr_rfc }, }; @@ -5553,7 +5530,7 @@ index 9033088c..ce9f4334 100644 { /* From RFC 3686 */ .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc" "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e" -@@ -20838,7 +20935,7 @@ static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = { +@@ -20838,7 +20935,7 @@ static struct cipher_testvec aes_ctr_rfc }, }; @@ -5562,7 +5539,7 @@ index 9033088c..ce9f4334 100644 /* From NIST Special Publication 800-38A, Appendix F.5 */ { .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6" -@@ -20867,7 +20964,7 @@ static struct cipher_testvec aes_ofb_enc_tv_template[] = { +@@ -20867,7 +20964,7 @@ static struct cipher_testvec aes_ofb_enc } }; @@ -5571,7 +5548,7 @@ index 9033088c..ce9f4334 100644 /* From NIST Special Publication 800-38A, Appendix F.5 */ { .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6" -@@ -20896,7 +20993,7 @@ static struct cipher_testvec aes_ofb_dec_tv_template[] = { +@@ -20896,7 +20993,7 @@ static struct cipher_testvec aes_ofb_dec } }; @@ -5580,7 +5557,7 @@ index 9033088c..ce9f4334 100644 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */ .key = zeroed_string, .klen = 16, -@@ -21056,7 +21153,7 @@ static struct aead_testvec aes_gcm_enc_tv_template[] = { +@@ -21056,7 +21153,7 @@ static struct aead_testvec aes_gcm_enc_t } }; @@ -5589,7 +5566,7 @@ index 9033088c..ce9f4334 100644 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */ .key = zeroed_string, .klen = 32, -@@ -21258,7 +21355,7 @@ static struct aead_testvec aes_gcm_dec_tv_template[] = { +@@ -21258,7 +21355,7 @@ static struct aead_testvec aes_gcm_dec_t } }; @@ -5598,7 +5575,7 @@ index 9033088c..ce9f4334 100644 { /* Generated using Crypto++ */ .key = zeroed_string, .klen = 20, -@@ -21871,7 +21968,7 @@ static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = { +@@ -21871,7 +21968,7 @@ static struct aead_testvec aes_gcm_rfc41 } }; @@ -5607,7 +5584,7 @@ index 9033088c..ce9f4334 100644 { /* Generated using Crypto++ */ .key = zeroed_string, .klen = 20, -@@ -22485,7 +22582,7 @@ static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = { +@@ -22485,7 +22582,7 @@ static struct aead_testvec aes_gcm_rfc41 } }; @@ -5616,7 +5593,7 @@ index 9033088c..ce9f4334 100644 { /* From draft-mcgrew-gcm-test-01 */ .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda" "\x90\x6a\xc7\x3c\x36\x13\xa6\x34" -@@ -22516,7 +22613,7 @@ static struct aead_testvec aes_gcm_rfc4543_enc_tv_template[] = { +@@ -22516,7 +22613,7 @@ static struct aead_testvec aes_gcm_rfc45 } }; @@ -5625,7 +5602,7 @@ index 9033088c..ce9f4334 100644 { /* From draft-mcgrew-gcm-test-01 */ .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda" "\x90\x6a\xc7\x3c\x36\x13\xa6\x34" -@@ -22575,7 +22672,7 @@ static struct aead_testvec aes_gcm_rfc4543_dec_tv_template[] = { +@@ -22575,7 +22672,7 @@ static struct aead_testvec aes_gcm_rfc45 }, }; @@ -5634,7 +5611,7 @@ index 9033088c..ce9f4334 100644 { /* From RFC 3610 */ .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7" "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf", -@@ -22859,7 +22956,7 @@ static struct aead_testvec aes_ccm_enc_tv_template[] = { +@@ -22859,7 +22956,7 @@ static struct aead_testvec aes_ccm_enc_t } }; @@ -5643,7 +5620,7 @@ index 9033088c..ce9f4334 100644 { /* From RFC 3610 */ .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7" "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf", -@@ -23191,7 +23288,7 @@ static struct aead_testvec aes_ccm_dec_tv_template[] = { +@@ -23191,7 +23288,7 @@ static struct aead_testvec aes_ccm_dec_t * These vectors are copied/generated from the ones for rfc4106 with * the key truncated by one byte.. */ @@ -5652,7 +5629,7 @@ index 9033088c..ce9f4334 100644 { /* Generated using Crypto++ */ .key = zeroed_string, .klen = 19, -@@ -23804,7 +23901,7 @@ static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = { +@@ -23804,7 +23901,7 @@ static struct aead_testvec aes_ccm_rfc43 } }; @@ -5661,7 +5638,7 @@ index 9033088c..ce9f4334 100644 { /* Generated using Crypto++ */ .key = zeroed_string, .klen = 19, -@@ -24420,9 +24517,7 @@ static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = { +@@ -24420,9 +24517,7 @@ static struct aead_testvec aes_ccm_rfc43 /* * ChaCha20-Poly1305 AEAD test vectors from RFC7539 2.8.2./A.5. */ @@ -5672,7 +5649,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x80\x81\x82\x83\x84\x85\x86\x87" "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" -@@ -24554,7 +24649,7 @@ static struct aead_testvec rfc7539_enc_tv_template[] = { +@@ -24554,7 +24649,7 @@ static struct aead_testvec rfc7539_enc_t }, }; @@ -5681,7 +5658,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x80\x81\x82\x83\x84\x85\x86\x87" "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" -@@ -24689,9 +24784,7 @@ static struct aead_testvec rfc7539_dec_tv_template[] = { +@@ -24689,9 +24784,7 @@ static struct aead_testvec rfc7539_dec_t /* * draft-irtf-cfrg-chacha20-poly1305 */ @@ -5692,7 +5669,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a" "\xf3\x33\x88\x86\x04\xf6\xb5\xf0" -@@ -24779,7 +24872,7 @@ static struct aead_testvec rfc7539esp_enc_tv_template[] = { +@@ -24779,7 +24872,7 @@ static struct aead_testvec rfc7539esp_en }, }; @@ -5701,7 +5678,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a" "\xf3\x33\x88\x86\x04\xf6\xb5\xf0" -@@ -24875,7 +24968,7 @@ static struct aead_testvec rfc7539esp_dec_tv_template[] = { +@@ -24875,7 +24968,7 @@ static struct aead_testvec rfc7539esp_de * semiblock of the ciphertext from the test vector. For decryption, iv is * the first semiblock of the ciphertext. */ @@ -5710,7 +5687,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x75\x75\xda\x3a\x93\x60\x7c\xc2" "\xbf\xd8\xce\xc7\xaa\xdf\xd9\xa6", -@@ -24890,7 +24983,7 @@ static struct cipher_testvec aes_kw_enc_tv_template[] = { +@@ -24890,7 +24983,7 @@ static struct cipher_testvec aes_kw_enc_ }, }; @@ -5719,7 +5696,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x80\xaa\x99\x73\x27\xa4\x80\x6b" "\x6a\x7a\x41\xa5\x2b\x86\xc3\x71" -@@ -24913,9 +25006,7 @@ static struct cipher_testvec aes_kw_dec_tv_template[] = { +@@ -24913,9 +25006,7 @@ static struct cipher_testvec aes_kw_dec_ * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf * Only AES-128 is supported at this time. */ @@ -5730,7 +5707,7 @@ index 9033088c..ce9f4334 100644 { .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42" "\xed\x06\x1c\xab\xb8\xd4\x62\x02", -@@ -25011,7 +25102,7 @@ static struct cprng_testvec ansi_cprng_aes_tv_template[] = { +@@ -25011,7 +25102,7 @@ static struct cprng_testvec ansi_cprng_a * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and * w/o personalization string, w/ and w/o additional input string). */ @@ -5739,7 +5716,7 @@ index 9033088c..ce9f4334 100644 { .entropy = (unsigned char *) "\x72\x88\x4c\xcd\x6c\x85\x57\x70\xf7\x0b\x8b\x86" -@@ -25169,7 +25260,7 @@ static struct drbg_testvec drbg_pr_sha256_tv_template[] = { +@@ -25169,7 +25260,7 @@ static struct drbg_testvec drbg_pr_sha25 }, }; @@ -5748,7 +5725,7 @@ index 9033088c..ce9f4334 100644 { .entropy = (unsigned char *) "\x99\x69\xe5\x4b\x47\x03\xff\x31\x78\x5b\x87\x9a" -@@ -25327,7 +25418,7 @@ static struct drbg_testvec drbg_pr_hmac_sha256_tv_template[] = { +@@ -25327,7 +25418,7 @@ static struct drbg_testvec drbg_pr_hmac_ }, }; @@ -5757,7 +5734,7 @@ index 9033088c..ce9f4334 100644 { .entropy = (unsigned char *) "\xd1\x44\xc6\x61\x81\x6d\xca\x9d\x15\x28\x8a\x42" -@@ -25451,7 +25542,7 @@ static struct drbg_testvec drbg_pr_ctr_aes128_tv_template[] = { +@@ -25451,7 +25542,7 @@ static struct drbg_testvec drbg_pr_ctr_a * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and * w/o personalization string, w/ and w/o additional input string). */ @@ -5766,7 +5743,7 @@ index 9033088c..ce9f4334 100644 { .entropy = (unsigned char *) "\xa6\x5a\xd0\xf3\x45\xdb\x4e\x0e\xff\xe8\x75\xc3" -@@ -25573,7 +25664,7 @@ static struct drbg_testvec drbg_nopr_sha256_tv_template[] = { +@@ -25573,7 +25664,7 @@ static struct drbg_testvec drbg_nopr_sha }, }; @@ -5775,7 +5752,7 @@ index 9033088c..ce9f4334 100644 { .entropy = (unsigned char *) "\xca\x85\x19\x11\x34\x93\x84\xbf\xfe\x89\xde\x1c" -@@ -25695,7 +25786,7 @@ static struct drbg_testvec drbg_nopr_hmac_sha256_tv_template[] = { +@@ -25695,7 +25786,7 @@ static struct drbg_testvec drbg_nopr_hma }, }; @@ -5784,7 +5761,7 @@ index 9033088c..ce9f4334 100644 { .entropy = (unsigned char *) "\xc3\x5c\x2f\xa2\xa8\x9d\x52\xa1\x1f\xa3\x2a\xa9" -@@ -25719,7 +25810,7 @@ static struct drbg_testvec drbg_nopr_ctr_aes192_tv_template[] = { +@@ -25719,7 +25810,7 @@ static struct drbg_testvec drbg_nopr_ctr }, }; @@ -5793,7 +5770,7 @@ index 9033088c..ce9f4334 100644 { .entropy = (unsigned char *) "\x36\x40\x19\x40\xfa\x8b\x1f\xba\x91\xa1\x66\x1f" -@@ -25743,7 +25834,7 @@ static struct drbg_testvec drbg_nopr_ctr_aes256_tv_template[] = { +@@ -25743,7 +25834,7 @@ static struct drbg_testvec drbg_nopr_ctr }, }; @@ -5802,7 +5779,7 @@ index 9033088c..ce9f4334 100644 { .entropy = (unsigned char *) "\x87\xe1\xc5\x32\x99\x7f\x57\xa3\x5c\x28\x6d\xe8" -@@ -25832,14 +25923,7 @@ static struct drbg_testvec drbg_nopr_ctr_aes128_tv_template[] = { +@@ -25832,14 +25923,7 @@ static struct drbg_testvec drbg_nopr_ctr }; /* Cast5 test vectors from RFC 2144 */ @@ -5818,7 +5795,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x01\x23\x45\x67\x12\x34\x56\x78" "\x23\x45\x67\x89\x34\x56\x78\x9a", -@@ -26000,7 +26084,7 @@ static struct cipher_testvec cast5_enc_tv_template[] = { +@@ -26000,7 +26084,7 @@ static struct cipher_testvec cast5_enc_t }, }; @@ -5827,7 +5804,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x01\x23\x45\x67\x12\x34\x56\x78" "\x23\x45\x67\x89\x34\x56\x78\x9a", -@@ -26161,7 +26245,7 @@ static struct cipher_testvec cast5_dec_tv_template[] = { +@@ -26161,7 +26245,7 @@ static struct cipher_testvec cast5_dec_t }, }; @@ -5836,7 +5813,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A", -@@ -26299,7 +26383,7 @@ static struct cipher_testvec cast5_cbc_enc_tv_template[] = { +@@ -26299,7 +26383,7 @@ static struct cipher_testvec cast5_cbc_e }, }; @@ -5845,7 +5822,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A", -@@ -26437,7 +26521,7 @@ static struct cipher_testvec cast5_cbc_dec_tv_template[] = { +@@ -26437,7 +26521,7 @@ static struct cipher_testvec cast5_cbc_d }, }; @@ -5854,7 +5831,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A", -@@ -26588,7 +26672,7 @@ static struct cipher_testvec cast5_ctr_enc_tv_template[] = { +@@ -26588,7 +26672,7 @@ static struct cipher_testvec cast5_ctr_e }, }; @@ -5863,7 +5840,7 @@ index 9033088c..ce9f4334 100644 { /* Generated from TF test vectors */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A", -@@ -26742,10 +26826,7 @@ static struct cipher_testvec cast5_ctr_dec_tv_template[] = { +@@ -26742,10 +26826,7 @@ static struct cipher_testvec cast5_ctr_d /* * ARC4 test vectors from OpenSSL */ @@ -5875,7 +5852,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", .klen = 8, -@@ -26811,7 +26892,7 @@ static struct cipher_testvec arc4_enc_tv_template[] = { +@@ -26811,7 +26892,7 @@ static struct cipher_testvec arc4_enc_tv }, }; @@ -5884,7 +5861,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", .klen = 8, -@@ -26880,10 +26961,7 @@ static struct cipher_testvec arc4_dec_tv_template[] = { +@@ -26880,10 +26961,7 @@ static struct cipher_testvec arc4_dec_tv /* * TEA test vectors */ @@ -5896,7 +5873,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -26926,7 +27004,7 @@ static struct cipher_testvec tea_enc_tv_template[] = { +@@ -26926,7 +27004,7 @@ static struct cipher_testvec tea_enc_tv_ } }; @@ -5905,7 +5882,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -26972,10 +27050,7 @@ static struct cipher_testvec tea_dec_tv_template[] = { +@@ -26972,10 +27050,7 @@ static struct cipher_testvec tea_dec_tv_ /* * XTEA test vectors */ @@ -5917,7 +5894,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -27018,7 +27093,7 @@ static struct cipher_testvec xtea_enc_tv_template[] = { +@@ -27018,7 +27093,7 @@ static struct cipher_testvec xtea_enc_tv } }; @@ -5926,7 +5903,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -27064,10 +27139,7 @@ static struct cipher_testvec xtea_dec_tv_template[] = { +@@ -27064,10 +27139,7 @@ static struct cipher_testvec xtea_dec_tv /* * KHAZAD test vectors. */ @@ -5938,7 +5915,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x80\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00", -@@ -27113,7 +27185,7 @@ static struct cipher_testvec khazad_enc_tv_template[] = { +@@ -27113,7 +27185,7 @@ static struct cipher_testvec khazad_enc_ }, }; @@ -5947,7 +5924,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x80\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00", -@@ -27163,12 +27235,7 @@ static struct cipher_testvec khazad_dec_tv_template[] = { +@@ -27163,12 +27235,7 @@ static struct cipher_testvec khazad_dec_ * Anubis test vectors. */ @@ -5961,7 +5938,7 @@ index 9033088c..ce9f4334 100644 { .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe" "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe", -@@ -27231,7 +27298,7 @@ static struct cipher_testvec anubis_enc_tv_template[] = { +@@ -27231,7 +27298,7 @@ static struct cipher_testvec anubis_enc_ }, }; @@ -5970,7 +5947,7 @@ index 9033088c..ce9f4334 100644 { .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe" "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe", -@@ -27294,7 +27361,7 @@ static struct cipher_testvec anubis_dec_tv_template[] = { +@@ -27294,7 +27361,7 @@ static struct cipher_testvec anubis_dec_ }, }; @@ -5979,7 +5956,7 @@ index 9033088c..ce9f4334 100644 { .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe" "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe", -@@ -27329,7 +27396,7 @@ static struct cipher_testvec anubis_cbc_enc_tv_template[] = { +@@ -27329,7 +27396,7 @@ static struct cipher_testvec anubis_cbc_ }, }; @@ -5988,7 +5965,7 @@ index 9033088c..ce9f4334 100644 { .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe" "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe", -@@ -27367,10 +27434,7 @@ static struct cipher_testvec anubis_cbc_dec_tv_template[] = { +@@ -27367,10 +27434,7 @@ static struct cipher_testvec anubis_cbc_ /* * XETA test vectors */ @@ -6000,7 +5977,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -27413,7 +27477,7 @@ static struct cipher_testvec xeta_enc_tv_template[] = { +@@ -27413,7 +27477,7 @@ static struct cipher_testvec xeta_enc_tv } }; @@ -6009,7 +5986,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -27459,10 +27523,7 @@ static struct cipher_testvec xeta_dec_tv_template[] = { +@@ -27459,10 +27523,7 @@ static struct cipher_testvec xeta_dec_tv /* * FCrypt test vectors */ @@ -6021,7 +5998,7 @@ index 9033088c..ce9f4334 100644 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */ .key = "\x00\x00\x00\x00\x00\x00\x00\x00", .klen = 8, -@@ -27523,7 +27584,7 @@ static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = { +@@ -27523,7 +27584,7 @@ static struct cipher_testvec fcrypt_pcbc } }; @@ -6030,7 +6007,7 @@ index 9033088c..ce9f4334 100644 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */ .key = "\x00\x00\x00\x00\x00\x00\x00\x00", .klen = 8, -@@ -27587,18 +27648,7 @@ static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = { +@@ -27587,18 +27648,7 @@ static struct cipher_testvec fcrypt_pcbc /* * CAMELLIA test vectors. */ @@ -6050,7 +6027,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x01\x23\x45\x67\x89\xab\xcd\xef" "\xfe\xdc\xba\x98\x76\x54\x32\x10", -@@ -27898,7 +27948,7 @@ static struct cipher_testvec camellia_enc_tv_template[] = { +@@ -27898,7 +27948,7 @@ static struct cipher_testvec camellia_en }, }; @@ -6059,7 +6036,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x01\x23\x45\x67\x89\xab\xcd\xef" "\xfe\xdc\xba\x98\x76\x54\x32\x10", -@@ -28198,7 +28248,7 @@ static struct cipher_testvec camellia_dec_tv_template[] = { +@@ -28198,7 +28248,7 @@ static struct cipher_testvec camellia_de }, }; @@ -6068,7 +6045,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b" "\x51\x2e\x03\xd5\x34\x12\x00\x06", -@@ -28494,7 +28544,7 @@ static struct cipher_testvec camellia_cbc_enc_tv_template[] = { +@@ -28494,7 +28544,7 @@ static struct cipher_testvec camellia_cb }, }; @@ -6077,7 +6054,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b" "\x51\x2e\x03\xd5\x34\x12\x00\x06", -@@ -28790,7 +28840,7 @@ static struct cipher_testvec camellia_cbc_dec_tv_template[] = { +@@ -28790,7 +28840,7 @@ static struct cipher_testvec camellia_cb }, }; @@ -6086,7 +6063,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -29457,7 +29507,7 @@ static struct cipher_testvec camellia_ctr_enc_tv_template[] = { +@@ -29457,7 +29507,7 @@ static struct cipher_testvec camellia_ct }, }; @@ -6095,7 +6072,7 @@ index 9033088c..ce9f4334 100644 { /* Generated with Crypto++ */ .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9" "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A" -@@ -30124,7 +30174,7 @@ static struct cipher_testvec camellia_ctr_dec_tv_template[] = { +@@ -30124,7 +30174,7 @@ static struct cipher_testvec camellia_ct }, }; @@ -6104,7 +6081,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-LRW test vectors */ { .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d" -@@ -30376,7 +30426,7 @@ static struct cipher_testvec camellia_lrw_enc_tv_template[] = { +@@ -30376,7 +30426,7 @@ static struct cipher_testvec camellia_lr }, }; @@ -6113,7 +6090,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-LRW test vectors */ /* same as enc vectors with input and result reversed */ { -@@ -30629,7 +30679,7 @@ static struct cipher_testvec camellia_lrw_dec_tv_template[] = { +@@ -30629,7 +30679,7 @@ static struct cipher_testvec camellia_lr }, }; @@ -6122,7 +6099,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-XTS test vectors */ { .key = "\x00\x00\x00\x00\x00\x00\x00\x00" -@@ -30971,7 +31021,7 @@ static struct cipher_testvec camellia_xts_enc_tv_template[] = { +@@ -30971,7 +31021,7 @@ static struct cipher_testvec camellia_xt }, }; @@ -6131,7 +6108,7 @@ index 9033088c..ce9f4334 100644 /* Generated from AES-XTS test vectors */ /* same as enc vectors with input and result reversed */ { -@@ -31317,10 +31367,7 @@ static struct cipher_testvec camellia_xts_dec_tv_template[] = { +@@ -31317,10 +31367,7 @@ static struct cipher_testvec camellia_xt /* * SEED test vectors */ @@ -6143,7 +6120,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -31362,7 +31409,7 @@ static struct cipher_testvec seed_enc_tv_template[] = { +@@ -31362,7 +31409,7 @@ static struct cipher_testvec seed_enc_tv } }; @@ -6152,7 +6129,7 @@ index 9033088c..ce9f4334 100644 { .key = zeroed_string, .klen = 16, -@@ -31404,8 +31451,7 @@ static struct cipher_testvec seed_dec_tv_template[] = { +@@ -31404,8 +31451,7 @@ static struct cipher_testvec seed_dec_tv } }; @@ -6162,7 +6139,7 @@ index 9033088c..ce9f4334 100644 /* * Testvectors from verified.test-vectors submitted to ECRYPT. * They are truncated to size 39, 64, 111, 129 to test a variety -@@ -32574,8 +32620,7 @@ static struct cipher_testvec salsa20_stream_enc_tv_template[] = { +@@ -32574,8 +32620,7 @@ static struct cipher_testvec salsa20_str }, }; @@ -6172,7 +6149,7 @@ index 9033088c..ce9f4334 100644 { /* RFC7539 A.2. Test Vector #1 */ .key = "\x00\x00\x00\x00\x00\x00\x00\x00" "\x00\x00\x00\x00\x00\x00\x00\x00" -@@ -33086,9 +33131,7 @@ static struct cipher_testvec chacha20_enc_tv_template[] = { +@@ -33086,9 +33131,7 @@ static struct cipher_testvec chacha20_en /* * CTS (Cipher Text Stealing) mode tests */ @@ -6183,7 +6160,7 @@ index 9033088c..ce9f4334 100644 { /* from rfc3962 */ .klen = 16, .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20" -@@ -33190,7 +33233,7 @@ static struct cipher_testvec cts_mode_enc_tv_template[] = { +@@ -33190,7 +33233,7 @@ static struct cipher_testvec cts_mode_en } }; @@ -6204,7 +6181,7 @@ index 9033088c..ce9f4334 100644 { .inlen = 70, .outlen = 38, -@@ -33347,7 +33387,7 @@ static struct comp_testvec deflate_comp_tv_template[] = { +@@ -33347,7 +33387,7 @@ static struct comp_testvec deflate_comp_ }, }; @@ -6213,7 +6190,7 @@ index 9033088c..ce9f4334 100644 { .inlen = 122, .outlen = 191, -@@ -33386,10 +33426,7 @@ static struct comp_testvec deflate_decomp_tv_template[] = { +@@ -33386,10 +33426,7 @@ static struct comp_testvec deflate_decom /* * LZO test vectors (null-terminated strings). */ @@ -6225,7 +6202,7 @@ index 9033088c..ce9f4334 100644 { .inlen = 70, .outlen = 57, -@@ -33429,7 +33466,7 @@ static struct comp_testvec lzo_comp_tv_template[] = { +@@ -33429,7 +33466,7 @@ static struct comp_testvec lzo_comp_tv_t }, }; @@ -6234,7 +6211,7 @@ index 9033088c..ce9f4334 100644 { .inlen = 133, .outlen = 159, -@@ -33472,7 +33509,7 @@ static struct comp_testvec lzo_decomp_tv_template[] = { +@@ -33472,7 +33509,7 @@ static struct comp_testvec lzo_decomp_tv */ #define MICHAEL_MIC_TEST_VECTORS 6 @@ -6243,7 +6220,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x00\x00\x00\x00\x00\x00\x00\x00", .ksize = 8, -@@ -33520,9 +33557,7 @@ static struct hash_testvec michael_mic_tv_template[] = { +@@ -33520,9 +33557,7 @@ static struct hash_testvec michael_mic_t /* * CRC32 test vectors */ @@ -6254,7 +6231,7 @@ index 9033088c..ce9f4334 100644 { .key = "\x87\xa9\xcb\xed", .ksize = 4, -@@ -33954,9 +33989,7 @@ static struct hash_testvec crc32_tv_template[] = { +@@ -33954,9 +33989,7 @@ static struct hash_testvec crc32_tv_temp /* * CRC32C test vectors */ @@ -6265,7 +6242,7 @@ index 9033088c..ce9f4334 100644 { .psize = 0, .digest = "\x00\x00\x00\x00", -@@ -34392,9 +34425,7 @@ static struct hash_testvec crc32c_tv_template[] = { +@@ -34392,9 +34425,7 @@ static struct hash_testvec crc32c_tv_tem /* * Blakcifn CRC test vectors */ @@ -6276,7 +6253,7 @@ index 9033088c..ce9f4334 100644 { .psize = 0, .digest = "\x00\x00\x00\x00", -@@ -34479,9 +34510,6 @@ static struct hash_testvec bfin_crc_tv_template[] = { +@@ -34479,9 +34510,6 @@ static struct hash_testvec bfin_crc_tv_t }; @@ -6286,7 +6263,7 @@ index 9033088c..ce9f4334 100644 static struct comp_testvec lz4_comp_tv_template[] = { { .inlen = 70, -@@ -34512,9 +34540,6 @@ static struct comp_testvec lz4_decomp_tv_template[] = { +@@ -34512,9 +34540,6 @@ static struct comp_testvec lz4_decomp_tv }, }; @@ -6296,9 +6273,6 @@ index 9033088c..ce9f4334 100644 static struct comp_testvec lz4hc_comp_tv_template[] = { { .inlen = 70, -diff --git a/crypto/tls.c b/crypto/tls.c -new file mode 100644 -index 00000000..377226f5 --- /dev/null +++ b/crypto/tls.c @@ -0,0 +1,607 @@ @@ -6909,8 +6883,6 @@ index 00000000..377226f5 + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("TLS 1.0 record encryption"); -diff --git a/drivers/crypto/caam/Kconfig b/drivers/crypto/caam/Kconfig -index 64bf3024..3831a6f7 100644 --- a/drivers/crypto/caam/Kconfig +++ b/drivers/crypto/caam/Kconfig @@ -1,6 +1,11 @@ @@ -6964,7 +6936,7 @@ index 64bf3024..3831a6f7 100644 help Enable the Job Ring's interrupt coalescing feature. -@@ -74,7 +86,6 @@ config CRYPTO_DEV_FSL_CAAM_INTC_TIME_THLD +@@ -74,7 +86,6 @@ config CRYPTO_DEV_FSL_CAAM_INTC_TIME_THL config CRYPTO_DEV_FSL_CAAM_CRYPTO_API tristate "Register algorithm implementations with the Crypto API" @@ -7051,11 +7023,9 @@ index 64bf3024..3831a6f7 100644 + def_tristate (CRYPTO_DEV_FSL_CAAM_CRYPTO_API || \ + CRYPTO_DEV_FSL_CAAM_CRYPTO_API_QI || \ + CRYPTO_DEV_FSL_DPAA2_CAAM) -diff --git a/drivers/crypto/caam/Makefile b/drivers/crypto/caam/Makefile -index 08bf5515..01f73a25 100644 --- a/drivers/crypto/caam/Makefile +++ b/drivers/crypto/caam/Makefile -@@ -5,13 +5,26 @@ ifeq ($(CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG), y) +@@ -5,13 +5,26 @@ ifeq ($(CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG ccflags-y := -DDEBUG endif @@ -7083,8 +7053,6 @@ index 08bf5515..01f73a25 100644 +obj-$(CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM) += dpaa2_caam.o + +dpaa2_caam-y := caamalg_qi2.o dpseci.o -diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c -index 0d743c63..6480a01f 100644 --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c @@ -2,6 +2,7 @@ @@ -7528,7 +7496,7 @@ index 0d743c63..6480a01f 100644 return 0; } -@@ -470,11 +168,11 @@ static int aead_set_sh_desc(struct crypto_aead *aead) +@@ -470,11 +168,11 @@ static int aead_set_sh_desc(struct crypt unsigned int ivsize = crypto_aead_ivsize(aead); struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; @@ -7544,7 +7512,7 @@ index 0d743c63..6480a01f 100644 OP_ALG_AAI_CTR_MOD128); const bool is_rfc3686 = alg->caam.rfc3686; -@@ -482,7 +180,7 @@ static int aead_set_sh_desc(struct crypto_aead *aead) +@@ -482,7 +180,7 @@ static int aead_set_sh_desc(struct crypt return 0; /* NULL encryption / decryption */ @@ -7553,7 +7521,7 @@ index 0d743c63..6480a01f 100644 return aead_null_set_sh_desc(aead); /* -@@ -497,8 +195,14 @@ static int aead_set_sh_desc(struct crypto_aead *aead) +@@ -497,8 +195,14 @@ static int aead_set_sh_desc(struct crypt * RFC3686 specific: * CONTEXT1[255:128] = {NONCE, IV, COUNTER} */ @@ -7569,7 +7537,7 @@ index 0d743c63..6480a01f 100644 if (alg->caam.geniv) goto skip_enc; -@@ -507,146 +211,64 @@ static int aead_set_sh_desc(struct crypto_aead *aead) +@@ -507,146 +211,64 @@ static int aead_set_sh_desc(struct crypt * Job Descriptor and Shared Descriptors * must all fit into the 64-word Descriptor h/w Buffer */ @@ -7694,8 +7662,7 @@ index 0d743c63..6480a01f 100644 - - /* Skip assoc data */ - append_seq_fifo_store(desc, 0, FIFOST_TYPE_SKIP | FIFOLDST_VLF); -+ ctx->adata.key_dma = ctx->key_dma; - +- - /* read assoc before reading payload */ - append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS2 | FIFOLD_TYPE_MSG | - KEY_VLF); @@ -7714,7 +7681,8 @@ index 0d743c63..6480a01f 100644 - LDST_SRCDST_BYTE_CONTEXT | - ((ctx1_iv_off + CTR_RFC3686_IV_SIZE) << - LDST_OFFSET_SHIFT)); -- ++ ctx->adata.key_dma = ctx->key_dma; + - /* Choose operation */ - if (ctr_mode) - append_operation(desc, ctx->class1_alg_type | @@ -7729,13 +7697,13 @@ index 0d743c63..6480a01f 100644 - append_math_add(desc, VARSEQINLEN, SEQOUTLEN, REG0, CAAM_CMD_SZ); - append_math_add(desc, VARSEQOUTLEN, SEQOUTLEN, REG0, CAAM_CMD_SZ); - aead_append_src_dst(desc, FIFOLD_TYPE_MSG); -+ ctx->adata.key_inline = !!(inl_mask & 1); -+ ctx->cdata.key_inline = !!(inl_mask & 2); - +- - /* Load ICV */ - append_seq_fifo_load(desc, ctx->authsize, FIFOLD_CLASS_CLASS2 | - FIFOLD_TYPE_LAST2 | FIFOLD_TYPE_ICV); -- ++ ctx->adata.key_inline = !!(inl_mask & 1); ++ ctx->cdata.key_inline = !!(inl_mask & 2); + - ctx->sh_desc_dec_dma = dma_map_single(jrdev, desc, - desc_bytes(desc), - DMA_TO_DEVICE); @@ -7758,7 +7726,7 @@ index 0d743c63..6480a01f 100644 if (!alg->caam.geniv) goto skip_givenc; -@@ -655,107 +277,32 @@ static int aead_set_sh_desc(struct crypto_aead *aead) +@@ -655,107 +277,32 @@ skip_enc: * Job Descriptor and Shared Descriptors * must all fit into the 64-word Descriptor h/w Buffer */ @@ -7768,29 +7736,25 @@ index 0d743c63..6480a01f 100644 - (is_rfc3686 ? DESC_AEAD_CTR_RFC3686_LEN : 0) <= - CAAM_DESC_BYTES_MAX) - keys_fit_inline = true; +- +- /* aead_givencrypt shared descriptor */ +- desc = ctx->sh_desc_enc; +- +- /* Note: Context registers are saved. */ +- init_sh_desc_key_aead(desc, ctx, keys_fit_inline, is_rfc3686); + if (desc_inline_query(DESC_AEAD_GIVENC_LEN + + (is_rfc3686 ? DESC_AEAD_CTR_RFC3686_LEN : 0), + AUTHENC_DESC_JOB_IO_LEN, data_len, &inl_mask, + ARRAY_SIZE(data_len)) < 0) + return -EINVAL; -- /* aead_givencrypt shared descriptor */ -- desc = ctx->sh_desc_enc; +- if (is_rfc3686) +- goto copy_iv; + if (inl_mask & 1) + ctx->adata.key_virt = ctx->key; + else + ctx->adata.key_dma = ctx->key_dma; -- /* Note: Context registers are saved. */ -- init_sh_desc_key_aead(desc, ctx, keys_fit_inline, is_rfc3686); -+ if (inl_mask & 2) -+ ctx->cdata.key_virt = ctx->key + ctx->adata.keylen_pad; -+ else -+ ctx->cdata.key_dma = ctx->key_dma + ctx->adata.keylen_pad; - -- if (is_rfc3686) -- goto copy_iv; -- - /* Generate IV */ - geniv = NFIFOENTRY_STYPE_PAD | NFIFOENTRY_DEST_DECO | - NFIFOENTRY_DTYPE_MSG | NFIFOENTRY_LC1 | @@ -7835,7 +7799,11 @@ index 0d743c63..6480a01f 100644 - LDST_SRCDST_WORD_INFO_FIFO | LDST_IMM); - append_load_imm_u32(desc, ivsize, LDST_CLASS_2_CCB | - LDST_SRCDST_WORD_DATASZ_REG | LDST_IMM); -- ++ if (inl_mask & 2) ++ ctx->cdata.key_virt = ctx->key + ctx->adata.keylen_pad; ++ else ++ ctx->cdata.key_dma = ctx->key_dma + ctx->adata.keylen_pad; + - /* Load Counter into CONTEXT1 reg */ - if (is_rfc3686) - append_load_imm_be32(desc, 1, LDST_IMM | LDST_CLASS_1_CCB | @@ -7863,7 +7831,9 @@ index 0d743c63..6480a01f 100644 - /* Write ICV */ - append_seq_store(desc, ctx->authsize, LDST_CLASS_2_CCB | - LDST_SRCDST_BYTE_CONTEXT); -- ++ ctx->adata.key_inline = !!(inl_mask & 1); ++ ctx->cdata.key_inline = !!(inl_mask & 2); + - ctx->sh_desc_enc_dma = dma_map_single(jrdev, desc, - desc_bytes(desc), - DMA_TO_DEVICE); @@ -7876,9 +7846,6 @@ index 0d743c63..6480a01f 100644 - DUMP_PREFIX_ADDRESS, 16, 4, desc, - desc_bytes(desc), 1); -#endif -+ ctx->adata.key_inline = !!(inl_mask & 1); -+ ctx->cdata.key_inline = !!(inl_mask & 2); -+ + /* aead_givencrypt shared descriptor */ + desc = ctx->sh_desc_enc; + cnstr_shdsc_aead_givencap(desc, &ctx->cdata, &ctx->adata, ivsize, @@ -7889,7 +7856,7 @@ index 0d743c63..6480a01f 100644 skip_givenc: return 0; -@@ -776,12 +323,12 @@ static int gcm_set_sh_desc(struct crypto_aead *aead) +@@ -776,12 +323,12 @@ static int gcm_set_sh_desc(struct crypto { struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; @@ -7906,7 +7873,7 @@ index 0d743c63..6480a01f 100644 return 0; /* -@@ -789,175 +336,35 @@ static int gcm_set_sh_desc(struct crypto_aead *aead) +@@ -789,175 +336,35 @@ static int gcm_set_sh_desc(struct crypto * Job Descriptor and Shared Descriptor * must fit into the 64-word Descriptor h/w Buffer */ @@ -8102,7 +8069,7 @@ index 0d743c63..6480a01f 100644 return 0; } -@@ -976,11 +383,12 @@ static int rfc4106_set_sh_desc(struct crypto_aead *aead) +@@ -976,11 +383,12 @@ static int rfc4106_set_sh_desc(struct cr { struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; @@ -8118,7 +8085,7 @@ index 0d743c63..6480a01f 100644 return 0; /* -@@ -988,148 +396,37 @@ static int rfc4106_set_sh_desc(struct crypto_aead *aead) +@@ -988,148 +396,37 @@ static int rfc4106_set_sh_desc(struct cr * Job Descriptor and Shared Descriptor * must fit into the 64-word Descriptor h/w Buffer */ @@ -8289,7 +8256,7 @@ index 0d743c63..6480a01f 100644 return 0; } -@@ -1149,12 +446,12 @@ static int rfc4543_set_sh_desc(struct crypto_aead *aead) +@@ -1149,12 +446,12 @@ static int rfc4543_set_sh_desc(struct cr { struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; @@ -8306,15 +8273,22 @@ index 0d743c63..6480a01f 100644 return 0; /* -@@ -1162,151 +459,37 @@ static int rfc4543_set_sh_desc(struct crypto_aead *aead) +@@ -1162,151 +459,37 @@ static int rfc4543_set_sh_desc(struct cr * Job Descriptor and Shared Descriptor * must fit into the 64-word Descriptor h/w Buffer */ - if (DESC_RFC4543_ENC_LEN + GCM_DESC_JOB_IO_LEN + - ctx->enckeylen <= CAAM_DESC_BYTES_MAX) - keys_fit_inline = true; -- -- desc = ctx->sh_desc_enc; ++ if (rem_bytes >= DESC_RFC4543_ENC_LEN) { ++ ctx->cdata.key_inline = true; ++ ctx->cdata.key_virt = ctx->key; ++ } else { ++ ctx->cdata.key_inline = false; ++ ctx->cdata.key_dma = ctx->key_dma; ++ } + + desc = ctx->sh_desc_enc; - - init_sh_desc(desc, HDR_SHARE_SERIAL); - @@ -8371,20 +8345,12 @@ index 0d743c63..6480a01f 100644 - if (dma_mapping_error(jrdev, ctx->sh_desc_enc_dma)) { - dev_err(jrdev, "unable to map shared descriptor\n"); - return -ENOMEM; -+ if (rem_bytes >= DESC_RFC4543_ENC_LEN) { -+ ctx->cdata.key_inline = true; -+ ctx->cdata.key_virt = ctx->key; -+ } else { -+ ctx->cdata.key_inline = false; -+ ctx->cdata.key_dma = ctx->key_dma; - } +- } -#ifdef DEBUG - print_hex_dump(KERN_ERR, "rfc4543 enc shdesc@"__stringify(__LINE__)": ", - DUMP_PREFIX_ADDRESS, 16, 4, desc, - desc_bytes(desc), 1); -#endif -+ -+ desc = ctx->sh_desc_enc; + cnstr_shdsc_rfc4543_encap(desc, &ctx->cdata, ivsize, ctx->authsize, + false); + dma_sync_single_for_device(jrdev, ctx->sh_desc_enc_dma, @@ -8481,7 +8447,7 @@ index 0d743c63..6480a01f 100644 return 0; } -@@ -1322,19 +505,9 @@ static int rfc4543_setauthsize(struct crypto_aead *authenc, +@@ -1322,19 +505,9 @@ static int rfc4543_setauthsize(struct cr return 0; } @@ -8501,7 +8467,7 @@ index 0d743c63..6480a01f 100644 struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; struct crypto_authenc_keys keys; -@@ -1343,53 +516,32 @@ static int aead_setkey(struct crypto_aead *aead, +@@ -1343,53 +516,32 @@ static int aead_setkey(struct crypto_aea if (crypto_authenc_extractkeys(&keys, key, keylen) != 0) goto badkey; @@ -8564,7 +8530,7 @@ index 0d743c63..6480a01f 100644 badkey: crypto_aead_set_flags(aead, CRYPTO_TFM_RES_BAD_KEY_LEN); return -EINVAL; -@@ -1400,7 +552,6 @@ static int gcm_setkey(struct crypto_aead *aead, +@@ -1400,7 +552,6 @@ static int gcm_setkey(struct crypto_aead { struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; @@ -8572,7 +8538,7 @@ index 0d743c63..6480a01f 100644 #ifdef DEBUG print_hex_dump(KERN_ERR, "key in @"__stringify(__LINE__)": ", -@@ -1408,21 +559,10 @@ static int gcm_setkey(struct crypto_aead *aead, +@@ -1408,21 +559,10 @@ static int gcm_setkey(struct crypto_aead #endif memcpy(ctx->key, key, keylen); @@ -8597,7 +8563,7 @@ index 0d743c63..6480a01f 100644 } static int rfc4106_setkey(struct crypto_aead *aead, -@@ -1430,7 +570,6 @@ static int rfc4106_setkey(struct crypto_aead *aead, +@@ -1430,7 +570,6 @@ static int rfc4106_setkey(struct crypto_ { struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; @@ -8605,7 +8571,7 @@ index 0d743c63..6480a01f 100644 if (keylen < 4) return -EINVAL; -@@ -1446,22 +585,10 @@ static int rfc4106_setkey(struct crypto_aead *aead, +@@ -1446,22 +585,10 @@ static int rfc4106_setkey(struct crypto_ * The last four bytes of the key material are used as the salt value * in the nonce. Update the AES key length. */ @@ -8632,7 +8598,7 @@ index 0d743c63..6480a01f 100644 } static int rfc4543_setkey(struct crypto_aead *aead, -@@ -1469,7 +596,6 @@ static int rfc4543_setkey(struct crypto_aead *aead, +@@ -1469,7 +596,6 @@ static int rfc4543_setkey(struct crypto_ { struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; @@ -8640,7 +8606,7 @@ index 0d743c63..6480a01f 100644 if (keylen < 4) return -EINVAL; -@@ -1485,43 +611,28 @@ static int rfc4543_setkey(struct crypto_aead *aead, +@@ -1485,43 +611,28 @@ static int rfc4543_setkey(struct crypto_ * The last four bytes of the key material are used as the salt value * in the nonce. Update the AES key length. */ @@ -8691,7 +8657,7 @@ index 0d743c63..6480a01f 100644 #ifdef DEBUG print_hex_dump(KERN_ERR, "key in @"__stringify(__LINE__)": ", DUMP_PREFIX_ADDRESS, 16, 4, key, keylen, 1); -@@ -1544,215 +655,33 @@ static int ablkcipher_setkey(struct crypto_ablkcipher *ablkcipher, +@@ -1544,215 +655,33 @@ static int ablkcipher_setkey(struct cryp keylen -= CTR_RFC3686_NONCE_SIZE; } @@ -8734,15 +8700,15 @@ index 0d743c63..6480a01f 100644 - } - - set_jump_tgt_here(desc, key_jump_cmd); +- +- /* Load iv */ +- append_seq_load(desc, crt->ivsize, LDST_SRCDST_BYTE_CONTEXT | +- LDST_CLASS_1_CCB | (ctx1_iv_off << LDST_OFFSET_SHIFT)); + cnstr_shdsc_ablkcipher_encap(desc, &ctx->cdata, ivsize, is_rfc3686, + ctx1_iv_off); + dma_sync_single_for_device(jrdev, ctx->sh_desc_enc_dma, + desc_bytes(desc), DMA_TO_DEVICE); -- /* Load iv */ -- append_seq_load(desc, crt->ivsize, LDST_SRCDST_BYTE_CONTEXT | -- LDST_CLASS_1_CCB | (ctx1_iv_off << LDST_OFFSET_SHIFT)); -- - /* Load counter into CONTEXT1 reg */ - if (is_rfc3686) - append_load_imm_be32(desc, 1, LDST_IMM | LDST_CLASS_1_CCB | @@ -8924,7 +8890,7 @@ index 0d743c63..6480a01f 100644 } static int xts_ablkcipher_setkey(struct crypto_ablkcipher *ablkcipher, -@@ -1760,8 +689,7 @@ static int xts_ablkcipher_setkey(struct crypto_ablkcipher *ablkcipher, +@@ -1760,8 +689,7 @@ static int xts_ablkcipher_setkey(struct { struct caam_ctx *ctx = crypto_ablkcipher_ctx(ablkcipher); struct device *jrdev = ctx->jrdev; @@ -8934,7 +8900,7 @@ index 0d743c63..6480a01f 100644 if (keylen != 2 * AES_MIN_KEY_SIZE && keylen != 2 * AES_MAX_KEY_SIZE) { crypto_ablkcipher_set_flags(ablkcipher, -@@ -1771,126 +699,38 @@ static int xts_ablkcipher_setkey(struct crypto_ablkcipher *ablkcipher, +@@ -1771,126 +699,38 @@ static int xts_ablkcipher_setkey(struct } memcpy(ctx->key, key, keylen); @@ -9090,7 +9056,7 @@ index 0d743c63..6480a01f 100644 * @hw_desc: the h/w job descriptor followed by any referenced link tables */ struct ablkcipher_edesc { -@@ -1924,10 +764,11 @@ static void caam_unmap(struct device *dev, struct scatterlist *src, +@@ -1924,10 +764,11 @@ static void caam_unmap(struct device *de int sec4_sg_bytes) { if (dst != src) { @@ -9105,7 +9071,7 @@ index 0d743c63..6480a01f 100644 } if (iv_dma) -@@ -2021,8 +862,7 @@ static void ablkcipher_encrypt_done(struct device *jrdev, u32 *desc, u32 err, +@@ -2021,8 +862,7 @@ static void ablkcipher_encrypt_done(stru dev_err(jrdev, "%s %d: err 0x%x\n", __func__, __LINE__, err); #endif @@ -9115,7 +9081,7 @@ index 0d743c63..6480a01f 100644 if (err) caam_jr_strstatus(jrdev, err); -@@ -2031,10 +871,10 @@ static void ablkcipher_encrypt_done(struct device *jrdev, u32 *desc, u32 err, +@@ -2031,10 +871,10 @@ static void ablkcipher_encrypt_done(stru print_hex_dump(KERN_ERR, "dstiv @"__stringify(__LINE__)": ", DUMP_PREFIX_ADDRESS, 16, 4, req->info, edesc->src_nents > 1 ? 100 : ivsize, 1); @@ -9129,7 +9095,7 @@ index 0d743c63..6480a01f 100644 ablkcipher_unmap(jrdev, edesc, req); -@@ -2062,8 +902,7 @@ static void ablkcipher_decrypt_done(struct device *jrdev, u32 *desc, u32 err, +@@ -2062,8 +902,7 @@ static void ablkcipher_decrypt_done(stru dev_err(jrdev, "%s %d: err 0x%x\n", __func__, __LINE__, err); #endif @@ -9139,7 +9105,7 @@ index 0d743c63..6480a01f 100644 if (err) caam_jr_strstatus(jrdev, err); -@@ -2071,10 +910,10 @@ static void ablkcipher_decrypt_done(struct device *jrdev, u32 *desc, u32 err, +@@ -2071,10 +910,10 @@ static void ablkcipher_decrypt_done(stru print_hex_dump(KERN_ERR, "dstiv @"__stringify(__LINE__)": ", DUMP_PREFIX_ADDRESS, 16, 4, req->info, ivsize, 1); @@ -9153,7 +9119,7 @@ index 0d743c63..6480a01f 100644 ablkcipher_unmap(jrdev, edesc, req); -@@ -2114,7 +953,7 @@ static void init_aead_job(struct aead_request *req, +@@ -2114,7 +953,7 @@ static void init_aead_job(struct aead_re init_job_desc_shared(desc, ptr, len, HDR_SHARE_DEFER | HDR_REVERSE); if (all_contig) { @@ -9162,7 +9128,7 @@ index 0d743c63..6480a01f 100644 in_options = 0; } else { src_dma = edesc->sec4_sg_dma; -@@ -2129,7 +968,7 @@ static void init_aead_job(struct aead_request *req, +@@ -2129,7 +968,7 @@ static void init_aead_job(struct aead_re out_options = in_options; if (unlikely(req->src != req->dst)) { @@ -9171,7 +9137,7 @@ index 0d743c63..6480a01f 100644 dst_dma = sg_dma_address(req->dst); } else { dst_dma = edesc->sec4_sg_dma + -@@ -2175,7 +1014,7 @@ static void init_gcm_job(struct aead_request *req, +@@ -2175,7 +1014,7 @@ static void init_gcm_job(struct aead_req FIFOLD_TYPE_IV | FIFOLD_TYPE_FLUSH1 | 12 | last); /* Append Salt */ if (!generic_gcm) @@ -9180,7 +9146,7 @@ index 0d743c63..6480a01f 100644 /* Append IV */ append_data(desc, req->iv, ivsize); /* End of blank commands */ -@@ -2190,7 +1029,7 @@ static void init_authenc_job(struct aead_request *req, +@@ -2190,7 +1029,7 @@ static void init_authenc_job(struct aead struct caam_aead_alg, aead); unsigned int ivsize = crypto_aead_ivsize(aead); struct caam_ctx *ctx = crypto_aead_ctx(aead); @@ -9189,7 +9155,7 @@ index 0d743c63..6480a01f 100644 OP_ALG_AAI_CTR_MOD128); const bool is_rfc3686 = alg->caam.rfc3686; u32 *desc = edesc->hw_desc; -@@ -2236,16 +1075,15 @@ static void init_ablkcipher_job(u32 *sh_desc, dma_addr_t ptr, +@@ -2236,16 +1075,15 @@ static void init_ablkcipher_job(u32 *sh_ int len, sec4_sg_index = 0; #ifdef DEBUG @@ -9211,7 +9177,7 @@ index 0d743c63..6480a01f 100644 len = desc_len(sh_desc); init_job_desc_shared(desc, ptr, len, HDR_SHARE_DEFER | HDR_REVERSE); -@@ -2261,7 +1099,7 @@ static void init_ablkcipher_job(u32 *sh_desc, dma_addr_t ptr, +@@ -2261,7 +1099,7 @@ static void init_ablkcipher_job(u32 *sh_ append_seq_in_ptr(desc, src_dma, req->nbytes + ivsize, in_options); if (likely(req->src == req->dst)) { @@ -9220,7 +9186,7 @@ index 0d743c63..6480a01f 100644 dst_dma = sg_dma_address(req->src); } else { dst_dma = edesc->sec4_sg_dma + -@@ -2269,7 +1107,7 @@ static void init_ablkcipher_job(u32 *sh_desc, dma_addr_t ptr, +@@ -2269,7 +1107,7 @@ static void init_ablkcipher_job(u32 *sh_ out_options = LDST_SGF; } } else { @@ -9229,7 +9195,7 @@ index 0d743c63..6480a01f 100644 dst_dma = sg_dma_address(req->dst); } else { dst_dma = edesc->sec4_sg_dma + -@@ -2296,20 +1134,18 @@ static void init_ablkcipher_giv_job(u32 *sh_desc, dma_addr_t ptr, +@@ -2296,20 +1134,18 @@ static void init_ablkcipher_giv_job(u32 int len, sec4_sg_index = 0; #ifdef DEBUG @@ -9254,7 +9220,7 @@ index 0d743c63..6480a01f 100644 src_dma = sg_dma_address(req->src); in_options = 0; } else { -@@ -2340,87 +1176,100 @@ static struct aead_edesc *aead_edesc_alloc(struct aead_request *req, +@@ -2340,87 +1176,100 @@ static struct aead_edesc *aead_edesc_all struct crypto_aead *aead = crypto_aead_reqtfm(req); struct caam_ctx *ctx = crypto_aead_ctx(aead); struct device *jrdev = ctx->jrdev; @@ -9410,7 +9376,7 @@ index 0d743c63..6480a01f 100644 edesc->sec4_sg + sec4_sg_index, 0); } -@@ -2573,13 +1422,9 @@ static int aead_decrypt(struct aead_request *req) +@@ -2573,13 +1422,9 @@ static int aead_decrypt(struct aead_requ u32 *desc; int ret = 0; @@ -9427,7 +9393,7 @@ index 0d743c63..6480a01f 100644 /* allocate extended descriptor */ edesc = aead_edesc_alloc(req, AUTHENC_DESC_JOB_IO_LEN, -@@ -2619,51 +1464,80 @@ static struct ablkcipher_edesc *ablkcipher_edesc_alloc(struct ablkcipher_request +@@ -2619,51 +1464,80 @@ static struct ablkcipher_edesc *ablkciph struct device *jrdev = ctx->jrdev; gfp_t flags = (req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) ? GFP_KERNEL : GFP_ATOMIC; @@ -9531,7 +9497,7 @@ index 0d743c63..6480a01f 100644 return ERR_PTR(-ENOMEM); } -@@ -2673,23 +1547,24 @@ static struct ablkcipher_edesc *ablkcipher_edesc_alloc(struct ablkcipher_request +@@ -2673,23 +1547,24 @@ static struct ablkcipher_edesc *ablkciph edesc->sec4_sg = (void *)edesc + sizeof(struct ablkcipher_edesc) + desc_bytes; @@ -9563,7 +9529,7 @@ index 0d743c63..6480a01f 100644 return ERR_PTR(-ENOMEM); } -@@ -2701,7 +1576,7 @@ static struct ablkcipher_edesc *ablkcipher_edesc_alloc(struct ablkcipher_request +@@ -2701,7 +1576,7 @@ static struct ablkcipher_edesc *ablkciph sec4_sg_bytes, 1); #endif @@ -9572,7 +9538,7 @@ index 0d743c63..6480a01f 100644 return edesc; } -@@ -2792,30 +1667,54 @@ static struct ablkcipher_edesc *ablkcipher_giv_edesc_alloc( +@@ -2792,30 +1667,54 @@ static struct ablkcipher_edesc *ablkciph struct crypto_ablkcipher *ablkcipher = crypto_ablkcipher_reqtfm(req); struct caam_ctx *ctx = crypto_ablkcipher_ctx(ablkcipher); struct device *jrdev = ctx->jrdev; @@ -9589,10 +9555,10 @@ index 0d743c63..6480a01f 100644 + bool out_contig; int ivsize = crypto_ablkcipher_ivsize(ablkcipher); - int sec4_sg_index; +- +- src_nents = sg_count(req->src, req->nbytes); + int dst_sg_idx, sec4_sg_ents, sec4_sg_bytes; -- src_nents = sg_count(req->src, req->nbytes); -- - if (unlikely(req->dst != req->src)) - dst_nents = sg_count(req->dst, req->nbytes); + src_nents = sg_nents_for_len(req->src, req->nbytes); @@ -9643,7 +9609,7 @@ index 0d743c63..6480a01f 100644 } /* -@@ -2825,21 +1724,29 @@ static struct ablkcipher_edesc *ablkcipher_giv_edesc_alloc( +@@ -2825,21 +1724,29 @@ static struct ablkcipher_edesc *ablkciph iv_dma = dma_map_single(jrdev, greq->giv, ivsize, DMA_TO_DEVICE); if (dma_mapping_error(jrdev, iv_dma)) { dev_err(jrdev, "unable to map IV\n"); @@ -9679,7 +9645,7 @@ index 0d743c63..6480a01f 100644 return ERR_PTR(-ENOMEM); } -@@ -2849,24 +1756,24 @@ static struct ablkcipher_edesc *ablkcipher_giv_edesc_alloc( +@@ -2849,24 +1756,24 @@ static struct ablkcipher_edesc *ablkciph edesc->sec4_sg = (void *)edesc + sizeof(struct ablkcipher_edesc) + desc_bytes; @@ -9714,7 +9680,7 @@ index 0d743c63..6480a01f 100644 return ERR_PTR(-ENOMEM); } edesc->iv_dma = iv_dma; -@@ -2878,7 +1785,7 @@ static struct ablkcipher_edesc *ablkcipher_giv_edesc_alloc( +@@ -2878,7 +1785,7 @@ static struct ablkcipher_edesc *ablkciph sec4_sg_bytes, 1); #endif @@ -9723,7 +9689,7 @@ index 0d743c63..6480a01f 100644 return edesc; } -@@ -2889,7 +1796,7 @@ static int ablkcipher_givencrypt(struct skcipher_givcrypt_request *creq) +@@ -2889,7 +1796,7 @@ static int ablkcipher_givencrypt(struct struct crypto_ablkcipher *ablkcipher = crypto_ablkcipher_reqtfm(req); struct caam_ctx *ctx = crypto_ablkcipher_ctx(ablkcipher); struct device *jrdev = ctx->jrdev; @@ -9740,7 +9706,7 @@ index 0d743c63..6480a01f 100644 }; static struct caam_alg_template driver_algs[] = { -@@ -3118,7 +2024,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3118,7 +2024,6 @@ static struct caam_aead_alg driver_aeads .caam = { .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9748,7 +9714,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3140,7 +2045,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3140,7 +2045,6 @@ static struct caam_aead_alg driver_aeads .caam = { .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9756,7 +9722,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3162,7 +2066,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3162,7 +2066,6 @@ static struct caam_aead_alg driver_aeads .caam = { .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9764,7 +9730,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3184,7 +2087,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3184,7 +2087,6 @@ static struct caam_aead_alg driver_aeads .caam = { .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9772,7 +9738,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3206,7 +2108,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3206,7 +2108,6 @@ static struct caam_aead_alg driver_aeads .caam = { .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9780,7 +9746,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3228,7 +2129,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3228,7 +2129,6 @@ static struct caam_aead_alg driver_aeads .caam = { .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9788,7 +9754,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3250,7 +2150,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3250,7 +2150,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9796,7 +9762,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3273,7 +2172,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3273,7 +2172,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9804,7 +9770,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, }, }, -@@ -3296,7 +2194,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3296,7 +2194,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9812,7 +9778,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3319,7 +2216,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3319,7 +2216,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9820,7 +9786,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, }, }, -@@ -3342,7 +2238,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3342,7 +2238,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9828,7 +9794,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3365,7 +2260,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3365,7 +2260,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9836,7 +9802,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, }, }, -@@ -3388,7 +2282,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3388,7 +2282,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9844,7 +9810,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3411,7 +2304,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3411,7 +2304,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9852,7 +9818,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, }, }, -@@ -3434,7 +2326,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3434,7 +2326,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9860,7 +9826,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3457,7 +2348,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3457,7 +2348,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9868,7 +9834,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, }, }, -@@ -3480,7 +2370,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3480,7 +2370,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9876,7 +9842,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3503,7 +2392,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3503,7 +2392,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9884,7 +9850,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, }, }, -@@ -3526,7 +2414,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3526,7 +2414,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9892,7 +9858,7 @@ index 0d743c63..6480a01f 100644 } }, { -@@ -3549,7 +2436,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3549,7 +2436,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9900,7 +9866,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, } }, -@@ -3573,7 +2459,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3573,7 +2459,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9908,7 +9874,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3597,7 +2482,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3597,7 +2482,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9916,7 +9882,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, }, }, -@@ -3621,7 +2505,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3621,7 +2505,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9924,7 +9890,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3645,7 +2528,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3645,7 +2528,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9932,7 +9898,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, }, }, -@@ -3669,7 +2551,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3669,7 +2551,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9940,7 +9906,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3693,7 +2574,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3693,7 +2574,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9948,7 +9914,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, }, }, -@@ -3717,7 +2597,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3717,7 +2597,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9956,7 +9922,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3741,7 +2620,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3741,7 +2620,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9964,7 +9930,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, }, }, -@@ -3765,7 +2643,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3765,7 +2643,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9972,7 +9938,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3789,7 +2666,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3789,7 +2666,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9980,7 +9946,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, }, }, -@@ -3812,7 +2688,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3812,7 +2688,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9988,7 +9954,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3835,7 +2710,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3835,7 +2710,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -9996,7 +9962,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, }, }, -@@ -3858,7 +2732,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3858,7 +2732,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10004,7 +9970,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3881,7 +2754,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3881,7 +2754,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10012,7 +9978,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, }, }, -@@ -3904,7 +2776,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3904,7 +2776,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10020,7 +9986,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3927,7 +2798,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3927,7 +2798,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10028,7 +9994,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, }, }, -@@ -3950,7 +2820,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3950,7 +2820,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10036,7 +10002,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -3973,7 +2842,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3973,7 +2842,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10044,7 +10010,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, }, }, -@@ -3996,7 +2864,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -3996,7 +2864,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10052,7 +10018,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -4019,7 +2886,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4019,7 +2886,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10060,7 +10026,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, }, }, -@@ -4042,7 +2908,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4042,7 +2908,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10068,7 +10034,7 @@ index 0d743c63..6480a01f 100644 }, }, { -@@ -4065,7 +2930,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4065,7 +2930,6 @@ static struct caam_aead_alg driver_aeads .class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC, .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10076,7 +10042,7 @@ index 0d743c63..6480a01f 100644 .geniv = true, }, }, -@@ -4090,7 +2954,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4090,7 +2954,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10084,7 +10050,7 @@ index 0d743c63..6480a01f 100644 .rfc3686 = true, }, }, -@@ -4115,7 +2978,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4115,7 +2978,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_MD5 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10092,7 +10058,7 @@ index 0d743c63..6480a01f 100644 .rfc3686 = true, .geniv = true, }, -@@ -4141,7 +3003,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4141,7 +3003,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10100,7 +10066,7 @@ index 0d743c63..6480a01f 100644 .rfc3686 = true, }, }, -@@ -4166,7 +3027,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4166,7 +3027,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10108,7 +10074,7 @@ index 0d743c63..6480a01f 100644 .rfc3686 = true, .geniv = true, }, -@@ -4192,7 +3052,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4192,7 +3052,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10116,7 +10082,7 @@ index 0d743c63..6480a01f 100644 .rfc3686 = true, }, }, -@@ -4217,7 +3076,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4217,7 +3076,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10124,7 +10090,7 @@ index 0d743c63..6480a01f 100644 .rfc3686 = true, .geniv = true, }, -@@ -4243,7 +3101,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4243,7 +3101,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10132,7 +10098,7 @@ index 0d743c63..6480a01f 100644 .rfc3686 = true, }, }, -@@ -4268,7 +3125,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4268,7 +3125,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10140,7 +10106,7 @@ index 0d743c63..6480a01f 100644 .rfc3686 = true, .geniv = true, }, -@@ -4294,7 +3150,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4294,7 +3150,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10148,7 +10114,7 @@ index 0d743c63..6480a01f 100644 .rfc3686 = true, }, }, -@@ -4319,7 +3174,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4319,7 +3174,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10156,7 +10122,7 @@ index 0d743c63..6480a01f 100644 .rfc3686 = true, .geniv = true, }, -@@ -4345,7 +3199,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4345,7 +3199,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10164,7 +10130,7 @@ index 0d743c63..6480a01f 100644 .rfc3686 = true, }, }, -@@ -4370,7 +3223,6 @@ static struct caam_aead_alg driver_aeads[] = { +@@ -4370,7 +3223,6 @@ static struct caam_aead_alg driver_aeads OP_ALG_AAI_CTR_MOD128, .class2_alg_type = OP_ALG_ALGSEL_SHA512 | OP_ALG_AAI_HMAC_PRECOMP, @@ -10210,7 +10176,7 @@ index 0d743c63..6480a01f 100644 return 0; } -@@ -4421,25 +3291,9 @@ static int caam_aead_init(struct crypto_aead *tfm) +@@ -4421,25 +3291,9 @@ static int caam_aead_init(struct crypto_ static void caam_exit_common(struct caam_ctx *ctx) { @@ -10239,7 +10205,7 @@ index 0d743c63..6480a01f 100644 caam_jr_free(ctx->jrdev); } -@@ -4515,7 +3369,6 @@ static struct caam_crypto_alg *caam_alg_alloc(struct caam_alg_template +@@ -4515,7 +3369,6 @@ static struct caam_crypto_alg *caam_alg_ t_alg->caam.class1_alg_type = template->class1_alg_type; t_alg->caam.class2_alg_type = template->class2_alg_type; @@ -10247,9 +10213,6 @@ index 0d743c63..6480a01f 100644 return t_alg; } -diff --git a/drivers/crypto/caam/caamalg_desc.c b/drivers/crypto/caam/caamalg_desc.c -new file mode 100644 -index 00000000..d162120a --- /dev/null +++ b/drivers/crypto/caam/caamalg_desc.c @@ -0,0 +1,1913 @@ @@ -12166,9 +12129,6 @@ index 00000000..d162120a +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("FSL CAAM descriptor support"); +MODULE_AUTHOR("Freescale Semiconductor - NMG/STC"); -diff --git a/drivers/crypto/caam/caamalg_desc.h b/drivers/crypto/caam/caamalg_desc.h -new file mode 100644 -index 00000000..6b436f65 --- /dev/null +++ b/drivers/crypto/caam/caamalg_desc.h @@ -0,0 +1,127 @@ @@ -12299,9 +12259,6 @@ index 00000000..6b436f65 +void cnstr_shdsc_xts_ablkcipher_decap(u32 * const desc, struct alginfo *cdata); + +#endif /* _CAAMALG_DESC_H_ */ -diff --git a/drivers/crypto/caam/caamalg_qi.c b/drivers/crypto/caam/caamalg_qi.c -new file mode 100644 -index 00000000..d6a9b0c5 --- /dev/null +++ b/drivers/crypto/caam/caamalg_qi.c @@ -0,0 +1,2877 @@ @@ -15182,9 +15139,6 @@ index 00000000..d6a9b0c5 +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Support for crypto API using CAAM-QI backend"); +MODULE_AUTHOR("Freescale Semiconductor"); -diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c -new file mode 100644 -index 00000000..102b0841 --- /dev/null +++ b/drivers/crypto/caam/caamalg_qi2.c @@ -0,0 +1,4428 @@ @@ -19616,9 +19570,6 @@ index 00000000..102b0841 +MODULE_DESCRIPTION("Freescale DPAA2 CAAM Driver"); + +module_fsl_mc_driver(dpaa2_caam_driver); -diff --git a/drivers/crypto/caam/caamalg_qi2.h b/drivers/crypto/caam/caamalg_qi2.h -new file mode 100644 -index 00000000..2ba179db --- /dev/null +++ b/drivers/crypto/caam/caamalg_qi2.h @@ -0,0 +1,265 @@ @@ -19887,8 +19838,6 @@ index 00000000..2ba179db +int dpaa2_caam_enqueue(struct device *dev, struct caam_request *req); + +#endif /* _CAAMALG_QI2_H_ */ -diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c -index 631337c2..698580b6 100644 --- a/drivers/crypto/caam/caamhash.c +++ b/drivers/crypto/caam/caamhash.c @@ -72,7 +72,7 @@ @@ -19954,7 +19903,7 @@ index 631337c2..698580b6 100644 /* Common job descriptor seq in/out ptr routines */ /* Map state->caam_ctx, and append seq_out_ptr command that points to it */ -@@ -175,36 +194,27 @@ static inline dma_addr_t map_seq_out_ptr_result(u32 *desc, struct device *jrdev, +@@ -175,36 +194,27 @@ static inline dma_addr_t map_seq_out_ptr return dst_dma; } @@ -20000,15 +19949,14 @@ index 631337c2..698580b6 100644 - buf_dma = buf_map_to_sec4_sg(jrdev, sec4_sg, buf, buflen); - else - buf_dma = 0; -- -- return buf_dma; + dma_to_sec4_sg_one(sec4_sg, state->buf_dma, buflen, 0); -+ + +- return buf_dma; + return 0; } /* Map state->caam_ctx, and add it to link table */ -@@ -224,89 +234,54 @@ static inline int ctx_map_to_sec4_sg(u32 *desc, struct device *jrdev, +@@ -224,89 +234,54 @@ static inline int ctx_map_to_sec4_sg(u32 return 0; } @@ -20056,18 +20004,23 @@ index 631337c2..698580b6 100644 { - /* Calculate remaining bytes to read */ - append_math_add(desc, VARSEQINLEN, SEQINLEN, REG0, CAAM_CMD_SZ); -- ++ u32 op = ctx->adata.algtype; ++ u32 *skip_key_load; + - /* Read remaining bytes */ - append_seq_fifo_load(desc, 0, FIFOLD_CLASS_CLASS2 | FIFOLD_TYPE_LAST2 | - FIFOLD_TYPE_MSG | KEY_VLF); -+ u32 op = ctx->adata.algtype; -+ u32 *skip_key_load; ++ init_sh_desc(desc, HDR_SHARE_SERIAL); - /* Store class2 context bytes */ - append_seq_store(desc, digestsize, LDST_CLASS_2_CCB | - LDST_SRCDST_BYTE_CONTEXT); -} -+ init_sh_desc(desc, HDR_SHARE_SERIAL); ++ /* Append key if it has been set; ahash update excluded */ ++ if ((state != OP_ALG_AS_UPDATE) && (ctx->adata.keylen)) { ++ /* Skip key loading if already shared */ ++ skip_key_load = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | ++ JUMP_COND_SHRD); -/* - * For ahash update, final and finup, import context, read and write to seqout @@ -20077,12 +20030,7 @@ index 631337c2..698580b6 100644 - struct caam_hash_ctx *ctx) -{ - init_sh_desc_key_ahash(desc, ctx); -+ /* Append key if it has been set; ahash update excluded */ -+ if ((state != OP_ALG_AS_UPDATE) && (ctx->adata.keylen)) { -+ /* Skip key loading if already shared */ -+ skip_key_load = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | -+ JUMP_COND_SHRD); - +- - /* Import context from software */ - append_cmd(desc, CMD_SEQ_LOAD | LDST_SRCDST_BYTE_CONTEXT | - LDST_CLASS_2_CCB | ctx->ctx_len); @@ -20130,7 +20078,7 @@ index 631337c2..698580b6 100644 } static int ahash_set_sh_desc(struct crypto_ahash *ahash) -@@ -314,34 +289,13 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash) +@@ -314,34 +289,13 @@ static int ahash_set_sh_desc(struct cryp struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); int digestsize = crypto_ahash_digestsize(ahash); struct device *jrdev = ctx->jrdev; @@ -20168,7 +20116,7 @@ index 631337c2..698580b6 100644 #ifdef DEBUG print_hex_dump(KERN_ERR, "ahash update shdesc@"__stringify(__LINE__)": ", -@@ -350,17 +304,9 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash) +@@ -350,17 +304,9 @@ static int ahash_set_sh_desc(struct cryp /* ahash_update_first shared descriptor */ desc = ctx->sh_desc_update_first; @@ -20189,7 +20137,7 @@ index 631337c2..698580b6 100644 #ifdef DEBUG print_hex_dump(KERN_ERR, "ahash update first shdesc@"__stringify(__LINE__)": ", -@@ -369,53 +315,20 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash) +@@ -369,53 +315,20 @@ static int ahash_set_sh_desc(struct cryp /* ahash_final shared descriptor */ desc = ctx->sh_desc_fin; @@ -20249,7 +20197,7 @@ index 631337c2..698580b6 100644 #ifdef DEBUG print_hex_dump(KERN_ERR, "ahash digest shdesc@"__stringify(__LINE__)": ", -@@ -426,14 +339,6 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash) +@@ -426,14 +339,6 @@ static int ahash_set_sh_desc(struct cryp return 0; } @@ -20264,7 +20212,7 @@ index 631337c2..698580b6 100644 /* Digest hash size if it is too large */ static int hash_digest_key(struct caam_hash_ctx *ctx, const u8 *key_in, u32 *keylen, u8 *key_out, u32 digestsize) -@@ -469,7 +374,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, const u8 *key_in, +@@ -469,7 +374,7 @@ static int hash_digest_key(struct caam_h } /* Job descriptor to perform unkeyed hash on key_in */ @@ -20273,7 +20221,7 @@ index 631337c2..698580b6 100644 OP_ALG_AS_INITFINAL); append_seq_in_ptr(desc, src_dma, *keylen, 0); append_seq_fifo_load(desc, *keylen, FIFOLD_CLASS_CLASS2 | -@@ -513,10 +418,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, const u8 *key_in, +@@ -513,10 +418,7 @@ static int hash_digest_key(struct caam_h static int ahash_setkey(struct crypto_ahash *ahash, const u8 *key, unsigned int keylen) { @@ -20284,7 +20232,7 @@ index 631337c2..698580b6 100644 int blocksize = crypto_tfm_alg_blocksize(&ahash->base); int digestsize = crypto_ahash_digestsize(ahash); int ret; -@@ -539,43 +441,19 @@ static int ahash_setkey(struct crypto_ahash *ahash, +@@ -539,43 +441,19 @@ static int ahash_setkey(struct crypto_ah key = hashed_key; } @@ -20332,7 +20280,7 @@ index 631337c2..698580b6 100644 bad_free_key: kfree(hashed_key); crypto_ahash_set_flags(ahash, CRYPTO_TFM_RES_BAD_KEY_LEN); -@@ -604,6 +482,8 @@ static inline void ahash_unmap(struct device *dev, +@@ -604,6 +482,8 @@ static inline void ahash_unmap(struct de struct ahash_edesc *edesc, struct ahash_request *req, int dst_len) { @@ -20341,7 +20289,7 @@ index 631337c2..698580b6 100644 if (edesc->src_nents) dma_unmap_sg(dev, req->src, edesc->src_nents, DMA_TO_DEVICE); if (edesc->dst_dma) -@@ -612,6 +492,12 @@ static inline void ahash_unmap(struct device *dev, +@@ -612,6 +492,12 @@ static inline void ahash_unmap(struct de if (edesc->sec4_sg_bytes) dma_unmap_single(dev, edesc->sec4_sg_dma, edesc->sec4_sg_bytes, DMA_TO_DEVICE); @@ -20354,7 +20302,7 @@ index 631337c2..698580b6 100644 } static inline void ahash_unmap_ctx(struct device *dev, -@@ -643,8 +529,7 @@ static void ahash_done(struct device *jrdev, u32 *desc, u32 err, +@@ -643,8 +529,7 @@ static void ahash_done(struct device *jr dev_err(jrdev, "%s %d: err 0x%x\n", __func__, __LINE__, err); #endif @@ -20364,7 +20312,7 @@ index 631337c2..698580b6 100644 if (err) caam_jr_strstatus(jrdev, err); -@@ -671,19 +556,19 @@ static void ahash_done_bi(struct device *jrdev, u32 *desc, u32 err, +@@ -671,19 +556,19 @@ static void ahash_done_bi(struct device struct ahash_edesc *edesc; struct crypto_ahash *ahash = crypto_ahash_reqtfm(req); struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); @@ -20387,7 +20335,7 @@ index 631337c2..698580b6 100644 kfree(edesc); #ifdef DEBUG -@@ -713,8 +598,7 @@ static void ahash_done_ctx_src(struct device *jrdev, u32 *desc, u32 err, +@@ -713,8 +598,7 @@ static void ahash_done_ctx_src(struct de dev_err(jrdev, "%s %d: err 0x%x\n", __func__, __LINE__, err); #endif @@ -20397,7 +20345,7 @@ index 631337c2..698580b6 100644 if (err) caam_jr_strstatus(jrdev, err); -@@ -741,19 +625,19 @@ static void ahash_done_ctx_dst(struct device *jrdev, u32 *desc, u32 err, +@@ -741,19 +625,19 @@ static void ahash_done_ctx_dst(struct de struct ahash_edesc *edesc; struct crypto_ahash *ahash = crypto_ahash_reqtfm(req); struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); @@ -20420,7 +20368,7 @@ index 631337c2..698580b6 100644 kfree(edesc); #ifdef DEBUG -@@ -835,13 +719,12 @@ static int ahash_update_ctx(struct ahash_request *req) +@@ -835,13 +719,12 @@ static int ahash_update_ctx(struct ahash struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); struct caam_hash_state *state = ahash_request_ctx(req); struct device *jrdev = ctx->jrdev; @@ -20440,7 +20388,7 @@ index 631337c2..698580b6 100644 int in_len = *buflen + req->nbytes, to_hash; u32 *desc; int src_nents, mapped_nents, sec4_sg_bytes, sec4_sg_src_index; -@@ -895,10 +778,9 @@ static int ahash_update_ctx(struct ahash_request *req) +@@ -895,10 +778,9 @@ static int ahash_update_ctx(struct ahash if (ret) goto unmap_ctx; @@ -20454,7 +20402,7 @@ index 631337c2..698580b6 100644 if (mapped_nents) { sg_to_sec4_sg_last(req->src, mapped_nents, -@@ -909,12 +791,10 @@ static int ahash_update_ctx(struct ahash_request *req) +@@ -909,12 +791,10 @@ static int ahash_update_ctx(struct ahash to_hash - *buflen, *next_buflen, 0); } else { @@ -20469,7 +20417,7 @@ index 631337c2..698580b6 100644 desc = edesc->hw_desc; edesc->sec4_sg_dma = dma_map_single(jrdev, edesc->sec4_sg, -@@ -969,12 +849,9 @@ static int ahash_final_ctx(struct ahash_request *req) +@@ -969,12 +849,9 @@ static int ahash_final_ctx(struct ahash_ struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); struct caam_hash_state *state = ahash_request_ctx(req); struct device *jrdev = ctx->jrdev; @@ -20485,7 +20433,7 @@ index 631337c2..698580b6 100644 u32 *desc; int sec4_sg_bytes, sec4_sg_src_index; int digestsize = crypto_ahash_digestsize(ahash); -@@ -1001,11 +878,11 @@ static int ahash_final_ctx(struct ahash_request *req) +@@ -1001,11 +878,11 @@ static int ahash_final_ctx(struct ahash_ if (ret) goto unmap_ctx; @@ -20502,7 +20450,7 @@ index 631337c2..698580b6 100644 edesc->sec4_sg_dma = dma_map_single(jrdev, edesc->sec4_sg, sec4_sg_bytes, DMA_TO_DEVICE); -@@ -1048,12 +925,9 @@ static int ahash_finup_ctx(struct ahash_request *req) +@@ -1048,12 +925,9 @@ static int ahash_finup_ctx(struct ahash_ struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); struct caam_hash_state *state = ahash_request_ctx(req); struct device *jrdev = ctx->jrdev; @@ -20518,7 +20466,7 @@ index 631337c2..698580b6 100644 u32 *desc; int sec4_sg_src_index; int src_nents, mapped_nents; -@@ -1082,7 +956,7 @@ static int ahash_finup_ctx(struct ahash_request *req) +@@ -1082,7 +956,7 @@ static int ahash_finup_ctx(struct ahash_ /* allocate space for base edesc and hw desc commands, link tables */ edesc = ahash_edesc_alloc(ctx, sec4_sg_src_index + mapped_nents, @@ -20527,7 +20475,7 @@ index 631337c2..698580b6 100644 flags); if (!edesc) { dma_unmap_sg(jrdev, req->src, src_nents, DMA_TO_DEVICE); -@@ -1098,9 +972,9 @@ static int ahash_finup_ctx(struct ahash_request *req) +@@ -1098,9 +972,9 @@ static int ahash_finup_ctx(struct ahash_ if (ret) goto unmap_ctx; @@ -20540,7 +20488,7 @@ index 631337c2..698580b6 100644 ret = ahash_edesc_add_src(ctx, edesc, req, mapped_nents, sec4_sg_src_index, ctx->ctx_len + buflen, -@@ -1136,15 +1010,18 @@ static int ahash_digest(struct ahash_request *req) +@@ -1136,15 +1010,18 @@ static int ahash_digest(struct ahash_req { struct crypto_ahash *ahash = crypto_ahash_reqtfm(req); struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); @@ -20561,7 +20509,7 @@ index 631337c2..698580b6 100644 src_nents = sg_nents_for_len(req->src, req->nbytes); if (src_nents < 0) { dev_err(jrdev, "Invalid number of src SG.\n"); -@@ -1215,10 +1092,10 @@ static int ahash_final_no_ctx(struct ahash_request *req) +@@ -1215,10 +1092,10 @@ static int ahash_final_no_ctx(struct aha struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); struct caam_hash_state *state = ahash_request_ctx(req); struct device *jrdev = ctx->jrdev; @@ -20576,7 +20524,7 @@ index 631337c2..698580b6 100644 u32 *desc; int digestsize = crypto_ahash_digestsize(ahash); struct ahash_edesc *edesc; -@@ -1276,13 +1153,12 @@ static int ahash_update_no_ctx(struct ahash_request *req) +@@ -1276,13 +1153,12 @@ static int ahash_update_no_ctx(struct ah struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); struct caam_hash_state *state = ahash_request_ctx(req); struct device *jrdev = ctx->jrdev; @@ -20596,7 +20544,7 @@ index 631337c2..698580b6 100644 int in_len = *buflen + req->nbytes, to_hash; int sec4_sg_bytes, src_nents, mapped_nents; struct ahash_edesc *edesc; -@@ -1331,8 +1207,10 @@ static int ahash_update_no_ctx(struct ahash_request *req) +@@ -1331,8 +1207,10 @@ static int ahash_update_no_ctx(struct ah edesc->sec4_sg_bytes = sec4_sg_bytes; edesc->dst_dma = 0; @@ -20609,7 +20557,7 @@ index 631337c2..698580b6 100644 sg_to_sec4_sg_last(req->src, mapped_nents, edesc->sec4_sg + 1, 0); -@@ -1342,8 +1220,6 @@ static int ahash_update_no_ctx(struct ahash_request *req) +@@ -1342,8 +1220,6 @@ static int ahash_update_no_ctx(struct ah *next_buflen, 0); } @@ -20618,7 +20566,7 @@ index 631337c2..698580b6 100644 desc = edesc->hw_desc; edesc->sec4_sg_dma = dma_map_single(jrdev, edesc->sec4_sg, -@@ -1403,12 +1279,9 @@ static int ahash_finup_no_ctx(struct ahash_request *req) +@@ -1403,12 +1279,9 @@ static int ahash_finup_no_ctx(struct aha struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); struct caam_hash_state *state = ahash_request_ctx(req); struct device *jrdev = ctx->jrdev; @@ -20634,7 +20582,7 @@ index 631337c2..698580b6 100644 u32 *desc; int sec4_sg_bytes, sec4_sg_src_index, src_nents, mapped_nents; int digestsize = crypto_ahash_digestsize(ahash); -@@ -1450,9 +1323,9 @@ static int ahash_finup_no_ctx(struct ahash_request *req) +@@ -1450,9 +1323,9 @@ static int ahash_finup_no_ctx(struct aha edesc->src_nents = src_nents; edesc->sec4_sg_bytes = sec4_sg_bytes; @@ -20647,7 +20595,7 @@ index 631337c2..698580b6 100644 ret = ahash_edesc_add_src(ctx, edesc, req, mapped_nents, 1, buflen, req->nbytes); -@@ -1496,11 +1369,10 @@ static int ahash_update_first(struct ahash_request *req) +@@ -1496,11 +1369,10 @@ static int ahash_update_first(struct aha struct caam_hash_ctx *ctx = crypto_ahash_ctx(ahash); struct caam_hash_state *state = ahash_request_ctx(req); struct device *jrdev = ctx->jrdev; @@ -20663,7 +20611,7 @@ index 631337c2..698580b6 100644 int to_hash; u32 *desc; int src_nents, mapped_nents; -@@ -1582,6 +1454,7 @@ static int ahash_update_first(struct ahash_request *req) +@@ -1582,6 +1454,7 @@ static int ahash_update_first(struct aha state->final = ahash_final_no_ctx; scatterwalk_map_and_copy(next_buf, req->src, 0, req->nbytes, 0); @@ -20679,7 +20627,7 @@ index 631337c2..698580b6 100644 }; /* ahash descriptors */ -@@ -1714,7 +1586,6 @@ static struct caam_hash_template driver_hash[] = { +@@ -1714,7 +1586,6 @@ static struct caam_hash_template driver_ }, }, .alg_type = OP_ALG_ALGSEL_SHA1, @@ -20687,7 +20635,7 @@ index 631337c2..698580b6 100644 }, { .name = "sha224", .driver_name = "sha224-caam", -@@ -1736,7 +1607,6 @@ static struct caam_hash_template driver_hash[] = { +@@ -1736,7 +1607,6 @@ static struct caam_hash_template driver_ }, }, .alg_type = OP_ALG_ALGSEL_SHA224, @@ -20695,7 +20643,7 @@ index 631337c2..698580b6 100644 }, { .name = "sha256", .driver_name = "sha256-caam", -@@ -1758,7 +1628,6 @@ static struct caam_hash_template driver_hash[] = { +@@ -1758,7 +1628,6 @@ static struct caam_hash_template driver_ }, }, .alg_type = OP_ALG_ALGSEL_SHA256, @@ -20703,7 +20651,7 @@ index 631337c2..698580b6 100644 }, { .name = "sha384", .driver_name = "sha384-caam", -@@ -1780,7 +1649,6 @@ static struct caam_hash_template driver_hash[] = { +@@ -1780,7 +1649,6 @@ static struct caam_hash_template driver_ }, }, .alg_type = OP_ALG_ALGSEL_SHA384, @@ -20711,7 +20659,7 @@ index 631337c2..698580b6 100644 }, { .name = "sha512", .driver_name = "sha512-caam", -@@ -1802,7 +1670,6 @@ static struct caam_hash_template driver_hash[] = { +@@ -1802,7 +1670,6 @@ static struct caam_hash_template driver_ }, }, .alg_type = OP_ALG_ALGSEL_SHA512, @@ -20719,7 +20667,7 @@ index 631337c2..698580b6 100644 }, { .name = "md5", .driver_name = "md5-caam", -@@ -1824,14 +1691,12 @@ static struct caam_hash_template driver_hash[] = { +@@ -1824,14 +1691,12 @@ static struct caam_hash_template driver_ }, }, .alg_type = OP_ALG_ALGSEL_MD5, @@ -20734,7 +20682,7 @@ index 631337c2..698580b6 100644 struct ahash_alg ahash_alg; }; -@@ -1853,6 +1718,7 @@ static int caam_hash_cra_init(struct crypto_tfm *tfm) +@@ -1853,6 +1718,7 @@ static int caam_hash_cra_init(struct cry HASH_MSG_LEN + SHA256_DIGEST_SIZE, HASH_MSG_LEN + 64, HASH_MSG_LEN + SHA512_DIGEST_SIZE }; @@ -20742,7 +20690,7 @@ index 631337c2..698580b6 100644 /* * Get a Job ring from Job Ring driver to ensure in-order -@@ -1863,11 +1729,31 @@ static int caam_hash_cra_init(struct crypto_tfm *tfm) +@@ -1863,11 +1729,31 @@ static int caam_hash_cra_init(struct cry pr_err("Job Ring Device allocation for transform failed\n"); return PTR_ERR(ctx->jrdev); } @@ -20777,7 +20725,7 @@ index 631337c2..698580b6 100644 OP_ALG_ALGSEL_SHIFT]; crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), -@@ -1879,30 +1765,10 @@ static void caam_hash_cra_exit(struct crypto_tfm *tfm) +@@ -1879,30 +1765,10 @@ static void caam_hash_cra_exit(struct cr { struct caam_hash_ctx *ctx = crypto_tfm_ctx(tfm); @@ -20812,7 +20760,7 @@ index 631337c2..698580b6 100644 caam_jr_free(ctx->jrdev); } -@@ -1961,7 +1827,6 @@ caam_hash_alloc(struct caam_hash_template *template, +@@ -1961,7 +1827,6 @@ caam_hash_alloc(struct caam_hash_templat alg->cra_type = &crypto_ahash_type; t_alg->alg_type = template->alg_type; @@ -20820,8 +20768,6 @@ index 631337c2..698580b6 100644 return t_alg; } -diff --git a/drivers/crypto/caam/caampkc.c b/drivers/crypto/caam/caampkc.c -index 354a16ab..4fcb378e 100644 --- a/drivers/crypto/caam/caampkc.c +++ b/drivers/crypto/caam/caampkc.c @@ -18,6 +18,10 @@ @@ -20835,7 +20781,7 @@ index 354a16ab..4fcb378e 100644 static void rsa_io_unmap(struct device *dev, struct rsa_edesc *edesc, struct akcipher_request *req) -@@ -54,6 +58,42 @@ static void rsa_priv_f1_unmap(struct device *dev, struct rsa_edesc *edesc, +@@ -54,6 +58,42 @@ static void rsa_priv_f1_unmap(struct dev dma_unmap_single(dev, pdb->d_dma, key->d_sz, DMA_TO_DEVICE); } @@ -20878,7 +20824,7 @@ index 354a16ab..4fcb378e 100644 /* RSA Job Completion handler */ static void rsa_pub_done(struct device *dev, u32 *desc, u32 err, void *context) { -@@ -90,6 +130,42 @@ static void rsa_priv_f1_done(struct device *dev, u32 *desc, u32 err, +@@ -90,6 +130,42 @@ static void rsa_priv_f1_done(struct devi akcipher_request_complete(req, err); } @@ -20921,7 +20867,7 @@ index 354a16ab..4fcb378e 100644 static struct rsa_edesc *rsa_edesc_alloc(struct akcipher_request *req, size_t desclen) { -@@ -97,8 +173,8 @@ static struct rsa_edesc *rsa_edesc_alloc(struct akcipher_request *req, +@@ -97,8 +173,8 @@ static struct rsa_edesc *rsa_edesc_alloc struct caam_rsa_ctx *ctx = akcipher_tfm_ctx(tfm); struct device *dev = ctx->dev; struct rsa_edesc *edesc; @@ -20932,7 +20878,7 @@ index 354a16ab..4fcb378e 100644 int sgc; int sec4_sg_index, sec4_sg_len = 0, sec4_sg_bytes; int src_nents, dst_nents; -@@ -258,6 +334,172 @@ static int set_rsa_priv_f1_pdb(struct akcipher_request *req, +@@ -258,6 +334,172 @@ static int set_rsa_priv_f1_pdb(struct ak return 0; } @@ -21105,7 +21051,7 @@ index 354a16ab..4fcb378e 100644 static int caam_rsa_enc(struct akcipher_request *req) { struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); -@@ -301,24 +543,14 @@ static int caam_rsa_enc(struct akcipher_request *req) +@@ -301,24 +543,14 @@ init_fail: return ret; } @@ -21131,7 +21077,7 @@ index 354a16ab..4fcb378e 100644 /* Allocate extended descriptor */ edesc = rsa_edesc_alloc(req, DESC_RSA_PRIV_F1_LEN); if (IS_ERR(edesc)) -@@ -344,17 +576,147 @@ static int caam_rsa_dec(struct akcipher_request *req) +@@ -344,17 +576,147 @@ init_fail: return ret; } @@ -21285,7 +21231,7 @@ index 354a16ab..4fcb378e 100644 } /** -@@ -370,10 +732,9 @@ static inline u8 *caam_read_raw_data(const u8 *buf, size_t *nbytes) +@@ -370,10 +732,9 @@ static inline u8 *caam_read_raw_data(con { u8 *val; @@ -21299,7 +21245,7 @@ index 354a16ab..4fcb378e 100644 val = kzalloc(*nbytes, GFP_DMA | GFP_KERNEL); if (!val) -@@ -395,7 +756,7 @@ static int caam_rsa_set_pub_key(struct crypto_akcipher *tfm, const void *key, +@@ -395,7 +756,7 @@ static int caam_rsa_set_pub_key(struct c unsigned int keylen) { struct caam_rsa_ctx *ctx = akcipher_tfm_ctx(tfm); @@ -21308,7 +21254,7 @@ index 354a16ab..4fcb378e 100644 struct caam_rsa_key *rsa_key = &ctx->key; int ret; -@@ -437,11 +798,69 @@ static int caam_rsa_set_pub_key(struct crypto_akcipher *tfm, const void *key, +@@ -437,11 +798,69 @@ err: return -ENOMEM; } @@ -21379,7 +21325,7 @@ index 354a16ab..4fcb378e 100644 struct caam_rsa_key *rsa_key = &ctx->key; int ret; -@@ -483,6 +902,8 @@ static int caam_rsa_set_priv_key(struct crypto_akcipher *tfm, const void *key, +@@ -483,6 +902,8 @@ static int caam_rsa_set_priv_key(struct memcpy(rsa_key->d, raw_key.d, raw_key.d_sz); memcpy(rsa_key->e, raw_key.e, raw_key.e_sz); @@ -21388,15 +21334,12 @@ index 354a16ab..4fcb378e 100644 return 0; err: -diff --git a/drivers/crypto/caam/caampkc.h b/drivers/crypto/caam/caampkc.h -index f595d159..87ab75e9 100644 --- a/drivers/crypto/caam/caampkc.h +++ b/drivers/crypto/caam/caampkc.h -@@ -12,22 +12,76 @@ - #include "compat.h" +@@ -13,21 +13,75 @@ #include "pdb.h" -+/** + /** + * caam_priv_key_form - CAAM RSA private key representation + * CAAM RSA private key may have either of three forms. + * @@ -21428,7 +21371,7 @@ index f595d159..87ab75e9 100644 + FORM3 +}; + - /** ++/** * caam_rsa_key - CAAM RSA key structure. Keys are allocated in DMA zone. * @n : RSA modulus raw byte stream * @e : RSA public exponent raw byte stream @@ -21486,8 +21429,6 @@ index f595d159..87ab75e9 100644 +void init_rsa_priv_f3_desc(u32 *desc, struct rsa_priv_f3_pdb *pdb); #endif -diff --git a/drivers/crypto/caam/caamrng.c b/drivers/crypto/caam/caamrng.c -index 9b92af2c..fde07d4f 100644 --- a/drivers/crypto/caam/caamrng.c +++ b/drivers/crypto/caam/caamrng.c @@ -52,7 +52,7 @@ @@ -21499,7 +21440,7 @@ index 9b92af2c..fde07d4f 100644 /* Buffer, its dma address and lock */ struct buf_data { -@@ -100,8 +100,7 @@ static void rng_done(struct device *jrdev, u32 *desc, u32 err, void *context) +@@ -100,8 +100,7 @@ static void rng_done(struct device *jrde { struct buf_data *bd; @@ -21509,7 +21450,7 @@ index 9b92af2c..fde07d4f 100644 if (err) caam_jr_strstatus(jrdev, err); -@@ -196,9 +195,6 @@ static inline int rng_create_sh_desc(struct caam_rng_ctx *ctx) +@@ -196,9 +195,6 @@ static inline int rng_create_sh_desc(str init_sh_desc(desc, HDR_SHARE_SERIAL); @@ -21519,7 +21460,7 @@ index 9b92af2c..fde07d4f 100644 /* Generate random bytes */ append_operation(desc, OP_ALG_ALGSEL_RNG | OP_TYPE_CLASS1_ALG); -@@ -289,11 +285,7 @@ static int caam_init_rng(struct caam_rng_ctx *ctx, struct device *jrdev) +@@ -289,11 +285,7 @@ static int caam_init_rng(struct caam_rng if (err) return err; @@ -21541,8 +21482,6 @@ index 9b92af2c..fde07d4f 100644 if (!rng_ctx) { err = -ENOMEM; goto free_caam_alloc; -diff --git a/drivers/crypto/caam/compat.h b/drivers/crypto/caam/compat.h -index 7149cd24..4e084f51 100644 --- a/drivers/crypto/caam/compat.h +++ b/drivers/crypto/caam/compat.h @@ -16,6 +16,7 @@ @@ -21553,8 +21492,6 @@ index 7149cd24..4e084f51 100644 #include #include #include -diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c -index 98468b96..8f9642c6 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c @@ -2,40 +2,41 @@ @@ -21609,7 +21546,7 @@ index 98468b96..8f9642c6 100644 /* * Descriptor to instantiate RNG State Handle 0 in normal mode and -@@ -270,7 +271,7 @@ static int deinstantiate_rng(struct device *ctrldev, int state_handle_mask) +@@ -270,7 +271,7 @@ static int deinstantiate_rng(struct devi /* * If the corresponding bit is set, then it means the state * handle was initialized by us, and thus it needs to be @@ -21618,7 +21555,7 @@ index 98468b96..8f9642c6 100644 */ if ((1 << sh_idx) & state_handle_mask) { /* -@@ -303,20 +304,24 @@ static int caam_remove(struct platform_device *pdev) +@@ -303,20 +304,24 @@ static int caam_remove(struct platform_d struct device *ctrldev; struct caam_drv_private *ctrlpriv; struct caam_ctrl __iomem *ctrl; @@ -21651,7 +21588,7 @@ index 98468b96..8f9642c6 100644 deinstantiate_rng(ctrldev, ctrlpriv->rng4_sh_init); /* Shut down debug views */ -@@ -331,8 +336,8 @@ static int caam_remove(struct platform_device *pdev) +@@ -331,8 +336,8 @@ static int caam_remove(struct platform_d clk_disable_unprepare(ctrlpriv->caam_ipg); clk_disable_unprepare(ctrlpriv->caam_mem); clk_disable_unprepare(ctrlpriv->caam_aclk); @@ -21662,7 +21599,7 @@ index 98468b96..8f9642c6 100644 return 0; } -@@ -366,11 +371,8 @@ static void kick_trng(struct platform_device *pdev, int ent_delay) +@@ -366,11 +371,8 @@ static void kick_trng(struct platform_de */ val = (rd_reg32(&r4tst->rtsdctl) & RTSDCTL_ENT_DLY_MASK) >> RTSDCTL_ENT_DLY_SHIFT; @@ -21676,7 +21613,7 @@ index 98468b96..8f9642c6 100644 val = rd_reg32(&r4tst->rtsdctl); val = (val & ~RTSDCTL_ENT_DLY_MASK) | -@@ -382,15 +384,12 @@ static void kick_trng(struct platform_device *pdev, int ent_delay) +@@ -382,15 +384,12 @@ static void kick_trng(struct platform_de wr_reg32(&r4tst->rtfrqmax, RTFRQMAX_DISABLE); /* read the control register */ val = rd_reg32(&r4tst->rtmctl); @@ -21739,7 +21676,7 @@ index 98468b96..8f9642c6 100644 struct device *dev; struct device_node *nprop, *np; struct caam_ctrl __iomem *ctrl; -@@ -452,9 +449,10 @@ static int caam_probe(struct platform_device *pdev) +@@ -452,9 +449,10 @@ static int caam_probe(struct platform_de dev = &pdev->dev; dev_set_drvdata(dev, ctrlpriv); @@ -21751,7 +21688,7 @@ index 98468b96..8f9642c6 100644 /* Enable clocking */ clk = caam_drv_identify_clk(&pdev->dev, "ipg"); if (IS_ERR(clk)) { -@@ -483,14 +481,16 @@ static int caam_probe(struct platform_device *pdev) +@@ -483,14 +481,16 @@ static int caam_probe(struct platform_de } ctrlpriv->caam_aclk = clk; @@ -21775,7 +21712,7 @@ index 98468b96..8f9642c6 100644 ret = clk_prepare_enable(ctrlpriv->caam_ipg); if (ret < 0) { -@@ -511,11 +511,13 @@ static int caam_probe(struct platform_device *pdev) +@@ -511,11 +511,13 @@ static int caam_probe(struct platform_de goto disable_caam_mem; } @@ -21794,7 +21731,7 @@ index 98468b96..8f9642c6 100644 } /* Get configuration properties from device tree */ -@@ -542,13 +544,13 @@ static int caam_probe(struct platform_device *pdev) +@@ -542,13 +544,13 @@ static int caam_probe(struct platform_de else BLOCK_OFFSET = PG_SIZE_64K; @@ -21813,7 +21750,7 @@ index 98468b96..8f9642c6 100644 BLOCK_OFFSET * DECO_BLOCK_NUMBER ); -@@ -557,12 +559,17 @@ static int caam_probe(struct platform_device *pdev) +@@ -557,12 +559,17 @@ static int caam_probe(struct platform_de /* * Enable DECO watchdogs and, if this is a PHYS_ADDR_T_64BIT kernel, @@ -21836,7 +21773,7 @@ index 98468b96..8f9642c6 100644 /* * Read the Compile Time paramters and SCFGR to determine -@@ -590,64 +597,67 @@ static int caam_probe(struct platform_device *pdev) +@@ -590,64 +597,67 @@ static int caam_probe(struct platform_de JRSTART_JR1_START | JRSTART_JR2_START | JRSTART_JR3_START); @@ -21943,7 +21880,7 @@ index 98468b96..8f9642c6 100644 } /* If no QI and no rings specified, quit and go home */ -@@ -662,8 +672,10 @@ static int caam_probe(struct platform_device *pdev) +@@ -662,8 +672,10 @@ static int caam_probe(struct platform_de /* * If SEC has RNG version >= 4 and RNG state handle has not been * already instantiated, do RNG instantiation @@ -21955,7 +21892,7 @@ index 98468b96..8f9642c6 100644 ctrlpriv->rng4_sh_init = rd_reg32(&ctrl->r4tst[0].rdsta); /* -@@ -731,77 +743,46 @@ static int caam_probe(struct platform_device *pdev) +@@ -731,77 +743,46 @@ static int caam_probe(struct platform_de /* Report "alive" for developer to see */ dev_info(dev, "device ID = 0x%016llx (Era %d)\n", caam_id, caam_get_era()); @@ -22067,7 +22004,7 @@ index 98468b96..8f9642c6 100644 ctrlpriv->ctl_kek_wrap.size = KEK_KEY_SIZE * sizeof(u32); ctrlpriv->ctl_kek = debugfs_create_blob("kek", S_IRUSR | -@@ -809,7 +790,7 @@ static int caam_probe(struct platform_device *pdev) +@@ -809,7 +790,7 @@ static int caam_probe(struct platform_de ctrlpriv->ctl, &ctrlpriv->ctl_kek_wrap); @@ -22076,7 +22013,7 @@ index 98468b96..8f9642c6 100644 ctrlpriv->ctl_tkek_wrap.size = KEK_KEY_SIZE * sizeof(u32); ctrlpriv->ctl_tkek = debugfs_create_blob("tkek", S_IRUSR | -@@ -817,7 +798,7 @@ static int caam_probe(struct platform_device *pdev) +@@ -817,7 +798,7 @@ static int caam_probe(struct platform_de ctrlpriv->ctl, &ctrlpriv->ctl_tkek_wrap); @@ -22085,7 +22022,7 @@ index 98468b96..8f9642c6 100644 ctrlpriv->ctl_tdsk_wrap.size = KEK_KEY_SIZE * sizeof(u32); ctrlpriv->ctl_tdsk = debugfs_create_blob("tdsk", S_IRUSR | -@@ -828,13 +809,17 @@ static int caam_probe(struct platform_device *pdev) +@@ -828,13 +809,17 @@ static int caam_probe(struct platform_de return 0; caam_remove: @@ -22104,7 +22041,7 @@ index 98468b96..8f9642c6 100644 disable_caam_aclk: clk_disable_unprepare(ctrlpriv->caam_aclk); disable_caam_mem: -@@ -844,17 +829,6 @@ static int caam_probe(struct platform_device *pdev) +@@ -844,17 +829,6 @@ disable_caam_ipg: return ret; } @@ -22122,8 +22059,6 @@ index 98468b96..8f9642c6 100644 static struct platform_driver caam_driver = { .driver = { .name = "caam", -diff --git a/drivers/crypto/caam/ctrl.h b/drivers/crypto/caam/ctrl.h -index cac5402a..7e7bf68c 100644 --- a/drivers/crypto/caam/ctrl.h +++ b/drivers/crypto/caam/ctrl.h @@ -10,4 +10,6 @@ @@ -22133,8 +22068,6 @@ index cac5402a..7e7bf68c 100644 +extern bool caam_dpaa2; + #endif /* CTRL_H */ -diff --git a/drivers/crypto/caam/desc.h b/drivers/crypto/caam/desc.h -index 513b6646..a8c3be73 100644 --- a/drivers/crypto/caam/desc.h +++ b/drivers/crypto/caam/desc.h @@ -22,12 +22,6 @@ @@ -22280,8 +22213,6 @@ index 513b6646..a8c3be73 100644 +#define CCTRL_UNLOAD_SBOX 0x10000000 + #endif /* DESC_H */ -diff --git a/drivers/crypto/caam/desc_constr.h b/drivers/crypto/caam/desc_constr.h -index a8cd8a78..2d9dbeca 100644 --- a/drivers/crypto/caam/desc_constr.h +++ b/drivers/crypto/caam/desc_constr.h @@ -4,6 +4,9 @@ @@ -22341,7 +22272,7 @@ index a8cd8a78..2d9dbeca 100644 { u32 pdb_len = (pdb_bytes + CAAM_CMD_SZ - 1) / CAAM_CMD_SZ; -@@ -72,19 +76,20 @@ static inline void init_sh_desc_pdb(u32 *desc, u32 options, size_t pdb_bytes) +@@ -72,19 +76,20 @@ static inline void init_sh_desc_pdb(u32 options); } @@ -22365,7 +22296,7 @@ index a8cd8a78..2d9dbeca 100644 { dma_addr_t *offset = (dma_addr_t *)desc_end(desc); -@@ -94,8 +99,8 @@ static inline void append_ptr(u32 *desc, dma_addr_t ptr) +@@ -94,8 +99,8 @@ static inline void append_ptr(u32 *desc, CAAM_PTR_SZ / CAAM_CMD_SZ); } @@ -22376,7 +22307,7 @@ index a8cd8a78..2d9dbeca 100644 { PRINT_POS; init_job_desc(desc, HDR_SHARED | options | -@@ -103,7 +108,7 @@ static inline void init_job_desc_shared(u32 *desc, dma_addr_t ptr, int len, +@@ -103,7 +108,7 @@ static inline void init_job_desc_shared( append_ptr(desc, ptr); } @@ -22385,7 +22316,7 @@ index a8cd8a78..2d9dbeca 100644 { u32 *offset = desc_end(desc); -@@ -114,7 +119,7 @@ static inline void append_data(u32 *desc, void *data, int len) +@@ -114,7 +119,7 @@ static inline void append_data(u32 *desc (len + CAAM_CMD_SZ - 1) / CAAM_CMD_SZ); } @@ -22394,7 +22325,7 @@ index a8cd8a78..2d9dbeca 100644 { u32 *cmd = desc_end(desc); -@@ -125,7 +130,7 @@ static inline void append_cmd(u32 *desc, u32 command) +@@ -125,7 +130,7 @@ static inline void append_cmd(u32 *desc, #define append_u32 append_cmd @@ -22403,7 +22334,7 @@ index a8cd8a78..2d9dbeca 100644 { u32 *offset = desc_end(desc); -@@ -142,14 +147,14 @@ static inline void append_u64(u32 *desc, u64 data) +@@ -142,14 +147,14 @@ static inline void append_u64(u32 *desc, } /* Write command without affecting header, and return pointer to next word */ @@ -22420,7 +22351,7 @@ index a8cd8a78..2d9dbeca 100644 u32 command) { append_cmd(desc, command | len); -@@ -157,7 +162,7 @@ static inline void append_cmd_ptr(u32 *desc, dma_addr_t ptr, int len, +@@ -157,7 +162,7 @@ static inline void append_cmd_ptr(u32 *d } /* Write length after pointer, rather than inside command */ @@ -22429,7 +22360,7 @@ index a8cd8a78..2d9dbeca 100644 unsigned int len, u32 command) { append_cmd(desc, command); -@@ -166,7 +171,7 @@ static inline void append_cmd_ptr_extlen(u32 *desc, dma_addr_t ptr, +@@ -166,7 +171,7 @@ static inline void append_cmd_ptr_extlen append_cmd(desc, len); } @@ -22438,7 +22369,7 @@ index a8cd8a78..2d9dbeca 100644 u32 command) { append_cmd(desc, command | IMMEDIATE | len); -@@ -174,7 +179,7 @@ static inline void append_cmd_data(u32 *desc, void *data, int len, +@@ -174,7 +179,7 @@ static inline void append_cmd_data(u32 * } #define APPEND_CMD_RET(cmd, op) \ @@ -22447,7 +22378,7 @@ index a8cd8a78..2d9dbeca 100644 { \ u32 *cmd = desc_end(desc); \ PRINT_POS; \ -@@ -183,14 +188,15 @@ static inline u32 *append_##cmd(u32 *desc, u32 options) \ +@@ -183,14 +188,15 @@ static inline u32 *append_##cmd(u32 *des } APPEND_CMD_RET(jump, JUMP) APPEND_CMD_RET(move, MOVE) @@ -22465,7 +22396,7 @@ index a8cd8a78..2d9dbeca 100644 { u32 val = caam32_to_cpu(*move_cmd); -@@ -200,7 +206,7 @@ static inline void set_move_tgt_here(u32 *desc, u32 *move_cmd) +@@ -200,7 +206,7 @@ static inline void set_move_tgt_here(u32 } #define APPEND_CMD(cmd, op) \ @@ -22474,7 +22405,7 @@ index a8cd8a78..2d9dbeca 100644 { \ PRINT_POS; \ append_cmd(desc, CMD_##op | options); \ -@@ -208,7 +214,8 @@ static inline void append_##cmd(u32 *desc, u32 options) \ +@@ -208,7 +214,8 @@ static inline void append_##cmd(u32 *des APPEND_CMD(operation, OPERATION) #define APPEND_CMD_LEN(cmd, op) \ @@ -22484,7 +22415,7 @@ index a8cd8a78..2d9dbeca 100644 { \ PRINT_POS; \ append_cmd(desc, CMD_##op | len | options); \ -@@ -220,8 +227,8 @@ APPEND_CMD_LEN(seq_fifo_load, SEQ_FIFO_LOAD) +@@ -220,8 +227,8 @@ APPEND_CMD_LEN(seq_fifo_load, SEQ_FIFO_L APPEND_CMD_LEN(seq_fifo_store, SEQ_FIFO_STORE) #define APPEND_CMD_PTR(cmd, op) \ @@ -22506,7 +22437,7 @@ index a8cd8a78..2d9dbeca 100644 { u32 cmd_src; -@@ -249,7 +256,8 @@ static inline void append_store(u32 *desc, dma_addr_t ptr, unsigned int len, +@@ -249,7 +256,8 @@ static inline void append_store(u32 *des } #define APPEND_SEQ_PTR_INTLEN(cmd, op) \ @@ -22534,7 +22465,7 @@ index a8cd8a78..2d9dbeca 100644 unsigned int len, u32 options) \ { \ PRINT_POS; \ -@@ -287,7 +295,7 @@ APPEND_CMD_PTR_EXTLEN(seq_out_ptr, SEQ_OUT_PTR) +@@ -287,7 +295,7 @@ APPEND_CMD_PTR_EXTLEN(seq_out_ptr, SEQ_O * the size of its type */ #define APPEND_CMD_PTR_LEN(cmd, op, type) \ @@ -22543,7 +22474,7 @@ index a8cd8a78..2d9dbeca 100644 type len, u32 options) \ { \ PRINT_POS; \ -@@ -304,7 +312,7 @@ APPEND_CMD_PTR_LEN(seq_out_ptr, SEQ_OUT_PTR, u32) +@@ -304,7 +312,7 @@ APPEND_CMD_PTR_LEN(seq_out_ptr, SEQ_OUT_ * from length of immediate data provided, e.g., split keys */ #define APPEND_CMD_PTR_TO_IMM2(cmd, op) \ @@ -22552,7 +22483,7 @@ index a8cd8a78..2d9dbeca 100644 unsigned int data_len, \ unsigned int len, u32 options) \ { \ -@@ -315,7 +323,7 @@ static inline void append_##cmd##_as_imm(u32 *desc, void *data, \ +@@ -315,7 +323,7 @@ static inline void append_##cmd##_as_imm APPEND_CMD_PTR_TO_IMM2(key, KEY); #define APPEND_CMD_RAW_IMM(cmd, op, type) \ @@ -22628,9 +22559,6 @@ index a8cd8a78..2d9dbeca 100644 +} + +#endif /* DESC_CONSTR_H */ -diff --git a/drivers/crypto/caam/dpseci.c b/drivers/crypto/caam/dpseci.c -new file mode 100644 -index 00000000..410cd790 --- /dev/null +++ b/drivers/crypto/caam/dpseci.c @@ -0,0 +1,859 @@ @@ -23493,9 +23421,6 @@ index 00000000..410cd790 + + return 0; +} -diff --git a/drivers/crypto/caam/dpseci.h b/drivers/crypto/caam/dpseci.h -new file mode 100644 -index 00000000..d37489c6 --- /dev/null +++ b/drivers/crypto/caam/dpseci.h @@ -0,0 +1,395 @@ @@ -23894,9 +23819,6 @@ index 00000000..d37489c6 + u16 token, struct dpseci_congestion_notification_cfg *cfg); + +#endif /* _DPSECI_H_ */ -diff --git a/drivers/crypto/caam/dpseci_cmd.h b/drivers/crypto/caam/dpseci_cmd.h -new file mode 100644 -index 00000000..7624315e --- /dev/null +++ b/drivers/crypto/caam/dpseci_cmd.h @@ -0,0 +1,261 @@ @@ -24161,8 +24083,6 @@ index 00000000..7624315e +}; + +#endif /* _DPSECI_CMD_H_ */ -diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c -index 33e41ea8..31963397 100644 --- a/drivers/crypto/caam/error.c +++ b/drivers/crypto/caam/error.c @@ -6,11 +6,54 @@ @@ -24277,7 +24197,7 @@ index 33e41ea8..31963397 100644 static const char * const cha_id_list[] = { "", "AES", -@@ -146,10 +237,9 @@ static void report_ccb_status(struct device *jrdev, const u32 status, +@@ -146,10 +237,9 @@ static void report_ccb_status(struct dev strlen(rng_err_id_list[err_id])) { /* RNG-only error */ err_str = rng_err_id_list[err_id]; @@ -24290,7 +24210,7 @@ index 33e41ea8..31963397 100644 /* * CCB ICV check failures are part of normal operation life; -@@ -198,6 +288,27 @@ static void report_deco_status(struct device *jrdev, const u32 status, +@@ -198,6 +288,27 @@ static void report_deco_status(struct de status, error, idx_str, idx, err_str, err_err_code); } @@ -24318,7 +24238,7 @@ index 33e41ea8..31963397 100644 static void report_jr_status(struct device *jrdev, const u32 status, const char *error) { -@@ -212,7 +323,7 @@ static void report_cond_code_status(struct device *jrdev, const u32 status, +@@ -212,7 +323,7 @@ static void report_cond_code_status(stru status, error, __func__); } @@ -24327,7 +24247,7 @@ index 33e41ea8..31963397 100644 { static const struct stat_src { void (*report_ssed)(struct device *jrdev, const u32 status, -@@ -224,7 +335,7 @@ void caam_jr_strstatus(struct device *jrdev, u32 status) +@@ -224,7 +335,7 @@ void caam_jr_strstatus(struct device *jr { report_ccb_status, "CCB" }, { report_jump_status, "Jump" }, { report_deco_status, "DECO" }, @@ -24336,14 +24256,12 @@ index 33e41ea8..31963397 100644 { report_jr_status, "Job Ring" }, { report_cond_code_status, "Condition Code" }, { NULL, NULL }, -@@ -250,4 +361,4 @@ void caam_jr_strstatus(struct device *jrdev, u32 status) +@@ -250,4 +361,4 @@ void caam_jr_strstatus(struct device *jr else dev_err(jrdev, "%d: unknown error source\n", ssrc); } -EXPORT_SYMBOL(caam_jr_strstatus); +EXPORT_SYMBOL(caam_strstatus); -diff --git a/drivers/crypto/caam/error.h b/drivers/crypto/caam/error.h -index b6350b0d..751ddcac 100644 --- a/drivers/crypto/caam/error.h +++ b/drivers/crypto/caam/error.h @@ -7,5 +7,13 @@ @@ -24361,8 +24279,6 @@ index b6350b0d..751ddcac 100644 + int rowsize, int groupsize, struct scatterlist *sg, + size_t tlen, bool ascii); #endif /* CAAM_ERROR_H */ -diff --git a/drivers/crypto/caam/intern.h b/drivers/crypto/caam/intern.h -index 5d4c0507..a5236125 100644 --- a/drivers/crypto/caam/intern.h +++ b/drivers/crypto/caam/intern.h @@ -41,6 +41,7 @@ struct caam_drv_private_jr { @@ -24422,8 +24338,6 @@ index 5d4c0507..a5236125 100644 +#endif + #endif /* INTERN_H */ -diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c -index 757c27f9..00e87094 100644 --- a/drivers/crypto/caam/jr.c +++ b/drivers/crypto/caam/jr.c @@ -9,6 +9,7 @@ @@ -24449,7 +24363,7 @@ index 757c27f9..00e87094 100644 static int caam_reset_hw_jr(struct device *dev) { struct caam_drv_private_jr *jrp = dev_get_drvdata(dev); -@@ -73,6 +82,8 @@ static int caam_jr_shutdown(struct device *dev) +@@ -73,6 +82,8 @@ static int caam_jr_shutdown(struct devic ret = caam_reset_hw_jr(dev); @@ -24458,7 +24372,7 @@ index 757c27f9..00e87094 100644 /* Release interrupt */ free_irq(jrp->irq, dev); -@@ -116,6 +127,8 @@ static int caam_jr_remove(struct platform_device *pdev) +@@ -116,6 +127,8 @@ static int caam_jr_remove(struct platfor dev_err(jrdev, "Failed to shut down job ring\n"); irq_dispose_mapping(jrpriv->irq); @@ -24467,7 +24381,7 @@ index 757c27f9..00e87094 100644 return ret; } -@@ -128,7 +141,7 @@ static irqreturn_t caam_jr_interrupt(int irq, void *st_dev) +@@ -128,7 +141,7 @@ static irqreturn_t caam_jr_interrupt(int /* * Check the output ring for ready responses, kick @@ -24476,7 +24390,7 @@ index 757c27f9..00e87094 100644 */ irqstate = rd_reg32(&jrp->rregs->jrintstatus); if (!irqstate) -@@ -150,13 +163,18 @@ static irqreturn_t caam_jr_interrupt(int irq, void *st_dev) +@@ -150,13 +163,18 @@ static irqreturn_t caam_jr_interrupt(int /* Have valid interrupt at this point, just ACK and trigger */ wr_reg32(&jrp->rregs->jrintstatus, irqstate); @@ -24498,7 +24412,7 @@ index 757c27f9..00e87094 100644 struct caam_drv_private_jr *jrp = dev_get_drvdata(dev); void (*usercall)(struct device *dev, u32 *desc, u32 status, void *arg); u32 *userdesc, userstatus; -@@ -230,8 +248,6 @@ static irqreturn_t caam_jr_threadirq(int irq, void *st_dev) +@@ -230,8 +248,6 @@ static irqreturn_t caam_jr_threadirq(int /* reenable / unmask IRQs */ clrsetbits_32(&jrp->rregs->rconfig_lo, JRCFG_IMSK, 0); @@ -24507,11 +24421,10 @@ index 757c27f9..00e87094 100644 } /** -@@ -274,6 +290,36 @@ struct device *caam_jr_alloc(void) - } +@@ -275,6 +291,36 @@ struct device *caam_jr_alloc(void) EXPORT_SYMBOL(caam_jr_alloc); -+/** + /** + * caam_jridx_alloc() - Alloc a specific job ring based on its index. + * + * returns : pointer to the newly allocated physical @@ -24541,10 +24454,11 @@ index 757c27f9..00e87094 100644 +} +EXPORT_SYMBOL(caam_jridx_alloc); + - /** ++/** * caam_jr_free() - Free the Job Ring * @rdev - points to the dev that identifies the Job ring to -@@ -389,10 +435,11 @@ static int caam_jr_init(struct device *dev) + * be released. +@@ -389,10 +435,11 @@ static int caam_jr_init(struct device *d jrp = dev_get_drvdata(dev); @@ -24559,7 +24473,7 @@ index 757c27f9..00e87094 100644 if (error) { dev_err(dev, "can't connect JobR %d interrupt (%d)\n", jrp->ridx, jrp->irq); -@@ -454,6 +501,7 @@ static int caam_jr_init(struct device *dev) +@@ -454,6 +501,7 @@ out_free_inpring: out_free_irq: free_irq(jrp->irq, dev); out_kill_deq: @@ -24567,7 +24481,7 @@ index 757c27f9..00e87094 100644 return error; } -@@ -489,15 +537,28 @@ static int caam_jr_probe(struct platform_device *pdev) +@@ -489,15 +537,28 @@ static int caam_jr_probe(struct platform return -ENOMEM; } @@ -24603,7 +24517,7 @@ index 757c27f9..00e87094 100644 /* Identify the interrupt */ jrpriv->irq = irq_of_parse_and_map(nprop, 0); -@@ -517,10 +578,12 @@ static int caam_jr_probe(struct platform_device *pdev) +@@ -517,10 +578,12 @@ static int caam_jr_probe(struct platform atomic_set(&jrpriv->tfm_count, 0); @@ -24617,8 +24531,6 @@ index 757c27f9..00e87094 100644 { .compatible = "fsl,sec-v4.0-job-ring", }, -diff --git a/drivers/crypto/caam/jr.h b/drivers/crypto/caam/jr.h -index 97113a6d..ee4d31c9 100644 --- a/drivers/crypto/caam/jr.h +++ b/drivers/crypto/caam/jr.h @@ -8,7 +8,9 @@ @@ -24631,11 +24543,9 @@ index 97113a6d..ee4d31c9 100644 void caam_jr_free(struct device *rdev); int caam_jr_enqueue(struct device *dev, u32 *desc, void (*cbk)(struct device *dev, u32 *desc, u32 status, -diff --git a/drivers/crypto/caam/key_gen.c b/drivers/crypto/caam/key_gen.c -index 3ce1d5cd..a523ed77 100644 --- a/drivers/crypto/caam/key_gen.c +++ b/drivers/crypto/caam/key_gen.c -@@ -41,15 +41,29 @@ Split key generation----------------------------------------------- +@@ -41,15 +41,29 @@ Split key generation-------------------- [06] 0x64260028 fifostr: class2 mdsplit-jdk len=40 @0xffe04000 */ @@ -24668,7 +24578,7 @@ index 3ce1d5cd..a523ed77 100644 desc = kmalloc(CAAM_CMD_SZ * 6 + CAAM_PTR_SZ * 2, GFP_KERNEL | GFP_DMA); if (!desc) { dev_err(jrdev, "unable to allocate key input memory\n"); -@@ -63,7 +77,7 @@ int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, +@@ -63,7 +77,7 @@ int gen_split_key(struct device *jrdev, goto out_free; } @@ -24677,7 +24587,7 @@ index 3ce1d5cd..a523ed77 100644 DMA_FROM_DEVICE); if (dma_mapping_error(jrdev, dma_addr_out)) { dev_err(jrdev, "unable to map key output memory\n"); -@@ -74,7 +88,9 @@ int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, +@@ -74,7 +88,9 @@ int gen_split_key(struct device *jrdev, append_key(desc, dma_addr_in, keylen, CLASS_2 | KEY_DEST_CLASS_REG); /* Sets MDHA up into an HMAC-INIT */ @@ -24688,7 +24598,7 @@ index 3ce1d5cd..a523ed77 100644 /* * do a FIFO_LOAD of zero, this will trigger the internal key expansion -@@ -87,7 +103,7 @@ int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, +@@ -87,7 +103,7 @@ int gen_split_key(struct device *jrdev, * FIFO_STORE with the explicit split-key content store * (0x26 output type) */ @@ -24697,7 +24607,7 @@ index 3ce1d5cd..a523ed77 100644 LDST_CLASS_2_CCB | FIFOST_TYPE_SPLIT_KEK); #ifdef DEBUG -@@ -108,11 +124,11 @@ int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, +@@ -108,11 +124,11 @@ int gen_split_key(struct device *jrdev, #ifdef DEBUG print_hex_dump(KERN_ERR, "ctx.key@"__stringify(__LINE__)": ", DUMP_PREFIX_ADDRESS, 16, 4, key_out, @@ -24711,8 +24621,6 @@ index 3ce1d5cd..a523ed77 100644 DMA_FROM_DEVICE); out_unmap_in: dma_unmap_single(jrdev, dma_addr_in, keylen, DMA_TO_DEVICE); -diff --git a/drivers/crypto/caam/key_gen.h b/drivers/crypto/caam/key_gen.h -index c5588f6d..851a7c86 100644 --- a/drivers/crypto/caam/key_gen.h +++ b/drivers/crypto/caam/key_gen.h @@ -5,6 +5,36 @@ @@ -24762,8 +24670,6 @@ index c5588f6d..851a7c86 100644 +int gen_split_key(struct device *jrdev, u8 *key_out, + struct alginfo * const adata, const u8 *key_in, u32 keylen, + int max_keylen); -diff --git a/drivers/crypto/caam/pdb.h b/drivers/crypto/caam/pdb.h -index aaa00dd1..31e59963 100644 --- a/drivers/crypto/caam/pdb.h +++ b/drivers/crypto/caam/pdb.h @@ -483,6 +483,8 @@ struct dsa_verify_pdb { @@ -24847,11 +24753,9 @@ index aaa00dd1..31e59963 100644 +} __packed; + #endif -diff --git a/drivers/crypto/caam/pkc_desc.c b/drivers/crypto/caam/pkc_desc.c -index 4e4183e6..9e2ce6fe 100644 --- a/drivers/crypto/caam/pkc_desc.c +++ b/drivers/crypto/caam/pkc_desc.c -@@ -34,3 +34,39 @@ void init_rsa_priv_f1_desc(u32 *desc, struct rsa_priv_f1_pdb *pdb) +@@ -34,3 +34,39 @@ void init_rsa_priv_f1_desc(u32 *desc, st append_operation(desc, OP_TYPE_UNI_PROTOCOL | OP_PCLID_RSADEC_PRVKEY | RSA_PRIV_KEY_FRM_1); } @@ -24891,9 +24795,6 @@ index 4e4183e6..9e2ce6fe 100644 + append_operation(desc, OP_TYPE_UNI_PROTOCOL | OP_PCLID_RSADEC_PRVKEY | + RSA_PRIV_KEY_FRM_3); +} -diff --git a/drivers/crypto/caam/qi.c b/drivers/crypto/caam/qi.c -new file mode 100644 -index 00000000..48185d55 --- /dev/null +++ b/drivers/crypto/caam/qi.c @@ -0,0 +1,797 @@ @@ -25694,9 +25595,6 @@ index 00000000..48185d55 + dev_info(qidev, "Linux CAAM Queue I/F driver initialised\n"); + return 0; +} -diff --git a/drivers/crypto/caam/qi.h b/drivers/crypto/caam/qi.h -new file mode 100644 -index 00000000..0c2e68b3 --- /dev/null +++ b/drivers/crypto/caam/qi.h @@ -0,0 +1,204 @@ @@ -25904,8 +25802,6 @@ index 00000000..0c2e68b3 +void qi_cache_free(void *obj); + +#endif /* __QI_H__ */ -diff --git a/drivers/crypto/caam/regs.h b/drivers/crypto/caam/regs.h -index 84d2f838..74eb8c6c 100644 --- a/drivers/crypto/caam/regs.h +++ b/drivers/crypto/caam/regs.h @@ -2,6 +2,7 @@ @@ -25924,7 +25820,7 @@ index 84d2f838..74eb8c6c 100644 #define caam_to_cpu(len) \ static inline u##len caam##len ## _to_cpu(u##len val) \ -@@ -154,13 +156,10 @@ static inline u64 rd_reg64(void __iomem *reg) +@@ -154,13 +156,10 @@ static inline u64 rd_reg64(void __iomem #else /* CONFIG_64BIT */ static inline void wr_reg64(void __iomem *reg, u64 data) { @@ -25940,7 +25836,7 @@ index 84d2f838..74eb8c6c 100644 wr_reg32((u32 __iomem *)(reg), data >> 32); wr_reg32((u32 __iomem *)(reg) + 1, data); } -@@ -168,41 +167,40 @@ static inline void wr_reg64(void __iomem *reg, u64 data) +@@ -168,41 +167,40 @@ static inline void wr_reg64(void __iomem static inline u64 rd_reg64(void __iomem *reg) { @@ -26024,9 +25920,6 @@ index 84d2f838..74eb8c6c 100644 #define JRSTA_CCBERR_JUMP 0x08000000 #define JRSTA_CCBERR_INDEX_MASK 0xff00 #define JRSTA_CCBERR_INDEX_SHIFT 8 -diff --git a/drivers/crypto/caam/sg_sw_qm.h b/drivers/crypto/caam/sg_sw_qm.h -new file mode 100644 -index 00000000..3b3cabc4 --- /dev/null +++ b/drivers/crypto/caam/sg_sw_qm.h @@ -0,0 +1,126 @@ @@ -26156,9 +26049,6 @@ index 00000000..3b3cabc4 +} + +#endif /* __SG_SW_QM_H */ -diff --git a/drivers/crypto/caam/sg_sw_qm2.h b/drivers/crypto/caam/sg_sw_qm2.h -new file mode 100644 -index 00000000..31b44075 --- /dev/null +++ b/drivers/crypto/caam/sg_sw_qm2.h @@ -0,0 +1,81 @@ @@ -26243,8 +26133,6 @@ index 00000000..31b44075 +} + +#endif /* _SG_SW_QM2_H_ */ -diff --git a/drivers/crypto/caam/sg_sw_sec4.h b/drivers/crypto/caam/sg_sw_sec4.h -index 41cd5a35..936b1b63 100644 --- a/drivers/crypto/caam/sg_sw_sec4.h +++ b/drivers/crypto/caam/sg_sw_sec4.h @@ -5,9 +5,19 @@ @@ -26287,7 +26175,7 @@ index 41cd5a35..936b1b63 100644 #ifdef DEBUG print_hex_dump(KERN_ERR, "sec4_sg_ptr@: ", DUMP_PREFIX_ADDRESS, 16, 4, sec4_sg_ptr, -@@ -43,6 +59,14 @@ sg_to_sec4_sg(struct scatterlist *sg, int sg_count, +@@ -43,6 +59,14 @@ sg_to_sec4_sg(struct scatterlist *sg, in return sec4_sg_ptr - 1; } @@ -26302,7 +26190,7 @@ index 41cd5a35..936b1b63 100644 /* * convert scatterlist to h/w link table format * scatterlist must have been previously dma mapped -@@ -52,31 +76,7 @@ static inline void sg_to_sec4_sg_last(struct scatterlist *sg, int sg_count, +@@ -52,31 +76,7 @@ static inline void sg_to_sec4_sg_last(st u16 offset) { sec4_sg_ptr = sg_to_sec4_sg(sg, sg_count, sec4_sg_ptr, offset); @@ -26336,11 +26224,9 @@ index 41cd5a35..936b1b63 100644 - return sg_nents; -} +#endif /* _SG_SW_SEC4_H_ */ -diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c -index ef5d394f..cc8deece 100644 --- a/drivers/net/wireless/rsi/rsi_91x_usb.c +++ b/drivers/net/wireless/rsi/rsi_91x_usb.c -@@ -516,7 +516,7 @@ static int rsi_probe(struct usb_interface *pfunction, +@@ -516,7 +516,7 @@ err: /** * rsi_disconnect() - This function performs the reverse of the probe function, @@ -26349,11 +26235,9 @@ index ef5d394f..cc8deece 100644 * @pfunction: Pointer to the USB interface structure. * * Return: None. -diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c -index defffa75..ec88ed9c 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c -@@ -211,7 +211,7 @@ static void deinit_irq(struct net_device *dev) +@@ -211,7 +211,7 @@ static void deinit_irq(struct net_device vif = netdev_priv(dev); wilc = vif->wilc; @@ -26362,11 +26246,9 @@ index defffa75..ec88ed9c 100644 if (wilc->dev_irq_num) { free_irq(wilc->dev_irq_num, wilc); gpio_free(wilc->gpio); -diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c -index 60d8b055..02d3e721 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c -@@ -2359,7 +2359,7 @@ int wilc_deinit_host_int(struct net_device *net) +@@ -2359,7 +2359,7 @@ int wilc_deinit_host_int(struct net_devi del_timer_sync(&wilc_during_ip_timer); if (s32Error) @@ -26375,9 +26257,6 @@ index 60d8b055..02d3e721 100644 return s32Error; } -diff --git a/include/crypto/acompress.h b/include/crypto/acompress.h -new file mode 100644 -index 00000000..e328b524 --- /dev/null +++ b/include/crypto/acompress.h @@ -0,0 +1,269 @@ @@ -26650,9 +26529,6 @@ index 00000000..e328b524 +} + +#endif -diff --git a/include/crypto/internal/acompress.h b/include/crypto/internal/acompress.h -new file mode 100644 -index 00000000..1de2b5af --- /dev/null +++ b/include/crypto/internal/acompress.h @@ -0,0 +1,81 @@ @@ -26737,9 +26613,6 @@ index 00000000..1de2b5af +int crypto_unregister_acomp(struct acomp_alg *alg); + +#endif -diff --git a/include/crypto/internal/scompress.h b/include/crypto/internal/scompress.h -new file mode 100644 -index 00000000..3fda3c56 --- /dev/null +++ b/include/crypto/internal/scompress.h @@ -0,0 +1,136 @@ @@ -26879,8 +26752,6 @@ index 00000000..3fda3c56 +int crypto_unregister_scomp(struct scomp_alg *alg); + +#endif -diff --git a/include/linux/crypto.h b/include/linux/crypto.h -index 7cee5551..8348d83d 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -50,6 +50,8 @@ @@ -26900,8 +26771,6 @@ index 7cee5551..8348d83d 100644 #define CRYPTO_ALG_LARVAL 0x00000010 #define CRYPTO_ALG_DEAD 0x00000020 -diff --git a/include/uapi/linux/cryptouser.h b/include/uapi/linux/cryptouser.h -index 79b5ded2..11d21fce 100644 --- a/include/uapi/linux/cryptouser.h +++ b/include/uapi/linux/cryptouser.h @@ -46,6 +46,7 @@ enum crypto_attr_type_t { @@ -26922,8 +26791,6 @@ index 79b5ded2..11d21fce 100644 + #define CRYPTO_REPORT_MAXSIZE (sizeof(struct crypto_user_alg) + \ sizeof(struct crypto_report_blkcipher)) -diff --git a/scripts/spelling.txt b/scripts/spelling.txt -index 163c720d..8392f89c 100644 --- a/scripts/spelling.txt +++ b/scripts/spelling.txt @@ -305,6 +305,9 @@ defintion||definition @@ -26936,11 +26803,9 @@ index 163c720d..8392f89c 100644 deivce||device delared||declared delare||declare -diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c -index 504c7cd7..d8577374 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c -@@ -506,7 +506,7 @@ static int acp_init(void __iomem *acp_mmio) +@@ -506,7 +506,7 @@ static int acp_init(void __iomem *acp_mm return 0; } @@ -26949,6 +26814,3 @@ index 504c7cd7..d8577374 100644 static int acp_deinit(void __iomem *acp_mmio) { u32 val; --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/805-dma-support-layerscape.patch b/target/linux/layerscape/patches-4.9/805-dma-support-layerscape.patch index 0df88bfca6..94f0a3444e 100644 --- a/target/linux/layerscape/patches-4.9/805-dma-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/805-dma-support-layerscape.patch @@ -30,8 +30,6 @@ Signed-off-by: Yangbo Lu create mode 100644 drivers/dma/dpaa2-qdma/fsl_dpdmai_cmd.h create mode 100644 drivers/dma/fsl-qdma.c -diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig -index 141aefbe..8caaf091 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -192,6 +192,20 @@ config FSL_EDMA @@ -79,8 +77,6 @@ index 141aefbe..8caaf091 100644 # driver files source "drivers/dma/bestcomm/Kconfig" -diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile -index e4dc9cac..a694da0e 100644 --- a/drivers/dma/Makefile +++ b/drivers/dma/Makefile @@ -29,6 +29,8 @@ obj-$(CONFIG_DW_DMAC_CORE) += dw/ @@ -92,7 +88,7 @@ index e4dc9cac..a694da0e 100644 obj-$(CONFIG_FSL_RAID) += fsl_raid.o obj-$(CONFIG_HSU_DMA) += hsu/ obj-$(CONFIG_IMG_MDC_DMA) += img-mdc-dma.o -@@ -67,6 +69,7 @@ obj-$(CONFIG_TI_DMA_CROSSBAR) += ti-dma-crossbar.o +@@ -67,6 +69,7 @@ obj-$(CONFIG_TI_DMA_CROSSBAR) += ti-dma- obj-$(CONFIG_TI_EDMA) += edma.o obj-$(CONFIG_XGENE_DMA) += xgene-dma.o obj-$(CONFIG_ZX_DMA) += zx296702_dma.o @@ -100,9 +96,6 @@ index e4dc9cac..a694da0e 100644 obj-y += qcom/ obj-y += xilinx/ -diff --git a/drivers/dma/caam_dma.c b/drivers/dma/caam_dma.c -new file mode 100644 -index 00000000..e430b320 --- /dev/null +++ b/drivers/dma/caam_dma.c @@ -0,0 +1,563 @@ @@ -669,9 +662,6 @@ index 00000000..e430b320 +MODULE_LICENSE("Dual BSD/GPL"); +MODULE_DESCRIPTION("NXP CAAM support for SG DMA"); +MODULE_AUTHOR("NXP Semiconductors"); -diff --git a/drivers/dma/dpaa2-qdma/Kconfig b/drivers/dma/dpaa2-qdma/Kconfig -new file mode 100644 -index 00000000..084e34bf --- /dev/null +++ b/drivers/dma/dpaa2-qdma/Kconfig @@ -0,0 +1,8 @@ @@ -683,9 +673,6 @@ index 00000000..084e34bf + ---help--- + NXP Data Path Acceleration Architecture 2 QDMA driver, + using the NXP MC bus driver. -diff --git a/drivers/dma/dpaa2-qdma/Makefile b/drivers/dma/dpaa2-qdma/Makefile -new file mode 100644 -index 00000000..ba599ac6 --- /dev/null +++ b/drivers/dma/dpaa2-qdma/Makefile @@ -0,0 +1,8 @@ @@ -697,9 +684,6 @@ index 00000000..ba599ac6 +obj-$(CONFIG_FSL_DPAA2_QDMA) += fsl-dpaa2-qdma.o + +fsl-dpaa2-qdma-objs := dpaa2-qdma.o dpdmai.o -diff --git a/drivers/dma/dpaa2-qdma/dpaa2-qdma.c b/drivers/dma/dpaa2-qdma/dpaa2-qdma.c -new file mode 100644 -index 00000000..ad6b03f7 --- /dev/null +++ b/drivers/dma/dpaa2-qdma/dpaa2-qdma.c @@ -0,0 +1,986 @@ @@ -1689,9 +1673,6 @@ index 00000000..ad6b03f7 + +MODULE_DESCRIPTION("NXP DPAA2 qDMA driver"); +MODULE_LICENSE("Dual BSD/GPL"); -diff --git a/drivers/dma/dpaa2-qdma/dpaa2-qdma.h b/drivers/dma/dpaa2-qdma/dpaa2-qdma.h -new file mode 100644 -index 00000000..71a00db8 --- /dev/null +++ b/drivers/dma/dpaa2-qdma/dpaa2-qdma.h @@ -0,0 +1,262 @@ @@ -1957,9 +1938,6 @@ index 00000000..71a00db8 +#define SG_POOL_SIZE (sizeof(struct qdma_sg_blk) +\ + sizeof(struct dpaa2_qdma_sg) * NUM_SG_PER_BLK) +#endif /* __DPAA2_QDMA_H */ -diff --git a/drivers/dma/dpaa2-qdma/dpdmai.c b/drivers/dma/dpaa2-qdma/dpdmai.c -new file mode 100644 -index 00000000..ad13fc1e --- /dev/null +++ b/drivers/dma/dpaa2-qdma/dpdmai.c @@ -0,0 +1,454 @@ @@ -2417,9 +2395,6 @@ index 00000000..ad13fc1e + + return 0; +} -diff --git a/drivers/dma/dpaa2-qdma/fsl_dpdmai.h b/drivers/dma/dpaa2-qdma/fsl_dpdmai.h -new file mode 100644 -index 00000000..e931ce16 --- /dev/null +++ b/drivers/dma/dpaa2-qdma/fsl_dpdmai.h @@ -0,0 +1,521 @@ @@ -2944,9 +2919,6 @@ index 00000000..e931ce16 + struct dpdmai_tx_queue_attr *attr); + +#endif /* __FSL_DPDMAI_H */ -diff --git a/drivers/dma/dpaa2-qdma/fsl_dpdmai_cmd.h b/drivers/dma/dpaa2-qdma/fsl_dpdmai_cmd.h -new file mode 100644 -index 00000000..7d403c01 --- /dev/null +++ b/drivers/dma/dpaa2-qdma/fsl_dpdmai_cmd.h @@ -0,0 +1,222 @@ @@ -3172,9 +3144,6 @@ index 00000000..7d403c01 + MC_RSP_OP(cmd, 1, 0, 32, uint32_t, attr->fqid) + +#endif /* _FSL_DPDMAI_CMD_H */ -diff --git a/drivers/dma/fsl-qdma.c b/drivers/dma/fsl-qdma.c -new file mode 100644 -index 00000000..6c4c2813 --- /dev/null +++ b/drivers/dma/fsl-qdma.c @@ -0,0 +1,1201 @@ @@ -4379,6 +4348,3 @@ index 00000000..6c4c2813 +MODULE_ALIAS("platform:fsl-qdma"); +MODULE_DESCRIPTION("Freescale qDMA engine driver"); +MODULE_LICENSE("GPL v2"); --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/806-flextimer-support-layerscape.patch b/target/linux/layerscape/patches-4.9/806-flextimer-support-layerscape.patch index 4f7fe70a8d..7ead7b6eca 100644 --- a/target/linux/layerscape/patches-4.9/806-flextimer-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/806-flextimer-support-layerscape.patch @@ -14,11 +14,9 @@ Signed-off-by: Yangbo Lu 2 files changed, 371 insertions(+), 4 deletions(-) create mode 100644 drivers/soc/fsl/layerscape/ftm_alarm.c -diff --git a/drivers/clocksource/fsl_ftm_timer.c b/drivers/clocksource/fsl_ftm_timer.c -index 738515b8..770bbbca 100644 --- a/drivers/clocksource/fsl_ftm_timer.c +++ b/drivers/clocksource/fsl_ftm_timer.c -@@ -83,11 +83,11 @@ static inline void ftm_counter_disable(void __iomem *base) +@@ -83,11 +83,11 @@ static inline void ftm_counter_disable(v static inline void ftm_irq_acknowledge(void __iomem *base) { @@ -34,9 +32,6 @@ index 738515b8..770bbbca 100644 } static inline void ftm_irq_enable(void __iomem *base) -diff --git a/drivers/soc/fsl/layerscape/ftm_alarm.c b/drivers/soc/fsl/layerscape/ftm_alarm.c -new file mode 100644 -index 00000000..49865b0b --- /dev/null +++ b/drivers/soc/fsl/layerscape/ftm_alarm.c @@ -0,0 +1,367 @@ @@ -407,6 +402,3 @@ index 00000000..49865b0b + return platform_driver_register(&ftm_alarm_driver); +} +device_initcall(ftm_alarm_init); --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch b/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch index fad24106a0..657a38fece 100644 --- a/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/810-iommu-support-layerscape.patch @@ -23,11 +23,9 @@ Signed-off-by: Yangbo Lu include/linux/iommu.h | 55 +++++++--- 10 files changed, 739 insertions(+), 157 deletions(-) -diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c -index c380b7e8..93199931 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c -@@ -373,6 +373,8 @@ static struct iommu_group *acpihid_device_group(struct device *dev) +@@ -373,6 +373,8 @@ static struct iommu_group *acpihid_devic if (!entry->group) entry->group = generic_device_group(dev); @@ -36,7 +34,7 @@ index c380b7e8..93199931 100644 return entry->group; } -@@ -3159,9 +3161,10 @@ static bool amd_iommu_capable(enum iommu_cap cap) +@@ -3160,9 +3162,10 @@ static bool amd_iommu_capable(enum iommu return false; } @@ -49,7 +47,7 @@ index c380b7e8..93199931 100644 struct unity_map_entry *entry; int devid; -@@ -3170,41 +3173,56 @@ static void amd_iommu_get_dm_regions(struct device *dev, +@@ -3171,41 +3174,56 @@ static void amd_iommu_get_dm_regions(str return; list_for_each_entry(entry, &amd_iommu_unity_map, list) { @@ -120,7 +118,7 @@ index c380b7e8..93199931 100644 { struct dma_ops_domain *dma_dom = to_dma_ops_domain(to_pdomain(domain)); unsigned long start, end; -@@ -3228,9 +3246,9 @@ static const struct iommu_ops amd_iommu_ops = { +@@ -3229,9 +3247,9 @@ static const struct iommu_ops amd_iommu_ .add_device = amd_iommu_add_device, .remove_device = amd_iommu_remove_device, .device_group = amd_iommu_device_group, @@ -133,8 +131,6 @@ index c380b7e8..93199931 100644 .pgsize_bitmap = AMD_IOMMU_PGSIZES, }; -diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c -index e6f9b2d7..48e2a7c4 100644 --- a/drivers/iommu/arm-smmu-v3.c +++ b/drivers/iommu/arm-smmu-v3.c @@ -410,6 +410,9 @@ @@ -173,7 +169,7 @@ index e6f9b2d7..48e2a7c4 100644 }; struct arm_smmu_domain { -@@ -1000,9 +1009,9 @@ static void arm_smmu_write_strtab_ent(struct arm_smmu_device *smmu, u32 sid, +@@ -1000,9 +1009,9 @@ static void arm_smmu_write_strtab_ent(st * This is hideously complicated, but we only really care about * three cases at the moment: * @@ -186,19 +182,13 @@ index e6f9b2d7..48e2a7c4 100644 * * Given that we can't update the STE atomically and the SMMU * doesn't read the thing in a defined order, that leaves us -@@ -1040,17 +1049,16 @@ static void arm_smmu_write_strtab_ent(struct arm_smmu_device *smmu, u32 sid, - } +@@ -1041,11 +1050,15 @@ static void arm_smmu_write_strtab_ent(st } -- /* Nuke the existing Config, as we're going to rewrite it */ -- val &= ~(STRTAB_STE_0_CFG_MASK << STRTAB_STE_0_CFG_SHIFT); -+ /* Nuke the existing STE_0 value, as we're going to rewrite it */ + /* Nuke the existing STE_0 value, as we're going to rewrite it */ +- val = ste->valid ? STRTAB_STE_0_V : 0; + val = STRTAB_STE_0_V; - -- if (ste->valid) -- val |= STRTAB_STE_0_V; -- else -- val &= ~STRTAB_STE_0_V; ++ + /* Bypass/fault */ + if (!ste->assigned || !(ste->s1_cfg || ste->s2_cfg)) { + if (!ste->assigned && disable_bypass) @@ -212,15 +202,7 @@ index e6f9b2d7..48e2a7c4 100644 dst[0] = cpu_to_le64(val); dst[1] = cpu_to_le64(STRTAB_STE_1_SHCFG_INCOMING << STRTAB_STE_1_SHCFG_SHIFT); -@@ -1081,7 +1089,6 @@ static void arm_smmu_write_strtab_ent(struct arm_smmu_device *smmu, u32 sid, - val |= (ste->s1_cfg->cdptr_dma & STRTAB_STE_0_S1CTXPTR_MASK - << STRTAB_STE_0_S1CTXPTR_SHIFT) | - STRTAB_STE_0_CFG_S1_TRANS; -- - } - - if (ste->s2_cfg) { -@@ -1114,10 +1121,7 @@ static void arm_smmu_write_strtab_ent(struct arm_smmu_device *smmu, u32 sid, +@@ -1108,10 +1121,7 @@ static void arm_smmu_write_strtab_ent(st static void arm_smmu_init_bypass_stes(u64 *strtab, unsigned int nent) { unsigned int i; @@ -232,7 +214,7 @@ index e6f9b2d7..48e2a7c4 100644 for (i = 0; i < nent; ++i) { arm_smmu_write_strtab_ent(NULL, -1, strtab, &ste); -@@ -1370,8 +1374,6 @@ static bool arm_smmu_capable(enum iommu_cap cap) +@@ -1364,8 +1374,6 @@ static bool arm_smmu_capable(enum iommu_ switch (cap) { case IOMMU_CAP_CACHE_COHERENCY: return true; @@ -241,7 +223,7 @@ index e6f9b2d7..48e2a7c4 100644 case IOMMU_CAP_NOEXEC: return true; default: -@@ -1383,7 +1385,9 @@ static struct iommu_domain *arm_smmu_domain_alloc(unsigned type) +@@ -1377,7 +1385,9 @@ static struct iommu_domain *arm_smmu_dom { struct arm_smmu_domain *smmu_domain; @@ -252,7 +234,7 @@ index e6f9b2d7..48e2a7c4 100644 return NULL; /* -@@ -1514,6 +1518,11 @@ static int arm_smmu_domain_finalise(struct iommu_domain *domain) +@@ -1508,6 +1518,11 @@ static int arm_smmu_domain_finalise(stru struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain); struct arm_smmu_device *smmu = smmu_domain->smmu; @@ -264,7 +246,7 @@ index e6f9b2d7..48e2a7c4 100644 /* Restrict the stage to what we can actually support */ if (!(smmu->features & ARM_SMMU_FEAT_TRANS_S1)) smmu_domain->stage = ARM_SMMU_DOMAIN_S2; -@@ -1584,7 +1593,7 @@ static __le64 *arm_smmu_get_step_for_sid(struct arm_smmu_device *smmu, u32 sid) +@@ -1578,7 +1593,7 @@ static __le64 *arm_smmu_get_step_for_sid return step; } @@ -273,7 +255,7 @@ index e6f9b2d7..48e2a7c4 100644 { int i; struct arm_smmu_master_data *master = fwspec->iommu_priv; -@@ -1596,17 +1605,14 @@ static int arm_smmu_install_ste_for_dev(struct iommu_fwspec *fwspec) +@@ -1590,17 +1605,14 @@ static int arm_smmu_install_ste_for_dev( arm_smmu_write_strtab_ent(smmu, sid, step, &master->ste); } @@ -293,7 +275,7 @@ index e6f9b2d7..48e2a7c4 100644 } static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev) -@@ -1625,7 +1631,7 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev) +@@ -1619,7 +1631,7 @@ static int arm_smmu_attach_dev(struct io ste = &master->ste; /* Already attached to a different domain? */ @@ -302,7 +284,7 @@ index e6f9b2d7..48e2a7c4 100644 arm_smmu_detach_dev(dev); mutex_lock(&smmu_domain->init_mutex); -@@ -1646,10 +1652,12 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev) +@@ -1640,10 +1652,12 @@ static int arm_smmu_attach_dev(struct io goto out_unlock; } @@ -318,7 +300,7 @@ index e6f9b2d7..48e2a7c4 100644 ste->s1_cfg = &smmu_domain->s1_cfg; ste->s2_cfg = NULL; arm_smmu_write_ctx_desc(smmu, ste->s1_cfg); -@@ -1658,10 +1666,7 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev) +@@ -1652,10 +1666,7 @@ static int arm_smmu_attach_dev(struct io ste->s2_cfg = &smmu_domain->s2_cfg; } @@ -330,7 +312,7 @@ index e6f9b2d7..48e2a7c4 100644 out_unlock: mutex_unlock(&smmu_domain->init_mutex); return ret; -@@ -1709,6 +1714,9 @@ arm_smmu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova) +@@ -1703,6 +1714,9 @@ arm_smmu_iova_to_phys(struct iommu_domai struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain); struct io_pgtable_ops *ops = smmu_domain->pgtbl_ops; @@ -340,7 +322,7 @@ index e6f9b2d7..48e2a7c4 100644 if (!ops) return 0; -@@ -1807,7 +1815,7 @@ static void arm_smmu_remove_device(struct device *dev) +@@ -1801,7 +1815,7 @@ static void arm_smmu_remove_device(struc return; master = fwspec->iommu_priv; @@ -349,7 +331,7 @@ index e6f9b2d7..48e2a7c4 100644 arm_smmu_detach_dev(dev); iommu_group_remove_device(dev); kfree(master); -@@ -1836,6 +1844,9 @@ static int arm_smmu_domain_get_attr(struct iommu_domain *domain, +@@ -1830,6 +1844,9 @@ static int arm_smmu_domain_get_attr(stru { struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain); @@ -359,7 +341,7 @@ index e6f9b2d7..48e2a7c4 100644 switch (attr) { case DOMAIN_ATTR_NESTING: *(int *)data = (smmu_domain->stage == ARM_SMMU_DOMAIN_NESTED); -@@ -1851,6 +1862,9 @@ static int arm_smmu_domain_set_attr(struct iommu_domain *domain, +@@ -1845,6 +1862,9 @@ static int arm_smmu_domain_set_attr(stru int ret = 0; struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain); @@ -369,7 +351,7 @@ index e6f9b2d7..48e2a7c4 100644 mutex_lock(&smmu_domain->init_mutex); switch (attr) { -@@ -1880,6 +1894,31 @@ static int arm_smmu_of_xlate(struct device *dev, struct of_phandle_args *args) +@@ -1874,6 +1894,31 @@ static int arm_smmu_of_xlate(struct devi return iommu_fwspec_add_ids(dev, args->args, 1); } @@ -401,7 +383,7 @@ index e6f9b2d7..48e2a7c4 100644 static struct iommu_ops arm_smmu_ops = { .capable = arm_smmu_capable, .domain_alloc = arm_smmu_domain_alloc, -@@ -1895,6 +1934,8 @@ static struct iommu_ops arm_smmu_ops = { +@@ -1889,6 +1934,8 @@ static struct iommu_ops arm_smmu_ops = { .domain_get_attr = arm_smmu_domain_get_attr, .domain_set_attr = arm_smmu_domain_set_attr, .of_xlate = arm_smmu_of_xlate, @@ -410,8 +392,6 @@ index e6f9b2d7..48e2a7c4 100644 .pgsize_bitmap = -1UL, /* Restricted during device attach */ }; -diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c -index 8f728144..3243a96d 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -49,6 +49,7 @@ @@ -448,7 +428,7 @@ index 8f728144..3243a96d 100644 }; struct arm_smmu_domain { -@@ -821,6 +827,12 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain, +@@ -821,6 +827,12 @@ static int arm_smmu_init_domain_context( if (smmu_domain->smmu) goto out_unlock; @@ -461,7 +441,7 @@ index 8f728144..3243a96d 100644 /* * Mapping the requested stage onto what we support is surprisingly * complicated, mainly because the spec allows S1+S2 SMMUs without -@@ -981,7 +993,7 @@ static void arm_smmu_destroy_domain_context(struct iommu_domain *domain) +@@ -981,7 +993,7 @@ static void arm_smmu_destroy_domain_cont void __iomem *cb_base; int irq; @@ -470,7 +450,7 @@ index 8f728144..3243a96d 100644 return; /* -@@ -1004,7 +1016,9 @@ static struct iommu_domain *arm_smmu_domain_alloc(unsigned type) +@@ -1004,7 +1016,9 @@ static struct iommu_domain *arm_smmu_dom { struct arm_smmu_domain *smmu_domain; @@ -481,7 +461,7 @@ index 8f728144..3243a96d 100644 return NULL; /* * Allocate the domain and initialise some of its data structures. -@@ -1202,10 +1216,15 @@ static int arm_smmu_domain_add_master(struct arm_smmu_domain *smmu_domain, +@@ -1202,10 +1216,15 @@ static int arm_smmu_domain_add_master(st { struct arm_smmu_device *smmu = smmu_domain->smmu; struct arm_smmu_s2cr *s2cr = smmu->s2crs; @@ -498,7 +478,7 @@ index 8f728144..3243a96d 100644 for_each_cfg_sme(fwspec, i, idx) { if (type == s2cr[idx].type && cbndx == s2cr[idx].cbndx) continue; -@@ -1343,6 +1362,9 @@ static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain, +@@ -1343,6 +1362,9 @@ static phys_addr_t arm_smmu_iova_to_phys struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain); struct io_pgtable_ops *ops= smmu_domain->pgtbl_ops; @@ -508,7 +488,7 @@ index 8f728144..3243a96d 100644 if (!ops) return 0; -@@ -1368,8 +1390,6 @@ static bool arm_smmu_capable(enum iommu_cap cap) +@@ -1368,8 +1390,6 @@ static bool arm_smmu_capable(enum iommu_ * requests. */ return true; @@ -517,7 +497,7 @@ index 8f728144..3243a96d 100644 case IOMMU_CAP_NOEXEC: return true; default: -@@ -1478,10 +1498,12 @@ static struct iommu_group *arm_smmu_device_group(struct device *dev) +@@ -1478,10 +1498,12 @@ static struct iommu_group *arm_smmu_devi } if (group) @@ -531,7 +511,7 @@ index 8f728144..3243a96d 100644 else group = generic_device_group(dev); -@@ -1493,6 +1515,9 @@ static int arm_smmu_domain_get_attr(struct iommu_domain *domain, +@@ -1493,6 +1515,9 @@ static int arm_smmu_domain_get_attr(stru { struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain); @@ -541,7 +521,7 @@ index 8f728144..3243a96d 100644 switch (attr) { case DOMAIN_ATTR_NESTING: *(int *)data = (smmu_domain->stage == ARM_SMMU_DOMAIN_NESTED); -@@ -1508,6 +1533,9 @@ static int arm_smmu_domain_set_attr(struct iommu_domain *domain, +@@ -1508,6 +1533,9 @@ static int arm_smmu_domain_set_attr(stru int ret = 0; struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain); @@ -551,7 +531,7 @@ index 8f728144..3243a96d 100644 mutex_lock(&smmu_domain->init_mutex); switch (attr) { -@@ -1534,17 +1562,44 @@ static int arm_smmu_domain_set_attr(struct iommu_domain *domain, +@@ -1534,17 +1562,44 @@ out_unlock: static int arm_smmu_of_xlate(struct device *dev, struct of_phandle_args *args) { @@ -606,7 +586,7 @@ index 8f728144..3243a96d 100644 .pgsize_bitmap = -1UL, /* Restricted during device attach */ }; -@@ -1581,16 +1638,22 @@ static void arm_smmu_device_reset(struct arm_smmu_device *smmu) +@@ -1581,16 +1638,22 @@ static void arm_smmu_device_reset(struct for (i = 0; i < smmu->num_mapping_groups; ++i) arm_smmu_write_sme(smmu, i); @@ -638,7 +618,7 @@ index 8f728144..3243a96d 100644 writel_relaxed(reg, gr0_base + ARM_SMMU_GR0_sACR); } -@@ -2024,6 +2087,11 @@ static int arm_smmu_device_dt_probe(struct platform_device *pdev) +@@ -2024,6 +2087,11 @@ static int arm_smmu_device_dt_probe(stru bus_set_iommu(&pci_bus_type, &arm_smmu_ops); } #endif @@ -650,8 +630,6 @@ index 8f728144..3243a96d 100644 return 0; } -diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c -index 1520e7f0..3ade4153 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -37,15 +37,50 @@ struct iommu_dma_msi_page { @@ -709,11 +687,10 @@ index 1520e7f0..3ade4153 100644 } int iommu_dma_init(void) -@@ -61,26 +96,54 @@ int iommu_dma_init(void) - * callback when domain->type == IOMMU_DOMAIN_DMA. +@@ -62,25 +97,53 @@ int iommu_dma_init(void) */ int iommu_get_dma_cookie(struct iommu_domain *domain) -+{ + { + if (domain->iova_cookie) + return -EEXIST; + @@ -738,7 +715,7 @@ index 1520e7f0..3ade4153 100644 + * used by the devices attached to @domain. + */ +int iommu_get_msi_cookie(struct iommu_domain *domain, dma_addr_t base) - { ++{ struct iommu_dma_cookie *cookie; + if (domain->type != IOMMU_DOMAIN_UNMANAGED) @@ -769,7 +746,7 @@ index 1520e7f0..3ade4153 100644 * * IOMMU drivers should normally call this from their domain_free callback. */ -@@ -92,7 +155,7 @@ void iommu_put_dma_cookie(struct iommu_domain *domain) +@@ -92,7 +155,7 @@ void iommu_put_dma_cookie(struct iommu_d if (!cookie) return; @@ -778,7 +755,7 @@ index 1520e7f0..3ade4153 100644 put_iova_domain(&cookie->iovad); list_for_each_entry_safe(msi, tmp, &cookie->msi_page_list, list) { -@@ -104,21 +167,99 @@ void iommu_put_dma_cookie(struct iommu_domain *domain) +@@ -104,21 +167,99 @@ void iommu_put_dma_cookie(struct iommu_d } EXPORT_SYMBOL(iommu_put_dma_cookie); @@ -884,7 +861,7 @@ index 1520e7f0..3ade4153 100644 } /** -@@ -136,11 +277,12 @@ static void iova_reserve_pci_windows(struct pci_dev *dev, +@@ -136,11 +277,12 @@ static void iova_reserve_pci_windows(str int iommu_dma_init_domain(struct iommu_domain *domain, dma_addr_t base, u64 size, struct device *dev) { @@ -900,7 +877,7 @@ index 1520e7f0..3ade4153 100644 /* Use the smallest supported page size for IOVA granularity */ order = __ffs(domain->pgsize_bitmap); -@@ -160,22 +302,37 @@ int iommu_dma_init_domain(struct iommu_domain *domain, dma_addr_t base, +@@ -160,22 +302,37 @@ int iommu_dma_init_domain(struct iommu_d end_pfn = min_t(unsigned long, end_pfn, domain->geometry.aperture_end >> order); } @@ -947,7 +924,7 @@ index 1520e7f0..3ade4153 100644 } EXPORT_SYMBOL(iommu_dma_init_domain); -@@ -643,11 +800,12 @@ static struct iommu_dma_msi_page *iommu_dma_get_msi_page(struct device *dev, +@@ -643,11 +800,12 @@ static struct iommu_dma_msi_page *iommu_ { struct iommu_dma_cookie *cookie = domain->iova_cookie; struct iommu_dma_msi_page *msi_page; @@ -962,7 +939,7 @@ index 1520e7f0..3ade4153 100644 list_for_each_entry(msi_page, &cookie->msi_page_list, list) if (msi_page->phys == msi_addr) return msi_page; -@@ -656,13 +814,18 @@ static struct iommu_dma_msi_page *iommu_dma_get_msi_page(struct device *dev, +@@ -656,13 +814,18 @@ static struct iommu_dma_msi_page *iommu_ if (!msi_page) return NULL; @@ -987,7 +964,7 @@ index 1520e7f0..3ade4153 100644 goto out_free_iova; INIT_LIST_HEAD(&msi_page->list); -@@ -670,7 +833,10 @@ static struct iommu_dma_msi_page *iommu_dma_get_msi_page(struct device *dev, +@@ -670,7 +833,10 @@ static struct iommu_dma_msi_page *iommu_ return msi_page; out_free_iova: @@ -999,7 +976,7 @@ index 1520e7f0..3ade4153 100644 out_free_page: kfree(msi_page); return NULL; -@@ -711,7 +877,7 @@ void iommu_dma_map_msi_msg(int irq, struct msi_msg *msg) +@@ -711,7 +877,7 @@ void iommu_dma_map_msi_msg(int irq, stru msg->data = ~0U; } else { msg->address_hi = upper_32_bits(msi_page->iova); @@ -1008,8 +985,6 @@ index 1520e7f0..3ade4153 100644 msg->address_lo += lower_32_bits(msi_page->iova); } } -diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c -index 002f8a42..befbfd30 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -440,6 +440,7 @@ struct dmar_rmrr_unit { @@ -1020,7 +995,7 @@ index 002f8a42..befbfd30 100644 }; struct dmar_atsr_unit { -@@ -4250,27 +4251,40 @@ static inline void init_iommu_pm_ops(void) {} +@@ -4250,27 +4251,40 @@ static inline void init_iommu_pm_ops(voi int __init dmar_parse_one_rmrr(struct acpi_dmar_header *header, void *arg) { struct acpi_dmar_reserved_memory *rmrr; @@ -1074,7 +1049,7 @@ index 002f8a42..befbfd30 100644 kfree(rmrru); } -@@ -5219,6 +5234,45 @@ static void intel_iommu_remove_device(struct device *dev) +@@ -5219,6 +5234,45 @@ static void intel_iommu_remove_device(st iommu_device_unlink(iommu->iommu_dev, dev); } @@ -1120,7 +1095,7 @@ index 002f8a42..befbfd30 100644 #ifdef CONFIG_INTEL_IOMMU_SVM #define MAX_NR_PASID_BITS (20) static inline unsigned long intel_iommu_get_pts(struct intel_iommu *iommu) -@@ -5349,19 +5403,21 @@ struct intel_iommu *intel_svm_device_to_iommu(struct device *dev) +@@ -5349,19 +5403,21 @@ struct intel_iommu *intel_svm_device_to_ #endif /* CONFIG_INTEL_IOMMU_SVM */ static const struct iommu_ops intel_iommu_ops = { @@ -1155,8 +1130,6 @@ index 002f8a42..befbfd30 100644 }; static void quirk_iommu_g4x_gfx(struct pci_dev *dev) -diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c -index 87d3060f..e6a8c225 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -36,6 +36,7 @@ @@ -1181,7 +1154,7 @@ index 87d3060f..e6a8c225 100644 #define IOMMU_GROUP_ATTR(_name, _mode, _show, _store) \ struct iommu_group_attribute iommu_group_attr_##_name = \ __ATTR(_name, _mode, _show, _store) -@@ -86,6 +94,18 @@ static int __iommu_attach_group(struct iommu_domain *domain, +@@ -86,6 +94,18 @@ static int __iommu_attach_group(struct i static void __iommu_detach_group(struct iommu_domain *domain, struct iommu_group *group); @@ -1200,7 +1173,7 @@ index 87d3060f..e6a8c225 100644 static ssize_t iommu_group_attr_show(struct kobject *kobj, struct attribute *__attr, char *buf) { -@@ -133,8 +153,131 @@ static ssize_t iommu_group_show_name(struct iommu_group *group, char *buf) +@@ -133,8 +153,131 @@ static ssize_t iommu_group_show_name(str return sprintf(buf, "%s\n", group->name); } @@ -1332,7 +1305,7 @@ index 87d3060f..e6a8c225 100644 static void iommu_group_release(struct kobject *kobj) { struct iommu_group *group = to_iommu_group(kobj); -@@ -212,6 +355,11 @@ struct iommu_group *iommu_group_alloc(void) +@@ -212,6 +355,11 @@ struct iommu_group *iommu_group_alloc(vo */ kobject_put(&group->kobj); @@ -1344,7 +1317,7 @@ index 87d3060f..e6a8c225 100644 pr_debug("Allocated group %d\n", group->id); return group; -@@ -318,7 +466,7 @@ static int iommu_group_create_direct_mappings(struct iommu_group *group, +@@ -318,7 +466,7 @@ static int iommu_group_create_direct_map struct device *dev) { struct iommu_domain *domain = group->default_domain; @@ -1353,7 +1326,7 @@ index 87d3060f..e6a8c225 100644 struct list_head mappings; unsigned long pg_size; int ret = 0; -@@ -331,18 +479,21 @@ static int iommu_group_create_direct_mappings(struct iommu_group *group, +@@ -331,18 +479,21 @@ static int iommu_group_create_direct_map pg_size = 1UL << __ffs(domain->pgsize_bitmap); INIT_LIST_HEAD(&mappings); @@ -1378,7 +1351,7 @@ index 87d3060f..e6a8c225 100644 for (addr = start; addr < end; addr += pg_size) { phys_addr_t phys_addr; -@@ -358,7 +509,7 @@ static int iommu_group_create_direct_mappings(struct iommu_group *group, +@@ -358,7 +509,7 @@ static int iommu_group_create_direct_map } out: @@ -1387,11 +1360,10 @@ index 87d3060f..e6a8c225 100644 return ret; } -@@ -562,6 +713,19 @@ struct iommu_group *iommu_group_get(struct device *dev) - } +@@ -563,6 +714,19 @@ struct iommu_group *iommu_group_get(stru EXPORT_SYMBOL_GPL(iommu_group_get); -+/** + /** + * iommu_group_ref_get - Increment reference on a group + * @group: the group to use, must not be NULL + * @@ -1404,10 +1376,11 @@ index 87d3060f..e6a8c225 100644 + return group; +} + - /** ++/** * iommu_group_put - Decrement group reference * @group: the group to use -@@ -845,10 +1009,19 @@ struct iommu_group *iommu_group_get_for_dev(struct device *dev) + * +@@ -845,10 +1009,19 @@ struct iommu_group *iommu_group_get_for_ * IOMMU driver. */ if (!group->default_domain) { @@ -1430,7 +1403,7 @@ index 87d3060f..e6a8c225 100644 } ret = iommu_group_add_device(group, dev); -@@ -1557,20 +1730,38 @@ int iommu_domain_set_attr(struct iommu_domain *domain, +@@ -1557,20 +1730,38 @@ int iommu_domain_set_attr(struct iommu_d } EXPORT_SYMBOL_GPL(iommu_domain_set_attr); @@ -1475,11 +1448,9 @@ index 87d3060f..e6a8c225 100644 } /* Request that a device is direct mapped by the IOMMU */ -diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c -index b12c12d7..9799daea 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c -@@ -410,6 +410,8 @@ static struct iommu_group *mtk_iommu_device_group(struct device *dev) +@@ -410,6 +410,8 @@ static struct iommu_group *mtk_iommu_dev data->m4u_group = iommu_group_alloc(); if (IS_ERR(data->m4u_group)) dev_err(dev, "Failed to allocate M4U IOMMU group\n"); @@ -1488,11 +1459,9 @@ index b12c12d7..9799daea 100644 } return data->m4u_group; } -diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c -index b8aeb076..c7063e9d 100644 --- a/drivers/iommu/mtk_iommu_v1.c +++ b/drivers/iommu/mtk_iommu_v1.c -@@ -502,6 +502,8 @@ static struct iommu_group *mtk_iommu_device_group(struct device *dev) +@@ -502,6 +502,8 @@ static struct iommu_group *mtk_iommu_dev data->m4u_group = iommu_group_alloc(); if (IS_ERR(data->m4u_group)) dev_err(dev, "Failed to allocate M4U IOMMU group\n"); @@ -1501,8 +1470,6 @@ index b8aeb076..c7063e9d 100644 } return data->m4u_group; } -diff --git a/include/linux/dma-iommu.h b/include/linux/dma-iommu.h -index 32c58906..36d3206d 100644 --- a/include/linux/dma-iommu.h +++ b/include/linux/dma-iommu.h @@ -27,6 +27,7 @@ int iommu_dma_init(void); @@ -1513,7 +1480,7 @@ index 32c58906..36d3206d 100644 void iommu_put_dma_cookie(struct iommu_domain *domain); /* Setup call for arch DMA mapping code */ -@@ -66,6 +67,7 @@ int iommu_dma_mapping_error(struct device *dev, dma_addr_t dma_addr); +@@ -66,6 +67,7 @@ int iommu_dma_mapping_error(struct devic /* The DMA API isn't _quite_ the whole story, though... */ void iommu_dma_map_msi_msg(int irq, struct msi_msg *msg); @@ -1521,7 +1488,7 @@ index 32c58906..36d3206d 100644 #else -@@ -82,6 +84,11 @@ static inline int iommu_get_dma_cookie(struct iommu_domain *domain) +@@ -82,6 +84,11 @@ static inline int iommu_get_dma_cookie(s return -ENODEV; } @@ -1533,7 +1500,7 @@ index 32c58906..36d3206d 100644 static inline void iommu_put_dma_cookie(struct iommu_domain *domain) { } -@@ -90,6 +97,10 @@ static inline void iommu_dma_map_msi_msg(int irq, struct msi_msg *msg) +@@ -90,6 +97,10 @@ static inline void iommu_dma_map_msi_msg { } @@ -1544,8 +1511,6 @@ index 32c58906..36d3206d 100644 #endif /* CONFIG_IOMMU_DMA */ #endif /* __KERNEL__ */ #endif /* __DMA_IOMMU_H */ -diff --git a/include/linux/iommu.h b/include/linux/iommu.h -index 436dc213..188599f5 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -117,18 +117,32 @@ enum iommu_attr { @@ -1614,7 +1579,7 @@ index 436dc213..188599f5 100644 /* Window handling functions */ int (*domain_window_enable)(struct iommu_domain *domain, u32 wnd_nr, -@@ -233,9 +248,14 @@ extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t io +@@ -233,9 +248,14 @@ extern phys_addr_t iommu_iova_to_phys(st extern void iommu_set_fault_handler(struct iommu_domain *domain, iommu_fault_handler_t handler, void *token); @@ -1631,7 +1596,7 @@ index 436dc213..188599f5 100644 extern int iommu_attach_group(struct iommu_domain *domain, struct iommu_group *group); -@@ -253,6 +273,7 @@ extern void iommu_group_remove_device(struct device *dev); +@@ -253,6 +273,7 @@ extern void iommu_group_remove_device(st extern int iommu_group_for_each_dev(struct iommu_group *group, void *data, int (*fn)(struct device *, void *)); extern struct iommu_group *iommu_group_get(struct device *dev); @@ -1639,7 +1604,7 @@ index 436dc213..188599f5 100644 extern void iommu_group_put(struct iommu_group *group); extern int iommu_group_register_notifier(struct iommu_group *group, struct notifier_block *nb); -@@ -439,16 +460,22 @@ static inline void iommu_set_fault_handler(struct iommu_domain *domain, +@@ -439,16 +460,22 @@ static inline void iommu_set_fault_handl { } @@ -1664,6 +1629,3 @@ index 436dc213..188599f5 100644 static inline int iommu_request_dm_for_dev(struct device *dev) { return -ENODEV; --- -2.14.1 - diff --git a/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch b/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch index b4b7b83193..eccac74002 100644 --- a/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/817-usb-support-layerscape.patch @@ -35,11 +35,9 @@ Signed-off-by: Yangbo Lu include/linux/usb/of.h | 2 + 18 files changed, 730 insertions(+), 73 deletions(-) -diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c -index afb953a2..c9c86495 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c -@@ -1812,6 +1812,10 @@ static int rx_bottom(struct r8152 *tp, int budget) +@@ -1812,6 +1812,10 @@ static int rx_bottom(struct r8152 *tp, i unsigned int pkt_len; struct sk_buff *skb; @@ -50,11 +48,9 @@ index afb953a2..c9c86495 100644 pkt_len = le32_to_cpu(rx_desc->opts1) & RX_LEN_MASK; if (pkt_len < ETH_ZLEN) break; -diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c -index 5ef8da6e..176dee01 100644 --- a/drivers/usb/common/common.c +++ b/drivers/usb/common/common.c -@@ -105,6 +105,56 @@ static const char *const usb_dr_modes[] = { +@@ -105,6 +105,56 @@ static const char *const usb_dr_modes[] [USB_DR_MODE_OTG] = "otg", }; @@ -111,11 +107,9 @@ index 5ef8da6e..176dee01 100644 static enum usb_dr_mode usb_get_dr_mode_from_string(const char *str) { int ret; -diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index 80d4ef31..e23acf03 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -4412,6 +4412,14 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, +@@ -4415,6 +4415,14 @@ hub_port_init(struct usb_hub *hub, struc else speed = usb_speed_string(udev->speed); @@ -130,11 +124,9 @@ index 80d4ef31..e23acf03 100644 if (udev->speed < USB_SPEED_SUPER) dev_info(&udev->dev, "%s %s USB device number %d using %s\n", -diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c -index fea44690..e34ef90a 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c -@@ -58,6 +58,7 @@ static int dwc3_get_dr_mode(struct dwc3 *dwc) +@@ -58,6 +58,7 @@ static int dwc3_get_dr_mode(struct dwc3 enum usb_dr_mode mode; struct device *dev = dwc->dev; unsigned int hw_mode; @@ -142,7 +134,7 @@ index fea44690..e34ef90a 100644 if (dwc->dr_mode == USB_DR_MODE_UNKNOWN) dwc->dr_mode = USB_DR_MODE_OTG; -@@ -83,6 +84,24 @@ static int dwc3_get_dr_mode(struct dwc3 *dwc) +@@ -83,6 +84,24 @@ static int dwc3_get_dr_mode(struct dwc3 mode = USB_DR_MODE_HOST; break; default: @@ -167,7 +159,7 @@ index fea44690..e34ef90a 100644 if (IS_ENABLED(CONFIG_USB_DWC3_HOST)) mode = USB_DR_MODE_HOST; else if (IS_ENABLED(CONFIG_USB_DWC3_GADGET)) -@@ -213,8 +232,9 @@ static void dwc3_frame_length_adjustment(struct dwc3 *dwc) +@@ -213,8 +232,9 @@ static void dwc3_frame_length_adjustment reg = dwc3_readl(dwc->regs, DWC3_GFLADJ); dft = reg & DWC3_GFLADJ_30MHZ_MASK; @@ -179,7 +171,7 @@ index fea44690..e34ef90a 100644 reg &= ~DWC3_GFLADJ_30MHZ_MASK; reg |= DWC3_GFLADJ_30MHZ_SDBND_SEL | dwc->fladj; dwc3_writel(dwc->regs, DWC3_GFLADJ, reg); -@@ -579,6 +599,99 @@ static int dwc3_phy_setup(struct dwc3 *dwc) +@@ -579,6 +599,99 @@ static int dwc3_phy_setup(struct dwc3 *d return 0; } @@ -279,7 +271,7 @@ index fea44690..e34ef90a 100644 static void dwc3_core_exit(struct dwc3 *dwc) { dwc3_event_buffers_cleanup(dwc); -@@ -721,6 +834,8 @@ static int dwc3_core_init(struct dwc3 *dwc) +@@ -721,6 +834,8 @@ static int dwc3_core_init(struct dwc3 *d if (ret) goto err1; @@ -288,7 +280,7 @@ index fea44690..e34ef90a 100644 /* Adjust Frame Length */ dwc3_frame_length_adjustment(dwc); -@@ -919,11 +1034,109 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc) +@@ -919,11 +1034,109 @@ static void dwc3_core_exit_mode(struct d } } @@ -398,7 +390,7 @@ index fea44690..e34ef90a 100644 struct resource *res; struct dwc3 *dwc; u8 lpm_nyet_threshold; -@@ -955,6 +1168,11 @@ static int dwc3_probe(struct platform_device *pdev) +@@ -955,6 +1168,11 @@ static int dwc3_probe(struct platform_de dwc->xhci_resources[0].flags = res->flags; dwc->xhci_resources[0].name = res->name; @@ -410,7 +402,7 @@ index fea44690..e34ef90a 100644 res->start += DWC3_GLOBALS_REGS_START; /* -@@ -997,6 +1215,12 @@ static int dwc3_probe(struct platform_device *pdev) +@@ -997,6 +1215,12 @@ static int dwc3_probe(struct platform_de dwc->usb3_lpm_capable = device_property_read_bool(dev, "snps,usb3_lpm_capable"); @@ -423,7 +415,7 @@ index fea44690..e34ef90a 100644 dwc->disable_scramble_quirk = device_property_read_bool(dev, "snps,disable_scramble_quirk"); dwc->u2exit_lfps_quirk = device_property_read_bool(dev, -@@ -1041,6 +1265,8 @@ static int dwc3_probe(struct platform_device *pdev) +@@ -1041,6 +1265,8 @@ static int dwc3_probe(struct platform_de dwc->hird_threshold = hird_threshold | (dwc->is_utmi_l1_suspend << 4); @@ -432,7 +424,7 @@ index fea44690..e34ef90a 100644 platform_set_drvdata(pdev, dwc); dwc3_cache_hwparams(dwc); -@@ -1064,6 +1290,11 @@ static int dwc3_probe(struct platform_device *pdev) +@@ -1064,6 +1290,11 @@ static int dwc3_probe(struct platform_de if (ret < 0) goto err1; @@ -444,8 +436,6 @@ index fea44690..e34ef90a 100644 pm_runtime_forbid(dev); ret = dwc3_alloc_event_buffers(dwc, DWC3_EVENT_BUFFERS_SIZE); -diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h -index 884c4371..9151eef4 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -26,6 +26,7 @@ @@ -563,8 +553,6 @@ index 884c4371..9151eef4 100644 }; /* -------------------------------------------------------------------------- */ -diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c -index 626d87d5..f1b98273 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -17,6 +17,8 @@ @@ -600,8 +588,6 @@ index 626d87d5..f1b98273 100644 dwc->xhci = xhci; ret = platform_device_add_resources(xhci, dwc->xhci_resources, -diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c -index aac0ce8a..fe49e758 100644 --- a/drivers/usb/gadget/udc/fsl_udc_core.c +++ b/drivers/usb/gadget/udc/fsl_udc_core.c @@ -198,7 +198,11 @@ __acquires(ep->udc->lock) @@ -617,7 +603,7 @@ index aac0ce8a..fe49e758 100644 spin_lock(&ep->udc->lock); ep->stopped = stopped; -@@ -245,10 +249,10 @@ static int dr_controller_setup(struct fsl_udc *udc) +@@ -245,10 +249,10 @@ static int dr_controller_setup(struct fs if (udc->pdata->have_sysif_regs) { if (udc->pdata->controller_ver) { /* controller version 1.6 or above */ @@ -630,7 +616,7 @@ index aac0ce8a..fe49e758 100644 } } portctrl |= PORTSCX_PTS_ULPI; -@@ -257,13 +261,14 @@ static int dr_controller_setup(struct fsl_udc *udc) +@@ -257,13 +261,14 @@ static int dr_controller_setup(struct fs portctrl |= PORTSCX_PTW_16BIT; /* fall through */ case FSL_USB2_PHY_UTMI: @@ -647,7 +633,7 @@ index aac0ce8a..fe49e758 100644 mdelay(FSL_UTMI_PHY_DLY); /* Delay for UTMI PHY CLK to become stable - 10ms*/ } -@@ -329,22 +334,22 @@ static int dr_controller_setup(struct fsl_udc *udc) +@@ -329,22 +334,22 @@ static int dr_controller_setup(struct fs /* Config control enable i/o output, cpu endian register */ #ifndef CONFIG_ARCH_MXC if (udc->pdata->have_sysif_regs) { @@ -675,7 +661,7 @@ index aac0ce8a..fe49e758 100644 } #endif -@@ -1057,7 +1062,7 @@ static int fsl_ep_fifo_status(struct usb_ep *_ep) +@@ -1057,7 +1062,7 @@ static int fsl_ep_fifo_status(struct usb struct ep_queue_head *qh; ep = container_of(_ep, struct fsl_ep, ep); @@ -684,7 +670,7 @@ index aac0ce8a..fe49e758 100644 return -ENODEV; udc = (struct fsl_udc *)ep->udc; -@@ -1599,14 +1604,13 @@ static int process_ep_req(struct fsl_udc *udc, int pipe, +@@ -1599,14 +1604,13 @@ static int process_ep_req(struct fsl_udc struct fsl_req *curr_req) { struct ep_td_struct *curr_td; @@ -700,7 +686,7 @@ index aac0ce8a..fe49e758 100644 actual = curr_req->req.length; for (j = 0; j < curr_req->dtd_count; j++) { -@@ -1651,11 +1655,9 @@ static int process_ep_req(struct fsl_udc *udc, int pipe, +@@ -1651,11 +1655,9 @@ static int process_ep_req(struct fsl_udc status = -EPROTO; break; } else { @@ -712,7 +698,7 @@ index aac0ce8a..fe49e758 100644 VDBG("dTD transmitted successful"); } -@@ -1698,7 +1700,7 @@ static void dtd_complete_irq(struct fsl_udc *udc) +@@ -1698,7 +1700,7 @@ static void dtd_complete_irq(struct fsl_ curr_ep = get_ep_by_pipe(udc, i); /* If the ep is configured */ @@ -721,7 +707,7 @@ index aac0ce8a..fe49e758 100644 WARNING("Invalid EP?"); continue; } -@@ -2420,10 +2422,12 @@ static int fsl_udc_probe(struct platform_device *pdev) +@@ -2420,10 +2422,12 @@ static int fsl_udc_probe(struct platform usb_sys_regs = (void *)dr_regs + USB_DR_SYS_OFFSET; #endif @@ -734,7 +720,7 @@ index aac0ce8a..fe49e758 100644 /* Read Device Controller Capability Parameters register */ dccparams = fsl_readl(&dr_regs->dccparams); -@@ -2463,9 +2467,11 @@ static int fsl_udc_probe(struct platform_device *pdev) +@@ -2463,9 +2467,11 @@ static int fsl_udc_probe(struct platform dr_controller_setup(udc_controller); } @@ -746,7 +732,7 @@ index aac0ce8a..fe49e758 100644 /* Setup gadget structure */ udc_controller->gadget.ops = &fsl_gadget_ops; -@@ -2478,6 +2484,7 @@ static int fsl_udc_probe(struct platform_device *pdev) +@@ -2478,6 +2484,7 @@ static int fsl_udc_probe(struct platform /* Setup gadget.dev and register with kernel */ dev_set_name(&udc_controller->gadget.dev, "gadget"); udc_controller->gadget.dev.of_node = pdev->dev.of_node; @@ -754,7 +740,7 @@ index aac0ce8a..fe49e758 100644 if (!IS_ERR_OR_NULL(udc_controller->transceiver)) udc_controller->gadget.is_otg = 1; -@@ -2529,7 +2536,9 @@ static int fsl_udc_probe(struct platform_device *pdev) +@@ -2529,7 +2536,9 @@ err_free_irq: err_iounmap: if (pdata->exit) pdata->exit(pdev); @@ -764,7 +750,7 @@ index aac0ce8a..fe49e758 100644 err_iounmap_noclk: iounmap(dr_regs); err_release_mem_region: -@@ -2557,8 +2566,9 @@ static int fsl_udc_remove(struct platform_device *pdev) +@@ -2557,8 +2566,9 @@ static int fsl_udc_remove(struct platfor udc_controller->done = &done; usb_del_gadget_udc(&udc_controller->gadget); @@ -775,7 +761,7 @@ index aac0ce8a..fe49e758 100644 /* DR has been stopped in usb_gadget_unregister_driver() */ remove_proc_file(); -@@ -2570,7 +2580,7 @@ static int fsl_udc_remove(struct platform_device *pdev) +@@ -2570,7 +2580,7 @@ static int fsl_udc_remove(struct platfor dma_pool_destroy(udc_controller->td_pool); free_irq(udc_controller->irq, udc_controller); iounmap(dr_regs); @@ -784,8 +770,6 @@ index aac0ce8a..fe49e758 100644 release_mem_region(res->start, resource_size(res)); /* free udc --wait for the release() finished */ -diff --git a/drivers/usb/gadget/udc/fsl_usb2_udc.h b/drivers/usb/gadget/udc/fsl_usb2_udc.h -index 84715625..f76c4ddd 100644 --- a/drivers/usb/gadget/udc/fsl_usb2_udc.h +++ b/drivers/usb/gadget/udc/fsl_usb2_udc.h @@ -20,6 +20,10 @@ @@ -818,8 +802,6 @@ index 84715625..f76c4ddd 100644 #endif #endif -diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig -index 0b80cee3..a57d95c3 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -165,7 +165,7 @@ config XPS_USB_HCD_XILINX @@ -831,8 +813,6 @@ index 0b80cee3..a57d95c3 100644 select USB_EHCI_ROOT_HUB_TT ---help--- Variation of ARC USB block used in some Freescale chips. -diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c -index 9f5ffb62..cd16860c 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -37,13 +37,141 @@ @@ -977,7 +957,7 @@ index 9f5ffb62..cd16860c 100644 /* configure so an HC device and id are always provided */ /* always called with process context; sleeping is OK */ -@@ -131,6 +259,12 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) +@@ -131,6 +259,12 @@ static int fsl_ehci_drv_probe(struct pla clrsetbits_be32(hcd->regs + FSL_SOC_USB_CTRL, CONTROL_REGISTER_W1C_MASK, 0x4); @@ -990,7 +970,7 @@ index 9f5ffb62..cd16860c 100644 /* * Enable UTMI phy and program PTS field in UTMI mode before asserting * controller reset for USB Controller version 2.5 -@@ -143,16 +277,20 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) +@@ -143,16 +277,20 @@ static int fsl_ehci_drv_probe(struct pla /* Don't need to set host mode here. It will be done by tdi_reset() */ @@ -1013,7 +993,7 @@ index 9f5ffb62..cd16860c 100644 dev_dbg(&pdev->dev, "hcd=0x%p ehci=0x%p, phy=0x%p\n", hcd, ehci, hcd->usb_phy); -@@ -168,6 +306,11 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) +@@ -168,6 +306,11 @@ static int fsl_ehci_drv_probe(struct pla retval = -ENODEV; goto err2; } @@ -1025,7 +1005,7 @@ index 9f5ffb62..cd16860c 100644 } #endif return retval; -@@ -181,6 +324,18 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) +@@ -181,6 +324,18 @@ static int fsl_ehci_drv_probe(struct pla return retval; } @@ -1044,7 +1024,7 @@ index 9f5ffb62..cd16860c 100644 static int ehci_fsl_setup_phy(struct usb_hcd *hcd, enum fsl_usb2_phy_modes phy_mode, unsigned int port_offset) -@@ -219,6 +374,21 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd, +@@ -219,6 +374,21 @@ static int ehci_fsl_setup_phy(struct usb /* fall through */ case FSL_USB2_PHY_UTMI: case FSL_USB2_PHY_UTMI_DUAL: @@ -1066,7 +1046,7 @@ index 9f5ffb62..cd16860c 100644 if (pdata->have_sysif_regs && pdata->controller_ver) { /* controller version 1.6 or above */ clrsetbits_be32(non_ehci + FSL_SOC_USB_CTRL, -@@ -292,14 +462,9 @@ static int ehci_fsl_usb_setup(struct ehci_hcd *ehci) +@@ -292,14 +462,9 @@ static int ehci_fsl_usb_setup(struct ehc return -EINVAL; if (pdata->operating_mode == FSL_USB2_MPH_HOST) { @@ -1082,7 +1062,7 @@ index 9f5ffb62..cd16860c 100644 ehci->has_fsl_port_bug = 1; if (pdata->port_enables & FSL_USB2_PORT0_ENABLED) -@@ -379,16 +544,57 @@ static int ehci_fsl_setup(struct usb_hcd *hcd) +@@ -379,16 +544,57 @@ static int ehci_fsl_setup(struct usb_hcd return retval; } @@ -1147,7 +1127,7 @@ index 9f5ffb62..cd16860c 100644 #ifdef CONFIG_PPC_MPC512x static int ehci_fsl_mpc512x_drv_suspend(struct device *dev) -@@ -535,26 +741,43 @@ static inline int ehci_fsl_mpc512x_drv_resume(struct device *dev) +@@ -535,26 +741,43 @@ static inline int ehci_fsl_mpc512x_drv_r } #endif /* CONFIG_PPC_MPC512x */ @@ -1198,7 +1178,7 @@ index 9f5ffb62..cd16860c 100644 if (!fsl_deep_sleep()) return 0; -@@ -568,12 +791,34 @@ static int ehci_fsl_drv_resume(struct device *dev) +@@ -568,12 +791,34 @@ static int ehci_fsl_drv_resume(struct de struct ehci_fsl *ehci_fsl = hcd_to_ehci_fsl(hcd); struct ehci_hcd *ehci = hcd_to_ehci(hcd); void __iomem *non_ehci = hcd->regs; @@ -1233,8 +1213,6 @@ index 9f5ffb62..cd16860c 100644 ehci_prepare_ports_for_controller_resume(ehci); if (!fsl_deep_sleep()) return 0; -diff --git a/drivers/usb/host/ehci-fsl.h b/drivers/usb/host/ehci-fsl.h -index 1a8a60a5..42ea2976 100644 --- a/drivers/usb/host/ehci-fsl.h +++ b/drivers/usb/host/ehci-fsl.h @@ -63,4 +63,7 @@ @@ -1245,11 +1223,9 @@ index 1a8a60a5..42ea2976 100644 +/* Retry count for checking UTMI PHY CLK validity */ +#define UTMI_PHY_CLK_VALID_CHK_RETRY 5 #endif /* _EHCI_FSL_H */ -diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c -index 255acca8..c8838c33 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c -@@ -305,6 +305,8 @@ static int ehci_bus_suspend (struct usb_hcd *hcd) +@@ -305,6 +305,8 @@ static int ehci_bus_suspend (struct usb_ USB_PORT_STAT_HIGH_SPEED) fs_idle_delay = true; ehci_writel(ehci, t2, reg); @@ -1258,11 +1234,9 @@ index 255acca8..c8838c33 100644 changed = 1; } } -diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h -index 3b06bb77..f296d1fb 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h -@@ -180,6 +180,9 @@ struct ehci_hcd { /* one per controller */ +@@ -180,6 +180,9 @@ struct ehci_hcd { /* one per controlle unsigned periodic_count; /* periodic activity count */ unsigned uframe_periodic_max; /* max periodic time per uframe */ @@ -1272,7 +1246,7 @@ index 3b06bb77..f296d1fb 100644 /* list of itds & sitds completed while now_frame was still active */ struct list_head cached_itd_list; -@@ -706,8 +709,10 @@ ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc) +@@ -706,8 +709,10 @@ ehci_port_speed(struct ehci_hcd *ehci, u * incoming packets get corrupted in HS mode */ #define ehci_has_fsl_hs_errata(e) ((e)->has_fsl_hs_errata) @@ -1283,11 +1257,9 @@ index 3b06bb77..f296d1fb 100644 #endif /* -diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c -index f07ccb25..1e59ea9f 100644 --- a/drivers/usb/host/fsl-mph-dr-of.c +++ b/drivers/usb/host/fsl-mph-dr-of.c -@@ -226,6 +226,18 @@ static int fsl_usb2_mph_dr_of_probe(struct platform_device *ofdev) +@@ -226,6 +226,18 @@ static int fsl_usb2_mph_dr_of_probe(stru of_property_read_bool(np, "fsl,usb-erratum-a007792"); pdata->has_fsl_erratum_a005275 = of_property_read_bool(np, "fsl,usb-erratum-a005275"); @@ -1306,8 +1278,6 @@ index f07ccb25..1e59ea9f 100644 /* * Determine whether phy_clk_valid needs to be checked -diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c -index 94eb2923..836355fa 100644 --- a/drivers/usb/phy/phy-fsl-usb.c +++ b/drivers/usb/phy/phy-fsl-usb.c @@ -1,5 +1,5 @@ @@ -1325,7 +1295,7 @@ index 94eb2923..836355fa 100644 struct device *dev; struct fsl_otg *otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); -@@ -486,6 +487,7 @@ int fsl_otg_start_host(struct otg_fsm *fsm, int on) +@@ -486,6 +487,7 @@ int fsl_otg_start_host(struct otg_fsm *f otg_reset_controller(); VDBG("host on......\n"); if (dev->driver->pm && dev->driver->pm->resume) { @@ -1333,7 +1303,7 @@ index 94eb2923..836355fa 100644 retval = dev->driver->pm->resume(dev); if (fsm->id) { /* default-b */ -@@ -510,8 +512,11 @@ int fsl_otg_start_host(struct otg_fsm *fsm, int on) +@@ -510,8 +512,11 @@ int fsl_otg_start_host(struct otg_fsm *f else { VDBG("host off......\n"); if (dev && dev->driver) { @@ -1346,7 +1316,7 @@ index 94eb2923..836355fa 100644 if (fsm->id) /* default-b */ fsl_otg_drv_vbus(fsm, 0); -@@ -539,8 +544,17 @@ int fsl_otg_start_gadget(struct otg_fsm *fsm, int on) +@@ -539,8 +544,17 @@ int fsl_otg_start_gadget(struct otg_fsm dev = otg->gadget->dev.parent; if (on) { @@ -1365,7 +1335,7 @@ index 94eb2923..836355fa 100644 } else { if (dev->driver->suspend) dev->driver->suspend(dev, otg_suspend_state); -@@ -672,6 +686,10 @@ static void fsl_otg_event(struct work_struct *work) +@@ -672,6 +686,10 @@ static void fsl_otg_event(struct work_st fsl_otg_start_host(fsm, 0); otg_drv_vbus(fsm, 0); fsl_otg_start_gadget(fsm, 1); @@ -1376,7 +1346,7 @@ index 94eb2923..836355fa 100644 } } -@@ -724,6 +742,7 @@ irqreturn_t fsl_otg_isr(int irq, void *dev_id) +@@ -724,6 +742,7 @@ irqreturn_t fsl_otg_isr(int irq, void *d { struct otg_fsm *fsm = &((struct fsl_otg *)dev_id)->fsm; struct usb_otg *otg = ((struct fsl_otg *)dev_id)->phy.otg; @@ -1384,7 +1354,7 @@ index 94eb2923..836355fa 100644 u32 otg_int_src, otg_sc; otg_sc = fsl_readl(&usb_dr_regs->otgsc); -@@ -753,18 +772,8 @@ irqreturn_t fsl_otg_isr(int irq, void *dev_id) +@@ -753,18 +772,8 @@ irqreturn_t fsl_otg_isr(int irq, void *d otg->gadget->is_a_peripheral = !fsm->id; VDBG("ID int (ID is %d)\n", fsm->id); @@ -1405,7 +1375,7 @@ index 94eb2923..836355fa 100644 return IRQ_HANDLED; } } -@@ -923,12 +932,32 @@ int usb_otg_start(struct platform_device *pdev) +@@ -923,12 +932,32 @@ int usb_otg_start(struct platform_device temp &= ~(PORTSC_PHY_TYPE_SEL | PORTSC_PTW); switch (pdata->phy_mode) { case FSL_USB2_PHY_ULPI: @@ -1438,8 +1408,6 @@ index 94eb2923..836355fa 100644 temp |= PORTSC_PTS_UTMI; /* fall through */ default: -diff --git a/drivers/usb/phy/phy-fsl-usb.h b/drivers/usb/phy/phy-fsl-usb.h -index 23149954..c4c08730 100644 --- a/drivers/usb/phy/phy-fsl-usb.h +++ b/drivers/usb/phy/phy-fsl-usb.h @@ -199,6 +199,14 @@ @@ -1457,8 +1425,6 @@ index 23149954..c4c08730 100644 /* BCSR5 */ #define BCSR5_INT_USB (0x02) -diff --git a/include/linux/usb.h b/include/linux/usb.h -index eba1f10e..c334e281 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -362,6 +362,7 @@ struct usb_bus { @@ -1469,8 +1435,6 @@ index eba1f10e..c334e281 100644 unsigned is_b_host:1; /* true during some HNP roleswitches */ unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */ unsigned no_stop_on_short:1; /* -diff --git a/include/linux/usb/of.h b/include/linux/usb/of.h -index 5ff9032e..2a57e0d2 100644 --- a/include/linux/usb/of.h +++ b/include/linux/usb/of.h @@ -11,6 +11,8 @@ @@ -1482,6 +1446,3 @@ index 5ff9032e..2a57e0d2 100644 #if IS_ENABLED(CONFIG_OF) enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *np, int arg0); bool of_usb_host_tpl_support(struct device_node *np); --- -2.14.1 - diff --git a/target/linux/mediatek/patches-4.9/0028-net-next-dsa-add-Mediatek-tag-RX-TX-handler.patch b/target/linux/mediatek/patches-4.9/0028-net-next-dsa-add-Mediatek-tag-RX-TX-handler.patch index 2ba1cb80d3..ef545e3db4 100644 --- a/target/linux/mediatek/patches-4.9/0028-net-next-dsa-add-Mediatek-tag-RX-TX-handler.patch +++ b/target/linux/mediatek/patches-4.9/0028-net-next-dsa-add-Mediatek-tag-RX-TX-handler.patch @@ -34,7 +34,7 @@ Reviewed-by: Florian Fainelli --- a/net/dsa/Kconfig +++ b/net/dsa/Kconfig -@@ -41,4 +41,6 @@ config NET_DSA_TAG_TRAILER +@@ -42,4 +42,6 @@ config NET_DSA_TAG_TRAILER config NET_DSA_TAG_QCA bool diff --git a/target/linux/mvebu/patches-4.9/120-net-mvneta-add-BQL-support.patch b/target/linux/mvebu/patches-4.9/120-net-mvneta-add-BQL-support.patch index 5fedc8e8ab..dba8f27b3d 100644 --- a/target/linux/mvebu/patches-4.9/120-net-mvneta-add-BQL-support.patch +++ b/target/linux/mvebu/patches-4.9/120-net-mvneta-add-BQL-support.patch @@ -1,6 +1,6 @@ --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -1719,8 +1719,10 @@ static struct mvneta_tx_queue *mvneta_tx +@@ -1720,8 +1720,10 @@ static struct mvneta_tx_queue *mvneta_tx /* Free tx queue skbuffs */ static void mvneta_txq_bufs_free(struct mvneta_port *pp, @@ -12,7 +12,7 @@ int i; for (i = 0; i < num; i++) { -@@ -1728,6 +1730,11 @@ static void mvneta_txq_bufs_free(struct +@@ -1729,6 +1731,11 @@ static void mvneta_txq_bufs_free(struct txq->txq_get_index; struct sk_buff *skb = txq->tx_skb[txq->txq_get_index]; @@ -24,7 +24,7 @@ mvneta_txq_inc_get(txq); if (!IS_TSO_HEADER(txq, tx_desc->buf_phys_addr)) -@@ -1738,6 +1745,8 @@ static void mvneta_txq_bufs_free(struct +@@ -1739,6 +1746,8 @@ static void mvneta_txq_bufs_free(struct continue; dev_kfree_skb_any(skb); } @@ -33,7 +33,7 @@ } /* Handle end of transmission */ -@@ -1751,7 +1760,7 @@ static void mvneta_txq_done(struct mvnet +@@ -1752,7 +1761,7 @@ static void mvneta_txq_done(struct mvnet if (!tx_done) return; @@ -42,7 +42,7 @@ txq->count -= tx_done; -@@ -2358,6 +2367,8 @@ out: +@@ -2359,6 +2368,8 @@ out: struct mvneta_pcpu_stats *stats = this_cpu_ptr(pp->stats); struct netdev_queue *nq = netdev_get_tx_queue(dev, txq_id); @@ -51,7 +51,7 @@ txq->count += frags; mvneta_txq_pend_desc_add(pp, txq, frags); -@@ -2382,9 +2393,10 @@ static void mvneta_txq_done_force(struct +@@ -2383,9 +2394,10 @@ static void mvneta_txq_done_force(struct struct mvneta_tx_queue *txq) { @@ -63,7 +63,7 @@ /* reset txq */ txq->count = 0; -@@ -2880,6 +2892,8 @@ static int mvneta_txq_init(struct mvneta +@@ -2881,6 +2893,8 @@ static int mvneta_txq_init(struct mvneta static void mvneta_txq_deinit(struct mvneta_port *pp, struct mvneta_tx_queue *txq) { @@ -72,7 +72,7 @@ kfree(txq->tx_skb); if (txq->tso_hdrs) -@@ -2891,6 +2905,8 @@ static void mvneta_txq_deinit(struct mvn +@@ -2892,6 +2906,8 @@ static void mvneta_txq_deinit(struct mvn txq->size * MVNETA_DESC_ALIGNED_SIZE, txq->descs, txq->descs_phys); diff --git a/target/linux/mvebu/patches-4.9/300-mvneta-tx-queue-workaround.patch b/target/linux/mvebu/patches-4.9/300-mvneta-tx-queue-workaround.patch index 2582a41993..2601d92fc3 100644 --- a/target/linux/mvebu/patches-4.9/300-mvneta-tx-queue-workaround.patch +++ b/target/linux/mvebu/patches-4.9/300-mvneta-tx-queue-workaround.patch @@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau --- --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -3833,6 +3833,16 @@ static int mvneta_ethtool_get_rxfh(struc +@@ -3834,6 +3834,16 @@ static int mvneta_ethtool_get_rxfh(struc return 0; } @@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau static const struct net_device_ops mvneta_netdev_ops = { .ndo_open = mvneta_open, .ndo_stop = mvneta_stop, -@@ -3843,6 +3853,7 @@ static const struct net_device_ops mvnet +@@ -3844,6 +3854,7 @@ static const struct net_device_ops mvnet .ndo_fix_features = mvneta_fix_features, .ndo_get_stats64 = mvneta_get_stats64, .ndo_do_ioctl = mvneta_ioctl, diff --git a/target/linux/mvebu/patches-4.9/400-phy-provide-a-hook-for-link-up-link-down-events.patch b/target/linux/mvebu/patches-4.9/400-phy-provide-a-hook-for-link-up-link-down-events.patch index da4d24b7d4..cac2e6ea6d 100644 --- a/target/linux/mvebu/patches-4.9/400-phy-provide-a-hook-for-link-up-link-down-events.patch +++ b/target/linux/mvebu/patches-4.9/400-phy-provide-a-hook-for-link-up-link-down-events.patch @@ -167,7 +167,7 @@ Signed-off-by: Russell King --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -429,6 +429,7 @@ struct phy_device { +@@ -425,6 +425,7 @@ struct phy_device { u8 mdix; diff --git a/target/linux/mvebu/patches-4.9/401-net-phy-move-phy-MMD-accessors-to-phy-core.c.patch b/target/linux/mvebu/patches-4.9/401-net-phy-move-phy-MMD-accessors-to-phy-core.c.patch index 360108fcc4..20ed3119d6 100644 --- a/target/linux/mvebu/patches-4.9/401-net-phy-move-phy-MMD-accessors-to-phy-core.c.patch +++ b/target/linux/mvebu/patches-4.9/401-net-phy-move-phy-MMD-accessors-to-phy-core.c.patch @@ -256,7 +256,7 @@ Signed-off-by: Russell King +EXPORT_SYMBOL(phy_write_mmd); --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -630,14 +630,7 @@ struct phy_fixup { +@@ -626,14 +626,7 @@ struct phy_fixup { * * Same rules as for phy_read(); */ @@ -272,7 +272,7 @@ Signed-off-by: Russell King /** * phy_read_mmd_indirect - reads data from the MMD registers -@@ -731,16 +724,7 @@ static inline bool phy_is_pseudo_fixed_l +@@ -727,16 +720,7 @@ static inline bool phy_is_pseudo_fixed_l * * Same rules as for phy_write(); */ diff --git a/target/linux/mvebu/patches-4.9/402-net-phy-make-phy_-read-write-_mmd-generic-MMD-access.patch b/target/linux/mvebu/patches-4.9/402-net-phy-make-phy_-read-write-_mmd-generic-MMD-access.patch index fcb274d557..33d467794a 100644 --- a/target/linux/mvebu/patches-4.9/402-net-phy-make-phy_-read-write-_mmd-generic-MMD-access.patch +++ b/target/linux/mvebu/patches-4.9/402-net-phy-make-phy_-read-write-_mmd-generic-MMD-access.patch @@ -64,7 +64,7 @@ Signed-off-by: Russell King EXPORT_SYMBOL(phy_write_mmd); --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -573,6 +573,30 @@ struct phy_driver { +@@ -569,6 +569,30 @@ struct phy_driver { */ void (*link_change_notify)(struct phy_device *dev); diff --git a/target/linux/mvebu/patches-4.9/407-net-phy-add-802.3-clause-45-support-to-phylib.patch b/target/linux/mvebu/patches-4.9/407-net-phy-add-802.3-clause-45-support-to-phylib.patch index ae4bb846f3..0715a6a8aa 100644 --- a/target/linux/mvebu/patches-4.9/407-net-phy-add-802.3-clause-45-support-to-phylib.patch +++ b/target/linux/mvebu/patches-4.9/407-net-phy-add-802.3-clause-45-support-to-phylib.patch @@ -295,7 +295,7 @@ Signed-off-by: Russell King } --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -810,6 +810,8 @@ static inline const char *phydev_name(co +@@ -806,6 +806,8 @@ static inline const char *phydev_name(co void phy_attached_print(struct phy_device *phydev, const char *fmt, ...) __printf(2, 3); void phy_attached_info(struct phy_device *phydev); @@ -304,7 +304,7 @@ Signed-off-by: Russell King int genphy_config_init(struct phy_device *phydev); int genphy_setup_forced(struct phy_device *phydev); int genphy_restart_aneg(struct phy_device *phydev); -@@ -824,6 +826,16 @@ static inline int genphy_no_soft_reset(s +@@ -820,6 +822,16 @@ static inline int genphy_no_soft_reset(s { return 0; } diff --git a/target/linux/mvebu/patches-4.9/411-net-phy-split-out-PHY-speed-and-duplex-string-genera.patch b/target/linux/mvebu/patches-4.9/411-net-phy-split-out-PHY-speed-and-duplex-string-genera.patch index f4da7e92e0..2f0039b111 100644 --- a/target/linux/mvebu/patches-4.9/411-net-phy-split-out-PHY-speed-and-duplex-string-genera.patch +++ b/target/linux/mvebu/patches-4.9/411-net-phy-split-out-PHY-speed-and-duplex-string-genera.patch @@ -91,7 +91,7 @@ Signed-off-by: Russell King { --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -645,6 +645,9 @@ struct phy_fixup { +@@ -641,6 +641,9 @@ struct phy_fixup { int (*run)(struct phy_device *phydev); }; diff --git a/target/linux/mvebu/patches-4.9/412-net-phy-move-phy_lookup_setting-and-guts-of-phy_supp.patch b/target/linux/mvebu/patches-4.9/412-net-phy-move-phy_lookup_setting-and-guts-of-phy_supp.patch index 051a9ed68e..8ead41cd6c 100644 --- a/target/linux/mvebu/patches-4.9/412-net-phy-move-phy_lookup_setting-and-guts-of-phy_supp.patch +++ b/target/linux/mvebu/patches-4.9/412-net-phy-move-phy_lookup_setting-and-guts-of-phy_supp.patch @@ -305,7 +305,7 @@ Signed-off-by: Russell King { --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -648,6 +648,21 @@ struct phy_fixup { +@@ -644,6 +644,21 @@ struct phy_fixup { const char *phy_speed_to_str(int speed); const char *phy_duplex_to_str(unsigned int duplex); diff --git a/target/linux/mvebu/patches-4.9/415-phylink-add-phylink-infrastructure.patch b/target/linux/mvebu/patches-4.9/415-phylink-add-phylink-infrastructure.patch index 59e8aa81b7..cf9b2061cb 100644 --- a/target/linux/mvebu/patches-4.9/415-phylink-add-phylink-infrastructure.patch +++ b/target/linux/mvebu/patches-4.9/415-phylink-add-phylink-infrastructure.patch @@ -999,7 +999,7 @@ Signed-off-by: Russell King +MODULE_LICENSE("GPL"); --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -153,6 +153,7 @@ static inline const char *phy_modes(phy_ +@@ -149,6 +149,7 @@ static inline const char *phy_modes(phy_ #define MII_ADDR_C45 (1<<30) struct device; @@ -1007,7 +1007,7 @@ Signed-off-by: Russell King struct sk_buff; /* -@@ -425,6 +426,7 @@ struct phy_device { +@@ -421,6 +422,7 @@ struct phy_device { struct mutex lock; diff --git a/target/linux/mvebu/patches-4.9/419-net-mvneta-convert-to-phylink.patch b/target/linux/mvebu/patches-4.9/419-net-mvneta-convert-to-phylink.patch index bc8d5fdacf..8084a17af1 100644 --- a/target/linux/mvebu/patches-4.9/419-net-mvneta-convert-to-phylink.patch +++ b/target/linux/mvebu/patches-4.9/419-net-mvneta-convert-to-phylink.patch @@ -21,15 +21,15 @@ Signed-off-by: Russell King Marvell ARMADA XP, ARMADA 370 and ARMADA 38x SoC family. --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -28,6 +28,7 @@ - #include +@@ -29,6 +29,7 @@ #include #include + #include +#include #include #include #include -@@ -188,6 +189,7 @@ +@@ -189,6 +190,7 @@ #define MVNETA_GMAC_CTRL_0 0x2c00 #define MVNETA_GMAC_MAX_RX_SIZE_SHIFT 2 #define MVNETA_GMAC_MAX_RX_SIZE_MASK 0x7ffc @@ -37,7 +37,7 @@ Signed-off-by: Russell King #define MVNETA_GMAC0_PORT_ENABLE BIT(0) #define MVNETA_GMAC_CTRL_2 0x2c08 #define MVNETA_GMAC2_INBAND_AN_ENABLE BIT(0) -@@ -203,13 +205,19 @@ +@@ -204,13 +206,19 @@ #define MVNETA_GMAC_TX_FLOW_CTRL_ENABLE BIT(5) #define MVNETA_GMAC_RX_FLOW_CTRL_ACTIVE BIT(6) #define MVNETA_GMAC_TX_FLOW_CTRL_ACTIVE BIT(7) @@ -57,7 +57,7 @@ Signed-off-by: Russell King #define MVNETA_GMAC_AN_FLOW_CTRL_EN BIT(11) #define MVNETA_GMAC_CONFIG_FULL_DUPLEX BIT(12) #define MVNETA_GMAC_AN_DUPLEX_EN BIT(13) -@@ -399,14 +407,9 @@ struct mvneta_port { +@@ -400,14 +408,9 @@ struct mvneta_port { u16 tx_ring_size; u16 rx_ring_size; @@ -74,7 +74,7 @@ Signed-off-by: Russell King struct mvneta_bm *bm_priv; struct mvneta_bm_pool *pool_long; -@@ -1240,44 +1243,6 @@ static void mvneta_set_other_mcast_table +@@ -1241,44 +1244,6 @@ static void mvneta_set_other_mcast_table mvreg_write(pp, MVNETA_DA_FILT_OTH_MCAST + offset, val); } @@ -119,7 +119,7 @@ Signed-off-by: Russell King static void mvneta_percpu_unmask_interrupt(void *arg) { struct mvneta_port *pp = arg; -@@ -1425,7 +1390,6 @@ static void mvneta_defaults_set(struct m +@@ -1426,7 +1391,6 @@ static void mvneta_defaults_set(struct m val &= ~MVNETA_PHY_POLLING_ENABLE; mvreg_write(pp, MVNETA_UNIT_CONTROL, val); @@ -127,7 +127,7 @@ Signed-off-by: Russell King mvneta_set_ucast_table(pp, -1); mvneta_set_special_mcast_table(pp, -1); mvneta_set_other_mcast_table(pp, -1); -@@ -2630,26 +2594,11 @@ static irqreturn_t mvneta_isr(int irq, v +@@ -2631,26 +2595,11 @@ static irqreturn_t mvneta_isr(int irq, v return IRQ_HANDLED; } @@ -156,7 +156,7 @@ Signed-off-by: Russell King } /* NAPI handler -@@ -2665,7 +2614,6 @@ static int mvneta_poll(struct napi_struc +@@ -2666,7 +2615,6 @@ static int mvneta_poll(struct napi_struc u32 cause_rx_tx; int rx_queue; struct mvneta_port *pp = netdev_priv(napi->dev); @@ -164,7 +164,7 @@ Signed-off-by: Russell King struct mvneta_pcpu_port *port = this_cpu_ptr(pp->ports); if (!netif_running(pp->dev)) { -@@ -2679,12 +2627,11 @@ static int mvneta_poll(struct napi_struc +@@ -2680,12 +2628,11 @@ static int mvneta_poll(struct napi_struc u32 cause_misc = mvreg_read(pp, MVNETA_INTR_MISC_CAUSE); mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0); @@ -182,7 +182,7 @@ Signed-off-by: Russell King } /* Release Tx descriptors */ -@@ -2980,7 +2927,6 @@ static int mvneta_setup_txqs(struct mvne +@@ -2981,7 +2928,6 @@ static int mvneta_setup_txqs(struct mvne static void mvneta_start_dev(struct mvneta_port *pp) { int cpu; @@ -190,7 +190,7 @@ Signed-off-by: Russell King mvneta_max_rx_size_set(pp, pp->pkt_size); mvneta_txq_max_tx_size_set(pp, pp->pkt_size); -@@ -3003,16 +2949,15 @@ static void mvneta_start_dev(struct mvne +@@ -3004,16 +2950,15 @@ static void mvneta_start_dev(struct mvne MVNETA_CAUSE_LINK_CHANGE | MVNETA_CAUSE_PSC_SYNC_CHANGE); @@ -209,7 +209,7 @@ Signed-off-by: Russell King for_each_online_cpu(cpu) { struct mvneta_pcpu_port *port = per_cpu_ptr(pp->ports, cpu); -@@ -3182,99 +3127,210 @@ static int mvneta_set_mac_addr(struct ne +@@ -3183,99 +3128,210 @@ static int mvneta_set_mac_addr(struct ne return 0; } @@ -490,7 +490,7 @@ Signed-off-by: Russell King } /* Electing a CPU must be done in an atomic way: it should be done -@@ -3532,10 +3588,9 @@ static int mvneta_stop(struct net_device +@@ -3533,10 +3589,9 @@ static int mvneta_stop(struct net_device static int mvneta_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { @@ -503,7 +503,7 @@ Signed-off-by: Russell King } /* Ethtool methods */ -@@ -3546,44 +3601,18 @@ mvneta_ethtool_set_link_ksettings(struct +@@ -3547,44 +3602,18 @@ mvneta_ethtool_set_link_ksettings(struct const struct ethtool_link_ksettings *cmd) { struct mvneta_port *pp = netdev_priv(ndev); @@ -557,7 +557,7 @@ Signed-off-by: Russell King } /* Set interrupt coalescing for ethtools */ -@@ -3691,26 +3720,28 @@ static void mvneta_ethtool_update_stats( +@@ -3692,26 +3721,28 @@ static void mvneta_ethtool_update_stats( { const struct mvneta_statistic *s; void __iomem *base = pp->base; @@ -591,7 +591,7 @@ Signed-off-by: Russell King } } -@@ -3870,7 +3901,7 @@ const struct ethtool_ops mvneta_eth_tool +@@ -3871,7 +3902,7 @@ const struct ethtool_ops mvneta_eth_tool .get_rxnfc = mvneta_ethtool_get_rxnfc, .get_rxfh = mvneta_ethtool_get_rxfh, .set_rxfh = mvneta_ethtool_set_rxfh, @@ -600,7 +600,7 @@ Signed-off-by: Russell King .set_link_ksettings = mvneta_ethtool_set_link_ksettings, }; -@@ -3997,14 +4028,13 @@ static int mvneta_probe(struct platform_ +@@ -3998,14 +4029,13 @@ static int mvneta_probe(struct platform_ const struct mbus_dram_target_info *dram_target_info; struct resource *res; struct device_node *dn = pdev->dev.of_node; @@ -616,7 +616,7 @@ Signed-off-by: Russell King int tx_csum_limit; int phy_mode; int err; -@@ -4020,31 +4050,11 @@ static int mvneta_probe(struct platform_ +@@ -4021,31 +4051,11 @@ static int mvneta_probe(struct platform_ goto err_free_netdev; } @@ -649,7 +649,7 @@ Signed-off-by: Russell King } dev->tx_queue_len = MVNETA_MAX_TXD; -@@ -4055,12 +4065,7 @@ static int mvneta_probe(struct platform_ +@@ -4056,12 +4066,7 @@ static int mvneta_probe(struct platform_ pp = netdev_priv(dev); spin_lock_init(&pp->lock); @@ -663,7 +663,7 @@ Signed-off-by: Russell King pp->rxq_def = rxq_def; -@@ -4071,7 +4076,7 @@ static int mvneta_probe(struct platform_ +@@ -4072,7 +4077,7 @@ static int mvneta_probe(struct platform_ pp->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(pp->clk)) { err = PTR_ERR(pp->clk); @@ -672,7 +672,7 @@ Signed-off-by: Russell King } clk_prepare_enable(pp->clk); -@@ -4179,6 +4184,14 @@ static int mvneta_probe(struct platform_ +@@ -4180,6 +4185,14 @@ static int mvneta_probe(struct platform_ dev->priv_flags |= IFF_LIVE_ADDR_CHANGE; dev->gso_max_segs = MVNETA_MAX_TSO_SEGS; @@ -687,7 +687,7 @@ Signed-off-by: Russell King err = register_netdev(dev); if (err < 0) { dev_err(&pdev->dev, "failed to register\n"); -@@ -4190,14 +4203,6 @@ static int mvneta_probe(struct platform_ +@@ -4191,14 +4204,6 @@ static int mvneta_probe(struct platform_ platform_set_drvdata(pdev, pp->dev); @@ -702,7 +702,7 @@ Signed-off-by: Russell King return 0; err_netdev: -@@ -4208,16 +4213,14 @@ err_netdev: +@@ -4209,16 +4214,14 @@ err_netdev: 1 << pp->id); } err_free_stats: @@ -721,7 +721,7 @@ Signed-off-by: Russell King err_free_irq: irq_dispose_mapping(dev->irq); err_free_netdev: -@@ -4229,7 +4232,6 @@ err_free_netdev: +@@ -4230,7 +4233,6 @@ err_free_netdev: static int mvneta_remove(struct platform_device *pdev) { struct net_device *dev = platform_get_drvdata(pdev); @@ -729,7 +729,7 @@ Signed-off-by: Russell King struct mvneta_port *pp = netdev_priv(dev); unregister_netdev(dev); -@@ -4237,10 +4239,8 @@ static int mvneta_remove(struct platform +@@ -4238,10 +4240,8 @@ static int mvneta_remove(struct platform clk_disable_unprepare(pp->clk); free_percpu(pp->ports); free_percpu(pp->stats); diff --git a/target/linux/mvebu/patches-4.9/420-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch b/target/linux/mvebu/patches-4.9/420-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch index 2558720261..6d35b5005c 100644 --- a/target/linux/mvebu/patches-4.9/420-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch +++ b/target/linux/mvebu/patches-4.9/420-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch @@ -12,7 +12,7 @@ Signed-off-by: Russell King --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -2629,9 +2629,11 @@ static int mvneta_poll(struct napi_struc +@@ -2630,9 +2630,11 @@ static int mvneta_poll(struct napi_struc mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0); if (cause_misc & (MVNETA_CAUSE_PHY_STATUS_CHANGE | @@ -26,7 +26,7 @@ Signed-off-by: Russell King } /* Release Tx descriptors */ -@@ -2946,8 +2948,7 @@ static void mvneta_start_dev(struct mvne +@@ -2947,8 +2949,7 @@ static void mvneta_start_dev(struct mvne mvreg_write(pp, MVNETA_INTR_MISC_MASK, MVNETA_CAUSE_PHY_STATUS_CHANGE | @@ -36,7 +36,7 @@ Signed-off-by: Russell King phylink_start(pp->phylink); netif_tx_start_all_queues(pp->dev); -@@ -3438,8 +3439,7 @@ static int mvneta_cpu_online(unsigned in +@@ -3439,8 +3440,7 @@ static int mvneta_cpu_online(unsigned in on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true); mvreg_write(pp, MVNETA_INTR_MISC_MASK, MVNETA_CAUSE_PHY_STATUS_CHANGE | @@ -46,7 +46,7 @@ Signed-off-by: Russell King netif_tx_start_all_queues(pp->dev); spin_unlock(&pp->lock); return 0; -@@ -3480,8 +3480,7 @@ static int mvneta_cpu_dead(unsigned int +@@ -3481,8 +3481,7 @@ static int mvneta_cpu_dead(unsigned int on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true); mvreg_write(pp, MVNETA_INTR_MISC_MASK, MVNETA_CAUSE_PHY_STATUS_CHANGE | diff --git a/target/linux/mvebu/patches-4.9/422-net-mvneta-add-nway_reset-support.patch b/target/linux/mvebu/patches-4.9/422-net-mvneta-add-nway_reset-support.patch index 9a604eb03a..20c23ba2ac 100644 --- a/target/linux/mvebu/patches-4.9/422-net-mvneta-add-nway_reset-support.patch +++ b/target/linux/mvebu/patches-4.9/422-net-mvneta-add-nway_reset-support.patch @@ -11,7 +11,7 @@ Signed-off-by: Russell King --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -3614,6 +3614,13 @@ mvneta_ethtool_get_link_ksettings(struct +@@ -3615,6 +3615,13 @@ mvneta_ethtool_get_link_ksettings(struct return phylink_ethtool_ksettings_get(pp->phylink, cmd); } @@ -25,7 +25,7 @@ Signed-off-by: Russell King /* Set interrupt coalescing for ethtools */ static int mvneta_ethtool_set_coalesce(struct net_device *dev, struct ethtool_coalesce *c) -@@ -3887,6 +3894,7 @@ static const struct net_device_ops mvnet +@@ -3888,6 +3895,7 @@ static const struct net_device_ops mvnet }; const struct ethtool_ops mvneta_eth_tool_ops = { diff --git a/target/linux/mvebu/patches-4.9/424-net-mvneta-add-flow-control-support-via-phylink.patch b/target/linux/mvebu/patches-4.9/424-net-mvneta-add-flow-control-support-via-phylink.patch index f10b57c99a..3f778953e0 100644 --- a/target/linux/mvebu/patches-4.9/424-net-mvneta-add-flow-control-support-via-phylink.patch +++ b/target/linux/mvebu/patches-4.9/424-net-mvneta-add-flow-control-support-via-phylink.patch @@ -11,7 +11,7 @@ Signed-off-by: Russell King --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -3178,6 +3178,12 @@ static int mvneta_mac_link_state(struct +@@ -3179,6 +3179,12 @@ static int mvneta_mac_link_state(struct state->link = !!(gmac_stat & MVNETA_GMAC_LINK_UP); state->duplex = !!(gmac_stat & MVNETA_GMAC_FULL_DUPLEX); @@ -24,7 +24,7 @@ Signed-off-by: Russell King return 1; } -@@ -3220,6 +3226,8 @@ static void mvneta_mac_config(struct net +@@ -3221,6 +3227,8 @@ static void mvneta_mac_config(struct net if (phylink_test(state->advertising, Pause)) new_an |= MVNETA_GMAC_ADVERT_SYM_FLOW_CTRL; @@ -33,7 +33,7 @@ Signed-off-by: Russell King switch (mode) { case MLO_AN_SGMII: -@@ -3244,7 +3252,7 @@ static void mvneta_mac_config(struct net +@@ -3245,7 +3253,7 @@ static void mvneta_mac_config(struct net /* The MAC only supports FD mode */ MVNETA_GMAC_CONFIG_FULL_DUPLEX; @@ -42,7 +42,7 @@ Signed-off-by: Russell King new_an |= MVNETA_GMAC_AN_FLOW_CTRL_EN; break; -@@ -3710,6 +3718,22 @@ static int mvneta_ethtool_set_ringparam( +@@ -3711,6 +3719,22 @@ static int mvneta_ethtool_set_ringparam( return 0; } @@ -65,7 +65,7 @@ Signed-off-by: Russell King static void mvneta_ethtool_get_strings(struct net_device *netdev, u32 sset, u8 *data) { -@@ -3901,6 +3925,8 @@ const struct ethtool_ops mvneta_eth_tool +@@ -3902,6 +3926,8 @@ const struct ethtool_ops mvneta_eth_tool .get_drvinfo = mvneta_ethtool_get_drvinfo, .get_ringparam = mvneta_ethtool_get_ringparam, .set_ringparam = mvneta_ethtool_set_ringparam, diff --git a/target/linux/mvebu/patches-4.9/425-net-mvneta-enable-flow-control-for-PHY-connections.patch b/target/linux/mvebu/patches-4.9/425-net-mvneta-enable-flow-control-for-PHY-connections.patch index 29d45f9216..f2d14afdac 100644 --- a/target/linux/mvebu/patches-4.9/425-net-mvneta-enable-flow-control-for-PHY-connections.patch +++ b/target/linux/mvebu/patches-4.9/425-net-mvneta-enable-flow-control-for-PHY-connections.patch @@ -12,7 +12,7 @@ Signed-off-by: Russell King --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -3152,10 +3152,11 @@ static void mvneta_validate_support(stru +@@ -3153,10 +3153,11 @@ static void mvneta_validate_support(stru phylink_set(mask, 10baseT_Full); phylink_set(mask, 100baseT_Half); phylink_set(mask, 100baseT_Full); diff --git a/target/linux/mvebu/patches-4.9/426-net-mvneta-enable-flow-control-for-fixed-connections.patch b/target/linux/mvebu/patches-4.9/426-net-mvneta-enable-flow-control-for-fixed-connections.patch index 60f549cc8b..bac74ca4e7 100644 --- a/target/linux/mvebu/patches-4.9/426-net-mvneta-enable-flow-control-for-fixed-connections.patch +++ b/target/linux/mvebu/patches-4.9/426-net-mvneta-enable-flow-control-for-fixed-connections.patch @@ -11,7 +11,7 @@ Signed-off-by: Russell King --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -3142,6 +3142,8 @@ static void mvneta_validate_support(stru +@@ -3143,6 +3143,8 @@ static void mvneta_validate_support(stru phylink_set(mask, BNC); phylink_set(mask, Backplane); @@ -20,7 +20,7 @@ Signed-off-by: Russell King /* Half-duplex at speeds higher than 100Mbit is unsupported */ phylink_set(mask, 1000baseT_Full); phylink_set(mask, 1000baseX_Full); -@@ -3154,9 +3156,6 @@ static void mvneta_validate_support(stru +@@ -3155,9 +3157,6 @@ static void mvneta_validate_support(stru phylink_set(mask, 100baseT_Full); } diff --git a/target/linux/mvebu/patches-4.9/427-phylink-add-EEE-support.patch b/target/linux/mvebu/patches-4.9/427-phylink-add-EEE-support.patch index 767830419c..bc7e5eeeb4 100644 --- a/target/linux/mvebu/patches-4.9/427-phylink-add-EEE-support.patch +++ b/target/linux/mvebu/patches-4.9/427-phylink-add-EEE-support.patch @@ -10,7 +10,7 @@ Signed-off-by: Russell King --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -3304,7 +3304,8 @@ static void mvneta_mac_link_down(struct +@@ -3305,7 +3305,8 @@ static void mvneta_mac_link_down(struct } } diff --git a/target/linux/mvebu/patches-4.9/428-net-mvneta-add-EEE-support.patch b/target/linux/mvebu/patches-4.9/428-net-mvneta-add-EEE-support.patch index e1e11ee290..3a20a06bee 100644 --- a/target/linux/mvebu/patches-4.9/428-net-mvneta-add-EEE-support.patch +++ b/target/linux/mvebu/patches-4.9/428-net-mvneta-add-EEE-support.patch @@ -13,7 +13,7 @@ Signed-off-by: Russell King --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -243,6 +243,12 @@ +@@ -244,6 +244,12 @@ #define MVNETA_TXQ_TOKEN_SIZE_REG(q) (0x3e40 + ((q) << 2)) #define MVNETA_TXQ_TOKEN_SIZE_MAX 0x7fffffff @@ -26,7 +26,7 @@ Signed-off-by: Russell King #define MVNETA_CAUSE_TXQ_SENT_DESC_ALL_MASK 0xff /* Descriptor ring Macros */ -@@ -316,6 +322,11 @@ +@@ -317,6 +323,11 @@ #define MVNETA_RX_GET_BM_POOL_ID(rxd) \ (((rxd)->status & MVNETA_RXD_BM_POOL_MASK) >> MVNETA_RXD_BM_POOL_SHIFT) @@ -38,7 +38,7 @@ Signed-off-by: Russell King struct mvneta_statistic { unsigned short offset; unsigned short type; -@@ -324,6 +335,7 @@ struct mvneta_statistic { +@@ -325,6 +336,7 @@ struct mvneta_statistic { #define T_REG_32 32 #define T_REG_64 64 @@ -46,7 +46,7 @@ Signed-off-by: Russell King static const struct mvneta_statistic mvneta_statistics[] = { { 0x3000, T_REG_64, "good_octets_received", }, -@@ -358,6 +370,7 @@ static const struct mvneta_statistic mvn +@@ -359,6 +371,7 @@ static const struct mvneta_statistic mvn { 0x304c, T_REG_32, "broadcast_frames_sent", }, { 0x3054, T_REG_32, "fc_sent", }, { 0x300c, T_REG_32, "internal_mac_transmit_err", }, @@ -54,7 +54,7 @@ Signed-off-by: Russell King }; struct mvneta_pcpu_stats { -@@ -416,6 +429,10 @@ struct mvneta_port { +@@ -417,6 +430,10 @@ struct mvneta_port { struct mvneta_bm_pool *pool_short; int bm_win_id; @@ -65,7 +65,7 @@ Signed-off-by: Russell King u64 ethtool_stats[ARRAY_SIZE(mvneta_statistics)]; u32 indir[MVNETA_RSS_LU_TABLE_SIZE]; -@@ -3289,6 +3306,18 @@ static void mvneta_mac_config(struct net +@@ -3290,6 +3307,18 @@ static void mvneta_mac_config(struct net mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, new_an); } @@ -84,7 +84,7 @@ Signed-off-by: Russell King static void mvneta_mac_link_down(struct net_device *ndev, unsigned int mode) { struct mvneta_port *pp = netdev_priv(ndev); -@@ -3302,6 +3331,9 @@ static void mvneta_mac_link_down(struct +@@ -3303,6 +3332,9 @@ static void mvneta_mac_link_down(struct val |= MVNETA_GMAC_FORCE_LINK_DOWN; mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val); } @@ -94,7 +94,7 @@ Signed-off-by: Russell King } static void mvneta_mac_link_up(struct net_device *ndev, unsigned int mode, -@@ -3318,6 +3350,11 @@ static void mvneta_mac_link_up(struct ne +@@ -3319,6 +3351,11 @@ static void mvneta_mac_link_up(struct ne } mvneta_port_up(pp); @@ -106,7 +106,7 @@ Signed-off-by: Russell King } static const struct phylink_mac_ops mvneta_phylink_ops = { -@@ -3770,6 +3807,13 @@ static void mvneta_ethtool_update_stats( +@@ -3771,6 +3808,13 @@ static void mvneta_ethtool_update_stats( high = readl_relaxed(base + s->offset + 4); val = (u64)high << 32 | low; break; @@ -120,7 +120,7 @@ Signed-off-by: Russell King } pp->ethtool_stats[i] += val; -@@ -3905,6 +3949,47 @@ static u16 mvneta_select_queue(struct ne +@@ -3906,6 +3950,47 @@ static u16 mvneta_select_queue(struct ne } @@ -168,7 +168,7 @@ Signed-off-by: Russell King static const struct net_device_ops mvneta_netdev_ops = { .ndo_open = mvneta_open, .ndo_stop = mvneta_stop, -@@ -3937,6 +4022,8 @@ const struct ethtool_ops mvneta_eth_tool +@@ -3938,6 +4023,8 @@ const struct ethtool_ops mvneta_eth_tool .set_rxfh = mvneta_ethtool_set_rxfh, .get_link_ksettings = mvneta_ethtool_get_link_ksettings, .set_link_ksettings = mvneta_ethtool_set_link_ksettings, diff --git a/target/linux/mvebu/patches-4.9/430-net-mvneta-add-module-EEPROM-reading-support.patch b/target/linux/mvebu/patches-4.9/430-net-mvneta-add-module-EEPROM-reading-support.patch index 1f35a18b9d..834bbe9a3e 100644 --- a/target/linux/mvebu/patches-4.9/430-net-mvneta-add-module-EEPROM-reading-support.patch +++ b/target/linux/mvebu/patches-4.9/430-net-mvneta-add-module-EEPROM-reading-support.patch @@ -7,7 +7,7 @@ Signed-off-by: Russell King --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -3949,6 +3949,22 @@ static u16 mvneta_select_queue(struct ne +@@ -3950,6 +3950,22 @@ static u16 mvneta_select_queue(struct ne } @@ -30,7 +30,7 @@ Signed-off-by: Russell King static int mvneta_ethtool_get_eee(struct net_device *dev, struct ethtool_eee *eee) { -@@ -4022,6 +4038,8 @@ const struct ethtool_ops mvneta_eth_tool +@@ -4023,6 +4039,8 @@ const struct ethtool_ops mvneta_eth_tool .set_rxfh = mvneta_ethtool_set_rxfh, .get_link_ksettings = mvneta_ethtool_get_link_ksettings, .set_link_ksettings = mvneta_ethtool_set_link_ksettings, diff --git a/target/linux/ramips/patches-4.9/0034-NET-multi-phy-support.patch b/target/linux/ramips/patches-4.9/0034-NET-multi-phy-support.patch index c19c3cd35a..4d7f590285 100644 --- a/target/linux/ramips/patches-4.9/0034-NET-multi-phy-support.patch +++ b/target/linux/ramips/patches-4.9/0034-NET-multi-phy-support.patch @@ -43,7 +43,7 @@ Signed-off-by: John Crispin } --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -373,6 +373,7 @@ struct phy_device { +@@ -369,6 +369,7 @@ struct phy_device { bool is_pseudo_fixed_link; bool has_fixups; bool suspended; diff --git a/target/linux/ramips/patches-4.9/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch b/target/linux/ramips/patches-4.9/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch index e1e2bae461..9d45ad010d 100644 --- a/target/linux/ramips/patches-4.9/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch +++ b/target/linux/ramips/patches-4.9/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch @@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_WRITE); return ret; } -@@ -1715,8 +1787,10 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1717,8 +1789,10 @@ int spi_nor_scan(struct spi_nor *nor, co else if (mtd->size > 0x1000000) { /* enable 4-byte addressing if the device exceeds 16MiB */ nor->addr_width = 4; diff --git a/target/linux/ramips/patches-4.9/0054-mtd-add-chunked-read-io-to-m25p80.patch b/target/linux/ramips/patches-4.9/0054-mtd-add-chunked-read-io-to-m25p80.patch index 7f88ec52a7..0a429d2bcd 100644 --- a/target/linux/ramips/patches-4.9/0054-mtd-add-chunked-read-io-to-m25p80.patch +++ b/target/linux/ramips/patches-4.9/0054-mtd-add-chunked-read-io-to-m25p80.patch @@ -83,7 +83,7 @@ if (info->flags & USE_FSR) nor->flags |= SNOR_F_USE_FSR; -@@ -1735,11 +1798,20 @@ int spi_nor_scan(struct spi_nor *nor, co +@@ -1737,11 +1800,20 @@ int spi_nor_scan(struct spi_nor *nor, co mtd->writebufsize = nor->page_size; if (np) { diff --git a/target/linux/ramips/patches-4.9/0063-set-CM_GCR_BASE_CMDEFTGT_MEM-according-to-datasheet.patch b/target/linux/ramips/patches-4.9/0063-set-CM_GCR_BASE_CMDEFTGT_MEM-according-to-datasheet.patch deleted file mode 100644 index d950c47573..0000000000 --- a/target/linux/ramips/patches-4.9/0063-set-CM_GCR_BASE_CMDEFTGT_MEM-according-to-datasheet.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/arch/mips/include/asm/mips-cm.h -+++ b/arch/mips/include/asm/mips-cm.h -@@ -239,8 +239,7 @@ BUILD_CM_Cx_R_(tcid_8_priority, 0x80) - #define CM_GCR_BASE_GCRBASE_MSK (_ULCAST_(0x1ffff) << 15) - #define CM_GCR_BASE_CMDEFTGT_SHF 0 - #define CM_GCR_BASE_CMDEFTGT_MSK (_ULCAST_(0x3) << 0) --#define CM_GCR_BASE_CMDEFTGT_DISABLED 0 --#define CM_GCR_BASE_CMDEFTGT_MEM 1 -+#define CM_GCR_BASE_CMDEFTGT_MEM 0 - #define CM_GCR_BASE_CMDEFTGT_IOCU0 2 - #define CM_GCR_BASE_CMDEFTGT_IOCU1 3 - diff --git a/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch b/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch index 285e4d2762..a5cdec5525 100644 --- a/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch +++ b/target/linux/sunxi/patches-4.9/0052-stmmac-form-4-12.patch @@ -2887,7 +2887,7 @@ + + /* Display RX ring */ + priv->hw->desc->display_ring(head_rx, DMA_RX_SIZE, true); - } ++ } +} + +static void stmmac_display_tx_rings(struct stmmac_priv *priv) @@ -2906,15 +2906,15 @@ + head_tx = (void *)tx_q->dma_etx; + else + head_tx = (void *)tx_q->dma_tx; ++ ++ priv->hw->desc->display_ring(head_tx, DMA_TX_SIZE, false); + } ++} - /* Display Rx ring */ - priv->hw->desc->display_ring(head_rx, DMA_RX_SIZE, true); - /* Display Tx ring */ - priv->hw->desc->display_ring(head_tx, DMA_TX_SIZE, false); -+ priv->hw->desc->display_ring(head_tx, DMA_TX_SIZE, false); -+ } -+} -+ +static void stmmac_display_rings(struct stmmac_priv *priv) +{ + /* Display RX ring */ @@ -3131,7 +3131,7 @@ if (priv->hw->mode->set_16kib_bfsize) bfsize = priv->hw->mode->set_16kib_bfsize(dev->mtu); -@@ -1018,235 +1228,409 @@ static int init_dma_desc_rings(struct ne +@@ -1018,257 +1228,516 @@ static int init_dma_desc_rings(struct ne priv->dma_buf_sz = bfsize; @@ -3163,7 +3163,10 @@ + p = &((rx_q->dma_erx + i)->basic); + else + p = rx_q->dma_rx + i; -+ + +- ret = stmmac_init_rx_buffers(priv, p, i, flags); +- if (ret) +- goto err_init_rx_buffers; + ret = stmmac_init_rx_buffers(priv, p, i, flags, + queue); + if (ret) @@ -3173,18 +3176,15 @@ + rx_q->rx_skbuff[i], rx_q->rx_skbuff[i]->data, + (unsigned int)rx_q->rx_skbuff_dma[i]); + } - -- ret = stmmac_init_rx_buffers(priv, p, i, flags); -- if (ret) -- goto err_init_rx_buffers; ++ + rx_q->cur_rx = 0; + rx_q->dirty_rx = (unsigned int)(i - DMA_RX_SIZE); ++ ++ stmmac_clear_rx_descriptors(priv, queue); - netif_dbg(priv, probe, priv->dev, "[%p]\t[%p]\t[%x]\n", - priv->rx_skbuff[i], priv->rx_skbuff[i]->data, - (unsigned int)priv->rx_skbuff_dma[i]); -+ stmmac_clear_rx_descriptors(priv, queue); -+ + /* Setup the chained descriptor addresses */ + if (priv->mode == STMMAC_CHAIN_MODE) { + if (priv->extend_desc) @@ -3277,8 +3277,13 @@ + priv->hw->mode->init(tx_q->dma_tx, + tx_q->dma_tx_phy, + DMA_TX_SIZE, 0); -+ } -+ + } + +- priv->tx_skbuff_dma[i].buf = 0; +- priv->tx_skbuff_dma[i].map_as_page = false; +- priv->tx_skbuff_dma[i].len = 0; +- priv->tx_skbuff_dma[i].last_segment = false; +- priv->tx_skbuff[i] = NULL; + for (i = 0; i < DMA_TX_SIZE; i++) { + struct dma_desc *p; + if (priv->extend_desc) @@ -3300,13 +3305,8 @@ + tx_q->tx_skbuff_dma[i].len = 0; + tx_q->tx_skbuff_dma[i].last_segment = false; + tx_q->tx_skbuff[i] = NULL; - } - -- priv->tx_skbuff_dma[i].buf = 0; -- priv->tx_skbuff_dma[i].map_as_page = false; -- priv->tx_skbuff_dma[i].len = 0; -- priv->tx_skbuff_dma[i].last_segment = false; -- priv->tx_skbuff[i] = NULL; ++ } ++ + tx_q->dirty_tx = 0; + tx_q->cur_tx = 0; + @@ -3387,17 +3387,10 @@ - priv->tx_skbuff_dma[i].buf, - priv->tx_skbuff_dma[i].len, - DMA_TO_DEVICE); -- } + for (i = 0; i < DMA_TX_SIZE; i++) + stmmac_free_tx_buffer(priv, queue, i); +} - -- if (priv->tx_skbuff[i]) { -- dev_kfree_skb_any(priv->tx_skbuff[i]); -- priv->tx_skbuff[i] = NULL; -- priv->tx_skbuff_dma[i].buf = 0; -- priv->tx_skbuff_dma[i].map_as_page = false; -- } ++ +/** + * free_dma_rx_desc_resources - free RX dma desc resources + * @priv: private structure @@ -3426,11 +3419,10 @@ + + kfree(rx_q->rx_skbuff_dma); + kfree(rx_q->rx_skbuff); - } - } - - /** -- * alloc_dma_desc_resources - alloc TX/RX resources. ++ } ++} ++ ++/** + * free_dma_tx_desc_resources - free TX dma desc resources + * @priv: private structure + */ @@ -3463,90 +3455,36 @@ + +/** + * alloc_dma_rx_desc_resources - alloc RX resources. - * @priv: private structure - * Description: according to which descriptor can be used (extend or basic) - * this function allocates the resources for TX and RX paths. In case of - * reception, for example, it pre-allocated the RX socket buffer in order to - * allow zero-copy mechanism. - */ --static int alloc_dma_desc_resources(struct stmmac_priv *priv) ++ * @priv: private structure ++ * Description: according to which descriptor can be used (extend or basic) ++ * this function allocates the resources for TX and RX paths. In case of ++ * reception, for example, it pre-allocated the RX socket buffer in order to ++ * allow zero-copy mechanism. ++ */ +static int alloc_dma_rx_desc_resources(struct stmmac_priv *priv) - { ++{ + u32 rx_count = priv->plat->rx_queues_to_use; - int ret = -ENOMEM; ++ int ret = -ENOMEM; + u32 queue; - -- priv->rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE, sizeof(dma_addr_t), -- GFP_KERNEL); -- if (!priv->rx_skbuff_dma) -- return -ENOMEM; ++ + /* RX queues buffers and DMA */ + for (queue = 0; queue < rx_count; queue++) { + struct stmmac_rx_queue *rx_q = &priv->rx_queue[queue]; - -- priv->rx_skbuff = kmalloc_array(DMA_RX_SIZE, sizeof(struct sk_buff *), -- GFP_KERNEL); -- if (!priv->rx_skbuff) -- goto err_rx_skbuff; -- -- priv->tx_skbuff_dma = kmalloc_array(DMA_TX_SIZE, -- sizeof(*priv->tx_skbuff_dma), -- GFP_KERNEL); -- if (!priv->tx_skbuff_dma) -- goto err_tx_skbuff_dma; -- -- priv->tx_skbuff = kmalloc_array(DMA_TX_SIZE, sizeof(struct sk_buff *), -- GFP_KERNEL); -- if (!priv->tx_skbuff) -- goto err_tx_skbuff; -- -- if (priv->extend_desc) { -- priv->dma_erx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE * -- sizeof(struct -- dma_extended_desc), -- &priv->dma_rx_phy, -- GFP_KERNEL); -- if (!priv->dma_erx) -- goto err_dma; ++ + rx_q->queue_index = queue; + rx_q->priv_data = priv; - -- priv->dma_etx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE * -- sizeof(struct -- dma_extended_desc), -- &priv->dma_tx_phy, ++ + rx_q->rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE, + sizeof(dma_addr_t), - GFP_KERNEL); -- if (!priv->dma_etx) { -- dma_free_coherent(priv->device, DMA_RX_SIZE * -- sizeof(struct dma_extended_desc), -- priv->dma_erx, priv->dma_rx_phy); -- goto err_dma; -- } -- } else { -- priv->dma_rx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE * -- sizeof(struct dma_desc), -- &priv->dma_rx_phy, -- GFP_KERNEL); -- if (!priv->dma_rx) -- goto err_dma; ++ GFP_KERNEL); + if (!rx_q->rx_skbuff_dma) + return -ENOMEM; - -- priv->dma_tx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE * -- sizeof(struct dma_desc), -- &priv->dma_tx_phy, -- GFP_KERNEL); -- if (!priv->dma_tx) { -- dma_free_coherent(priv->device, DMA_RX_SIZE * -- sizeof(struct dma_desc), -- priv->dma_rx, priv->dma_rx_phy); ++ + rx_q->rx_skbuff = kmalloc_array(DMA_RX_SIZE, + sizeof(struct sk_buff *), + GFP_KERNEL); + if (!rx_q->rx_skbuff) - goto err_dma; ++ goto err_dma; + + if (priv->extend_desc) { + rx_q->dma_erx = dma_zalloc_coherent(priv->device, @@ -3567,19 +3505,12 @@ + GFP_KERNEL); + if (!rx_q->dma_rx) + goto err_dma; - } - } - - return 0; - - err_dma: -- kfree(priv->tx_skbuff); --err_tx_skbuff: -- kfree(priv->tx_skbuff_dma); --err_tx_skbuff_dma: -- kfree(priv->rx_skbuff); --err_rx_skbuff: -- kfree(priv->rx_skbuff_dma); ++ } ++ } ++ ++ return 0; ++ ++err_dma: + free_dma_rx_desc_resources(priv); + + return ret; @@ -3636,7 +3567,7 @@ + GFP_KERNEL); + if (!tx_q->dma_tx) + goto err_dma_buffers; -+ } + } + } + + return 0; @@ -3644,9 +3575,9 @@ +err_dma_buffers: + free_dma_tx_desc_resources(priv); + - return ret; - } - ++ return ret; ++} ++ +/** + * alloc_dma_desc_resources - alloc TX/RX resources. + * @priv: private structure @@ -3672,78 +3603,119 @@ + * free_dma_desc_resources - free dma desc resources + * @priv: private structure + */ - static void free_dma_desc_resources(struct stmmac_priv *priv) - { -- /* Release the DMA TX/RX socket buffers */ -- dma_free_rx_skbufs(priv); -- dma_free_tx_skbufs(priv); -- -- /* Free DMA regions of consistent memory previously allocated */ -- if (!priv->extend_desc) { -- dma_free_coherent(priv->device, -- DMA_TX_SIZE * sizeof(struct dma_desc), -- priv->dma_tx, priv->dma_tx_phy); -- dma_free_coherent(priv->device, -- DMA_RX_SIZE * sizeof(struct dma_desc), -- priv->dma_rx, priv->dma_rx_phy); -- } else { -- dma_free_coherent(priv->device, DMA_TX_SIZE * -- sizeof(struct dma_extended_desc), -- priv->dma_etx, priv->dma_tx_phy); -- dma_free_coherent(priv->device, DMA_RX_SIZE * -- sizeof(struct dma_extended_desc), -- priv->dma_erx, priv->dma_rx_phy); -- } -- kfree(priv->rx_skbuff_dma); -- kfree(priv->rx_skbuff); -- kfree(priv->tx_skbuff_dma); -- kfree(priv->tx_skbuff); ++static void free_dma_desc_resources(struct stmmac_priv *priv) ++{ + /* Release the DMA RX socket buffers */ + free_dma_rx_desc_resources(priv); + + /* Release the DMA TX socket buffers */ + free_dma_tx_desc_resources(priv); - } - - /** -@@ -1256,19 +1640,104 @@ static void free_dma_desc_resources(stru - */ - static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv) - { -- int rx_count = priv->dma_cap.number_rx_queues; -- int queue = 0; ++} ++ ++/** ++ * stmmac_mac_enable_rx_queues - Enable MAC rx queues ++ * @priv: driver private structure ++ * Description: It is used for enabling the rx queues in the MAC ++ */ ++static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv) ++{ + u32 rx_queues_count = priv->plat->rx_queues_to_use; + int queue; + u8 mode; -- /* If GMAC does not have multiple queues, then this is not necessary*/ -- if (rx_count == 1) -- return; +- if (priv->tx_skbuff[i]) { +- dev_kfree_skb_any(priv->tx_skbuff[i]); +- priv->tx_skbuff[i] = NULL; +- priv->tx_skbuff_dma[i].buf = 0; +- priv->tx_skbuff_dma[i].map_as_page = false; +- } + for (queue = 0; queue < rx_queues_count; queue++) { + mode = priv->plat->rx_queues_cfg[queue].mode_to_use; + priv->hw->mac->rx_queue_enable(priv->hw, mode, queue); -+ } -+} + } + } -- /** -- * If the core is synthesized with multiple rx queues / multiple -- * dma channels, then rx queues will be disabled by default. -- * For now only rx queue 0 is enabled. -- */ -- priv->hw->mac->rx_queue_enable(priv->hw, queue); -+/** + /** +- * alloc_dma_desc_resources - alloc TX/RX resources. +- * @priv: private structure +- * Description: according to which descriptor can be used (extend or basic) +- * this function allocates the resources for TX and RX paths. In case of +- * reception, for example, it pre-allocated the RX socket buffer in order to +- * allow zero-copy mechanism. + * stmmac_start_rx_dma - start RX DMA channel + * @priv: driver private structure + * @chan: RX channel index + * Description: + * This starts a RX DMA channel -+ */ + */ +-static int alloc_dma_desc_resources(struct stmmac_priv *priv) +static void stmmac_start_rx_dma(struct stmmac_priv *priv, u32 chan) -+{ + { +- int ret = -ENOMEM; +- +- priv->rx_skbuff_dma = kmalloc_array(DMA_RX_SIZE, sizeof(dma_addr_t), +- GFP_KERNEL); +- if (!priv->rx_skbuff_dma) +- return -ENOMEM; +- +- priv->rx_skbuff = kmalloc_array(DMA_RX_SIZE, sizeof(struct sk_buff *), +- GFP_KERNEL); +- if (!priv->rx_skbuff) +- goto err_rx_skbuff; +- +- priv->tx_skbuff_dma = kmalloc_array(DMA_TX_SIZE, +- sizeof(*priv->tx_skbuff_dma), +- GFP_KERNEL); +- if (!priv->tx_skbuff_dma) +- goto err_tx_skbuff_dma; +- +- priv->tx_skbuff = kmalloc_array(DMA_TX_SIZE, sizeof(struct sk_buff *), +- GFP_KERNEL); +- if (!priv->tx_skbuff) +- goto err_tx_skbuff; +- +- if (priv->extend_desc) { +- priv->dma_erx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE * +- sizeof(struct +- dma_extended_desc), +- &priv->dma_rx_phy, +- GFP_KERNEL); +- if (!priv->dma_erx) +- goto err_dma; +- +- priv->dma_etx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE * +- sizeof(struct +- dma_extended_desc), +- &priv->dma_tx_phy, +- GFP_KERNEL); +- if (!priv->dma_etx) { +- dma_free_coherent(priv->device, DMA_RX_SIZE * +- sizeof(struct dma_extended_desc), +- priv->dma_erx, priv->dma_rx_phy); +- goto err_dma; +- } +- } else { +- priv->dma_rx = dma_zalloc_coherent(priv->device, DMA_RX_SIZE * +- sizeof(struct dma_desc), +- &priv->dma_rx_phy, +- GFP_KERNEL); +- if (!priv->dma_rx) +- goto err_dma; + netdev_dbg(priv->dev, "DMA RX processes started in channel %d\n", chan); + priv->hw->dma->start_rx(priv->ioaddr, chan); +} -+ + +- priv->dma_tx = dma_zalloc_coherent(priv->device, DMA_TX_SIZE * +- sizeof(struct dma_desc), +- &priv->dma_tx_phy, +- GFP_KERNEL); +- if (!priv->dma_tx) { +- dma_free_coherent(priv->device, DMA_RX_SIZE * +- sizeof(struct dma_desc), +- priv->dma_rx, priv->dma_rx_phy); +- goto err_dma; +- } +- } +/** + * stmmac_start_tx_dma - start TX DMA channel + * @priv: driver private structure @@ -3756,7 +3728,8 @@ + netdev_dbg(priv->dev, "DMA TX processes started in channel %d\n", chan); + priv->hw->dma->start_tx(priv->ioaddr, chan); +} -+ + +- return 0; +/** + * stmmac_stop_rx_dma - stop RX DMA channel + * @priv: driver private structure @@ -3769,7 +3742,16 @@ + netdev_dbg(priv->dev, "DMA RX processes stopped in channel %d\n", chan); + priv->hw->dma->stop_rx(priv->ioaddr, chan); +} -+ + +-err_dma: +- kfree(priv->tx_skbuff); +-err_tx_skbuff: +- kfree(priv->tx_skbuff_dma); +-err_tx_skbuff_dma: +- kfree(priv->rx_skbuff); +-err_rx_skbuff: +- kfree(priv->rx_skbuff_dma); +- return ret; +/** + * stmmac_stop_tx_dma - stop TX DMA channel + * @priv: driver private structure @@ -3781,8 +3763,9 @@ +{ + netdev_dbg(priv->dev, "DMA TX processes stopped in channel %d\n", chan); + priv->hw->dma->stop_tx(priv->ioaddr, chan); -+} -+ + } + +-static void free_dma_desc_resources(struct stmmac_priv *priv) +/** + * stmmac_start_all_dma - start all RX and TX DMA channels + * @priv: driver private structure @@ -3790,7 +3773,31 @@ + * This starts all the RX and TX DMA channels + */ +static void stmmac_start_all_dma(struct stmmac_priv *priv) -+{ + { +- /* Release the DMA TX/RX socket buffers */ +- dma_free_rx_skbufs(priv); +- dma_free_tx_skbufs(priv); +- +- /* Free DMA regions of consistent memory previously allocated */ +- if (!priv->extend_desc) { +- dma_free_coherent(priv->device, +- DMA_TX_SIZE * sizeof(struct dma_desc), +- priv->dma_tx, priv->dma_tx_phy); +- dma_free_coherent(priv->device, +- DMA_RX_SIZE * sizeof(struct dma_desc), +- priv->dma_rx, priv->dma_rx_phy); +- } else { +- dma_free_coherent(priv->device, DMA_TX_SIZE * +- sizeof(struct dma_extended_desc), +- priv->dma_etx, priv->dma_tx_phy); +- dma_free_coherent(priv->device, DMA_RX_SIZE * +- sizeof(struct dma_extended_desc), +- priv->dma_erx, priv->dma_rx_phy); +- } +- kfree(priv->rx_skbuff_dma); +- kfree(priv->rx_skbuff); +- kfree(priv->tx_skbuff_dma); +- kfree(priv->tx_skbuff); + u32 rx_channels_count = priv->plat->rx_queues_to_use; + u32 tx_channels_count = priv->plat->tx_queues_to_use; + u32 chan = 0; @@ -3800,23 +3807,38 @@ + + for (chan = 0; chan < tx_channels_count; chan++) + stmmac_start_tx_dma(priv, chan); -+} -+ -+/** + } + + /** +- * stmmac_mac_enable_rx_queues - Enable MAC rx queues +- * @priv: driver private structure +- * Description: It is used for enabling the rx queues in the MAC + * stmmac_stop_all_dma - stop all RX and TX DMA channels + * @priv: driver private structure + * Description: + * This stops the RX and TX DMA channels -+ */ + */ +-static void stmmac_mac_enable_rx_queues(struct stmmac_priv *priv) +static void stmmac_stop_all_dma(struct stmmac_priv *priv) -+{ + { +- int rx_count = priv->dma_cap.number_rx_queues; +- int queue = 0; + u32 rx_channels_count = priv->plat->rx_queues_to_use; + u32 tx_channels_count = priv->plat->tx_queues_to_use; + u32 chan = 0; -+ + +- /* If GMAC does not have multiple queues, then this is not necessary*/ +- if (rx_count == 1) +- return; + for (chan = 0; chan < rx_channels_count; chan++) + stmmac_stop_rx_dma(priv, chan); -+ + +- /** +- * If the core is synthesized with multiple rx queues / multiple +- * dma channels, then rx queues will be disabled by default. +- * For now only rx queue 0 is enabled. +- */ +- priv->hw->mac->rx_queue_enable(priv->hw, queue); + for (chan = 0; chan < tx_channels_count; chan++) + stmmac_stop_tx_dma(priv, chan); } diff --git a/target/linux/uml/patches-4.9/001-um-Allow-building-and-running-on-older-hosts.patch b/target/linux/uml/patches-4.9/001-um-Allow-building-and-running-on-older-hosts.patch index 9de557bfd5..501cca82f7 100644 --- a/target/linux/uml/patches-4.9/001-um-Allow-building-and-running-on-older-hosts.patch +++ b/target/linux/uml/patches-4.9/001-um-Allow-building-and-running-on-older-hosts.patch @@ -35,7 +35,7 @@ Signed-off-by: Richard Weinberger struct iovec iov; if (have_xstate_support) { -@@ -34,9 +35,9 @@ int save_fp_registers(int pid, unsigned +@@ -34,9 +35,9 @@ int save_fp_registers(int pid, unsigned if (ptrace(PTRACE_GETREGSET, pid, NT_X86_XSTATE, &iov) < 0) return -errno; return 0; diff --git a/target/linux/x86/patches-4.9/100-fix_cs5535_clockevt.patch b/target/linux/x86/patches-4.9/100-fix_cs5535_clockevt.patch index c49ddca7d6..c3a7fce9ce 100644 --- a/target/linux/x86/patches-4.9/100-fix_cs5535_clockevt.patch +++ b/target/linux/x86/patches-4.9/100-fix_cs5535_clockevt.patch @@ -1,6 +1,6 @@ --- a/drivers/clocksource/cs5535-clockevt.c +++ b/drivers/clocksource/cs5535-clockevt.c -@@ -129,7 +129,8 @@ static irqreturn_t mfgpt_tick(int irq, v +@@ -130,7 +130,8 @@ static irqreturn_t mfgpt_tick(int irq, v cs5535_mfgpt_write(cs5535_event_clock, MFGPT_REG_SETUP, MFGPT_SETUP_CNTEN | MFGPT_SETUP_CMP2);