Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
@@ -218,11 +218,6 @@ menu "Target Images"
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
default y
|
||||
|
||||
config GRUB_SERIAL
|
||||
string "Serial port device"
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
default "ttyS0"
|
||||
|
||||
config GRUB_BAUDRATE
|
||||
int "Serial port baud rate"
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
@@ -231,7 +226,8 @@ menu "Target Images"
|
||||
|
||||
config GRUB_FLOWCONTROL
|
||||
bool "Use RTE/CTS on serial console"
|
||||
depends on GRUB_SERIAL != ""
|
||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||
depends on TARGET_SERIAL != ""
|
||||
|
||||
config GRUB_BOOTOPTS
|
||||
string "Extra kernel boot options"
|
||||
@@ -288,6 +284,11 @@ menu "Target Images"
|
||||
select PACKAGE_kmod-e1000
|
||||
default y if BUILDBOT
|
||||
|
||||
config TARGET_SERIAL
|
||||
string "Serial port device"
|
||||
depends on TARGET_x86 || TARGET_armsr
|
||||
default "ttyS0"
|
||||
|
||||
config TARGET_IMAGES_GZIP
|
||||
bool "GZip images"
|
||||
depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armsr || TARGET_malta
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.15 = .139
|
||||
LINUX_KERNEL_HASH-5.15.139 = 9c68c10dfe18e59b892e940436dea6a18d167160d55e62563cf7282244d8044e
|
||||
LINUX_VERSION-5.15 = .140
|
||||
LINUX_KERNEL_HASH-5.15.140 = be2bee8b346f3ccb35879f16c80a323edda571e36190403805c14a9ea24e4a47
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-6.1 = .63
|
||||
LINUX_KERNEL_HASH-6.1.63 = c29d043b01dd4fcc61a24fd027c5c7912b15b1f10d8e3c83a0cb935885f0758d
|
||||
LINUX_VERSION-6.1 = .64
|
||||
LINUX_KERNEL_HASH-6.1.64 = 629daa38f3ea67f29610bfbd53f9f38f46834d3654451e9474100490c66dc7e7
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
GRUB_SERIAL:=$(call qstrip,$(CONFIG_GRUB_SERIAL))
|
||||
GRUB_SERIAL:=$(call qstrip,$(CONFIG_TARGET_SERIAL))
|
||||
ifeq ($(GRUB_SERIAL),)
|
||||
$(error This platform requires CONFIG_GRUB_SERIAL be set!)
|
||||
$(error This platform requires CONFIG_TARGET_SERIAL be set!)
|
||||
endif
|
||||
|
||||
define Package/base-files/install-target
|
||||
|
||||
@@ -15,7 +15,7 @@ ifneq ($(CONFIG_GRUB_CONSOLE),)
|
||||
GRUB_TERMINALS += console
|
||||
endif
|
||||
|
||||
GRUB_SERIAL:=$(call qstrip,$(CONFIG_GRUB_SERIAL))
|
||||
GRUB_SERIAL:=$(call qstrip,$(CONFIG_TARGET_SERIAL))
|
||||
|
||||
GRUB_SERIAL_CONFIG := serial --unit=0 --speed=$(CONFIG_GRUB_BAUDRATE) --word=8 --parity=no --stop=1 --rtscts=$(if $(CONFIG_GRUB_FLOWCONTROL),on,off)
|
||||
GRUB_TERMINALS += serial
|
||||
|
||||
@@ -266,7 +266,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
static inline int mmc_blk_part_switch(struct mmc_card *card,
|
||||
unsigned int part_type);
|
||||
static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
|
||||
@@ -2994,6 +3001,8 @@ static int mmc_blk_probe(struct mmc_card
|
||||
@@ -2996,6 +3003,8 @@ static int mmc_blk_probe(struct mmc_card
|
||||
{
|
||||
struct mmc_blk_data *md;
|
||||
int ret = 0;
|
||||
@@ -275,7 +275,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
/*
|
||||
* Check that the card supports the command class(es) we need.
|
||||
@@ -3001,7 +3010,16 @@ static int mmc_blk_probe(struct mmc_card
|
||||
@@ -3003,7 +3012,16 @@ static int mmc_blk_probe(struct mmc_card
|
||||
if (!(card->csd.cmdclass & CCC_BLOCK_READ))
|
||||
return -ENODEV;
|
||||
|
||||
@@ -293,7 +293,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
card->complete_wq = alloc_workqueue("mmc_complete",
|
||||
WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
|
||||
@@ -3016,6 +3034,17 @@ static int mmc_blk_probe(struct mmc_card
|
||||
@@ -3018,6 +3036,17 @@ static int mmc_blk_probe(struct mmc_card
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
@@ -325,7 +325,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
}
|
||||
--- a/drivers/mmc/core/quirks.h
|
||||
+++ b/drivers/mmc/core/quirks.h
|
||||
@@ -129,6 +129,14 @@ static const struct mmc_fixup __maybe_un
|
||||
@@ -130,6 +130,14 @@ static const struct mmc_fixup __maybe_un
|
||||
MMC_FIXUP(CID_NAME_ANY, CID_MANFID_SANDISK_SD, 0x5344, add_quirk_sd,
|
||||
MMC_QUIRK_BROKEN_SD_DISCARD),
|
||||
|
||||
@@ -2007,12 +2007,12 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
sdhci_dumpregs(host);
|
||||
--- a/include/linux/mmc/card.h
|
||||
+++ b/include/linux/mmc/card.h
|
||||
@@ -296,6 +296,8 @@ struct mmc_card {
|
||||
#define MMC_QUIRK_BROKEN_SD_DISCARD (1<<14) /* Disable broken SD discard support */
|
||||
@@ -297,6 +297,8 @@ struct mmc_card {
|
||||
#define MMC_QUIRK_BROKEN_SD_CACHE (1<<15) /* Disable broken SD cache support */
|
||||
#define MMC_QUIRK_BROKEN_CACHE_FLUSH (1<<16) /* Don't flush cache until the write has occurred */
|
||||
|
||||
+#define MMC_QUIRK_ERASE_BROKEN (1<<31) /* Skip erase */
|
||||
+
|
||||
bool written_flag; /* Indicates eMMC has been written since power on */
|
||||
bool reenable_cmdq; /* Re-enable Command Queue */
|
||||
|
||||
unsigned int erase_size; /* erase size in sectors */
|
||||
|
||||
@@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
#define USB_VENDOR_ID_BELKIN 0x050d
|
||||
#define USB_DEVICE_ID_FLIP_KVM 0x3201
|
||||
|
||||
@@ -1368,6 +1371,9 @@
|
||||
@@ -1369,6 +1372,9 @@
|
||||
#define USB_VENDOR_ID_XIAOMI 0x2717
|
||||
#define USB_DEVICE_ID_MI_SILENT_MOUSE 0x5014
|
||||
|
||||
@@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL },
|
||||
@@ -198,6 +199,7 @@ static const struct hid_device_id hid_qu
|
||||
@@ -199,6 +200,7 @@ static const struct hid_device_id hid_qu
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_GROUP_AUDIO), HID_QUIRK_NOGET },
|
||||
|
||||
@@ -594,7 +594,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
VM_BUG_ON_PAGE(tail > 2 && page_tail->mapping != TAIL_MAPPING,
|
||||
--- a/mm/memcontrol.c
|
||||
+++ b/mm/memcontrol.c
|
||||
@@ -5178,6 +5178,7 @@ static void __mem_cgroup_free(struct mem
|
||||
@@ -5179,6 +5179,7 @@ static void __mem_cgroup_free(struct mem
|
||||
|
||||
static void mem_cgroup_free(struct mem_cgroup *memcg)
|
||||
{
|
||||
@@ -602,7 +602,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
memcg_wb_domain_exit(memcg);
|
||||
__mem_cgroup_free(memcg);
|
||||
}
|
||||
@@ -5241,6 +5242,7 @@ static struct mem_cgroup *mem_cgroup_all
|
||||
@@ -5242,6 +5243,7 @@ static struct mem_cgroup *mem_cgroup_all
|
||||
memcg->deferred_split_queue.split_queue_len = 0;
|
||||
#endif
|
||||
idr_replace(&mem_cgroup_idr, memcg, memcg->id.id);
|
||||
|
||||
@@ -424,7 +424,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
/* will mmdrop() in finish_task_switch(). */
|
||||
--- a/mm/memcontrol.c
|
||||
+++ b/mm/memcontrol.c
|
||||
@@ -6212,6 +6212,30 @@ static void mem_cgroup_move_task(void)
|
||||
@@ -6213,6 +6213,30 @@ static void mem_cgroup_move_task(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -455,7 +455,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
static int seq_puts_memcg_tunable(struct seq_file *m, unsigned long value)
|
||||
{
|
||||
if (value == PAGE_COUNTER_MAX)
|
||||
@@ -6555,6 +6579,7 @@ struct cgroup_subsys memory_cgrp_subsys
|
||||
@@ -6556,6 +6580,7 @@ struct cgroup_subsys memory_cgrp_subsys
|
||||
.css_reset = mem_cgroup_css_reset,
|
||||
.css_rstat_flush = mem_cgroup_css_rstat_flush,
|
||||
.can_attach = mem_cgroup_can_attach,
|
||||
|
||||
@@ -318,7 +318,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
mctz = soft_limit_tree_from_page(page);
|
||||
if (!mctz)
|
||||
return;
|
||||
@@ -3433,6 +3443,9 @@ unsigned long mem_cgroup_soft_limit_recl
|
||||
@@ -3434,6 +3444,9 @@ unsigned long mem_cgroup_soft_limit_recl
|
||||
unsigned long excess;
|
||||
unsigned long nr_scanned;
|
||||
|
||||
@@ -328,7 +328,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
if (order > 0)
|
||||
return 0;
|
||||
|
||||
@@ -5321,6 +5334,7 @@ static int mem_cgroup_css_online(struct
|
||||
@@ -5322,6 +5335,7 @@ static int mem_cgroup_css_online(struct
|
||||
if (unlikely(mem_cgroup_is_root(memcg)))
|
||||
queue_delayed_work(system_unbound_wq, &stats_flush_dwork,
|
||||
2UL*HZ);
|
||||
@@ -336,7 +336,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5347,6 +5361,7 @@ static void mem_cgroup_css_offline(struc
|
||||
@@ -5348,6 +5362,7 @@ static void mem_cgroup_css_offline(struc
|
||||
memcg_offline_kmem(memcg);
|
||||
reparent_shrinker_deferred(memcg);
|
||||
wb_memcg_offline(memcg);
|
||||
@@ -344,7 +344,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
|
||||
drain_all_stock(memcg);
|
||||
|
||||
@@ -5358,6 +5373,7 @@ static void mem_cgroup_css_released(stru
|
||||
@@ -5359,6 +5374,7 @@ static void mem_cgroup_css_released(stru
|
||||
struct mem_cgroup *memcg = mem_cgroup_from_css(css);
|
||||
|
||||
invalidate_reclaim_iterators(memcg);
|
||||
|
||||
@@ -125,7 +125,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
pl = kzalloc(sizeof(*pl), GFP_KERNEL);
|
||||
if (!pl)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
@@ -946,9 +987,10 @@ EXPORT_SYMBOL_GPL(phylink_create);
|
||||
@@ -947,9 +988,10 @@ EXPORT_SYMBOL_GPL(phylink_create);
|
||||
* @pl: a pointer to a &struct phylink returned from phylink_create()
|
||||
* @pcs: a pointer to the &struct phylink_pcs
|
||||
*
|
||||
@@ -139,7 +139,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
*
|
||||
* Please note that there are behavioural changes with the mac_config()
|
||||
* callback if a PCS is present (denoting a newer setup) so removing a PCS
|
||||
@@ -959,6 +1001,14 @@ void phylink_set_pcs(struct phylink *pl,
|
||||
@@ -960,6 +1002,14 @@ void phylink_set_pcs(struct phylink *pl,
|
||||
{
|
||||
pl->pcs = pcs;
|
||||
pl->pcs_ops = pcs->ops;
|
||||
|
||||
@@ -66,7 +66,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
phy_interface_empty(config->supported_interfaces)) {
|
||||
dev_err(config->dev,
|
||||
"phylink: error: empty supported_interfaces but mac_select_pcs() method present\n");
|
||||
@@ -1220,6 +1227,7 @@ struct phylink *phylink_create(struct ph
|
||||
@@ -1221,6 +1228,7 @@ struct phylink *phylink_create(struct ph
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (pl->pcs_ops) {
|
||||
err = pl->pcs_ops->pcs_config(pl->pcs, pl->cur_link_an_mode,
|
||||
state->interface,
|
||||
@@ -1260,6 +1285,7 @@ struct phylink *phylink_create(struct ph
|
||||
@@ -1261,6 +1286,7 @@ struct phylink *phylink_create(struct ph
|
||||
pl->link_config.speed = SPEED_UNKNOWN;
|
||||
pl->link_config.duplex = DUPLEX_UNKNOWN;
|
||||
pl->link_config.an_enabled = true;
|
||||
@@ -83,7 +83,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
pl->mac_ops = mac_ops;
|
||||
__set_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state);
|
||||
timer_setup(&pl->link_poll, phylink_fixed_poll, 0);
|
||||
@@ -1651,6 +1677,8 @@ void phylink_start(struct phylink *pl)
|
||||
@@ -1652,6 +1678,8 @@ void phylink_start(struct phylink *pl)
|
||||
if (pl->netdev)
|
||||
netif_carrier_off(pl->netdev);
|
||||
|
||||
@@ -92,7 +92,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* Apply the link configuration to the MAC when starting. This allows
|
||||
* a fixed-link to start with the correct parameters, and also
|
||||
* ensures that we set the appropriate advertisement for Serdes links.
|
||||
@@ -1661,6 +1689,8 @@ void phylink_start(struct phylink *pl)
|
||||
@@ -1662,6 +1690,8 @@ void phylink_start(struct phylink *pl)
|
||||
*/
|
||||
phylink_mac_initial_config(pl, true);
|
||||
|
||||
@@ -101,7 +101,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
clear_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state);
|
||||
phylink_run_resolve(pl);
|
||||
|
||||
@@ -1680,16 +1710,9 @@ void phylink_start(struct phylink *pl)
|
||||
@@ -1681,16 +1711,9 @@ void phylink_start(struct phylink *pl)
|
||||
poll = true;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (poll)
|
||||
mod_timer(&pl->link_poll, jiffies + HZ);
|
||||
if (pl->phydev)
|
||||
@@ -1726,6 +1749,10 @@ void phylink_stop(struct phylink *pl)
|
||||
@@ -1727,6 +1750,10 @@ void phylink_stop(struct phylink *pl)
|
||||
}
|
||||
|
||||
phylink_run_resolve_and_disable(pl, PHYLINK_DISABLE_STOPPED);
|
||||
|
||||
@@ -17,7 +17,7 @@ Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
||||
|
||||
--- a/drivers/bluetooth/btusb.c
|
||||
+++ b/drivers/bluetooth/btusb.c
|
||||
@@ -2275,6 +2275,23 @@ struct btmtk_section_map {
|
||||
@@ -2287,6 +2287,23 @@ struct btmtk_section_map {
|
||||
};
|
||||
} __packed;
|
||||
|
||||
@@ -41,7 +41,7 @@ Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
||||
static void btusb_mtk_wmt_recv(struct urb *urb)
|
||||
{
|
||||
struct hci_dev *hdev = urb->context;
|
||||
@@ -3926,6 +3943,7 @@ static int btusb_probe(struct usb_interf
|
||||
@@ -3941,6 +3958,7 @@ static int btusb_probe(struct usb_interf
|
||||
hdev->shutdown = btusb_mtk_shutdown;
|
||||
hdev->manufacturer = 70;
|
||||
hdev->cmd_timeout = btusb_mtk_cmd_timeout;
|
||||
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
||||
|
||||
--- a/drivers/bluetooth/btusb.c
|
||||
+++ b/drivers/bluetooth/btusb.c
|
||||
@@ -2280,7 +2280,7 @@ static int btusb_set_bdaddr_mtk(struct h
|
||||
@@ -2292,7 +2292,7 @@ static int btusb_set_bdaddr_mtk(struct h
|
||||
struct sk_buff *skb;
|
||||
long ret;
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
||||
|
||||
--- a/drivers/bluetooth/btusb.c
|
||||
+++ b/drivers/bluetooth/btusb.c
|
||||
@@ -464,6 +464,9 @@ static const struct usb_device_id blackl
|
||||
@@ -476,6 +476,9 @@ static const struct usb_device_id blackl
|
||||
{ USB_DEVICE(0x13d3, 0x3564), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH |
|
||||
BTUSB_VALID_LE_STATES },
|
||||
|
||||
@@ -56,7 +56,7 @@ Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
||||
|
||||
--- a/drivers/bluetooth/btusb.c
|
||||
+++ b/drivers/bluetooth/btusb.c
|
||||
@@ -455,6 +455,9 @@ static const struct usb_device_id blackl
|
||||
@@ -467,6 +467,9 @@ static const struct usb_device_id blackl
|
||||
BTUSB_VALID_LE_STATES },
|
||||
|
||||
/* Additional MediaTek MT7921 Bluetooth devices */
|
||||
|
||||
@@ -54,7 +54,7 @@ Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
|
||||
|
||||
--- a/drivers/bluetooth/btusb.c
|
||||
+++ b/drivers/bluetooth/btusb.c
|
||||
@@ -473,6 +473,9 @@ static const struct usb_device_id blackl
|
||||
@@ -485,6 +485,9 @@ static const struct usb_device_id blackl
|
||||
{ USB_DEVICE(0x0489, 0xe0cd), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH |
|
||||
BTUSB_VALID_LE_STATES },
|
||||
|
||||
@@ -325,7 +325,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
|
||||
mctz = soft_limit_tree.rb_tree_per_node[nid];
|
||||
if (!mctz)
|
||||
return;
|
||||
@@ -3523,6 +3533,9 @@ unsigned long mem_cgroup_soft_limit_recl
|
||||
@@ -3524,6 +3534,9 @@ unsigned long mem_cgroup_soft_limit_recl
|
||||
struct mem_cgroup_tree_per_node *mctz;
|
||||
unsigned long excess;
|
||||
|
||||
@@ -335,7 +335,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
|
||||
if (order > 0)
|
||||
return 0;
|
||||
|
||||
@@ -5386,6 +5399,7 @@ static int mem_cgroup_css_online(struct
|
||||
@@ -5387,6 +5400,7 @@ static int mem_cgroup_css_online(struct
|
||||
if (unlikely(mem_cgroup_is_root(memcg)))
|
||||
queue_delayed_work(system_unbound_wq, &stats_flush_dwork,
|
||||
2UL*HZ);
|
||||
@@ -343,7 +343,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
|
||||
return 0;
|
||||
offline_kmem:
|
||||
memcg_offline_kmem(memcg);
|
||||
@@ -5417,6 +5431,7 @@ static void mem_cgroup_css_offline(struc
|
||||
@@ -5418,6 +5432,7 @@ static void mem_cgroup_css_offline(struc
|
||||
memcg_offline_kmem(memcg);
|
||||
reparent_shrinker_deferred(memcg);
|
||||
wb_memcg_offline(memcg);
|
||||
@@ -351,7 +351,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
|
||||
|
||||
drain_all_stock(memcg);
|
||||
|
||||
@@ -5428,6 +5443,7 @@ static void mem_cgroup_css_released(stru
|
||||
@@ -5429,6 +5444,7 @@ static void mem_cgroup_css_released(stru
|
||||
struct mem_cgroup *memcg = mem_cgroup_from_css(css);
|
||||
|
||||
invalidate_reclaim_iterators(memcg);
|
||||
|
||||
@@ -76,7 +76,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (pl->pcs) {
|
||||
err = pl->pcs->ops->pcs_config(pl->pcs, pl->cur_link_an_mode,
|
||||
state->interface,
|
||||
@@ -1498,6 +1524,7 @@ struct phylink *phylink_create(struct ph
|
||||
@@ -1499,6 +1525,7 @@ struct phylink *phylink_create(struct ph
|
||||
pl->link_config.speed = SPEED_UNKNOWN;
|
||||
pl->link_config.duplex = DUPLEX_UNKNOWN;
|
||||
pl->link_config.an_enabled = true;
|
||||
@@ -84,7 +84,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
pl->mac_ops = mac_ops;
|
||||
__set_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state);
|
||||
timer_setup(&pl->link_poll, phylink_fixed_poll, 0);
|
||||
@@ -1899,6 +1926,8 @@ void phylink_start(struct phylink *pl)
|
||||
@@ -1900,6 +1927,8 @@ void phylink_start(struct phylink *pl)
|
||||
if (pl->netdev)
|
||||
netif_carrier_off(pl->netdev);
|
||||
|
||||
@@ -93,7 +93,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* Apply the link configuration to the MAC when starting. This allows
|
||||
* a fixed-link to start with the correct parameters, and also
|
||||
* ensures that we set the appropriate advertisement for Serdes links.
|
||||
@@ -1909,6 +1938,8 @@ void phylink_start(struct phylink *pl)
|
||||
@@ -1910,6 +1939,8 @@ void phylink_start(struct phylink *pl)
|
||||
*/
|
||||
phylink_mac_initial_config(pl, true);
|
||||
|
||||
@@ -102,7 +102,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
phylink_enable_and_run_resolve(pl, PHYLINK_DISABLE_STOPPED);
|
||||
|
||||
if (pl->cfg_link_an_mode == MLO_AN_FIXED && pl->link_gpio) {
|
||||
@@ -1927,15 +1958,9 @@ void phylink_start(struct phylink *pl)
|
||||
@@ -1928,15 +1959,9 @@ void phylink_start(struct phylink *pl)
|
||||
poll = true;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (poll)
|
||||
mod_timer(&pl->link_poll, jiffies + HZ);
|
||||
if (pl->phydev)
|
||||
@@ -1972,6 +1997,10 @@ void phylink_stop(struct phylink *pl)
|
||||
@@ -1973,6 +1998,10 @@ void phylink_stop(struct phylink *pl)
|
||||
}
|
||||
|
||||
phylink_run_resolve_and_disable(pl, PHYLINK_DISABLE_STOPPED);
|
||||
|
||||
@@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
static void phylink_mac_pcs_get_state(struct phylink *pl,
|
||||
struct phylink_link_state *state)
|
||||
{
|
||||
@@ -3014,6 +3013,52 @@ void phylink_mii_c22_pcs_get_state(struc
|
||||
@@ -3015,6 +3014,52 @@ void phylink_mii_c22_pcs_get_state(struc
|
||||
EXPORT_SYMBOL_GPL(phylink_mii_c22_pcs_get_state);
|
||||
|
||||
/**
|
||||
@@ -118,7 +118,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
* phylink_mii_c22_pcs_set_advertisement() - configure the clause 37 PCS
|
||||
* advertisement
|
||||
* @pcs: a pointer to a &struct mdio_device.
|
||||
@@ -3085,6 +3130,46 @@ int phylink_mii_c22_pcs_set_advertisemen
|
||||
@@ -3086,6 +3131,46 @@ int phylink_mii_c22_pcs_set_advertisemen
|
||||
EXPORT_SYMBOL_GPL(phylink_mii_c22_pcs_set_advertisement);
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/netfilter/nf_tables_api.c
|
||||
+++ b/net/netfilter/nf_tables_api.c
|
||||
@@ -7703,7 +7703,7 @@ static int nft_register_flowtable_net_ho
|
||||
@@ -7708,7 +7708,7 @@ static int nft_register_flowtable_net_ho
|
||||
err = flowtable->data.type->setup(&flowtable->data,
|
||||
hook->ops.dev,
|
||||
FLOW_BLOCK_BIND);
|
||||
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/netfilter/nf_tables_api.c
|
||||
+++ b/net/netfilter/nf_tables_api.c
|
||||
@@ -7878,7 +7878,7 @@ static int nft_register_flowtable_net_ho
|
||||
@@ -7883,7 +7883,7 @@ static int nft_register_flowtable_net_ho
|
||||
err = flowtable->data.type->setup(&flowtable->data,
|
||||
hook->ops.dev,
|
||||
FLOW_BLOCK_BIND);
|
||||
|
||||
@@ -31,7 +31,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
|
||||
help
|
||||
--- a/init/main.c
|
||||
+++ b/init/main.c
|
||||
@@ -607,6 +607,29 @@ static inline void setup_nr_cpu_ids(void
|
||||
@@ -611,6 +611,29 @@ static inline void setup_nr_cpu_ids(void
|
||||
static inline void smp_prepare_cpus(unsigned int maxcpus) { }
|
||||
#endif
|
||||
|
||||
@@ -61,7 +61,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
|
||||
/*
|
||||
* We need to store the untouched command line for future reference.
|
||||
* We also need to store the touched command line since the parameter
|
||||
@@ -954,6 +977,7 @@ asmlinkage __visible void __init __no_sa
|
||||
@@ -958,6 +981,7 @@ asmlinkage __visible void __init __no_sa
|
||||
pr_notice("%s", linux_banner);
|
||||
early_security_init();
|
||||
setup_arch(&command_line);
|
||||
|
||||
@@ -27,7 +27,7 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
|
||||
--- a/drivers/firmware/qcom_scm.c
|
||||
+++ b/drivers/firmware/qcom_scm.c
|
||||
@@ -400,6 +400,29 @@ int qcom_scm_set_remote_state(u32 state,
|
||||
@@ -407,6 +407,29 @@ int qcom_scm_set_remote_state(u32 state,
|
||||
}
|
||||
EXPORT_SYMBOL(qcom_scm_set_remote_state);
|
||||
|
||||
@@ -57,7 +57,7 @@ Signed-off-by: Bjorn Andersson <andersson@kernel.org>
|
||||
static int __qcom_scm_set_dload_mode(struct device *dev, bool enable)
|
||||
{
|
||||
struct qcom_scm_desc desc = {
|
||||
@@ -1404,6 +1427,13 @@ static int qcom_scm_probe(struct platfor
|
||||
@@ -1411,6 +1434,13 @@ static int qcom_scm_probe(struct platfor
|
||||
|
||||
__get_convention();
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
}
|
||||
--- a/drivers/firmware/qcom_scm.c
|
||||
+++ b/drivers/firmware/qcom_scm.c
|
||||
@@ -305,6 +305,17 @@ static int qcom_scm_set_boot_addr(void *
|
||||
@@ -312,6 +312,17 @@ static int qcom_scm_set_boot_addr(void *
|
||||
desc.args[0] = flags;
|
||||
desc.args[1] = virt_to_phys(entry);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
|
||||
--- a/drivers/firmware/qcom_scm.c
|
||||
+++ b/drivers/firmware/qcom_scm.c
|
||||
@@ -1459,7 +1459,8 @@ static int qcom_scm_probe(struct platfor
|
||||
@@ -1466,7 +1466,8 @@ static int qcom_scm_probe(struct platfor
|
||||
static void qcom_scm_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
/* Clean shutdown, disable download mode to allow normal restart */
|
||||
|
||||
@@ -259,7 +259,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
|
||||
static int kernel_init(void *);
|
||||
|
||||
extern void init_IRQ(void);
|
||||
@@ -991,6 +995,18 @@ asmlinkage __visible void __init __no_sa
|
||||
@@ -995,6 +999,18 @@ asmlinkage __visible void __init __no_sa
|
||||
pr_notice("Kernel command line: %s\n", saved_command_line);
|
||||
/* parameters may set static keys */
|
||||
jump_label_init();
|
||||
|
||||
@@ -36,7 +36,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
|
||||
__netif_tx_unlock_bh(netdev_get_tx_queue(priv->dev, queue));
|
||||
|
||||
@@ -5474,12 +5475,13 @@ static int stmmac_napi_poll_tx(struct na
|
||||
@@ -5475,12 +5476,13 @@ static int stmmac_napi_poll_tx(struct na
|
||||
struct stmmac_channel *ch =
|
||||
container_of(napi, struct stmmac_channel, tx_napi);
|
||||
struct stmmac_priv *priv = ch->priv_data;
|
||||
@@ -51,7 +51,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
work_done = min(work_done, budget);
|
||||
|
||||
if (work_done < budget && napi_complete_done(napi, work_done)) {
|
||||
@@ -5490,6 +5492,10 @@ static int stmmac_napi_poll_tx(struct na
|
||||
@@ -5491,6 +5493,10 @@ static int stmmac_napi_poll_tx(struct na
|
||||
spin_unlock_irqrestore(&ch->lock, flags);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
return work_done;
|
||||
}
|
||||
|
||||
@@ -5499,11 +5505,12 @@ static int stmmac_napi_poll_rxtx(struct
|
||||
@@ -5500,11 +5506,12 @@ static int stmmac_napi_poll_rxtx(struct
|
||||
container_of(napi, struct stmmac_channel, rxtx_napi);
|
||||
struct stmmac_priv *priv = ch->priv_data;
|
||||
int rx_done, tx_done, rxtx_done;
|
||||
@@ -76,7 +76,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
tx_done = min(tx_done, budget);
|
||||
|
||||
rx_done = stmmac_rx_zc(priv, budget, chan);
|
||||
@@ -5528,6 +5535,10 @@ static int stmmac_napi_poll_rxtx(struct
|
||||
@@ -5529,6 +5536,10 @@ static int stmmac_napi_poll_rxtx(struct
|
||||
spin_unlock_irqrestore(&ch->lock, flags);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
From 4e242d6e08ad1d85b832e158cd0eafcb8f3f76a1 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Tue, 30 May 2023 22:40:31 +0200
|
||||
Subject: [PATCH v3] mtd: cfi_cmdset_0001: Byte swap OTP info
|
||||
|
||||
Currently the offset into the device when looking for OTP
|
||||
bits can go outside of the address of the MTD NOR devices,
|
||||
and if that memory isn't readable, bad things happen
|
||||
on the IXP4xx (added prints that illustrate the problem before
|
||||
the crash):
|
||||
|
||||
cfi_intelext_otp_walk walk OTP on chip 0 start at reg_prot_offset 0x00000100
|
||||
ixp4xx_copy_from copy from 0x00000100 to 0xc880dd78
|
||||
cfi_intelext_otp_walk walk OTP on chip 0 start at reg_prot_offset 0x12000000
|
||||
ixp4xx_copy_from copy from 0x12000000 to 0xc880dd78
|
||||
8<--- cut here ---
|
||||
Unable to handle kernel paging request at virtual address db000000
|
||||
[db000000] *pgd=00000000
|
||||
(...)
|
||||
|
||||
This happens in this case because the IXP4xx is big endian and
|
||||
the 32- and 16-bit fields in the struct cfi_intelext_otpinfo are not
|
||||
properly byteswapped. Compare to how the code in read_pri_intelext()
|
||||
byteswaps the fields in struct cfi_pri_intelext.
|
||||
|
||||
Adding a small byte swapping loop for the OTP in read_pri_intelext()
|
||||
and the crash goes away.
|
||||
|
||||
The problem went unnoticed for many years until I enabled
|
||||
CONFIG_MTD_OTP on the IXP4xx as well, triggering the bug.
|
||||
|
||||
Cc: Nicolas Pitre <npitre@baylibre.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
ChangeLog v2->v3:
|
||||
- Move the byte swapping to a small loop in read_pri_intelext()
|
||||
so all bytes are swapped as we reach cfi_intelext_otp_walk().
|
||||
ChangeLog v1->v2:
|
||||
- Drill deeper and discover a big endian compatibility issue.
|
||||
---
|
||||
drivers/mtd/chips/cfi_cmdset_0001.c | 20 ++++++++++++++++++--
|
||||
1 file changed, 18 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
|
||||
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
|
||||
@@ -421,9 +421,25 @@ read_pri_intelext(struct map_info *map,
|
||||
extra_size = 0;
|
||||
|
||||
/* Protection Register info */
|
||||
- if (extp->NumProtectionFields)
|
||||
+ if (extp->NumProtectionFields) {
|
||||
+ struct cfi_intelext_otpinfo *otp =
|
||||
+ (struct cfi_intelext_otpinfo *)&extp->extra[0];
|
||||
+
|
||||
extra_size += (extp->NumProtectionFields - 1) *
|
||||
- sizeof(struct cfi_intelext_otpinfo);
|
||||
+ sizeof(struct cfi_intelext_otpinfo);
|
||||
+
|
||||
+ if (extp_size >= sizeof(*extp) + extra_size) {
|
||||
+ int i;
|
||||
+
|
||||
+ /* Do some byteswapping if necessary */
|
||||
+ for (i = 0; i < extp->NumProtectionFields - 1; i++) {
|
||||
+ otp->ProtRegAddr = le32_to_cpu(otp->ProtRegAddr);
|
||||
+ otp->FactGroups = le16_to_cpu(otp->FactGroups);
|
||||
+ otp->UserGroups = le16_to_cpu(otp->UserGroups);
|
||||
+ otp++;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
if (extp->MinorVersion >= '1') {
|
||||
@@ -44,7 +44,7 @@ Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
|
||||
|
||||
/*
|
||||
* Some chips power-up with all sectors locked by default.
|
||||
@@ -1703,6 +1707,7 @@ static int cfi_intelext_write_words (str
|
||||
@@ -1719,6 +1723,7 @@ static int cfi_intelext_write_words (str
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
|
||||
static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
|
||||
unsigned long adr, const struct kvec **pvec,
|
||||
unsigned long *pvec_seek, int len)
|
||||
@@ -1931,6 +1936,7 @@ static int cfi_intelext_write_buffers (s
|
||||
@@ -1947,6 +1952,7 @@ static int cfi_intelext_write_buffers (s
|
||||
|
||||
return cfi_intelext_writev(mtd, &vec, 1, to, retlen);
|
||||
}
|
||||
|
||||
296
target/linux/mediatek/dts/mt7981b-confiabits-mt7981.dts
Normal file
296
target/linux/mediatek/dts/mt7981b-confiabits-mt7981.dts
Normal file
@@ -0,0 +1,296 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "mt7981.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
/ {
|
||||
model = "Confiabits MT7981";
|
||||
compatible = "confiabits,mt7981", "mediatek,mt7981";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
button-mesh {
|
||||
label = "mesh";
|
||||
linux,input-type = <EV_SW>;
|
||||
linux,code = <BTN_0>;
|
||||
gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
button-reset {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led-wlan5g {
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_WLAN;
|
||||
function-enumerator = <5>;
|
||||
gpios = <&pio 5 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
|
||||
led-wan-red {
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_WAN;
|
||||
gpios = <&pio 6 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_power: led-power {
|
||||
label = "blue:power"; // can be removed once #13837 is merged
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
gpios = <&pio 7 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led-lan1 {
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
function-enumerator = <1>;
|
||||
gpios = <&pio 9 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led-lan2 {
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
function-enumerator = <2>;
|
||||
gpios = <&pio 10 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led-lan3 {
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
function-enumerator = <3>;
|
||||
gpios = <&pio 11 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led-wan-blue {
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
function = LED_FUNCTION_WAN;
|
||||
gpios = <&pio 12 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led-wlan2g {
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_WLAN;
|
||||
function-enumerator = <2>;
|
||||
gpios = <&pio 34 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
led-mesh {
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
function = "mesh"; // no LED_FUNCTION_MESH yet
|
||||
gpios = <&pio 35 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&watchdog {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ð {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mdio_pins>;
|
||||
|
||||
status = "okay";
|
||||
|
||||
gmac0: mac@0 {
|
||||
compatible = "mediatek,eth-mac";
|
||||
reg = <0>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
nvmem-cell-names = "mac-address";
|
||||
nvmem-cells = <&macaddr_factory_4 0>;
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
&mdio_bus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
switch: switch@1f {
|
||||
compatible = "mediatek,mt7531";
|
||||
reg = <31>;
|
||||
reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
&switch {
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
port@4 {
|
||||
reg = <4>;
|
||||
label = "wan";
|
||||
|
||||
nvmem-cell-names = "mac-address";
|
||||
nvmem-cells = <&macaddr_factory_4 1>;
|
||||
};
|
||||
|
||||
port@6 {
|
||||
reg = <6>;
|
||||
label = "cpu";
|
||||
ethernet = <&gmac0>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi0_flash_pins>;
|
||||
status = "okay";
|
||||
|
||||
spi_nand: flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "spi-nand";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <52000000>;
|
||||
|
||||
spi-cal-enable;
|
||||
spi-cal-mode = "read-data";
|
||||
spi-cal-datalen = <7>;
|
||||
spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
|
||||
spi-cal-addrlen = <5>;
|
||||
spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
|
||||
|
||||
spi-tx-buswidth = <4>;
|
||||
spi-rx-buswidth = <4>;
|
||||
mediatek,nmbm;
|
||||
mediatek,bmt-max-ratio = <1>;
|
||||
mediatek,bmt-max-reserved-blocks = <64>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "BL2";
|
||||
reg = <0x00000 0x0100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x0100000 0x0080000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
factory: partition@180000 {
|
||||
label = "Factory";
|
||||
reg = <0x180000 0x0200000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
eeprom_factory_0: eeprom@0 {
|
||||
reg = <0x0 0x1000>;
|
||||
};
|
||||
|
||||
macaddr_factory_4: macaddr@4 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x4 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@380000 {
|
||||
label = "FIP";
|
||||
reg = <0x380000 0x0200000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@580000 {
|
||||
label = "ubi";
|
||||
reg = <0x580000 0x4000000>;
|
||||
compatible = "linux,ubi";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pio {
|
||||
spi0_flash_pins: spi0-pins {
|
||||
mux {
|
||||
function = "spi";
|
||||
groups = "spi0", "spi0_wp_hold";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&usb_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&xhci {
|
||||
status = "okay";
|
||||
mediatek,u3p-dis-msk = <0x1>;
|
||||
};
|
||||
|
||||
&wifi {
|
||||
status = "okay";
|
||||
nvmem-cells = <&eeprom_factory_0>;
|
||||
nvmem-cell-names = "eeprom";
|
||||
};
|
||||
@@ -15,6 +15,12 @@ bananapi,bpi-r3-mini)
|
||||
ucidef_set_led_netdev "wlan2g" "WLAN2G" "blue:wlan2g" "phy0-ap0"
|
||||
ucidef_set_led_netdev "wlan5g" "WLAN5G" "blue:wlan5g" "phy1-ap0"
|
||||
;;
|
||||
confiabits,mt7981)
|
||||
ucidef_set_led_netdev "lan1" "lan1" "blue:lan-1" "lan1" "link tx rx"
|
||||
ucidef_set_led_netdev "lan2" "lan2" "blue:lan-2" "lan2" "link tx rx"
|
||||
ucidef_set_led_netdev "lan3" "lan3" "blue:lan-3" "lan3" "link tx rx"
|
||||
ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" "link tx rx"
|
||||
;;
|
||||
cudy,wr3000-v1)
|
||||
ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan"
|
||||
;;
|
||||
|
||||
@@ -39,6 +39,7 @@ mediatek_setup_interfaces()
|
||||
cetron,ct3003-stock|\
|
||||
cetron,ct3003-ubootmod|\
|
||||
cmcc,a10-ubootmod|\
|
||||
confiabits,mt7981|\
|
||||
cudy,wr3000-v1|\
|
||||
jcg,q30|\
|
||||
jcg,q30-ubootmod|\
|
||||
|
||||
@@ -393,6 +393,23 @@ define Device/cmcc_rax3000m-nand-ubootmod
|
||||
endef
|
||||
TARGET_DEVICES += cmcc_rax3000m-nand-ubootmod
|
||||
|
||||
define Device/confiabits_mt7981
|
||||
DEVICE_VENDOR := Confiabits
|
||||
DEVICE_MODEL := MT7981
|
||||
DEVICE_DTS := mt7981b-confiabits-mt7981
|
||||
DEVICE_DTS_DIR := ../dts
|
||||
SUPPORTED_DEVICES += mediatek,mt7981-spim-snand-2500wan-gmac2-rfb
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGE_SIZE := 65536k
|
||||
KERNEL_IN_UBI := 1
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware \
|
||||
kmod-usb3 automount
|
||||
endef
|
||||
TARGET_DEVICES += confiabits_mt7981
|
||||
|
||||
define Device/cudy_wr3000-v1
|
||||
DEVICE_VENDOR := Cudy
|
||||
DEVICE_MODEL := WR3000
|
||||
|
||||
@@ -237,7 +237,7 @@ Signed-off-by: Wolfram Sang <wsa@kernel.org>
|
||||
priv->adap.algo = &hix5hd2_i2c_algorithm;
|
||||
--- a/drivers/i2c/busses/i2c-i801.c
|
||||
+++ b/drivers/i2c/busses/i2c-i801.c
|
||||
@@ -1111,7 +1111,7 @@ static void dmi_check_onboard_device(u8
|
||||
@@ -1110,7 +1110,7 @@ static void dmi_check_onboard_device(u8
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
info.addr = dmi_devices[i].i2c_addr;
|
||||
@@ -246,7 +246,7 @@ Signed-off-by: Wolfram Sang <wsa@kernel.org>
|
||||
i2c_new_client_device(adap, &info);
|
||||
break;
|
||||
}
|
||||
@@ -1267,7 +1267,7 @@ static void register_dell_lis3lv02d_i2c_
|
||||
@@ -1266,7 +1266,7 @@ static void register_dell_lis3lv02d_i2c_
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
info.addr = dell_lis3lv02d_devices[i].i2c_addr;
|
||||
@@ -403,7 +403,7 @@ Signed-off-by: Wolfram Sang <wsa@kernel.org>
|
||||
/* Slow down if we can't sense SCL */
|
||||
--- a/drivers/i2c/busses/i2c-pxa.c
|
||||
+++ b/drivers/i2c/busses/i2c-pxa.c
|
||||
@@ -1403,7 +1403,7 @@ static int i2c_pxa_probe(struct platform
|
||||
@@ -1463,7 +1463,7 @@ static int i2c_pxa_probe(struct platform
|
||||
spin_lock_init(&i2c->lock);
|
||||
init_waitqueue_head(&i2c->wait);
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
* managed to set the command line, unless CONFIG_CMDLINE_FORCE
|
||||
--- a/arch/arm64/Kconfig
|
||||
+++ b/arch/arm64/Kconfig
|
||||
@@ -2057,6 +2057,14 @@ config CMDLINE_FORCE
|
||||
@@ -2059,6 +2059,14 @@ config CMDLINE_FORCE
|
||||
|
||||
endchoice
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/phy/Kconfig
|
||||
+++ b/drivers/net/phy/Kconfig
|
||||
@@ -389,6 +389,12 @@ config ROCKCHIP_PHY
|
||||
@@ -386,6 +386,12 @@ config ROCKCHIP_PHY
|
||||
help
|
||||
Currently supports the integrated Ethernet PHY.
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
help
|
||||
--- a/drivers/net/phy/Makefile
|
||||
+++ b/drivers/net/phy/Makefile
|
||||
@@ -98,6 +98,7 @@ obj-$(CONFIG_QSEMI_PHY) += qsemi.o
|
||||
@@ -94,6 +94,7 @@ obj-$(CONFIG_QSEMI_PHY) += qsemi.o
|
||||
obj-$(CONFIG_REALTEK_PHY) += realtek.o
|
||||
obj-$(CONFIG_RENESAS_PHY) += uPD60620.o
|
||||
obj-$(CONFIG_ROCKCHIP_PHY) += rockchip.o
|
||||
|
||||
@@ -42,7 +42,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
L: linux-i2c@vger.kernel.org
|
||||
--- a/drivers/net/phy/Kconfig
|
||||
+++ b/drivers/net/phy/Kconfig
|
||||
@@ -314,6 +314,18 @@ config MEDIATEK_GE_PHY
|
||||
@@ -311,6 +311,18 @@ config MEDIATEK_GE_PHY
|
||||
help
|
||||
Supports the MediaTek Gigabit Ethernet PHYs.
|
||||
|
||||
@@ -63,7 +63,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
depends on PTP_1588_CLOCK_OPTIONAL
|
||||
--- a/drivers/net/phy/Makefile
|
||||
+++ b/drivers/net/phy/Makefile
|
||||
@@ -84,6 +84,7 @@ obj-$(CONFIG_MARVELL_PHY) += marvell.o
|
||||
@@ -80,6 +80,7 @@ obj-$(CONFIG_MARVELL_PHY) += marvell.o
|
||||
obj-$(CONFIG_MARVELL_88X2222_PHY) += marvell-88x2222.o
|
||||
obj-$(CONFIG_MAXLINEAR_GPHY) += mxl-gpy.o
|
||||
obj-$(CONFIG_MEDIATEK_GE_PHY) += mediatek-ge.o
|
||||
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
--- a/drivers/net/phy/Kconfig
|
||||
+++ b/drivers/net/phy/Kconfig
|
||||
@@ -326,6 +326,13 @@ config MEDIATEK_GE_SOC_PHY
|
||||
@@ -323,6 +323,13 @@ config MEDIATEK_GE_SOC_PHY
|
||||
present in the SoCs efuse and will dynamically calibrate VCM
|
||||
(common-mode voltage) during startup.
|
||||
|
||||
@@ -29,7 +29,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
depends on PTP_1588_CLOCK_OPTIONAL
|
||||
--- a/drivers/net/phy/Makefile
|
||||
+++ b/drivers/net/phy/Makefile
|
||||
@@ -83,6 +83,7 @@ obj-$(CONFIG_MARVELL_10G_PHY) += marvell
|
||||
@@ -79,6 +79,7 @@ obj-$(CONFIG_MARVELL_10G_PHY) += marvell
|
||||
obj-$(CONFIG_MARVELL_PHY) += marvell.o
|
||||
obj-$(CONFIG_MARVELL_88X2222_PHY) += marvell-88x2222.o
|
||||
obj-$(CONFIG_MAXLINEAR_GPHY) += mxl-gpy.o
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
* CONFIG_CMDLINE is meant to be a default in case nothing else
|
||||
--- a/arch/arm64/Kconfig
|
||||
+++ b/arch/arm64/Kconfig
|
||||
@@ -2234,6 +2234,14 @@ config CMDLINE_FORCE
|
||||
@@ -2236,6 +2236,14 @@ config CMDLINE_FORCE
|
||||
|
||||
endchoice
|
||||
|
||||
|
||||
@@ -1,139 +0,0 @@
|
||||
From ea8444b6fa5955c16b713dc83310882b93b44e62 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robert.marko@sartura.hr>
|
||||
Date: Fri, 10 Nov 2023 10:10:29 +0100
|
||||
Subject: [PATCH] Revert "i2c: pxa: move to generic GPIO recovery"
|
||||
|
||||
This reverts commit 0b01392c18b9993a584f36ace1d61118772ad0ca.
|
||||
|
||||
Conversion of PXA to generic I2C recovery, makes the I2C bus completely
|
||||
lock up if recovery pinctrl is present in the DT and I2C recovery is
|
||||
enabled.
|
||||
|
||||
So, until the generic I2C recovery can also work with PXA lets revert
|
||||
to have working I2C and I2C recovery again.
|
||||
|
||||
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
|
||||
Cc: stable@vger.kernel.org # 5.11+
|
||||
---
|
||||
drivers/i2c/busses/i2c-pxa.c | 76 ++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 68 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/drivers/i2c/busses/i2c-pxa.c
|
||||
+++ b/drivers/i2c/busses/i2c-pxa.c
|
||||
@@ -264,6 +264,9 @@ struct pxa_i2c {
|
||||
u32 hs_mask;
|
||||
|
||||
struct i2c_bus_recovery_info recovery;
|
||||
+ struct pinctrl *pinctrl;
|
||||
+ struct pinctrl_state *pinctrl_default;
|
||||
+ struct pinctrl_state *pinctrl_recovery;
|
||||
};
|
||||
|
||||
#define _IBMR(i2c) ((i2c)->reg_ibmr)
|
||||
@@ -1302,12 +1305,13 @@ static void i2c_pxa_prepare_recovery(str
|
||||
*/
|
||||
gpiod_set_value(i2c->recovery.scl_gpiod, ibmr & IBMR_SCLS);
|
||||
gpiod_set_value(i2c->recovery.sda_gpiod, ibmr & IBMR_SDAS);
|
||||
+
|
||||
+ WARN_ON(pinctrl_select_state(i2c->pinctrl, i2c->pinctrl_recovery));
|
||||
}
|
||||
|
||||
static void i2c_pxa_unprepare_recovery(struct i2c_adapter *adap)
|
||||
{
|
||||
struct pxa_i2c *i2c = adap->algo_data;
|
||||
- struct i2c_bus_recovery_info *bri = adap->bus_recovery_info;
|
||||
u32 isr;
|
||||
|
||||
/*
|
||||
@@ -1321,7 +1325,7 @@ static void i2c_pxa_unprepare_recovery(s
|
||||
i2c_pxa_do_reset(i2c);
|
||||
}
|
||||
|
||||
- WARN_ON(pinctrl_select_state(bri->pinctrl, bri->pins_default));
|
||||
+ WARN_ON(pinctrl_select_state(i2c->pinctrl, i2c->pinctrl_default));
|
||||
|
||||
dev_dbg(&i2c->adap.dev, "recovery: IBMR 0x%08x ISR 0x%08x\n",
|
||||
readl(_IBMR(i2c)), readl(_ISR(i2c)));
|
||||
@@ -1343,20 +1347,76 @@ static int i2c_pxa_init_recovery(struct
|
||||
if (IS_ENABLED(CONFIG_I2C_PXA_SLAVE))
|
||||
return 0;
|
||||
|
||||
- bri->pinctrl = devm_pinctrl_get(dev);
|
||||
- if (PTR_ERR(bri->pinctrl) == -ENODEV) {
|
||||
- bri->pinctrl = NULL;
|
||||
+ i2c->pinctrl = devm_pinctrl_get(dev);
|
||||
+ if (PTR_ERR(i2c->pinctrl) == -ENODEV)
|
||||
+ i2c->pinctrl = NULL;
|
||||
+ if (IS_ERR(i2c->pinctrl))
|
||||
+ return PTR_ERR(i2c->pinctrl);
|
||||
+
|
||||
+ if (!i2c->pinctrl)
|
||||
+ return 0;
|
||||
+
|
||||
+ i2c->pinctrl_default = pinctrl_lookup_state(i2c->pinctrl,
|
||||
+ PINCTRL_STATE_DEFAULT);
|
||||
+ i2c->pinctrl_recovery = pinctrl_lookup_state(i2c->pinctrl, "recovery");
|
||||
+
|
||||
+ if (IS_ERR(i2c->pinctrl_default) || IS_ERR(i2c->pinctrl_recovery)) {
|
||||
+ dev_info(dev, "missing pinmux recovery information: %ld %ld\n",
|
||||
+ PTR_ERR(i2c->pinctrl_default),
|
||||
+ PTR_ERR(i2c->pinctrl_recovery));
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Claiming GPIOs can influence the pinmux state, and may glitch the
|
||||
+ * I2C bus. Do this carefully.
|
||||
+ */
|
||||
+ bri->scl_gpiod = devm_gpiod_get(dev, "scl", GPIOD_OUT_HIGH_OPEN_DRAIN);
|
||||
+ if (bri->scl_gpiod == ERR_PTR(-EPROBE_DEFER))
|
||||
+ return -EPROBE_DEFER;
|
||||
+ if (IS_ERR(bri->scl_gpiod)) {
|
||||
+ dev_info(dev, "missing scl gpio recovery information: %pe\n",
|
||||
+ bri->scl_gpiod);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * We have SCL. Pull SCL low and wait a bit so that SDA glitches
|
||||
+ * have no effect.
|
||||
+ */
|
||||
+ gpiod_direction_output(bri->scl_gpiod, 0);
|
||||
+ udelay(10);
|
||||
+ bri->sda_gpiod = devm_gpiod_get(dev, "sda", GPIOD_OUT_HIGH_OPEN_DRAIN);
|
||||
+
|
||||
+ /* Wait a bit in case of a SDA glitch, and then release SCL. */
|
||||
+ udelay(10);
|
||||
+ gpiod_direction_output(bri->scl_gpiod, 1);
|
||||
+
|
||||
+ if (bri->sda_gpiod == ERR_PTR(-EPROBE_DEFER))
|
||||
+ return -EPROBE_DEFER;
|
||||
+
|
||||
+ if (IS_ERR(bri->sda_gpiod)) {
|
||||
+ dev_info(dev, "missing sda gpio recovery information: %pe\n",
|
||||
+ bri->sda_gpiod);
|
||||
return 0;
|
||||
}
|
||||
- if (IS_ERR(bri->pinctrl))
|
||||
- return PTR_ERR(bri->pinctrl);
|
||||
|
||||
bri->prepare_recovery = i2c_pxa_prepare_recovery;
|
||||
bri->unprepare_recovery = i2c_pxa_unprepare_recovery;
|
||||
+ bri->recover_bus = i2c_generic_scl_recovery;
|
||||
|
||||
i2c->adap.bus_recovery_info = bri;
|
||||
|
||||
- return 0;
|
||||
+ /*
|
||||
+ * Claiming GPIOs can change the pinmux state, which confuses the
|
||||
+ * pinctrl since pinctrl's idea of the current setting is unaffected
|
||||
+ * by the pinmux change caused by claiming the GPIO. Work around that
|
||||
+ * by switching pinctrl to the GPIO state here. We do it this way to
|
||||
+ * avoid glitching the I2C bus.
|
||||
+ */
|
||||
+ pinctrl_select_state(i2c->pinctrl, i2c->pinctrl_recovery);
|
||||
+
|
||||
+ return pinctrl_select_state(i2c->pinctrl, i2c->pinctrl_default);
|
||||
}
|
||||
|
||||
static int i2c_pxa_probe(struct platform_device *dev)
|
||||
@@ -1,139 +0,0 @@
|
||||
From ea8444b6fa5955c16b713dc83310882b93b44e62 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robert.marko@sartura.hr>
|
||||
Date: Fri, 10 Nov 2023 10:10:29 +0100
|
||||
Subject: [PATCH] Revert "i2c: pxa: move to generic GPIO recovery"
|
||||
|
||||
This reverts commit 0b01392c18b9993a584f36ace1d61118772ad0ca.
|
||||
|
||||
Conversion of PXA to generic I2C recovery, makes the I2C bus completely
|
||||
lock up if recovery pinctrl is present in the DT and I2C recovery is
|
||||
enabled.
|
||||
|
||||
So, until the generic I2C recovery can also work with PXA lets revert
|
||||
to have working I2C and I2C recovery again.
|
||||
|
||||
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
|
||||
Cc: stable@vger.kernel.org # 5.11+
|
||||
---
|
||||
drivers/i2c/busses/i2c-pxa.c | 76 ++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 68 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/drivers/i2c/busses/i2c-pxa.c
|
||||
+++ b/drivers/i2c/busses/i2c-pxa.c
|
||||
@@ -264,6 +264,9 @@ struct pxa_i2c {
|
||||
u32 hs_mask;
|
||||
|
||||
struct i2c_bus_recovery_info recovery;
|
||||
+ struct pinctrl *pinctrl;
|
||||
+ struct pinctrl_state *pinctrl_default;
|
||||
+ struct pinctrl_state *pinctrl_recovery;
|
||||
};
|
||||
|
||||
#define _IBMR(i2c) ((i2c)->reg_ibmr)
|
||||
@@ -1302,12 +1305,13 @@ static void i2c_pxa_prepare_recovery(str
|
||||
*/
|
||||
gpiod_set_value(i2c->recovery.scl_gpiod, ibmr & IBMR_SCLS);
|
||||
gpiod_set_value(i2c->recovery.sda_gpiod, ibmr & IBMR_SDAS);
|
||||
+
|
||||
+ WARN_ON(pinctrl_select_state(i2c->pinctrl, i2c->pinctrl_recovery));
|
||||
}
|
||||
|
||||
static void i2c_pxa_unprepare_recovery(struct i2c_adapter *adap)
|
||||
{
|
||||
struct pxa_i2c *i2c = adap->algo_data;
|
||||
- struct i2c_bus_recovery_info *bri = adap->bus_recovery_info;
|
||||
u32 isr;
|
||||
|
||||
/*
|
||||
@@ -1321,7 +1325,7 @@ static void i2c_pxa_unprepare_recovery(s
|
||||
i2c_pxa_do_reset(i2c);
|
||||
}
|
||||
|
||||
- WARN_ON(pinctrl_select_state(bri->pinctrl, bri->pins_default));
|
||||
+ WARN_ON(pinctrl_select_state(i2c->pinctrl, i2c->pinctrl_default));
|
||||
|
||||
dev_dbg(&i2c->adap.dev, "recovery: IBMR 0x%08x ISR 0x%08x\n",
|
||||
readl(_IBMR(i2c)), readl(_ISR(i2c)));
|
||||
@@ -1343,20 +1347,76 @@ static int i2c_pxa_init_recovery(struct
|
||||
if (IS_ENABLED(CONFIG_I2C_PXA_SLAVE))
|
||||
return 0;
|
||||
|
||||
- bri->pinctrl = devm_pinctrl_get(dev);
|
||||
- if (PTR_ERR(bri->pinctrl) == -ENODEV) {
|
||||
- bri->pinctrl = NULL;
|
||||
+ i2c->pinctrl = devm_pinctrl_get(dev);
|
||||
+ if (PTR_ERR(i2c->pinctrl) == -ENODEV)
|
||||
+ i2c->pinctrl = NULL;
|
||||
+ if (IS_ERR(i2c->pinctrl))
|
||||
+ return PTR_ERR(i2c->pinctrl);
|
||||
+
|
||||
+ if (!i2c->pinctrl)
|
||||
+ return 0;
|
||||
+
|
||||
+ i2c->pinctrl_default = pinctrl_lookup_state(i2c->pinctrl,
|
||||
+ PINCTRL_STATE_DEFAULT);
|
||||
+ i2c->pinctrl_recovery = pinctrl_lookup_state(i2c->pinctrl, "recovery");
|
||||
+
|
||||
+ if (IS_ERR(i2c->pinctrl_default) || IS_ERR(i2c->pinctrl_recovery)) {
|
||||
+ dev_info(dev, "missing pinmux recovery information: %ld %ld\n",
|
||||
+ PTR_ERR(i2c->pinctrl_default),
|
||||
+ PTR_ERR(i2c->pinctrl_recovery));
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Claiming GPIOs can influence the pinmux state, and may glitch the
|
||||
+ * I2C bus. Do this carefully.
|
||||
+ */
|
||||
+ bri->scl_gpiod = devm_gpiod_get(dev, "scl", GPIOD_OUT_HIGH_OPEN_DRAIN);
|
||||
+ if (bri->scl_gpiod == ERR_PTR(-EPROBE_DEFER))
|
||||
+ return -EPROBE_DEFER;
|
||||
+ if (IS_ERR(bri->scl_gpiod)) {
|
||||
+ dev_info(dev, "missing scl gpio recovery information: %pe\n",
|
||||
+ bri->scl_gpiod);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * We have SCL. Pull SCL low and wait a bit so that SDA glitches
|
||||
+ * have no effect.
|
||||
+ */
|
||||
+ gpiod_direction_output(bri->scl_gpiod, 0);
|
||||
+ udelay(10);
|
||||
+ bri->sda_gpiod = devm_gpiod_get(dev, "sda", GPIOD_OUT_HIGH_OPEN_DRAIN);
|
||||
+
|
||||
+ /* Wait a bit in case of a SDA glitch, and then release SCL. */
|
||||
+ udelay(10);
|
||||
+ gpiod_direction_output(bri->scl_gpiod, 1);
|
||||
+
|
||||
+ if (bri->sda_gpiod == ERR_PTR(-EPROBE_DEFER))
|
||||
+ return -EPROBE_DEFER;
|
||||
+
|
||||
+ if (IS_ERR(bri->sda_gpiod)) {
|
||||
+ dev_info(dev, "missing sda gpio recovery information: %pe\n",
|
||||
+ bri->sda_gpiod);
|
||||
return 0;
|
||||
}
|
||||
- if (IS_ERR(bri->pinctrl))
|
||||
- return PTR_ERR(bri->pinctrl);
|
||||
|
||||
bri->prepare_recovery = i2c_pxa_prepare_recovery;
|
||||
bri->unprepare_recovery = i2c_pxa_unprepare_recovery;
|
||||
+ bri->recover_bus = i2c_generic_scl_recovery;
|
||||
|
||||
i2c->adap.bus_recovery_info = bri;
|
||||
|
||||
- return 0;
|
||||
+ /*
|
||||
+ * Claiming GPIOs can change the pinmux state, which confuses the
|
||||
+ * pinctrl since pinctrl's idea of the current setting is unaffected
|
||||
+ * by the pinmux change caused by claiming the GPIO. Work around that
|
||||
+ * by switching pinctrl to the GPIO state here. We do it this way to
|
||||
+ * avoid glitching the I2C bus.
|
||||
+ */
|
||||
+ pinctrl_select_state(i2c->pinctrl, i2c->pinctrl_recovery);
|
||||
+
|
||||
+ return pinctrl_select_state(i2c->pinctrl, i2c->pinctrl_default);
|
||||
}
|
||||
|
||||
static int i2c_pxa_probe(struct platform_device *dev)
|
||||
@@ -258,7 +258,7 @@ Signed-off-by: Michael Gray <michael.gray@lantisproject.com>
|
||||
static int kernel_init(void *);
|
||||
|
||||
extern void init_IRQ(void);
|
||||
@@ -989,6 +993,18 @@ asmlinkage __visible void __init __no_sa
|
||||
@@ -993,6 +997,18 @@ asmlinkage __visible void __init __no_sa
|
||||
page_alloc_init();
|
||||
|
||||
pr_notice("Kernel command line: %s\n", saved_command_line);
|
||||
|
||||
@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -5222,6 +5222,16 @@ static int mvneta_setup_tc(struct net_de
|
||||
@@ -5234,6 +5234,16 @@ static int mvneta_setup_tc(struct net_de
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static const struct net_device_ops mvneta_netdev_ops = {
|
||||
.ndo_open = mvneta_open,
|
||||
.ndo_stop = mvneta_stop,
|
||||
@@ -5232,6 +5242,9 @@ static const struct net_device_ops mvnet
|
||||
@@ -5244,6 +5254,9 @@ static const struct net_device_ops mvnet
|
||||
.ndo_fix_features = mvneta_fix_features,
|
||||
.ndo_get_stats64 = mvneta_get_stats64,
|
||||
.ndo_eth_ioctl = mvneta_ioctl,
|
||||
|
||||
@@ -22,7 +22,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
|
||||
#include <linux/platform_data/x86/apple.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/suspend.h>
|
||||
@@ -5858,3 +5859,34 @@ static void nvidia_ion_ahci_fixup(struct
|
||||
@@ -5879,3 +5880,34 @@ static void nvidia_ion_ahci_fixup(struct
|
||||
pdev->dev_flags |= PCI_DEV_FLAGS_HAS_MSI_MASKING;
|
||||
}
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab8, nvidia_ion_ahci_fixup);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -18,7 +18,7 @@ Link: https://lore.kernel.org/r/20221107132901.489240-3-robimarko@gmail.com
|
||||
|
||||
--- a/drivers/clk/qcom/gcc-ipq8074.c
|
||||
+++ b/drivers/clk/qcom/gcc-ipq8074.c
|
||||
@@ -4671,6 +4671,20 @@ static const struct qcom_reset_map gcc_i
|
||||
@@ -4665,6 +4665,20 @@ static const struct qcom_reset_map gcc_i
|
||||
[GCC_PCIE1_AXI_SLAVE_ARES] = { 0x76040, 4 },
|
||||
[GCC_PCIE1_AHB_ARES] = { 0x76040, 5 },
|
||||
[GCC_PCIE1_AXI_MASTER_STICKY_ARES] = { 0x76040, 6 },
|
||||
|
||||
@@ -22,7 +22,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko@gmail.com
|
||||
|
||||
--- a/drivers/clk/qcom/gcc-ipq8074.c
|
||||
+++ b/drivers/clk/qcom/gcc-ipq8074.c
|
||||
@@ -680,7 +680,7 @@ static struct clk_rcg2 pcie0_aux_clk_src
|
||||
@@ -674,7 +674,7 @@ static struct clk_rcg2 pcie0_aux_clk_src
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gcc_pcie20_phy0_pipe_clk_xo[] = {
|
||||
@@ -31,7 +31,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko@gmail.com
|
||||
{ .fw_name = "xo", .name = "xo" },
|
||||
};
|
||||
|
||||
@@ -733,7 +733,7 @@ static struct clk_rcg2 pcie1_aux_clk_src
|
||||
@@ -727,7 +727,7 @@ static struct clk_rcg2 pcie1_aux_clk_src
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gcc_pcie20_phy1_pipe_clk_xo[] = {
|
||||
@@ -40,7 +40,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko@gmail.com
|
||||
{ .fw_name = "xo", .name = "xo" },
|
||||
};
|
||||
|
||||
@@ -1137,7 +1137,7 @@ static const struct freq_tbl ftbl_nss_no
|
||||
@@ -1131,7 +1131,7 @@ static const struct freq_tbl ftbl_nss_no
|
||||
|
||||
static const struct clk_parent_data gcc_xo_bias_pll_nss_noc_clk_gpll0_gpll2[] = {
|
||||
{ .fw_name = "xo", .name = "xo" },
|
||||
@@ -49,7 +49,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko@gmail.com
|
||||
{ .hw = &gpll0.clkr.hw },
|
||||
{ .hw = &gpll2.clkr.hw },
|
||||
};
|
||||
@@ -1362,7 +1362,7 @@ static const struct freq_tbl ftbl_nss_pp
|
||||
@@ -1356,7 +1356,7 @@ static const struct freq_tbl ftbl_nss_pp
|
||||
|
||||
static const struct clk_parent_data gcc_xo_bias_gpll0_gpll4_nss_ubi32[] = {
|
||||
{ .fw_name = "xo", .name = "xo" },
|
||||
@@ -58,7 +58,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko@gmail.com
|
||||
{ .hw = &gpll0.clkr.hw },
|
||||
{ .hw = &gpll4.clkr.hw },
|
||||
{ .hw = &nss_crypto_pll.clkr.hw },
|
||||
@@ -1413,10 +1413,10 @@ static const struct freq_tbl ftbl_nss_po
|
||||
@@ -1407,10 +1407,10 @@ static const struct freq_tbl ftbl_nss_po
|
||||
|
||||
static const struct clk_parent_data gcc_xo_uniphy0_rx_tx_ubi32_bias[] = {
|
||||
{ .fw_name = "xo", .name = "xo" },
|
||||
@@ -72,7 +72,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko@gmail.com
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_xo_uniphy0_rx_tx_ubi32_bias_map[] = {
|
||||
@@ -1465,10 +1465,10 @@ static const struct freq_tbl ftbl_nss_po
|
||||
@@ -1459,10 +1459,10 @@ static const struct freq_tbl ftbl_nss_po
|
||||
|
||||
static const struct clk_parent_data gcc_xo_uniphy0_tx_rx_ubi32_bias[] = {
|
||||
{ .fw_name = "xo", .name = "xo" },
|
||||
@@ -86,7 +86,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko@gmail.com
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_xo_uniphy0_tx_rx_ubi32_bias_map[] = {
|
||||
@@ -1696,12 +1696,12 @@ static const struct freq_tbl ftbl_nss_po
|
||||
@@ -1690,12 +1690,12 @@ static const struct freq_tbl ftbl_nss_po
|
||||
|
||||
static const struct clk_parent_data gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias[] = {
|
||||
{ .fw_name = "xo", .name = "xo" },
|
||||
@@ -104,7 +104,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko@gmail.com
|
||||
};
|
||||
|
||||
static const struct parent_map
|
||||
@@ -1758,12 +1758,12 @@ static const struct freq_tbl ftbl_nss_po
|
||||
@@ -1752,12 +1752,12 @@ static const struct freq_tbl ftbl_nss_po
|
||||
|
||||
static const struct clk_parent_data gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias[] = {
|
||||
{ .fw_name = "xo", .name = "xo" },
|
||||
@@ -122,7 +122,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko@gmail.com
|
||||
};
|
||||
|
||||
static const struct parent_map
|
||||
@@ -1820,10 +1820,10 @@ static const struct freq_tbl ftbl_nss_po
|
||||
@@ -1814,10 +1814,10 @@ static const struct freq_tbl ftbl_nss_po
|
||||
|
||||
static const struct clk_parent_data gcc_xo_uniphy2_rx_tx_ubi32_bias[] = {
|
||||
{ .fw_name = "xo", .name = "xo" },
|
||||
@@ -136,7 +136,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko@gmail.com
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_xo_uniphy2_rx_tx_ubi32_bias_map[] = {
|
||||
@@ -1877,10 +1877,10 @@ static const struct freq_tbl ftbl_nss_po
|
||||
@@ -1871,10 +1871,10 @@ static const struct freq_tbl ftbl_nss_po
|
||||
|
||||
static const struct clk_parent_data gcc_xo_uniphy2_tx_rx_ubi32_bias[] = {
|
||||
{ .fw_name = "xo", .name = "xo" },
|
||||
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
|
||||
--- a/drivers/clk/qcom/gcc-ipq8074.c
|
||||
+++ b/drivers/clk/qcom/gcc-ipq8074.c
|
||||
@@ -934,7 +934,7 @@ static struct clk_rcg2 usb0_mock_utmi_cl
|
||||
@@ -928,7 +928,7 @@ static struct clk_rcg2 usb0_mock_utmi_cl
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gcc_usb3phy_0_cc_pipe_clk_xo[] = {
|
||||
@@ -27,7 +27,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
{ .fw_name = "xo", .name = "xo" },
|
||||
};
|
||||
|
||||
@@ -1002,7 +1002,7 @@ static struct clk_rcg2 usb1_mock_utmi_cl
|
||||
@@ -996,7 +996,7 @@ static struct clk_rcg2 usb1_mock_utmi_cl
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gcc_usb3phy_1_cc_pipe_clk_xo[] = {
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
From 007ad475ba7f0d5d4d3e43a06e46a8a46d31c9d2 Mon Sep 17 00:00:00 2001
|
||||
From: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
|
||||
Date: Thu, 14 Sep 2023 12:29:51 +0530
|
||||
Subject: [PATCH] clk: qcom: ipq8074: drop the CLK_SET_RATE_PARENT flag from
|
||||
PLL clocks
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
GPLL, NSS crypto PLL clock rates are fixed and shouldn't be scaled based
|
||||
on the request from dependent clocks. Doing so will result in the
|
||||
unexpected behaviour. So drop the CLK_SET_RATE_PARENT flag from the PLL
|
||||
clocks.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Fixes: b8e7e519625f ("clk: qcom: ipq8074: add remaining PLL’s")
|
||||
Signed-off-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
|
||||
---
|
||||
drivers/clk/qcom/gcc-ipq8074.c | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
--- a/drivers/clk/qcom/gcc-ipq8074.c
|
||||
+++ b/drivers/clk/qcom/gcc-ipq8074.c
|
||||
@@ -76,7 +76,6 @@ static struct clk_fixed_factor gpll0_out
|
||||
&gpll0_main.clkr.hw },
|
||||
.num_parents = 1,
|
||||
.ops = &clk_fixed_factor_ops,
|
||||
- .flags = CLK_SET_RATE_PARENT,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -122,7 +121,6 @@ static struct clk_alpha_pll_postdiv gpll
|
||||
&gpll2_main.clkr.hw },
|
||||
.num_parents = 1,
|
||||
.ops = &clk_alpha_pll_postdiv_ro_ops,
|
||||
- .flags = CLK_SET_RATE_PARENT,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -155,7 +153,6 @@ static struct clk_alpha_pll_postdiv gpll
|
||||
&gpll4_main.clkr.hw },
|
||||
.num_parents = 1,
|
||||
.ops = &clk_alpha_pll_postdiv_ro_ops,
|
||||
- .flags = CLK_SET_RATE_PARENT,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -189,7 +186,6 @@ static struct clk_alpha_pll_postdiv gpll
|
||||
&gpll6_main.clkr.hw },
|
||||
.num_parents = 1,
|
||||
.ops = &clk_alpha_pll_postdiv_ro_ops,
|
||||
- .flags = CLK_SET_RATE_PARENT,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -202,7 +198,6 @@ static struct clk_fixed_factor gpll6_out
|
||||
&gpll6_main.clkr.hw },
|
||||
.num_parents = 1,
|
||||
.ops = &clk_fixed_factor_ops,
|
||||
- .flags = CLK_SET_RATE_PARENT,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -267,7 +262,6 @@ static struct clk_alpha_pll_postdiv nss_
|
||||
&nss_crypto_pll_main.clkr.hw },
|
||||
.num_parents = 1,
|
||||
.ops = &clk_alpha_pll_postdiv_ro_ops,
|
||||
- .flags = CLK_SET_RATE_PARENT,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -95,7 +95,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
|
||||
phydev->mii_ts->link_state(phydev->mii_ts, phydev);
|
||||
--- a/drivers/net/phy/phylink.c
|
||||
+++ b/drivers/net/phy/phylink.c
|
||||
@@ -1369,7 +1369,8 @@ void phylink_destroy(struct phylink *pl)
|
||||
@@ -1370,7 +1370,8 @@ void phylink_destroy(struct phylink *pl)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(phylink_destroy);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ Submitted-by: John Crispin <john@phrozen.org>
|
||||
|
||||
--- a/drivers/net/phy/phylink.c
|
||||
+++ b/drivers/net/phy/phylink.c
|
||||
@@ -1990,6 +1990,11 @@ int phylink_ethtool_ksettings_set(struct
|
||||
@@ -1991,6 +1991,11 @@ int phylink_ethtool_ksettings_set(struct
|
||||
* the presence of a PHY, this should not be changed as that
|
||||
* should be determined from the media side advertisement.
|
||||
*/
|
||||
@@ -33,7 +33,7 @@ Submitted-by: John Crispin <john@phrozen.org>
|
||||
return phy_ethtool_ksettings_set(pl->phydev, kset);
|
||||
}
|
||||
|
||||
@@ -2293,8 +2298,11 @@ int phylink_ethtool_get_eee(struct phyli
|
||||
@@ -2294,8 +2299,11 @@ int phylink_ethtool_get_eee(struct phyli
|
||||
|
||||
ASSERT_RTNL();
|
||||
|
||||
@@ -46,7 +46,7 @@ Submitted-by: John Crispin <john@phrozen.org>
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -2311,8 +2319,11 @@ int phylink_ethtool_set_eee(struct phyli
|
||||
@@ -2312,8 +2320,11 @@ int phylink_ethtool_set_eee(struct phyli
|
||||
|
||||
ASSERT_RTNL();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
GRUB_SERIAL:=$(call qstrip,$(CONFIG_GRUB_SERIAL))
|
||||
GRUB_SERIAL:=$(call qstrip,$(CONFIG_TARGET_SERIAL))
|
||||
ifeq ($(GRUB_SERIAL),)
|
||||
$(error This platform requires CONFIG_GRUB_SERIAL be set!)
|
||||
$(error This platform requires CONFIG_TARGET_SERIAL be set!)
|
||||
endif
|
||||
|
||||
define Package/base-files/install-target
|
||||
|
||||
@@ -16,7 +16,7 @@ ifneq ($(CONFIG_GRUB_CONSOLE),)
|
||||
GRUB_TERMINALS += console
|
||||
endif
|
||||
|
||||
GRUB_SERIAL:=$(call qstrip,$(CONFIG_GRUB_SERIAL))
|
||||
GRUB_SERIAL:=$(call qstrip,$(CONFIG_TARGET_SERIAL))
|
||||
|
||||
GRUB_CONSOLE_CMDLINE += console=$(GRUB_SERIAL),$(CONFIG_GRUB_BAUDRATE)n8$(if $(CONFIG_GRUB_FLOWCONTROL),r,)
|
||||
GRUB_SERIAL_CONFIG := serial --unit=0 --speed=$(CONFIG_GRUB_BAUDRATE) --word=8 --parity=no --stop=1 --rtscts=$(if $(CONFIG_GRUB_FLOWCONTROL),on,off)
|
||||
|
||||
Reference in New Issue
Block a user