X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Flayerscape%2Fpatches-4.9%2F202-core-linux-support-layerscape.patch;h=9dcecb07892eb499500d5c672575b3bc2211e709;hb=f621b539512e5b6c83dd2de1bc2dba06e40cd7ea;hp=6eeb6ffe773be64e41bece53ecc0deac272ec024;hpb=4e209e07f780211e1b5f1a4b16980481f167227f;p=openwrt%2Fstaging%2Flynxis.git 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..9dcecb0789 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 @@ -1,9 +1,9 @@ -From c37953457a7ebeb0d97ae8574b3d41274fcd9119 Mon Sep 17 00:00:00 2001 +From 67a2eceebe9dcd92a1a5f3e912340c8975c84434 Mon Sep 17 00:00:00 2001 From: Yangbo Lu -Date: Wed, 1 Nov 2017 16:22:33 +0800 -Subject: [PATCH] core-linux: support layerscape +Date: Wed, 17 Jan 2018 14:50:41 +0800 +Subject: [PATCH 02/30] core-linux: support layerscape -This is a integrated patch for layerscape core-linux support. +This is an integrated patch for layerscape core-linux support. Signed-off-by: Madalin Bucur Signed-off-by: Zhao Qiang @@ -18,7 +18,7 @@ Signed-off-by: Arnd Bergmann Signed-off-by: Yangbo Lu --- drivers/base/devres.c | 66 ++++++++++++++++++++++++++++ - drivers/base/soc.c | 66 ++++++++++++++++++++++++++++ + drivers/base/soc.c | 70 +++++++++++++++++++++++++++++ include/linux/device.h | 19 ++++++++ include/linux/fsl/svr.h | 97 +++++++++++++++++++++++++++++++++++++++++ include/linux/fsl_devices.h | 3 ++ @@ -30,11 +30,9 @@ Signed-off-by: Yangbo Lu net/core/dev.c | 13 +++++- net/core/skbuff.c | 29 +++++++++++- net/sched/sch_generic.c | 7 +++ - 13 files changed, 309 insertions(+), 3 deletions(-) + 13 files changed, 313 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 @@ @@ -126,7 +122,7 @@ index b63f23e6..0c5cf872 100644 static DEFINE_IDA(soc_ida); -@@ -159,3 +160,68 @@ static int __init soc_bus_register(void) +@@ -159,3 +160,72 @@ static int __init soc_bus_register(void) return bus_register(&soc_bus_type); } core_initcall(soc_bus_register); @@ -137,19 +133,23 @@ index b63f23e6..0c5cf872 100644 + const struct soc_device_attribute *match = arg; + + if (match->machine && -+ !glob_match(match->machine, soc_dev->attr->machine)) ++ (!soc_dev->attr->machine || ++ !glob_match(match->machine, soc_dev->attr->machine))) + return 0; + + if (match->family && -+ !glob_match(match->family, soc_dev->attr->family)) ++ (!soc_dev->attr->family || ++ !glob_match(match->family, soc_dev->attr->family))) + return 0; + + if (match->revision && -+ !glob_match(match->revision, soc_dev->attr->revision)) ++ (!soc_dev->attr->revision || ++ !glob_match(match->revision, soc_dev->attr->revision))) + return 0; + + if (match->soc_id && -+ !glob_match(match->soc_id, soc_dev->attr->soc_id)) ++ (!soc_dev->attr->soc_id || ++ !glob_match(match->soc_id, soc_dev->attr->soc_id))) + return 0; + + return 1; @@ -195,11 +195,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 +223,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 +323,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 +336,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 +354,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 +374,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 +384,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 +392,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 +402,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 +419,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) +@@ -6615,9 +6615,18 @@ int dev_set_mtu(struct net_device *dev, if (new_mtu == dev->mtu) return 0; @@ -461,11 +442,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 +477,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 +486,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 +494,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 +510,3 @@ index 8018dd3a..ea760b83 100644 } if (some_queue_timedout) { --- -2.14.1 -