Merge branch 'openwrt:master' into master
This commit is contained in:
commit
49d6745b35
1690 changed files with 3541 additions and 251243 deletions
|
@ -1107,7 +1107,6 @@ config KERNEL_PAGE_POOL
|
|||
config KERNEL_PAGE_POOL_STATS
|
||||
bool "Page pool stats support"
|
||||
depends on KERNEL_PAGE_POOL
|
||||
depends on !LINUX_5_10
|
||||
|
||||
#
|
||||
# NFS related symbols
|
||||
|
|
|
@ -103,6 +103,16 @@ define Build/append-rootfs
|
|||
dd if=$(IMAGE_ROOTFS) >> $@
|
||||
endef
|
||||
|
||||
define Build/append-squashfs-fakeroot-be
|
||||
rm -rf $@.fakefs $@.fakesquashfs
|
||||
mkdir $@.fakefs
|
||||
$(STAGING_DIR_HOST)/bin/mksquashfs3-lzma \
|
||||
$@.fakefs $@.fakesquashfs \
|
||||
-noappend -root-owned -be -nopad -b 65536 \
|
||||
$(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
|
||||
cat $@.fakesquashfs >> $@
|
||||
endef
|
||||
|
||||
define Build/append-squashfs4-fakeroot
|
||||
rm -rf $@.fakefs $@.fakesquashfs
|
||||
mkdir $@.fakefs
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
LINUX_VERSION-5.10 = .179
|
||||
LINUX_KERNEL_HASH-5.10.179 = 1bbd445c154b053eea46acc883be548a98179988a9ed3a0b81bddfbf30a37e29
|
|
@ -24,12 +24,6 @@ PKG_JOBS?=$(if $(PKG_BUILD_PARALLEL),$(MAKE_J),-j1)
|
|||
endif
|
||||
|
||||
PKG_BUILD_FLAGS?=
|
||||
# TODO remove this when all packages moved to PKG_BUILD_FLAGS=no-mips16
|
||||
PKG_USE_MIPS16?=1
|
||||
ifneq ($(strip $(PKG_USE_MIPS16)),1)
|
||||
PKG_BUILD_FLAGS+=no-mips16
|
||||
endif
|
||||
|
||||
__unknown_flags=$(filter-out no-iremap no-mips16 gc-sections no-gc-sections lto no-lto,$(PKG_BUILD_FLAGS))
|
||||
ifneq ($(__unknown_flags),)
|
||||
$(error unknown PKG_BUILD_FLAGS: $(__unknown_flags))
|
||||
|
|
|
@ -0,0 +1,222 @@
|
|||
From 3b07c3a6e4adebd0466f5e539f318224db8cfc37 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Sat, 6 May 2023 15:29:52 +0200
|
||||
Subject: [PATCH] ath10k-ct: fix compilation warning for debug level
|
||||
|
||||
Rework read_debug_level function as it does exceed the stack limit for
|
||||
some arch.
|
||||
Fix compilation error:
|
||||
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-malta_be/ath10k-ct-regular/ath10k-ct-2022-05-13-f808496f/ath10k-5.15/debug.c: In function 'ath10k_read_debug_level':
|
||||
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-malta_be/ath10k-ct-regular/ath10k-ct-2022-05-13-f808496f/ath10k-5.15/debug.c:1388:1: error: the frame size of 1440 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
|
||||
1388 | }
|
||||
| ^
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
ath10k-5.15/debug.c | 85 +++++++++++++++++++++++++--------------------
|
||||
ath10k-5.17/debug.c | 85 +++++++++++++++++++++++++--------------------
|
||||
2 files changed, 96 insertions(+), 74 deletions(-)
|
||||
|
||||
diff --git a/ath10k-5.15/debug.c b/ath10k-5.15/debug.c
|
||||
index af84012..d0fa911 100644
|
||||
--- a/ath10k-5.15/debug.c
|
||||
+++ b/ath10k-5.15/debug.c
|
||||
@@ -1344,47 +1344,58 @@ static const struct file_operations fops_simulate_fw_crash = {
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
+static const char debug_level_buf[] =
|
||||
+ "To change debug level, set value adding up desired flags:\n"
|
||||
+ "PCI: 0x1\n"
|
||||
+ "WMI: 0x2\n"
|
||||
+ "HTC: 0x4\n"
|
||||
+ "HTT: 0x8\n"
|
||||
+ "MAC: 0x10\n"
|
||||
+ "BOOT: 0x20\n"
|
||||
+ "PCI-DUMP: 0x40\n"
|
||||
+ "HTT-DUMP: 0x80\n"
|
||||
+ "MGMT: 0x100\n"
|
||||
+ "DATA: 0x200\n"
|
||||
+ "BMI: 0x400\n"
|
||||
+ "REGULATORY: 0x800\n"
|
||||
+ "TESTMODE: 0x1000\n"
|
||||
+ "WMI-PRINT: 0x2000\n"
|
||||
+ "PCI-PS: 0x4000\n"
|
||||
+ "AHB: 0x8000\n"
|
||||
+ "SDIO: 0x10000\n"
|
||||
+ "SDIO_DUMP: 0x20000\n"
|
||||
+ "USB: 0x40000\n"
|
||||
+ "USB_BULK: 0x80000\n"
|
||||
+ "SNOC: 0x100000\n"
|
||||
+ "QMI: 0x200000\n"
|
||||
+ "BEACONS: 0x8000000\n"
|
||||
+ "NO-FW-DBGLOG:0x10000000\n"
|
||||
+ "MAC2: 0x20000000\n"
|
||||
+ "INFO-AS-DBG: 0x40000000\n"
|
||||
+ "FW: 0x80000000\n"
|
||||
+ "ALL: 0xEFFFFFFF\n";
|
||||
+
|
||||
+#define READ_DEBUG_LEVEL_SIZE sizeof(debug_level_buf) + 60
|
||||
+
|
||||
static ssize_t ath10k_read_debug_level(struct file *file,
|
||||
char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
- int sz;
|
||||
- const char buf[] =
|
||||
- "To change debug level, set value adding up desired flags:\n"
|
||||
- "PCI: 0x1\n"
|
||||
- "WMI: 0x2\n"
|
||||
- "HTC: 0x4\n"
|
||||
- "HTT: 0x8\n"
|
||||
- "MAC: 0x10\n"
|
||||
- "BOOT: 0x20\n"
|
||||
- "PCI-DUMP: 0x40\n"
|
||||
- "HTT-DUMP: 0x80\n"
|
||||
- "MGMT: 0x100\n"
|
||||
- "DATA: 0x200\n"
|
||||
- "BMI: 0x400\n"
|
||||
- "REGULATORY: 0x800\n"
|
||||
- "TESTMODE: 0x1000\n"
|
||||
- "WMI-PRINT: 0x2000\n"
|
||||
- "PCI-PS: 0x4000\n"
|
||||
- "AHB: 0x8000\n"
|
||||
- "SDIO: 0x10000\n"
|
||||
- "SDIO_DUMP: 0x20000\n"
|
||||
- "USB: 0x40000\n"
|
||||
- "USB_BULK: 0x80000\n"
|
||||
- "SNOC: 0x100000\n"
|
||||
- "QMI: 0x200000\n"
|
||||
- "BEACONS: 0x8000000\n"
|
||||
- "NO-FW-DBGLOG:0x10000000\n"
|
||||
- "MAC2: 0x20000000\n"
|
||||
- "INFO-AS-DBG: 0x40000000\n"
|
||||
- "FW: 0x80000000\n"
|
||||
- "ALL: 0xEFFFFFFF\n";
|
||||
- char wbuf[sizeof(buf) + 60];
|
||||
- sz = snprintf(wbuf, sizeof(wbuf), "Current debug level: 0x%x\n\n%s",
|
||||
- ath10k_debug_mask, buf);
|
||||
- wbuf[sizeof(wbuf) - 1] = 0;
|
||||
-
|
||||
- return simple_read_from_buffer(user_buf, count, ppos, wbuf, sz);
|
||||
+ int sz, ret;
|
||||
+ char *wbuf;
|
||||
+
|
||||
+ wbuf = kcalloc(READ_DEBUG_LEVEL_SIZE, sizeof(char), GFP_KERNEL);
|
||||
+ if (!wbuf)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ sz = snprintf(wbuf, READ_DEBUG_LEVEL_SIZE,
|
||||
+ "Current debug level: 0x%x\n\n%s",
|
||||
+ ath10k_debug_mask, debug_level_buf);
|
||||
+
|
||||
+ ret = simple_read_from_buffer(user_buf, count, ppos, wbuf, sz);
|
||||
+ kfree(wbuf);
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
/* Set logging level.
|
||||
diff --git a/ath10k-5.17/debug.c b/ath10k-5.17/debug.c
|
||||
index af84012..d0fa911 100644
|
||||
--- a/ath10k-5.17/debug.c
|
||||
+++ b/ath10k-5.17/debug.c
|
||||
@@ -1344,47 +1344,58 @@ static const struct file_operations fops_simulate_fw_crash = {
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
+static const char debug_level_buf[] =
|
||||
+ "To change debug level, set value adding up desired flags:\n"
|
||||
+ "PCI: 0x1\n"
|
||||
+ "WMI: 0x2\n"
|
||||
+ "HTC: 0x4\n"
|
||||
+ "HTT: 0x8\n"
|
||||
+ "MAC: 0x10\n"
|
||||
+ "BOOT: 0x20\n"
|
||||
+ "PCI-DUMP: 0x40\n"
|
||||
+ "HTT-DUMP: 0x80\n"
|
||||
+ "MGMT: 0x100\n"
|
||||
+ "DATA: 0x200\n"
|
||||
+ "BMI: 0x400\n"
|
||||
+ "REGULATORY: 0x800\n"
|
||||
+ "TESTMODE: 0x1000\n"
|
||||
+ "WMI-PRINT: 0x2000\n"
|
||||
+ "PCI-PS: 0x4000\n"
|
||||
+ "AHB: 0x8000\n"
|
||||
+ "SDIO: 0x10000\n"
|
||||
+ "SDIO_DUMP: 0x20000\n"
|
||||
+ "USB: 0x40000\n"
|
||||
+ "USB_BULK: 0x80000\n"
|
||||
+ "SNOC: 0x100000\n"
|
||||
+ "QMI: 0x200000\n"
|
||||
+ "BEACONS: 0x8000000\n"
|
||||
+ "NO-FW-DBGLOG:0x10000000\n"
|
||||
+ "MAC2: 0x20000000\n"
|
||||
+ "INFO-AS-DBG: 0x40000000\n"
|
||||
+ "FW: 0x80000000\n"
|
||||
+ "ALL: 0xEFFFFFFF\n";
|
||||
+
|
||||
+#define READ_DEBUG_LEVEL_SIZE sizeof(debug_level_buf) + 60
|
||||
+
|
||||
static ssize_t ath10k_read_debug_level(struct file *file,
|
||||
char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
- int sz;
|
||||
- const char buf[] =
|
||||
- "To change debug level, set value adding up desired flags:\n"
|
||||
- "PCI: 0x1\n"
|
||||
- "WMI: 0x2\n"
|
||||
- "HTC: 0x4\n"
|
||||
- "HTT: 0x8\n"
|
||||
- "MAC: 0x10\n"
|
||||
- "BOOT: 0x20\n"
|
||||
- "PCI-DUMP: 0x40\n"
|
||||
- "HTT-DUMP: 0x80\n"
|
||||
- "MGMT: 0x100\n"
|
||||
- "DATA: 0x200\n"
|
||||
- "BMI: 0x400\n"
|
||||
- "REGULATORY: 0x800\n"
|
||||
- "TESTMODE: 0x1000\n"
|
||||
- "WMI-PRINT: 0x2000\n"
|
||||
- "PCI-PS: 0x4000\n"
|
||||
- "AHB: 0x8000\n"
|
||||
- "SDIO: 0x10000\n"
|
||||
- "SDIO_DUMP: 0x20000\n"
|
||||
- "USB: 0x40000\n"
|
||||
- "USB_BULK: 0x80000\n"
|
||||
- "SNOC: 0x100000\n"
|
||||
- "QMI: 0x200000\n"
|
||||
- "BEACONS: 0x8000000\n"
|
||||
- "NO-FW-DBGLOG:0x10000000\n"
|
||||
- "MAC2: 0x20000000\n"
|
||||
- "INFO-AS-DBG: 0x40000000\n"
|
||||
- "FW: 0x80000000\n"
|
||||
- "ALL: 0xEFFFFFFF\n";
|
||||
- char wbuf[sizeof(buf) + 60];
|
||||
- sz = snprintf(wbuf, sizeof(wbuf), "Current debug level: 0x%x\n\n%s",
|
||||
- ath10k_debug_mask, buf);
|
||||
- wbuf[sizeof(wbuf) - 1] = 0;
|
||||
-
|
||||
- return simple_read_from_buffer(user_buf, count, ppos, wbuf, sz);
|
||||
+ int sz, ret;
|
||||
+ char *wbuf;
|
||||
+
|
||||
+ wbuf = kcalloc(READ_DEBUG_LEVEL_SIZE, sizeof(char), GFP_KERNEL);
|
||||
+ if (!wbuf)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ sz = snprintf(wbuf, READ_DEBUG_LEVEL_SIZE,
|
||||
+ "Current debug level: 0x%x\n\n%s",
|
||||
+ ath10k_debug_mask, debug_level_buf);
|
||||
+
|
||||
+ ret = simple_read_from_buffer(user_buf, count, ppos, wbuf, sz);
|
||||
+ kfree(wbuf);
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
/* Set logging level.
|
||||
--
|
||||
2.39.2
|
||||
|
|
@ -105,6 +105,15 @@ MAKE_KMOD := $(KERNEL_MAKE) \
|
|||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
|
||||
# New kernel version changed the sysmbol exported from printk to _printk
|
||||
# The object file provided by broadcom require modification to correctly
|
||||
# modprobe and generate a .ko
|
||||
$(TARGET_CROSS)objcopy $(PKG_BUILD_DIR)/driver/wl_apsta/wl_prebuilt.o \
|
||||
--redefine-sym printk=_printk
|
||||
$(TARGET_CROSS)objcopy $(PKG_BUILD_DIR)/driver/wl_apsta_mini/wl_prebuilt.o \
|
||||
--redefine-sym printk=_printk
|
||||
|
||||
$(CP) $(PKG_BUILD_DIR)/driver $(PKG_BUILD_DIR)/driver-mini
|
||||
$(CP) ./src/glue $(PKG_BUILD_DIR)/glue
|
||||
endef
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
--- a/driver/wl_iw.c
|
||||
+++ a/driver/wl_iw.c
|
||||
@@ -381,9 +381,9 @@ wl_iw_set_freq(
|
||||
while (fwrq->e++ < 6)
|
||||
fwrq->m /= 10;
|
||||
}
|
||||
- /* handle 4.9GHz frequencies as Japan 4 GHz based channelization */
|
||||
- if (fwrq->m > 4000 && fwrq->m < 5000)
|
||||
- sf = WF_CHAN_FACTOR_4_G; /* start factor for 4 GHz */
|
||||
+ /* handle 4.9GHz frequencies as Japan 4 GHz based channelization */
|
||||
+ if (fwrq->m > 4000 && fwrq->m < 5000)
|
||||
+ sf = WF_CHAN_FACTOR_4_G; /* start factor for 4 GHz */
|
||||
|
||||
chan = wf_mhz2channel(fwrq->m, sf);
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
--- a/driver/wl_iw.c
|
||||
+++ a/driver/wl_iw.c
|
||||
@@ -100,7 +100,9 @@ dev_wlc_ioctl(
|
||||
{
|
||||
struct ifreq ifr;
|
||||
wl_ioctl_t ioc;
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0)
|
||||
mm_segment_t fs;
|
||||
+#endif
|
||||
int ret;
|
||||
|
||||
memset(&ioc, 0, sizeof(ioc));
|
||||
@@ -118,10 +120,14 @@ dev_wlc_ioctl(
|
||||
dev_open(dev);
|
||||
#endif
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0)
|
||||
fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
+#endif
|
||||
ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0)
|
||||
set_fs(fs);
|
||||
+#endif
|
||||
|
||||
return ret;
|
||||
}
|
|
@ -0,0 +1,297 @@
|
|||
--- a/driver/wl_iw.c
|
||||
+++ b/driver/wl_iw.c
|
||||
@@ -495,9 +495,9 @@ wl_iw_get_range(
|
||||
)
|
||||
{
|
||||
struct iw_range *range = (struct iw_range *) extra;
|
||||
- int channels[MAXCHANNEL+1];
|
||||
- wl_uint32_list_t *list = (wl_uint32_list_t *) channels;
|
||||
- wl_rateset_t rateset;
|
||||
+ int *channels;
|
||||
+ wl_uint32_list_t *list;
|
||||
+ wl_rateset_t *rateset;
|
||||
int error, i;
|
||||
uint sf, ch;
|
||||
|
||||
@@ -506,6 +506,17 @@ wl_iw_get_range(
|
||||
if (!extra)
|
||||
return -EINVAL;
|
||||
|
||||
+ channels = kcalloc(MAXCHANNEL+1, sizeof(*channels), GFP_KERNEL);
|
||||
+ if (!channels)
|
||||
+ return -ENOMEM;
|
||||
+ list = (wl_uint32_list_t *) channels;
|
||||
+
|
||||
+ rateset = kzalloc(sizeof(*rateset), GFP_KERNEL);
|
||||
+ if (!rateset) {
|
||||
+ error = -ENOMEM;
|
||||
+ goto free_channels;
|
||||
+ }
|
||||
+
|
||||
dwrq->length = sizeof(struct iw_range);
|
||||
memset(range, 0, sizeof(range));
|
||||
|
||||
@@ -514,8 +525,9 @@ wl_iw_get_range(
|
||||
|
||||
/* Set available channels/frequencies */
|
||||
list->count = htod32(MAXCHANNEL);
|
||||
- if ((error = dev_wlc_ioctl(dev, WLC_GET_VALID_CHANNELS, channels, sizeof(channels))))
|
||||
- return error;
|
||||
+ if ((error = dev_wlc_ioctl(dev, WLC_GET_VALID_CHANNELS, channels,
|
||||
+ (MAXCHANNEL+1) * sizeof(*channels))))
|
||||
+ goto free_rateset;
|
||||
for (i = 0; i < dtoh32(list->count) && i < IW_MAX_FREQUENCIES; i++) {
|
||||
range->freq[i].i = dtoh32(list->element[i]);
|
||||
|
||||
@@ -549,19 +561,19 @@ wl_iw_get_range(
|
||||
#endif /* WIRELESS_EXT > 11 */
|
||||
|
||||
/* Set available bitrates */
|
||||
- if ((error = dev_wlc_ioctl(dev, WLC_GET_CURR_RATESET, &rateset, sizeof(rateset))))
|
||||
- return error;
|
||||
- rateset.count = dtoh32(rateset.count);
|
||||
- range->num_bitrates = rateset.count;
|
||||
- for (i = 0; i < rateset.count && i < IW_MAX_BITRATES; i++)
|
||||
- range->bitrate[i] = (rateset.rates[i] & 0x7f) * 500000; /* convert to bps */
|
||||
+ if ((error = dev_wlc_ioctl(dev, WLC_GET_CURR_RATESET, rateset, sizeof(*rateset))))
|
||||
+ goto free_rateset;
|
||||
+ rateset->count = dtoh32(rateset->count);
|
||||
+ range->num_bitrates = rateset->count;
|
||||
+ for (i = 0; i < rateset->count && i < IW_MAX_BITRATES; i++)
|
||||
+ range->bitrate[i] = (rateset->rates[i] & 0x7f) * 500000; /* convert to bps */
|
||||
|
||||
/* Set an indication of the max TCP throughput
|
||||
* in bit/s that we can expect using this interface.
|
||||
* May be use for QoS stuff... Jean II
|
||||
*/
|
||||
if ((error = dev_wlc_ioctl(dev, WLC_GET_PHYTYPE, &i, sizeof(i))))
|
||||
- return error;
|
||||
+ goto free_rateset;
|
||||
i = dtoh32(i);
|
||||
if (i == WLC_PHY_TYPE_A)
|
||||
range->throughput = 24000000; /* 24 Mbits/s */
|
||||
@@ -624,7 +636,12 @@ wl_iw_get_range(
|
||||
#endif
|
||||
#endif /* WIRELESS_EXT > 17 */
|
||||
|
||||
- return 0;
|
||||
+free_rateset:
|
||||
+ kfree(rateset);
|
||||
+free_channels:
|
||||
+ kfree(channels);
|
||||
+
|
||||
+ return error;
|
||||
}
|
||||
|
||||
static int
|
||||
--- a/driver/bcmsrom.c
|
||||
+++ b/driver/bcmsrom.c
|
||||
@@ -437,20 +437,37 @@ srom_write(si_t *sih, uint bustype, void *curmap, osl_t *osh,
|
||||
uint byteoff, uint nbytes, uint16 *buf)
|
||||
{
|
||||
uint i, nw, crc_range;
|
||||
- uint16 old[SROM_MAXW], new[SROM_MAXW];
|
||||
+ uint16 *old, *new;
|
||||
uint8 crc;
|
||||
volatile uint32 val32;
|
||||
+ int rc = 0;
|
||||
|
||||
ASSERT(bustype == BUSTYPE(bustype));
|
||||
|
||||
+ old = MALLOC(osh, SROM_MAXW);
|
||||
+ ASSERT(old != NULL);
|
||||
+ if (!old)
|
||||
+ return -2;
|
||||
+
|
||||
+ new = MALLOC(osh, SROM_MAXW);
|
||||
+ ASSERT(new != NULL);
|
||||
+ if (!new) {
|
||||
+ rc = -2;
|
||||
+ goto free_old;
|
||||
+ }
|
||||
+
|
||||
/* check input - 16-bit access only. use byteoff 0x55aa to indicate
|
||||
* srclear
|
||||
*/
|
||||
- if ((byteoff != 0x55aa) && ((byteoff & 1) || (nbytes & 1)))
|
||||
- return 1;
|
||||
+ if ((byteoff != 0x55aa) && ((byteoff & 1) || (nbytes & 1))) {
|
||||
+ rc = 1;
|
||||
+ goto free_new;
|
||||
+ }
|
||||
|
||||
- if ((byteoff != 0x55aa) && ((byteoff + nbytes) > SROM_MAX))
|
||||
- return 1;
|
||||
+ if ((byteoff != 0x55aa) && ((byteoff + nbytes) > SROM_MAX)) {
|
||||
+ rc = 1;
|
||||
+ goto free_new;
|
||||
+ }
|
||||
|
||||
if (BUSTYPE(bustype) == PCMCIA_BUS) {
|
||||
crc_range = SROM_MAX;
|
||||
@@ -467,8 +484,10 @@ srom_write(si_t *sih, uint bustype, void *curmap, osl_t *osh,
|
||||
|
||||
nw = crc_range / 2;
|
||||
/* read first small number words from srom, then adjust the length, read all */
|
||||
- if (srom_read(sih, bustype, curmap, osh, 0, crc_range, old, FALSE))
|
||||
- return 1;
|
||||
+ if (srom_read(sih, bustype, curmap, osh, 0, crc_range, old, FALSE)) {
|
||||
+ rc = 1;
|
||||
+ goto free_new;
|
||||
+ }
|
||||
|
||||
BS_ERROR(("%s: old[SROM4_SIGN] 0x%x, old[SROM8_SIGN] 0x%x\n",
|
||||
__FUNCTION__, old[SROM4_SIGN], old[SROM8_SIGN]));
|
||||
@@ -481,10 +500,13 @@ srom_write(si_t *sih, uint bustype, void *curmap, osl_t *osh,
|
||||
__FUNCTION__, buf[SROM4_SIGN], buf[SROM8_SIGN]));
|
||||
|
||||
/* block invalid buffer size */
|
||||
- if (nbytes < SROM4_WORDS * 2)
|
||||
- return BCME_BUFTOOSHORT;
|
||||
- else if (nbytes > SROM4_WORDS * 2)
|
||||
- return BCME_BUFTOOLONG;
|
||||
+ if (nbytes < SROM4_WORDS * 2) {
|
||||
+ rc = BCME_BUFTOOSHORT;
|
||||
+ goto free_new;
|
||||
+ } else if (nbytes > SROM4_WORDS * 2) {
|
||||
+ rc = BCME_BUFTOOLONG;
|
||||
+ goto free_new;
|
||||
+ }
|
||||
|
||||
nw = SROM4_WORDS;
|
||||
} else if (nbytes == SROM_WORDS * 2){ /* the other possible SROM format */
|
||||
@@ -493,17 +515,22 @@ srom_write(si_t *sih, uint bustype, void *curmap, osl_t *osh,
|
||||
nw = SROM_WORDS;
|
||||
} else {
|
||||
BS_ERROR(("%s: Invalid input file signature\n", __FUNCTION__));
|
||||
- return BCME_BADARG;
|
||||
+ rc = BCME_BADARG;
|
||||
+ goto free_new;
|
||||
}
|
||||
crc_range = nw * 2;
|
||||
- if (srom_read(sih, bustype, curmap, osh, 0, crc_range, old, FALSE))
|
||||
- return 1;
|
||||
+ if (srom_read(sih, bustype, curmap, osh, 0, crc_range, old, FALSE)) {
|
||||
+ rc = 1;
|
||||
+ goto free_new;
|
||||
+ }
|
||||
} else if ((old[SROM4_SIGN] == SROM4_SIGNATURE) ||
|
||||
(old[SROM8_SIGN] == SROM4_SIGNATURE)) {
|
||||
nw = SROM4_WORDS;
|
||||
crc_range = nw * 2;
|
||||
- if (srom_read(sih, bustype, curmap, osh, 0, crc_range, old, FALSE))
|
||||
- return 1;
|
||||
+ if (srom_read(sih, bustype, curmap, osh, 0, crc_range, old, FALSE)) {
|
||||
+ rc = 1;
|
||||
+ goto free_new;
|
||||
+ }
|
||||
} else {
|
||||
/* Assert that we have already read enough for sromrev 2 */
|
||||
ASSERT(crc_range >= SROM_WORDS * 2);
|
||||
@@ -562,8 +589,10 @@ srom_write(si_t *sih, uint bustype, void *curmap, osl_t *osh,
|
||||
}
|
||||
} else if (BUSTYPE(bustype) == PCMCIA_BUS) {
|
||||
/* enable writes to the SPROM */
|
||||
- if (sprom_cmd_pcmcia(osh, SROM_WEN))
|
||||
- return 1;
|
||||
+ if (sprom_cmd_pcmcia(osh, SROM_WEN)) {
|
||||
+ rc = 1;
|
||||
+ goto free_new;
|
||||
+ }
|
||||
bcm_mdelay(WRITE_ENABLE_DELAY);
|
||||
/* write srom */
|
||||
for (i = 0; i < nw; i++) {
|
||||
@@ -573,14 +602,15 @@ srom_write(si_t *sih, uint bustype, void *curmap, osl_t *osh,
|
||||
}
|
||||
}
|
||||
/* disable writes to the SPROM */
|
||||
- if (sprom_cmd_pcmcia(osh, SROM_WDS))
|
||||
- return 1;
|
||||
+ if (sprom_cmd_pcmcia(osh, SROM_WDS)) {
|
||||
+ rc = 1;
|
||||
+ goto free_new;
|
||||
+ }
|
||||
} else if (BUSTYPE(bustype) == SI_BUS) {
|
||||
#if defined(BCMUSBDEV)
|
||||
if (SPROMBUS == PCMCIA_BUS) {
|
||||
uint origidx;
|
||||
void *regs;
|
||||
- int rc;
|
||||
bool wasup;
|
||||
|
||||
origidx = si_coreidx(sih);
|
||||
@@ -596,16 +626,24 @@ srom_write(si_t *sih, uint bustype, void *curmap, osl_t *osh,
|
||||
si_core_disable(sih, 0);
|
||||
|
||||
si_setcoreidx(sih, origidx);
|
||||
- return rc;
|
||||
+ goto free_new;
|
||||
}
|
||||
#endif
|
||||
- return 1;
|
||||
+ rc = 1;
|
||||
+ goto free_new;
|
||||
} else {
|
||||
- return 1;
|
||||
+ rc = 1;
|
||||
+ goto free_new;
|
||||
}
|
||||
|
||||
bcm_mdelay(WRITE_ENABLE_DELAY);
|
||||
- return 0;
|
||||
+ rc = 0;
|
||||
+
|
||||
+free_new:
|
||||
+ MFREE(osh, new, SROM_MAXW);
|
||||
+free_old:
|
||||
+ MFREE(osh, old, SROM_MAXW);
|
||||
+ return rc;
|
||||
}
|
||||
|
||||
#if defined(BCMUSBDEV)
|
||||
--- a/driver/linux_osl.c
|
||||
+++ b/driver/linux_osl.c
|
||||
@@ -600,20 +600,29 @@ int
|
||||
osl_printf(const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
- char buf[1024];
|
||||
+ char *buf;
|
||||
int len;
|
||||
|
||||
+ buf = kcalloc(1024, sizeof(*buf), GFP_KERNEL);
|
||||
+ if (!buf)
|
||||
+ return (-ENOMEM);
|
||||
+
|
||||
/* sprintf into a local buffer because there *is* no "vprintk()".. */
|
||||
va_start(args, format);
|
||||
len = vsnprintf(buf, 1024, format, args);
|
||||
va_end(args);
|
||||
|
||||
- if (len > sizeof(buf)) {
|
||||
+ if (len > (sizeof(*buf) * 1024)) {
|
||||
printk("osl_printf: buffer overrun\n");
|
||||
- return (0);
|
||||
+ goto exit;
|
||||
}
|
||||
|
||||
- return (printk(buf));
|
||||
+ printk(buf);
|
||||
+
|
||||
+exit:
|
||||
+ kfree(buf);
|
||||
+
|
||||
+ return (0);
|
||||
}
|
||||
|
||||
int
|
||||
--- a/driver/bcmutils.c
|
||||
+++ b/driver/bcmutils.c
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <typedefs.h>
|
||||
#include <bcmdefs.h>
|
||||
+#define __need___va_list
|
||||
#include <stdarg.h>
|
||||
#include <bcmutils.h>
|
||||
#ifdef BCMDRIVER
|
|
@ -0,0 +1,14 @@
|
|||
--- a/driver/aiutils.c
|
||||
+++ b/driver/aiutils.c
|
||||
@@ -228,9 +228,10 @@ ai_scan(si_t *sih, void *regs, uint devid)
|
||||
do {
|
||||
asd = get_asd(sih, &eromptr, 0, j, AD_ST_SLAVE, &addrl, &addrh,
|
||||
&sizel, &sizeh);
|
||||
- if ((asd != 0) && (j == 1) && (sizel == SI_CORE_SIZE))
|
||||
+ if ((asd != 0) && (j == 1) && (sizel == SI_CORE_SIZE)) {
|
||||
sii->coresba2[idx] = addrl;
|
||||
sii->coresba2_size[idx] = sizel;
|
||||
+ }
|
||||
j++;
|
||||
} while (asd != 0);
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
--- a/driver/hnddma.c
|
||||
+++ b/driver/hnddma.c
|
||||
@@ -1896,7 +1896,8 @@ dma64_txfast(dma_info_t *di, void *p0, bool commit)
|
||||
if (!(flags & D64_CTRL1_EOF)) {
|
||||
#if defined(linux) && defined(__mips__)
|
||||
if (CHIPID(di->sih->chip) == BCM5356_CHIP_ID && di->sih->chiprev == 0) {
|
||||
- uint32 ctrl1, ctrl2, addrlow, addrhigh;
|
||||
+ uint32 ctrl2, addrlow, addrhigh;
|
||||
+ // uint32 ctrl1;
|
||||
|
||||
addrlow = R_SM((volatile uint32 *)&di->txd64[PREVTXD(txout)].addrlow);
|
||||
addrhigh = R_SM((volatile uint32 *)&di->txd64[PREVTXD(txout)].addrhigh);
|
||||
|
||||
--- a/driver/include/linux_osl.h
|
||||
+++ b/driver/include/linux_osl.h
|
||||
@@ -580,9 +580,9 @@ extern void osl_writew(uint16 v, volatile uint16 *r);
|
||||
extern void osl_writel(uint32 v, volatile uint32 *r);
|
||||
|
||||
/* uncached/cached virtual address */
|
||||
-#define OSL_UNCACHED(va) osl_uncached((va))
|
||||
+#define OSL_UNCACHED(va) osl_uncached((void *)(va))
|
||||
extern void *osl_uncached(void *va);
|
||||
-#define OSL_CACHED(va) osl_cached((va))
|
||||
+#define OSL_CACHED(va) osl_cached((void *)(va))
|
||||
extern void *osl_cached(void *va);
|
||||
|
||||
/* get processor cycle count */
|
||||
--- a/driver/siutils.c
|
||||
+++ b/driver/siutils.c
|
||||
@@ -495,11 +495,13 @@ BCMATTACHFN(si_doattach)(si_info_t *sii, uint devid, osl_t *osh, void *regs,
|
||||
}
|
||||
|
||||
sih->bustype = bustype;
|
||||
+#ifdef BCMBUSTYPE
|
||||
if (bustype != BUSTYPE(bustype)) {
|
||||
SI_ERROR(("si_doattach: bus type %d does not match configured bus type %d\n",
|
||||
bustype, BUSTYPE(bustype)));
|
||||
return NULL;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* bus/core/clk setup for register access */
|
||||
if (!si_buscore_prep(sii, bustype, devid, sdh)) {
|
||||
@@ -1716,6 +1718,9 @@ si_clkctl_xtal(si_t *sih, uint what, bool on)
|
||||
outen);
|
||||
}
|
||||
|
||||
+ return (0);
|
||||
+
|
||||
+
|
||||
default:
|
||||
return (-1);
|
||||
}
|
||||
--- a/driver/bcmsrom.c
|
||||
+++ b/driver/bcmsrom.c
|
||||
@@ -1005,6 +1043,7 @@ BCMNMIATTACHFN(srom_parsecis)(osl_t *osh, uint8 *pcis[], uint ciscnt, char **var
|
||||
break;
|
||||
}
|
||||
|
||||
+ fallthrough;
|
||||
case CISTPL_MANFID: FROMHOST();
|
||||
varbuf_append(&b, vstr_manfid, (cis[i + 1] << 8) + cis[i]);
|
||||
varbuf_append(&b, vstr_prodid, (cis[i + 3] << 8) + cis[i + 2]);
|
|
@ -0,0 +1,10 @@
|
|||
--- a/driver/wl_linux.c
|
||||
+++ b/driver/wl_linux.c
|
||||
@@ -1109,6 +1109,7 @@ wl_module_exit(void)
|
||||
|
||||
module_init(wl_module_init);
|
||||
module_exit(wl_module_exit);
|
||||
+MODULE_LICENSE("Proprietary");
|
||||
|
||||
/**
|
||||
* This function frees the WL per-device resources.
|
|
@ -409,8 +409,6 @@ static int __init nct5104d_gpio_init(void)
|
|||
{
|
||||
int err;
|
||||
struct nct5104d_sio sio;
|
||||
const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
|
||||
const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
|
||||
|
||||
if (nct5104d_find(0x2e, &sio) &&
|
||||
nct5104d_find(0x4e, &sio))
|
||||
|
|
|
@ -1620,7 +1620,9 @@ DSL_BSP_FWDownload (DSL_DEV_Device_t * pDev, const char *buf,
|
|||
IFX_MEI_EMSG ("Firmware size is too small!\n");
|
||||
return retval;
|
||||
}
|
||||
copy_from_user ((char *) &img_hdr_tmp, buf, sizeof (img_hdr_tmp));
|
||||
if (copy_from_user ((char *) &img_hdr_tmp, buf, sizeof (img_hdr_tmp)))
|
||||
return -EFAULT;
|
||||
|
||||
// header of image_size and crc are not included.
|
||||
DSL_DEV_PRIVATE(pDev)->image_size = le32_to_cpu (img_hdr_tmp.size) + 8;
|
||||
|
||||
|
@ -1698,7 +1700,9 @@ DSL_BSP_FWDownload (DSL_DEV_Device_t * pDev, const char *buf,
|
|||
nCopy = SDRAM_SEGMENT_SIZE - offset;
|
||||
else
|
||||
nCopy = size - nRead;
|
||||
copy_from_user (mem_ptr, buf + nRead, nCopy);
|
||||
if (copy_from_user (mem_ptr, buf + nRead, nCopy))
|
||||
return -EFAULT;
|
||||
|
||||
for (offset = 0; offset < (nCopy / 4); offset++) {
|
||||
((unsigned long *) mem_ptr)[offset] = le32_to_cpu (((unsigned long *) mem_ptr)[offset]);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
--- a/src/pm/drv_dsl_cpe_pm_core.c
|
||||
+++ b/src/pm/drv_dsl_cpe_pm_core.c
|
||||
@@ -2274,16 +2274,18 @@ DSL_Error_t DSL_DRV_PM_CountersReset(
|
||||
}
|
||||
#endif /* #ifdef INCLUDE_DSL_CPE_PM_HISTORY*/
|
||||
|
||||
- if (ResetType == DSL_PM_RESET_HISTORY)
|
||||
- break;
|
||||
+ if (ResetType == DSL_PM_RESET_HISTORY)
|
||||
+ break;
|
||||
|
||||
+ fallthrough;
|
||||
case DSL_PM_RESET_TOTAL:
|
||||
#ifdef INCLUDE_DSL_CPE_PM_TOTAL_COUNTERS
|
||||
memset(EpData.pRecTotal, 0x0, EpData.nEpRecElementSize);
|
||||
#endif /* #ifdef INCLUDE_DSL_CPE_PM_TOTAL_COUNTERS*/
|
||||
- if (ResetType == DSL_PM_RESET_TOTAL)
|
||||
- break;
|
||||
+ if (ResetType == DSL_PM_RESET_TOTAL)
|
||||
+ break;
|
||||
|
||||
+ fallthrough;
|
||||
case DSL_PM_RESET_HISTORY_SHOWTIME:
|
||||
#ifdef INCLUDE_DSL_CPE_PM_SHOWTIME_COUNTERS
|
||||
nErrCode = DSL_DRV_PM_HistoryDelete(pContext, EpData.pHistShowtime );
|
||||
--- a/src/device/drv_dsl_cpe_device_danube.c
|
||||
+++ b/src/device/drv_dsl_cpe_device_danube.c
|
||||
@@ -3193,7 +3193,7 @@ DSL_Error_t DSL_DRV_DEV_AutobootHandleTraining(
|
||||
DSL_DEV_NUM(pContext)));
|
||||
}
|
||||
#endif /* INCLUDE_DSL_DELT*/
|
||||
- /* Pass through */
|
||||
+ fallthrough ;
|
||||
case DSL_LINESTATE_IDLE:
|
||||
#if defined(INCLUDE_DSL_PM) && defined(INCLUDE_DSL_CPE_PM_LINE_COUNTERS)
|
||||
if ( (pContext->bGotFullInit == DSL_TRUE) &&
|
|
@ -0,0 +1,65 @@
|
|||
--- a/src/g997/drv_dsl_cpe_api_g997_danube.c
|
||||
+++ b/src/g997/drv_dsl_cpe_api_g997_danube.c
|
||||
@@ -1984,41 +1984,53 @@ DSL_Error_t DSL_DRV_DEV_G997_DeltHlogGet(
|
||||
{
|
||||
if (nDirection == DSL_DOWNSTREAM)
|
||||
{
|
||||
- DSL_G997_DeltHlogData_t HlogData;
|
||||
+ DSL_G997_DeltHlogData_t *HlogData;
|
||||
|
||||
- memset(&HlogData, 0x0, sizeof(DSL_G997_DeltHlogData_t));
|
||||
+ HlogData = kzalloc(sizeof(*HlogData), GFP_KERNEL);
|
||||
+ if (!HlogData)
|
||||
+ {
|
||||
+ DSL_DEBUG(DSL_DBG_ERR,
|
||||
+ (pContext, "DSL[%02d]: ERROR - Alloc HlogData failed!"DSL_DRV_CRLF,
|
||||
+ DSL_DEV_NUM(pContext)));
|
||||
+ return DSL_ERR_MEMORY;
|
||||
+ }
|
||||
+
|
||||
+ memset(HlogData, 0x0, sizeof(DSL_G997_DeltHlogData_t));
|
||||
|
||||
/* Get SHOWTIME Hlog values*/
|
||||
nErrCode = DSL_DRV_DANUBE_G997_DeltHlogGet(
|
||||
- pContext, nDirection, &HlogData);
|
||||
+ pContext, nDirection, HlogData);
|
||||
if (nErrCode != DSL_SUCCESS)
|
||||
{
|
||||
DSL_DEBUG(DSL_DBG_ERR,
|
||||
(pContext, "DSL[%02d]: ERROR - Showtime Hlog get failed!"DSL_DRV_CRLF,
|
||||
DSL_DEV_NUM(pContext)));
|
||||
+ kfree(HlogData);
|
||||
return nErrCode;
|
||||
}
|
||||
|
||||
/* if actual group size != 1, values should be spread */
|
||||
- if (HlogData.nGroupSize != 1)
|
||||
+ if (HlogData->nGroupSize != 1)
|
||||
{
|
||||
nErrCode = DSL_DRV_DANUBE_G997_DeltValuesSpread(
|
||||
- 0x1, HlogData.nGroupSize, HlogData.deltHlog.nNumData,
|
||||
- HlogData.deltHlog.nNSCData, pData->deltHlog.nNSCData);
|
||||
+ 0x1, HlogData->nGroupSize, HlogData->deltHlog.nNumData,
|
||||
+ HlogData->deltHlog.nNSCData, pData->deltHlog.nNSCData);
|
||||
|
||||
if (nErrCode == DSL_SUCCESS)
|
||||
{
|
||||
pData->deltHlog.nNumData =
|
||||
- (DSL_uint16_t)(HlogData.deltHlog.nNumData * HlogData.nGroupSize);
|
||||
+ (DSL_uint16_t)(HlogData->deltHlog.nNumData * HlogData->nGroupSize);
|
||||
pData->nGroupSize = 1;
|
||||
- pData->nMeasurementTime = HlogData.nMeasurementTime;
|
||||
+ pData->nMeasurementTime = HlogData->nMeasurementTime;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* No spread needed, copy data*/
|
||||
- memcpy(pData, &HlogData, sizeof(DSL_G997_DeltHlogData_t));
|
||||
+ memcpy(pData, HlogData, sizeof(DSL_G997_DeltHlogData_t));
|
||||
}
|
||||
+
|
||||
+ kfree(HlogData);
|
||||
}
|
||||
else
|
||||
{
|
|
@ -0,0 +1,26 @@
|
|||
--- a/src/g997/drv_dsl_cpe_api_g997_danube.c
|
||||
+++ b/src/g997/drv_dsl_cpe_api_g997_danube.c
|
||||
@@ -2512,6 +2524,7 @@ DSL_Error_t DSL_DRV_DEV_G997_PowerManagementStateForcedTrigger(
|
||||
else
|
||||
{
|
||||
/* read L3 request failure reason */
|
||||
+ DSL_uint8_t nErrCodeL3;
|
||||
nErrCode = DSL_DRV_DANUBE_CmvRead(pContext, DSL_CMV_GROUP_STAT,
|
||||
DSL_CMV_ADDRESS_STAT_L3_FAILURE_REASON, 0, 1, &nVal);
|
||||
DSL_DEBUG(DSL_DBG_MSG,
|
||||
@@ -2525,11 +2538,13 @@ DSL_Error_t DSL_DRV_DEV_G997_PowerManagementStateForcedTrigger(
|
||||
nErrCode = DSL_ERR_MSG_EXCHANGE;
|
||||
break;
|
||||
}
|
||||
- if (((nVal >> 4) & 0x15) == 0x5)
|
||||
+
|
||||
+ nErrCodeL3 = (nVal >> 4) & 0x15;
|
||||
+ if (nErrCodeL3 == 0x5)
|
||||
{
|
||||
nErrCode = DSL_ERR_L3_NOT_IN_L0;
|
||||
}
|
||||
- else if (((nVal >> 4) & 0x15) == 0x9)
|
||||
+ else if (nErrCodeL3 == 0x9)
|
||||
{
|
||||
nErrCode = DSL_ERR_L3_TIMED_OUT;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
--- a/ltq_atm.c
|
||||
+++ b/ltq_atm.c
|
||||
@@ -338,7 +338,8 @@ static int ppe_ioctl(struct atm_dev *dev
|
||||
break;
|
||||
|
||||
case PPE_ATM_MIB_VCC: /* VCC related MIB */
|
||||
- copy_from_user(&mib_vcc, arg, sizeof(mib_vcc));
|
||||
+ if (copy_from_user(&mib_vcc, arg, sizeof(mib_vcc)))
|
||||
+ return -EFAULT;
|
||||
conn = find_vpivci(mib_vcc.vpi, mib_vcc.vci);
|
||||
if (conn >= 0) {
|
||||
mib_vcc.mib_vcc.aal5VccCrcErrors = g_atm_priv_data.conn[conn].aal5_vcc_crc_err;
|
|
@ -257,7 +257,7 @@ void ifx_deu_aes (void *ctx_arg, u8 *out_arg, const u8 *in_arg,
|
|||
{
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
volatile struct aes_t *aes = (volatile struct aes_t *) AES_START;
|
||||
struct aes_ctx *ctx = (struct aes_ctx *)ctx_arg;
|
||||
//struct aes_ctx *ctx = (struct aes_ctx *)ctx_arg;
|
||||
unsigned long flag;
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
int i = 0;
|
||||
|
@ -699,7 +699,7 @@ void ifx_deu_aes_xts (void *ctx_arg, u8 *out_arg, const u8 *in_arg,
|
|||
{
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
volatile struct aes_t *aes = (volatile struct aes_t *) AES_START;
|
||||
struct aes_ctx *ctx = (struct aes_ctx *)ctx_arg;
|
||||
//struct aes_ctx *ctx = (struct aes_ctx *)ctx_arg;
|
||||
unsigned long flag;
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
u8 oldiv[16];
|
||||
|
|
|
@ -205,12 +205,13 @@ void ifx_deu_des (void *ctx_arg, u8 *out_arg, const u8 *in_arg,
|
|||
des->K3HR = DEU_ENDIAN_SWAP(*((u32 *) key + 4));
|
||||
des->K3LR = DEU_ENDIAN_SWAP(*((u32 *) key + 5));
|
||||
/* no break; */
|
||||
|
||||
fallthrough;
|
||||
case 16:
|
||||
des->K2HR = DEU_ENDIAN_SWAP(*((u32 *) key + 2));
|
||||
des->K2LR = DEU_ENDIAN_SWAP(*((u32 *) key + 3));
|
||||
|
||||
/* no break; */
|
||||
fallthrough;
|
||||
case 8:
|
||||
des->K1HR = DEU_ENDIAN_SWAP(*((u32 *) key + 0));
|
||||
des->K1LR = DEU_ENDIAN_SWAP(*((u32 *) key + 1));
|
||||
|
|
|
@ -143,7 +143,7 @@ static inline void md5_transform_helper(struct md5_ctx *ctx)
|
|||
static int md5_init(struct shash_desc *desc)
|
||||
{
|
||||
struct md5_ctx *mctx = shash_desc_ctx(desc);
|
||||
volatile struct deu_hash_t *hash = (struct deu_hash_t *) HASH_START;
|
||||
//volatile struct deu_hash_t *hash = (struct deu_hash_t *) HASH_START;
|
||||
|
||||
mctx->byte_count = 0;
|
||||
mctx->started = 0;
|
||||
|
@ -200,8 +200,8 @@ static int md5_final(struct shash_desc *desc, u8 *out)
|
|||
const unsigned int offset = mctx->byte_count & 0x3f;
|
||||
char *p = (char *)mctx->block + offset;
|
||||
int padding = 56 - (offset + 1);
|
||||
volatile struct deu_hash_t *hashs = (struct deu_hash_t *) HASH_START;
|
||||
unsigned long flag;
|
||||
//volatile struct deu_hash_t *hashs = (struct deu_hash_t *) HASH_START;
|
||||
//unsigned long flag;
|
||||
|
||||
*p++ = 0x80;
|
||||
if (padding < 0) {
|
||||
|
|
|
@ -199,8 +199,8 @@ static int sha1_final(struct shash_desc *desc, u8 *out)
|
|||
u64 t;
|
||||
u8 bits[8] = { 0, };
|
||||
static const u8 padding[64] = { 0x80, };
|
||||
volatile struct deu_hash_t *hashs = (struct deu_hash_t *) HASH_START;
|
||||
unsigned long flag;
|
||||
//volatile struct deu_hash_t *hashs = (struct deu_hash_t *) HASH_START;
|
||||
//unsigned long flag;
|
||||
|
||||
t = sctx->count;
|
||||
bits[7] = 0xff & t;
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
--- a/ifxmips_ptm_adsl.c
|
||||
+++ b/ifxmips_ptm_adsl.c
|
||||
@@ -175,9 +175,11 @@ static INLINE void mailbox_signal(unsign
|
||||
*/
|
||||
static INLINE void proc_file_create(void);
|
||||
static INLINE void proc_file_delete(void);
|
||||
+#if defined(ENABLE_DBG_PROC) && ENABLE_DBG_PROC
|
||||
static int proc_read_version(char *, char **, off_t, int, int *, void *);
|
||||
static int proc_read_wanmib(char *, char **, off_t, int, int *, void *);
|
||||
static int proc_write_wanmib(struct file *, const char *, unsigned long, void *);
|
||||
+#endif
|
||||
#if defined(ENABLE_FW_PROC) && ENABLE_FW_PROC
|
||||
static int proc_read_genconf(char *, char **, off_t, int, int *, void *);
|
||||
#endif
|
||||
@@ -889,6 +891,7 @@ static INLINE void proc_file_delete(void
|
||||
remove_proc_entry("driver/ifx_ptm", NULL);
|
||||
}
|
||||
|
||||
+#if defined(ENABLE_DBG_PROC) && ENABLE_DBG_PROC
|
||||
static int proc_read_version(char *buf, char **start, off_t offset, int count, int *eof, void *data)
|
||||
{
|
||||
int len = 0;
|
||||
@@ -963,8 +966,9 @@ static int proc_write_wanmib(struct file
|
||||
|
||||
return count;
|
||||
}
|
||||
+#endif
|
||||
|
||||
-#if defined(ENABLE_FW_PROC) && ENABLE_FW_PROC
|
||||
+#if defined(ENABLE_FW_PROC) && ENABLE_FW_PROC && defined(ENABLE_DBG_PROC) && ENABLE_DBG_PROC
|
||||
|
||||
static int proc_read_genconf(char *page, char **start, off_t off, int count, int *eof, void *data)
|
||||
{
|
|
@ -0,0 +1,38 @@
|
|||
--- a/ifxmips_ptm_adsl.c
|
||||
+++ b/ifxmips_ptm_adsl.c
|
||||
@@ -180,7 +180,7 @@ static int proc_read_version(char *, char **, off_t, int, int *, void *);
|
||||
static int proc_read_wanmib(char *, char **, off_t, int, int *, void *);
|
||||
static int proc_write_wanmib(struct file *, const char *, unsigned long, void *);
|
||||
#endif
|
||||
-#if defined(ENABLE_FW_PROC) && ENABLE_FW_PROC
|
||||
+#if defined(ENABLE_FW_PROC) && ENABLE_FW_PROC && defined(ENABLE_DBG_PROC) && ENABLE_DBG_PROC
|
||||
static int proc_read_genconf(char *, char **, off_t, int, int *, void *);
|
||||
#endif
|
||||
#if defined(ENABLE_DBG_PROC) && ENABLE_DBG_PROC
|
||||
@@ -191,8 +191,8 @@ static int proc_write_wanmib(struct file *, const char *, unsigned long, void *)
|
||||
/*
|
||||
* Proc Help Functions
|
||||
*/
|
||||
-static INLINE int stricmp(const char *, const char *);
|
||||
#if defined(ENABLE_DBG_PROC) && ENABLE_DBG_PROC
|
||||
+ static INLINE int stricmp(const char *, const char *);
|
||||
static INLINE int strincmp(const char *, const char *, int);
|
||||
#endif
|
||||
static INLINE int ifx_ptm_version(char *);
|
||||
@@ -1159,8 +1159,6 @@ static int proc_write_dbg(struct file *file, const char *buf, unsigned long coun
|
||||
return count;
|
||||
}
|
||||
|
||||
-#endif // defined(ENABLE_DBG_PROC) && ENABLE_DBG_PROC
|
||||
-
|
||||
static INLINE int stricmp(const char *p1, const char *p2)
|
||||
{
|
||||
int c1, c2;
|
||||
@@ -1178,7 +1176,6 @@ static INLINE int stricmp(const char *p1, const char *p2)
|
||||
return *p1 - *p2;
|
||||
}
|
||||
|
||||
-#if defined(ENABLE_DBG_PROC) && ENABLE_DBG_PROC
|
||||
static INLINE int strincmp(const char *p1, const char *p2, int n)
|
||||
{
|
||||
int c1 = 0, c2;
|
|
@ -0,0 +1,114 @@
|
|||
--- a/src/drv_tapi_cid.c
|
||||
+++ b/src/drv_tapi_cid.c
|
||||
@@ -1424,6 +1424,8 @@ static IFX_int32_t cid_lookup_transparent(TAPI_CIDTX_DATA_t *pTxData,
|
||||
|
||||
cidfsk_set_tx_time (pTxData, &pConfData->TapiCidFskConf);
|
||||
|
||||
+ fallthrough;
|
||||
+
|
||||
case IFX_TAPI_CID_GEN_TYPE_DTMF:
|
||||
memcpy (pTxData->cidBuf[IFX_TAPI_CID_GEN_TYPE_DTMF].pBuf,
|
||||
pMessage[0].transparent.data, pMessage[0].transparent.len);
|
||||
@@ -1497,6 +1499,7 @@ static IFX_int32_t cid_prepare_data(TAPI_CHANNEL *pChannel,
|
||||
break;
|
||||
case IFX_TAPI_CID_STD_KPN_DTMF:
|
||||
/*lint -fallthrough*/
|
||||
+ fallthrough;
|
||||
case IFX_TAPI_CID_STD_KPN_DTMF_FSK:
|
||||
if (IFX_TAPI_CID_HM_ONHOOK == pTxData->txHookMode)
|
||||
{
|
||||
@@ -1506,6 +1509,7 @@ static IFX_int32_t cid_prepare_data(TAPI_CHANNEL *pChannel,
|
||||
}
|
||||
/* KPN CID Type 2 (off-hook) always using FSK */
|
||||
/*lint -fallthrough*/
|
||||
+ fallthrough;
|
||||
default:
|
||||
pTxData->cidGenType = IFX_TAPI_CID_GEN_TYPE_FSK;
|
||||
break;
|
||||
@@ -1532,6 +1536,7 @@ static IFX_int32_t cid_prepare_data(TAPI_CHANNEL *pChannel,
|
||||
break;
|
||||
|
||||
/*lint -fallthrough*/
|
||||
+ fallthrough;
|
||||
case IFX_TAPI_CID_GEN_TYPE_FSK:
|
||||
|
||||
if (IFX_TAPI_CID_STD_NTT == pConfData->nStandard)
|
||||
@@ -2036,6 +2041,7 @@ static FSM_STATUS_t cid_fsm_alert_exec(TAPI_CHANNEL *pChannel)
|
||||
}
|
||||
pTxData->nCidSubState++;
|
||||
/*lint -fallthrough*/
|
||||
+ fallthrough;
|
||||
case 1:
|
||||
if (pConfData->OSIoffhook && pConfData->nSAStone)
|
||||
{
|
||||
@@ -2052,6 +2058,7 @@ static FSM_STATUS_t cid_fsm_alert_exec(TAPI_CHANNEL *pChannel)
|
||||
}
|
||||
pTxData->nCidSubState++;
|
||||
/*lint -fallthrough*/
|
||||
+ fallthrough;
|
||||
case 2:
|
||||
if (pConfData->nSAStone)
|
||||
{
|
||||
@@ -2069,6 +2076,7 @@ static FSM_STATUS_t cid_fsm_alert_exec(TAPI_CHANNEL *pChannel)
|
||||
}
|
||||
pTxData->nCidSubState++;
|
||||
/*lint -fallthrough*/
|
||||
+ fallthrough;
|
||||
default:
|
||||
/* Play CAS tone on data channel, use unprotected function, protection
|
||||
is done around cid_fsm_alert_exec */
|
||||
@@ -3458,6 +3466,7 @@ IFX_int32_t TAPI_Phone_CID_Stop_Tx(TAPI_CHANNEL *pChannel)
|
||||
}
|
||||
/* deliberately fall through */
|
||||
/*lint -fallthrough*/
|
||||
+ fallthrough;
|
||||
case TAPI_CID_STATE_ACK:
|
||||
/* deactivate the DTMF override - last two params are ignored */
|
||||
if (ptr_chk(pDrvCtx->SIG.DTMFD_Override, ""))
|
||||
@@ -3469,6 +3478,7 @@ IFX_int32_t TAPI_Phone_CID_Stop_Tx(TAPI_CHANNEL *pChannel)
|
||||
}
|
||||
/* deliberately fall through */
|
||||
/*lint -fallthrough*/
|
||||
+ fallthrough;
|
||||
case TAPI_CID_STATE_SENDING:
|
||||
TAPI_Stop_Timer (pTxData->CidTimerID);
|
||||
break;
|
||||
@@ -4066,6 +4076,7 @@ IFX_int32_t TAPI_Phone_Get_CidRxData (TAPI_CHANNEL *pChannel,
|
||||
/* If the fifo is not empty take the data from the fifo first. */
|
||||
/* deliberately fallthrough to default case */
|
||||
/*lint -fallthrough*/
|
||||
+ fallthrough;
|
||||
default:
|
||||
/* Allow readout of data in all other states not handled above.
|
||||
When there is no data in the fifo TAPI_statusErr is returned. */
|
||||
--- a/src/drv_tapi_dial.c
|
||||
+++ b/src/drv_tapi_dial.c
|
||||
@@ -319,6 +319,8 @@ static IFX_void_t ifx_tapi_dial_OnTimer(Timer_ID Timer, IFX_ulong_t nArg)
|
||||
/* NOTE: the "break" statement has been intentionally omitted */
|
||||
/*lint -fallthrough */
|
||||
|
||||
+ fallthrough;
|
||||
+
|
||||
case TAPI_HOOK_STATE_DIAL_L_VAL:
|
||||
/* digit_l_min expires: onhook has lasted long enough to be a
|
||||
certain low pulse (not noise). The next state is the overlap with
|
||||
--- a/src/drv_tapi_event.c
|
||||
+++ b/src/drv_tapi_event.c
|
||||
@@ -1545,6 +1545,7 @@ IFX_int32_t IFX_TAPI_Event_Dispatch_ProcessCtx(IFX_TAPI_EXT_EVENT_PARAM_t*
|
||||
/**\todo put in device fifo */
|
||||
pEvent->ch = IFX_TAPI_DEVICE_CH_NUMBER;
|
||||
/*lint -fallthrough */
|
||||
+ fallthrough;
|
||||
case IFX_TAPI_ERRSRC_LL_CH:
|
||||
pEvent->data.value |= IFX_TAPI_ERRSRC_LL;
|
||||
break;
|
||||
--- a/src/drv_tapi_ioctl.c
|
||||
+++ b/src/drv_tapi_ioctl.c
|
||||
@@ -1552,6 +1553,7 @@ static IFX_int32_t TAPI_IoctlCh (IFX_TAPI_DRV_CTX_t* pDrvCtx,
|
||||
/* Dial Services */
|
||||
ret = TAPI_statusNotSupported;
|
||||
/*lint -fallthrough*/
|
||||
+ fallthrough;
|
||||
default:
|
||||
bHandled = IFX_FALSE;
|
||||
break;
|
|
@ -0,0 +1,12 @@
|
|||
--- a/src/drv_tapi_ioctl.c
|
||||
+++ b/src/drv_tapi_ioctl.c
|
||||
@@ -702,7 +702,8 @@ static IFX_int32_t TAPI_IoctlDev (IFX_TAPI_DRV_CTX_t* pDrvCtx,
|
||||
|
||||
if (ret == TAPI_statusOk || ret == 1)
|
||||
{
|
||||
- copy_to_user ((IFX_void_t*)ioarg, p_tmp, sizeof(IFX_TAPI_CAP_t));
|
||||
+ if (copy_to_user ((IFX_void_t*)ioarg, p_tmp, sizeof(IFX_TAPI_CAP_t)))
|
||||
+ ret = TAPI_statusErrKernCpy;
|
||||
}
|
||||
}
|
||||
TAPI_OS_Free (p_tmp);
|
|
@ -0,0 +1,99 @@
|
|||
--- a/src/drv_mei_cpe_api_intern.c
|
||||
+++ b/src/drv_mei_cpe_api_intern.c
|
||||
@@ -421,7 +421,9 @@ IFX_int32_t MEI_InternalMsgSend(
|
||||
return retVal;
|
||||
}
|
||||
|
||||
-static IFX_void_t MEI_Internal_DumpMessage(
|
||||
+#define MEI_Internal_DumpMessage_bufSize 10
|
||||
+
|
||||
+static IFX_int32_t MEI_Internal_DumpMessage(
|
||||
MEI_DYN_CNTRL_T *pMeiDynCntrl,
|
||||
const IFX_uint16_t nMsgId,
|
||||
const IFX_uint16_t *pData,
|
||||
@@ -435,15 +437,20 @@ static IFX_void_t MEI_Internal_DumpMessa
|
||||
IFX_uint8_t i;
|
||||
const IFX_uint32_t nCommonPayloadSize = 5*nSize/2;
|
||||
const IFX_uint8_t nInfoSize = 35;
|
||||
- const IFX_uint8_t nBufSize = 10;
|
||||
IFX_uint32_t nMsgSize = nCommonPayloadSize + nInfoSize;
|
||||
IFX_uint32_t nCharsWrittenToBuf = 0;
|
||||
- char msg[nMsgSize];
|
||||
- char buf[nBufSize];
|
||||
+ char *msg;
|
||||
+ char buf[MEI_Internal_DumpMessage_bufSize];
|
||||
|
||||
if((pData == IFX_NULL) || (nSize < 4))
|
||||
{
|
||||
- return ;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ msg = kcalloc(nMsgSize, sizeof(*msg), GFP_KERNEL);
|
||||
+ if (!msg)
|
||||
+ {
|
||||
+ return -ENOMEM;
|
||||
}
|
||||
|
||||
pMsg16 = (IFX_uint16_t*)(pData+2);
|
||||
@@ -464,7 +471,8 @@ static IFX_void_t MEI_Internal_DumpMessa
|
||||
/* 32-bit payload elements */
|
||||
for (i=0; i<((nSize-4)/4); i++)
|
||||
{
|
||||
- nCharsWrittenToBuf = snprintf(buf, nBufSize, " %08X", pMsg32[i]);
|
||||
+ nCharsWrittenToBuf = snprintf(buf, MEI_Internal_DumpMessage_bufSize,
|
||||
+ " %08X", pMsg32[i]);
|
||||
strncat(msg, buf, nMsgSize);
|
||||
nMsgSize -= nCharsWrittenToBuf;
|
||||
}
|
||||
@@ -474,7 +482,8 @@ static IFX_void_t MEI_Internal_DumpMessa
|
||||
/* 16-bit payload elements */
|
||||
for (i=0; i<((nSize-4)/2); i++)
|
||||
{
|
||||
- nCharsWrittenToBuf = snprintf(buf, nBufSize, " %04X", pMsg16[i]);
|
||||
+ nCharsWrittenToBuf = snprintf(buf, MEI_Internal_DumpMessage_bufSize,
|
||||
+ " %04X", pMsg16[i]);
|
||||
strncat(msg, buf, nMsgSize);
|
||||
nMsgSize -= nCharsWrittenToBuf;
|
||||
}
|
||||
@@ -482,6 +491,10 @@ static IFX_void_t MEI_Internal_DumpMessa
|
||||
strncat(msg, MEI_DRV_CRLF, nMsgSize);
|
||||
|
||||
PRN_DBG_USR_RAW(MEI_MSG_DUMP_API, dbg_level, (msg));
|
||||
+
|
||||
+ kfree(msg);
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
IFX_int32_t MEI_InternalSendMessage(
|
||||
@@ -503,18 +516,25 @@ IFX_int32_t MEI_InternalSendMessage(
|
||||
msg.ack_msg.pPayload = (unsigned char *)pDataAck;
|
||||
msg.ack_msg.paylSize_byte = nLenAck;
|
||||
|
||||
- MEI_Internal_DumpMessage(pMeiDynCntrl, msg.write_msg.msgId,
|
||||
+ ret = MEI_Internal_DumpMessage(pMeiDynCntrl, msg.write_msg.msgId,
|
||||
(IFX_uint16_t *)msg.write_msg.pPayload, msg.write_msg.paylSize_byte,
|
||||
IFX_FALSE, MEI_DRV_PRN_LEVEL_NORMAL);
|
||||
|
||||
+ if (ret < 0)
|
||||
+ {
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
ret = MEI_InternalMsgSend(pMeiDynCntrl, &msg);
|
||||
|
||||
- if (ret >= 0)
|
||||
+ if (ret < 0)
|
||||
{
|
||||
- MEI_Internal_DumpMessage(pMeiDynCntrl, msg.ack_msg.msgId,
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = MEI_Internal_DumpMessage(pMeiDynCntrl, msg.ack_msg.msgId,
|
||||
(IFX_uint16_t *)msg.ack_msg.pPayload, msg.ack_msg.paylSize_byte,
|
||||
IFX_TRUE, MEI_DRV_PRN_LEVEL_NORMAL);
|
||||
- }
|
||||
|
||||
return ret;
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
--- a/src/drv_mei_cpe_linux.c
|
||||
+++ b/src/drv_mei_cpe_linux.c
|
||||
@@ -1267,7 +1267,9 @@ static long MEI_Ioctl( struct file *filp,
|
||||
MEI_IOCTL_RETURN:
|
||||
|
||||
local_args.drv_ioctl.retCode = ret;
|
||||
- copy_to_user( ((IOCTL_MEI_arg_t *)nArgument), &local_args, retSize);
|
||||
+ if (copy_to_user( ((IOCTL_MEI_arg_t *)nArgument), &local_args, retSize))
|
||||
+ PRN_ERR_USR_NL( MEI_DRV, MEI_DRV_PRN_LEVEL_ERR,
|
||||
+ ("MEI_DRV[??] Error ioctl - copy_to_user failed!" MEI_DRV_CRLF));
|
||||
|
||||
return (ret < 0) ? -1 : 0;
|
||||
}
|
||||
@@ -3571,9 +3573,11 @@ static int MEI_IoctlMeiDbgAccessWr_Wrap(
|
||||
ret = MEI_IoctlMeiDbgAccessWr( pMeiDynCntrl, pLocalArgument);
|
||||
|
||||
/* return arguments - count */
|
||||
- copy_to_user( (void *)&pUserArgument->count,
|
||||
+ if (copy_to_user( (void *)&pUserArgument->count,
|
||||
(void *)&pLocalArgument->count,
|
||||
- sizeof(pUserArgument->count) ) ;
|
||||
+ sizeof(pUserArgument->count) ))
|
||||
+ PRN_ERR_USR_NL( MEI_DRV, MEI_DRV_PRN_LEVEL_ERR,
|
||||
+ ("MEI_DRV[??] Error ioctl - copy_to_user failed!" MEI_DRV_CRLF));
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -3600,16 +3604,20 @@ static int MEI_IoctlMeiDbgAccessRd_Wrap(
|
||||
if ( pLocalArgument->count )
|
||||
{
|
||||
/* return the buffer */
|
||||
- copy_to_user( pUserBuf,
|
||||
+ if (copy_to_user( pUserBuf,
|
||||
pLocalArgument->pData_32,
|
||||
- pLocalArgument->count * sizeof(IFX_uint32_t) ) ;
|
||||
+ pLocalArgument->count * sizeof(IFX_uint32_t) ))
|
||||
+ PRN_ERR_USR_NL( MEI_DRV, MEI_DRV_PRN_LEVEL_ERR,
|
||||
+ ("MEI_DRV[??] Error ioctl - copy_to_user failed!" MEI_DRV_CRLF));
|
||||
|
||||
}
|
||||
|
||||
/* return count argument */
|
||||
- copy_to_user( (void *)&pUserArgument->count,
|
||||
+ if (copy_to_user( (void *)&pUserArgument->count,
|
||||
(void *)&pLocalArgument->count,
|
||||
- sizeof(pUserArgument->count) ) ;
|
||||
+ sizeof(pUserArgument->count) ))
|
||||
+ PRN_ERR_USR_NL( MEI_DRV, MEI_DRV_PRN_LEVEL_ERR,
|
||||
+ ("MEI_DRV[??] Error ioctl - copy_to_user failed!" MEI_DRV_CRLF));
|
||||
|
||||
return ret;
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
--- a/src/device/drv_dsl_cpe_device_vrx.c
|
||||
+++ b/src/device/drv_dsl_cpe_device_vrx.c
|
||||
@@ -8885,6 +8885,9 @@ DSL_Error_t DSL_DRV_DEV_AutobootHandleTr
|
||||
(pContext, SYS_DBG_MSG"DSL[%02d]: ORDERLY_SHUTDOWN state reached"
|
||||
DSL_DRV_CRLF, DSL_DEV_NUM(pContext)));
|
||||
/* do not use break here, continue handling */
|
||||
+
|
||||
+ fallthrough;
|
||||
+
|
||||
#endif /* INCLUDE_DSL_CPE_API_VRX */
|
||||
case DSL_LINESTATE_EXCEPTION:
|
||||
if (!bPreFail)
|
||||
--- a/src/pm/drv_dsl_cpe_pm_core.c
|
||||
+++ b/src/pm/drv_dsl_cpe_pm_core.c
|
||||
@@ -2355,15 +2355,19 @@ DSL_Error_t DSL_DRV_PM_CountersReset(
|
||||
}
|
||||
#endif /* #ifdef INCLUDE_DSL_CPE_PM_HISTORY*/
|
||||
|
||||
- if (ResetType == DSL_PM_RESET_HISTORY)
|
||||
- break;
|
||||
+ if (ResetType == DSL_PM_RESET_HISTORY)
|
||||
+ break;
|
||||
+
|
||||
+ fallthrough;
|
||||
|
||||
case DSL_PM_RESET_TOTAL:
|
||||
#ifdef INCLUDE_DSL_CPE_PM_TOTAL_COUNTERS
|
||||
memset(EpData.pRecTotal, nFillValue, EpData.nEpRecElementSize);
|
||||
#endif /* #ifdef INCLUDE_DSL_CPE_PM_TOTAL_COUNTERS*/
|
||||
- if (ResetType == DSL_PM_RESET_TOTAL)
|
||||
- break;
|
||||
+ if (ResetType == DSL_PM_RESET_TOTAL)
|
||||
+ break;
|
||||
+
|
||||
+ fallthrough;
|
||||
|
||||
case DSL_PM_RESET_HISTORY_SHOWTIME:
|
||||
#ifdef INCLUDE_DSL_CPE_PM_SHOWTIME_COUNTERS
|
||||
--- a/src/common/drv_dsl_cpe_api.c
|
||||
+++ b/src/common/drv_dsl_cpe_api.c
|
||||
@@ -2652,6 +2652,8 @@ DSL_Error_t DSL_DRV_AutobootControlSet(
|
||||
/* no break */
|
||||
/* ... pass to restart*/
|
||||
|
||||
+ fallthrough;
|
||||
+
|
||||
#if defined (DSL_VRX_DEVICE_VR11)
|
||||
case DSL_AUTOBOOT_CTRL_STOP_PD:
|
||||
#endif
|
|
@ -0,0 +1,10 @@
|
|||
--- a/src/drv_vmmc_bbd.c
|
||||
+++ b/src/drv_vmmc_bbd.c
|
||||
@@ -1025,6 +1025,7 @@ static IFX_int32_t vmmc_BBD_WhiteListedCmdWr(VMMC_CHANNEL *pCh,
|
||||
}
|
||||
}
|
||||
}
|
||||
+ fallthrough;
|
||||
case VMMC_WL_SDD_RING_CFG:
|
||||
case VMMC_WL_SDD_DCDC_CFG:
|
||||
case VMMC_WL_SDD_MWI_CFG:
|
|
@ -0,0 +1,16 @@
|
|||
--- a/src/drv_vmmc_ioctl.c
|
||||
+++ b/src/drv_vmmc_ioctl.c
|
||||
@@ -108,9 +108,11 @@ extern IFX_int32_t VMMC_ChipAccessInit (
|
||||
{\
|
||||
arg* p_arg = VMMC_OS_Malloc (sizeof(arg));\
|
||||
VMMC_ASSERT (p_arg != IFX_NULL);\
|
||||
- copy_from_user (p_arg, (IFX_uint8_t*)ioarg, sizeof(arg));\
|
||||
+ if (copy_from_user (p_arg, (IFX_uint8_t*)ioarg, sizeof(arg)))\
|
||||
+ ret = -EFAULT;\
|
||||
ret = func((pContext), p_arg);\
|
||||
- copy_to_user ((IFX_uint8_t*)ioarg, p_arg, sizeof(arg));\
|
||||
+ if (copy_to_user ((IFX_uint8_t*)ioarg, p_arg, sizeof(arg)))\
|
||||
+ ret = -EFAULT;\
|
||||
VMMC_OS_Free (p_arg);\
|
||||
}\
|
||||
break
|
|
@ -0,0 +1,31 @@
|
|||
--- a/dcdp/atm_tc.c
|
||||
+++ b/dcdp/atm_tc.c
|
||||
@@ -746,7 +746,8 @@ static void atm_aca_init(struct atm_priv
|
||||
ACA_TXOUT_EN | ACA_RXIN_EN | ACA_RXOUT_EN, 1);
|
||||
}
|
||||
|
||||
-static int print_datetime(char *buffer, const struct timespec64 *datetime)
|
||||
+static int print_datetime(char *buffer, int buffer_size,
|
||||
+ const struct timespec64 *datetime)
|
||||
{
|
||||
struct tm nowtm;
|
||||
char tmbuf[64];
|
||||
@@ -765,7 +766,8 @@ static int print_datetime(char *buffer,
|
||||
nowtm.tm_hour,
|
||||
nowtm.tm_min,
|
||||
nowtm.tm_sec);
|
||||
- snprintf(buffer, sizeof(buffer), "%s.%06d", tmbuf, (int)datetime->tv_nsec / 1000);
|
||||
+ snprintf(buffer, sizeof(tmbuf)+buffer_size, "%s.%06d",
|
||||
+ tmbuf, (int)datetime->tv_nsec / 1000);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -967,7 +969,7 @@ void show_atm_pvc(struct seq_file *seq,
|
||||
char buf[64];
|
||||
|
||||
seq_printf(seq, "\tNet device: %s\n", pvc->dev->name);
|
||||
- print_datetime(buf, &(pvc->access_time));
|
||||
+ print_datetime(buf, sizeof(buf), &(pvc->access_time));
|
||||
seq_printf(seq, "\tLast user cell: %s\n", buf);
|
||||
seq_printf(seq, "\tPort: %d\n", pvc->port);
|
||||
seq_printf(seq, "\tSoftware TX Queue: %u\n", pvc->sw_txq_tbl);
|
|
@ -0,0 +1,206 @@
|
|||
--- a/dcdp/ptm_tc.c
|
||||
+++ b/dcdp/ptm_tc.c
|
||||
@@ -298,15 +298,19 @@ static int ptm_tc_get_stats(struct ptm_e
|
||||
)
|
||||
{
|
||||
struct rtnl_link_stats64 *stat;
|
||||
- struct wan_rx_mib_table rx_mib;
|
||||
+ struct wan_rx_mib_table *rx_mib;
|
||||
unsigned int cur_cnt, last_cnt;
|
||||
struct intel_tc_ptm_sl_stats *ptm_sl_stats;
|
||||
struct ptm_priv *ptm_tc;
|
||||
+ int ret = 0;
|
||||
if (!priv || !stats)
|
||||
return -EFAULT;
|
||||
ptm_tc = priv->ptm_tc;
|
||||
if (!ptm_tc)
|
||||
return -EFAULT;
|
||||
+ rx_mib = kzalloc(sizeof(*rx_mib), GFP_KERNEL);
|
||||
+ if (!rx_mib)
|
||||
+ return -ENOMEM;
|
||||
if (bonding)
|
||||
stats->tc_info = TC_PTM_BND_MODE;
|
||||
else
|
||||
@@ -340,11 +344,11 @@ static int ptm_tc_get_stats(struct ptm_e
|
||||
? cur_cnt - last_cnt
|
||||
: cur_cnt + ((unsigned int)(-1) - last_cnt);
|
||||
|
||||
- tc_mem_read(priv, &rx_mib,
|
||||
+ tc_mem_read(priv, rx_mib,
|
||||
fpi_addr(__RX_GIF_MIB_BASE),
|
||||
- sizeof(rx_mib)
|
||||
+ sizeof(*rx_mib)
|
||||
);
|
||||
- ptm_sl_stats->wrx_gif_drop_pdu = rx_mib.wrx_dropdes_pdu;
|
||||
+ ptm_sl_stats->wrx_gif_drop_pdu = rx_mib->wrx_dropdes_pdu;
|
||||
|
||||
cur_cnt = tc_r32(GIF0_RX_CRC_ERR_CNT);
|
||||
last_cnt = priv->ptm_mib.rx_crc_err_pdu[0];
|
||||
@@ -358,7 +362,7 @@ static int ptm_tc_get_stats(struct ptm_e
|
||||
? cur_cnt - last_cnt
|
||||
: cur_cnt + ((unsigned int)(-1) - last_cnt);
|
||||
|
||||
- ptm_sl_stats->wrx_gif_total_bytes = rx_mib.wrx_total_bytes;
|
||||
+ ptm_sl_stats->wrx_gif_total_bytes = rx_mib->wrx_total_bytes;
|
||||
cur_cnt = sb_r32(__US_TC_LOCAL_Q_CFG_CTXT_BASE +
|
||||
offsetof(desq_cfg_ctxt_t, deq_pkt_cnt) / 4);
|
||||
last_cnt = priv->ptm_mib.tx_total_pdu[0];
|
||||
@@ -376,90 +380,108 @@ static int ptm_tc_get_stats(struct ptm_e
|
||||
/* For bonding information */
|
||||
if (bonding) {
|
||||
int i;
|
||||
- struct intel_tc_ptm_bonding_stats ptm_ds;
|
||||
- struct intel_tc_ptm_bonding_stats ptm_us;
|
||||
+ struct intel_tc_ptm_bonding_stats *ptm_ds;
|
||||
+ struct intel_tc_ptm_bonding_stats *ptm_us;
|
||||
struct intel_tc_ptm_bonding_stats *ptm_bonding_stats;
|
||||
+
|
||||
+ ptm_ds = kzalloc(sizeof(*ptm_ds), GFP_KERNEL);
|
||||
+ if (!ptm_ds) {
|
||||
+ ret = -ENOMEM;
|
||||
+ goto free_rx_mib;
|
||||
+ }
|
||||
+
|
||||
+ ptm_us = kzalloc(sizeof(*ptm_us), GFP_KERNEL);
|
||||
+ if (!ptm_us) {
|
||||
+ ret = -ENOMEM;
|
||||
+ goto free_ptm_ds;
|
||||
+ }
|
||||
+
|
||||
priv = tc_ep_priv(0);
|
||||
- ptm_tc_bond_get_stats(priv, &ptm_ds);
|
||||
+ ptm_tc_bond_get_stats(priv, ptm_ds);
|
||||
priv = tc_ep_priv(1);
|
||||
- ptm_tc_bond_get_stats(priv, &ptm_us);
|
||||
+ ptm_tc_bond_get_stats(priv, ptm_us);
|
||||
ptm_bonding_stats =
|
||||
&(stats->stats.ptm_tc_stats.pmt_bonding_stats);
|
||||
for (i = 0; i < 8; i++)
|
||||
ptm_bonding_stats->us_gif_mib[i] =
|
||||
- ptm_ds.us_gif_mib[i] + ptm_us.us_gif_mib[i];
|
||||
+ ptm_ds->us_gif_mib[i] + ptm_us->us_gif_mib[i];
|
||||
for (i = 0; i < 8; i++) {
|
||||
ptm_bonding_stats->ds_gif_mib[i].rx_frag_byte_cnt =
|
||||
- ptm_ds.ds_gif_mib[i].rx_frag_byte_cnt
|
||||
- + ptm_us.ds_gif_mib[i].rx_frag_byte_cnt;
|
||||
+ ptm_ds->ds_gif_mib[i].rx_frag_byte_cnt
|
||||
+ + ptm_us->ds_gif_mib[i].rx_frag_byte_cnt;
|
||||
ptm_bonding_stats->ds_gif_mib[i].rx_byte_cnt =
|
||||
- ptm_ds.ds_gif_mib[i].rx_byte_cnt
|
||||
- + ptm_us.ds_gif_mib[i].rx_byte_cnt;
|
||||
+ ptm_ds->ds_gif_mib[i].rx_byte_cnt
|
||||
+ + ptm_us->ds_gif_mib[i].rx_byte_cnt;
|
||||
ptm_bonding_stats->ds_gif_mib[i].rx_of_frag_byte_cnt =
|
||||
- ptm_ds.ds_gif_mib[i].rx_of_frag_byte_cnt
|
||||
- + ptm_us.ds_gif_mib[i].rx_of_frag_byte_cnt;
|
||||
+ ptm_ds->ds_gif_mib[i].rx_of_frag_byte_cnt
|
||||
+ + ptm_us->ds_gif_mib[i].rx_of_frag_byte_cnt;
|
||||
ptm_bonding_stats->ds_gif_mib[i].rx_of_byte_cnt =
|
||||
- ptm_ds.ds_gif_mib[i].rx_of_byte_cnt
|
||||
- + ptm_us.ds_gif_mib[i].rx_of_byte_cnt;
|
||||
+ ptm_ds->ds_gif_mib[i].rx_of_byte_cnt
|
||||
+ + ptm_us->ds_gif_mib[i].rx_of_byte_cnt;
|
||||
ptm_bonding_stats->ds_gif_mib[i].rx_oor_frag_byte_cnt =
|
||||
- ptm_ds.ds_gif_mib[i].rx_oor_frag_byte_cnt
|
||||
- + ptm_us.ds_gif_mib[i].rx_oor_frag_byte_cnt;
|
||||
+ ptm_ds->ds_gif_mib[i].rx_oor_frag_byte_cnt
|
||||
+ + ptm_us->ds_gif_mib[i].rx_oor_frag_byte_cnt;
|
||||
ptm_bonding_stats->ds_gif_mib[i].rx_miss_frag_byte_cnt =
|
||||
- ptm_ds.ds_gif_mib[i].rx_miss_frag_byte_cnt
|
||||
- + ptm_us.ds_gif_mib[i].rx_miss_frag_byte_cnt;
|
||||
+ ptm_ds->ds_gif_mib[i].rx_miss_frag_byte_cnt
|
||||
+ + ptm_us->ds_gif_mib[i].rx_miss_frag_byte_cnt;
|
||||
ptm_bonding_stats->ds_gif_mib[i].rx_to_frag_byte_cnt =
|
||||
- ptm_ds.ds_gif_mib[i].rx_to_frag_byte_cnt
|
||||
- + ptm_us.ds_gif_mib[i].rx_to_frag_byte_cnt;
|
||||
+ ptm_ds->ds_gif_mib[i].rx_to_frag_byte_cnt
|
||||
+ + ptm_us->ds_gif_mib[i].rx_to_frag_byte_cnt;
|
||||
}
|
||||
for (i = 0; i < 4; i++) {
|
||||
ptm_bonding_stats->ds_bg_mib[i].conform_pkt_cnt =
|
||||
- ptm_ds.ds_bg_mib[i].conform_pkt_cnt
|
||||
- + ptm_us.ds_bg_mib[i].conform_pkt_cnt;
|
||||
+ ptm_ds->ds_bg_mib[i].conform_pkt_cnt
|
||||
+ + ptm_us->ds_bg_mib[i].conform_pkt_cnt;
|
||||
ptm_bonding_stats->ds_bg_mib[i].conform_frag_cnt =
|
||||
- ptm_ds.ds_bg_mib[i].conform_frag_cnt
|
||||
- + ptm_us.ds_bg_mib[i].conform_frag_cnt;
|
||||
+ ptm_ds->ds_bg_mib[i].conform_frag_cnt
|
||||
+ + ptm_us->ds_bg_mib[i].conform_frag_cnt;
|
||||
ptm_bonding_stats->ds_bg_mib[i].conform_byte_cnt =
|
||||
- ptm_ds.ds_bg_mib[i].conform_byte_cnt
|
||||
- + ptm_us.ds_bg_mib[i].conform_byte_cnt;
|
||||
+ ptm_ds->ds_bg_mib[i].conform_byte_cnt
|
||||
+ + ptm_us->ds_bg_mib[i].conform_byte_cnt;
|
||||
ptm_bonding_stats->ds_bg_mib[i].no_sop_pkt_cnt =
|
||||
- ptm_ds.ds_bg_mib[i].no_sop_pkt_cnt
|
||||
- + ptm_us.ds_bg_mib[i].no_sop_pkt_cnt;
|
||||
+ ptm_ds->ds_bg_mib[i].no_sop_pkt_cnt
|
||||
+ + ptm_us->ds_bg_mib[i].no_sop_pkt_cnt;
|
||||
ptm_bonding_stats->ds_bg_mib[i].no_sop_frag_cnt =
|
||||
- ptm_ds.ds_bg_mib[i].no_sop_frag_cnt
|
||||
- + ptm_us.ds_bg_mib[i].no_sop_frag_cnt;
|
||||
+ ptm_ds->ds_bg_mib[i].no_sop_frag_cnt
|
||||
+ + ptm_us->ds_bg_mib[i].no_sop_frag_cnt;
|
||||
ptm_bonding_stats->ds_bg_mib[i].no_sop_byte_cnt =
|
||||
- ptm_ds.ds_bg_mib[i].no_sop_byte_cnt
|
||||
- + ptm_us.ds_bg_mib[i].no_sop_byte_cnt;
|
||||
+ ptm_ds->ds_bg_mib[i].no_sop_byte_cnt
|
||||
+ + ptm_us->ds_bg_mib[i].no_sop_byte_cnt;
|
||||
ptm_bonding_stats->ds_bg_mib[i].no_eop_pkt_cnt =
|
||||
- ptm_ds.ds_bg_mib[i].no_eop_pkt_cnt
|
||||
- + ptm_us.ds_bg_mib[i].no_eop_pkt_cnt;
|
||||
+ ptm_ds->ds_bg_mib[i].no_eop_pkt_cnt
|
||||
+ + ptm_us->ds_bg_mib[i].no_eop_pkt_cnt;
|
||||
ptm_bonding_stats->ds_bg_mib[i].no_eop_frag_cnt =
|
||||
- ptm_ds.ds_bg_mib[i].no_eop_frag_cnt
|
||||
- + ptm_us.ds_bg_mib[i].no_eop_frag_cnt;
|
||||
+ ptm_ds->ds_bg_mib[i].no_eop_frag_cnt
|
||||
+ + ptm_us->ds_bg_mib[i].no_eop_frag_cnt;
|
||||
ptm_bonding_stats->ds_bg_mib[i].no_eop_byte_cnt =
|
||||
- ptm_ds.ds_bg_mib[i].no_eop_byte_cnt
|
||||
- + ptm_us.ds_bg_mib[i].no_eop_byte_cnt;
|
||||
+ ptm_ds->ds_bg_mib[i].no_eop_byte_cnt
|
||||
+ + ptm_us->ds_bg_mib[i].no_eop_byte_cnt;
|
||||
ptm_bonding_stats->ds_bg_mib[i].oversize_pkt_cnt =
|
||||
- ptm_ds.ds_bg_mib[i].oversize_pkt_cnt
|
||||
- + ptm_us.ds_bg_mib[i].oversize_pkt_cnt;
|
||||
+ ptm_ds->ds_bg_mib[i].oversize_pkt_cnt
|
||||
+ + ptm_us->ds_bg_mib[i].oversize_pkt_cnt;
|
||||
ptm_bonding_stats->ds_bg_mib[i].oversize_frag_cnt =
|
||||
- ptm_ds.ds_bg_mib[i].oversize_frag_cnt
|
||||
- + ptm_us.ds_bg_mib[i].oversize_frag_cnt;
|
||||
+ ptm_ds->ds_bg_mib[i].oversize_frag_cnt
|
||||
+ + ptm_us->ds_bg_mib[i].oversize_frag_cnt;
|
||||
ptm_bonding_stats->ds_bg_mib[i].oversize_byte_cnt =
|
||||
- ptm_ds.ds_bg_mib[i].oversize_byte_cnt
|
||||
- + ptm_us.ds_bg_mib[i].oversize_byte_cnt;
|
||||
+ ptm_ds->ds_bg_mib[i].oversize_byte_cnt
|
||||
+ + ptm_us->ds_bg_mib[i].oversize_byte_cnt;
|
||||
ptm_bonding_stats->ds_bg_mib[i].noncosec_pkt_cnt =
|
||||
- ptm_ds.ds_bg_mib[i].noncosec_pkt_cnt
|
||||
- + ptm_us.ds_bg_mib[i].noncosec_pkt_cnt;
|
||||
+ ptm_ds->ds_bg_mib[i].noncosec_pkt_cnt
|
||||
+ + ptm_us->ds_bg_mib[i].noncosec_pkt_cnt;
|
||||
ptm_bonding_stats->ds_bg_mib[i].noncosec_frag_cnt =
|
||||
- ptm_ds.ds_bg_mib[i].noncosec_frag_cnt
|
||||
- + ptm_us.ds_bg_mib[i].noncosec_frag_cnt;
|
||||
+ ptm_ds->ds_bg_mib[i].noncosec_frag_cnt
|
||||
+ + ptm_us->ds_bg_mib[i].noncosec_frag_cnt;
|
||||
ptm_bonding_stats->ds_bg_mib[i].noncosec_byte_cnt =
|
||||
- ptm_ds.ds_bg_mib[i].noncosec_byte_cnt
|
||||
- + ptm_us.ds_bg_mib[i].noncosec_byte_cnt;
|
||||
+ ptm_ds->ds_bg_mib[i].noncosec_byte_cnt
|
||||
+ + ptm_us->ds_bg_mib[i].noncosec_byte_cnt;
|
||||
}
|
||||
+ kfree(ptm_us);
|
||||
+free_ptm_ds:
|
||||
+ kfree(ptm_ds);
|
||||
}
|
||||
- return 0;
|
||||
+free_rx_mib:
|
||||
+ kfree(rx_mib);
|
||||
+ return ret;
|
||||
}
|
||||
static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
{
|
|
@ -521,13 +521,13 @@ define KernelPackage/scsi-core
|
|||
TITLE:=SCSI device support
|
||||
KCONFIG:= \
|
||||
CONFIG_SCSI \
|
||||
CONFIG_SCSI_COMMON@ge5.15 \
|
||||
CONFIG_SCSI_COMMON \
|
||||
CONFIG_BLK_DEV_SD
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/scsi/scsi_mod.ko \
|
||||
$(LINUX_DIR)/drivers/scsi/scsi_common.ko@ge5.15 \
|
||||
$(LINUX_DIR)/drivers/scsi/scsi_common.ko \
|
||||
$(LINUX_DIR)/drivers/scsi/sd_mod.ko
|
||||
AUTOLOAD:=$(call AutoLoad,40,scsi_mod scsi_common@ge5.15 sd_mod,1)
|
||||
AUTOLOAD:=$(call AutoLoad,40,scsi_mod scsi_common sd_mod,1)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,scsi-core))
|
||||
|
|
|
@ -704,7 +704,6 @@ define KernelPackage/crypto-misc
|
|||
CONFIG_CRYPTO_KHAZAD \
|
||||
CONFIG_CRYPTO_SERPENT \
|
||||
CONFIG_CRYPTO_TEA \
|
||||
CONFIG_CRYPTO_TGR192@lt5.12 \
|
||||
CONFIG_CRYPTO_TWOFISH \
|
||||
CONFIG_CRYPTO_TWOFISH_COMMON \
|
||||
CONFIG_CRYPTO_TWOFISH_586 \
|
||||
|
@ -717,7 +716,6 @@ define KernelPackage/crypto-misc
|
|||
$(LINUX_DIR)/crypto/cast6_generic.ko \
|
||||
$(LINUX_DIR)/crypto/khazad.ko \
|
||||
$(LINUX_DIR)/crypto/tea.ko \
|
||||
$(LINUX_DIR)/crypto/tgr192.ko@lt5.12 \
|
||||
$(LINUX_DIR)/crypto/twofish_common.ko \
|
||||
$(LINUX_DIR)/crypto/wp512.ko \
|
||||
$(LINUX_DIR)/crypto/twofish_generic.ko \
|
||||
|
@ -725,7 +723,7 @@ define KernelPackage/crypto-misc
|
|||
$(LINUX_DIR)/crypto/blowfish_generic.ko \
|
||||
$(LINUX_DIR)/crypto/serpent_generic.ko
|
||||
AUTOLOAD:=$(call AutoLoad,10,anubis camellia_generic cast_common \
|
||||
cast5_generic cast6_generic khazad tea tgr192@lt5.12 twofish_common \
|
||||
cast5_generic cast6_generic khazad tea twofish_common \
|
||||
wp512 blowfish_common serpent_generic)
|
||||
ifndef CONFIG_TARGET_x86
|
||||
AUTOLOAD+= $(call AutoLoad,10,twofish_generic blowfish_generic)
|
||||
|
@ -738,10 +736,9 @@ ifndef CONFIG_TARGET_x86_64
|
|||
FILES+= \
|
||||
$(LINUX_DIR)/arch/x86/crypto/twofish-i586.ko \
|
||||
$(LINUX_DIR)/arch/x86/crypto/serpent-sse2-i586.ko \
|
||||
$(LINUX_DIR)/arch/x86/crypto/glue_helper.ko@lt5.12 \
|
||||
$(LINUX_DIR)/crypto/cryptd.ko \
|
||||
$(LINUX_DIR)/crypto/crypto_simd.ko
|
||||
AUTOLOAD+= $(call AutoLoad,10,cryptd glue_helper@lt5.12 \
|
||||
AUTOLOAD+= $(call AutoLoad,10,cryptd \
|
||||
serpent-sse2-i586 twofish-i586 blowfish_generic)
|
||||
endef
|
||||
endif
|
||||
|
@ -827,9 +824,7 @@ $(eval $(call KernelPackage,crypto-rmd160))
|
|||
|
||||
define KernelPackage/crypto-rng
|
||||
TITLE:=CryptoAPI random number generation
|
||||
DEPENDS:=+kmod-crypto-hash +kmod-crypto-hmac \
|
||||
+LINUX_5_10:kmod-crypto-sha256 \
|
||||
+LINUX_5_15:kmod-crypto-sha512
|
||||
DEPENDS:=+kmod-crypto-hash +kmod-crypto-hmac +kmod-crypto-sha512
|
||||
KCONFIG:= \
|
||||
CONFIG_CRYPTO_DRBG \
|
||||
CONFIG_CRYPTO_DRBG_HMAC=y \
|
||||
|
|
|
@ -87,31 +87,29 @@ define KernelPackage/fs-cifs
|
|||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=CIFS support
|
||||
KCONFIG:= \
|
||||
CONFIG_SMBFS_COMMON@ge5.15 \
|
||||
CONFIG_SMBFS_COMMON \
|
||||
CONFIG_CIFS \
|
||||
CONFIG_CIFS_DFS_UPCALL=n \
|
||||
CONFIG_CIFS_UPCALL=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/smbfs_common/cifs_arc4.ko@ge5.15 \
|
||||
$(LINUX_DIR)/fs/smbfs_common/cifs_md4.ko@ge5.15 \
|
||||
$(LINUX_DIR)/fs/smbfs_common/cifs_arc4.ko \
|
||||
$(LINUX_DIR)/fs/smbfs_common/cifs_md4.ko \
|
||||
$(LINUX_DIR)/fs/cifs/cifs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,cifs)
|
||||
$(call AddDepends/nls)
|
||||
DEPENDS+= \
|
||||
+LINUX_5_10:kmod-crypto-md4\
|
||||
+kmod-crypto-md5 \
|
||||
+kmod-crypto-sha256 \
|
||||
+kmod-crypto-sha512 \
|
||||
+kmod-crypto-cmac \
|
||||
+kmod-crypto-hmac \
|
||||
+LINUX_5_10:kmod-crypto-arc4 \
|
||||
+kmod-crypto-aead \
|
||||
+kmod-crypto-ccm \
|
||||
+kmod-crypto-ecb \
|
||||
+kmod-crypto-des \
|
||||
+(LINUX_5_15):kmod-asn1-decoder \
|
||||
+(LINUX_5_15):kmod-oid-registry \
|
||||
+(LINUX_5_15):kmod-dnsresolver
|
||||
+kmod-asn1-decoder \
|
||||
+kmod-oid-registry \
|
||||
+kmod-dnsresolver
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-cifs/description
|
||||
|
@ -367,7 +365,6 @@ $(eval $(call KernelPackage,fs-msdos))
|
|||
define KernelPackage/fs-netfs
|
||||
SUBMENU:=$(FS_MENU)
|
||||
TITLE:=Network Filesystems support
|
||||
DEPENDS:=@LINUX_5_15
|
||||
KCONFIG:= CONFIG_NETFS_SUPPORT
|
||||
FILES:=$(LINUX_DIR)/fs/netfs/netfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,28,netfs)
|
||||
|
@ -531,7 +528,6 @@ define KernelPackage/fs-ntfs3
|
|||
KCONFIG:= CONFIG_NTFS3_FS CONFIG_NTFS3_FS_POSIX_ACL=y
|
||||
FILES:=$(LINUX_DIR)/fs/ntfs3/ntfs3.ko
|
||||
$(call AddDepends/nls)
|
||||
DEPENDS+=@!LINUX_5_10
|
||||
AUTOLOAD:=$(call AutoLoad,80,ntfs3)
|
||||
endef
|
||||
|
||||
|
|
|
@ -438,7 +438,7 @@ define KernelPackage/iio-sps30
|
|||
CONFIG_SPS30_I2C
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/iio/chemical/sps30.ko \
|
||||
$(LINUX_DIR)/drivers/iio/chemical/sps30_i2c.ko@ge5.14
|
||||
$(LINUX_DIR)/drivers/iio/chemical/sps30_i2c.ko
|
||||
AUTOLOAD:=$(call AutoProbe,sps30 sps30_i2c)
|
||||
$(call AddDepends/iio)
|
||||
endef
|
||||
|
|
|
@ -92,7 +92,7 @@ $(eval $(call KernelPackage,input-gpio-keys))
|
|||
define KernelPackage/input-gpio-keys-polled
|
||||
SUBMENU:=$(INPUT_MODULES_MENU)
|
||||
TITLE:=Polled GPIO key support
|
||||
DEPENDS:=@GPIO_SUPPORT +kmod-input-core +LINUX_5_10:kmod-input-polldev
|
||||
DEPENDS:=@GPIO_SUPPORT +kmod-input-core
|
||||
KCONFIG:= \
|
||||
CONFIG_KEYBOARD_GPIO_POLLED \
|
||||
CONFIG_INPUT_KEYBOARD=y
|
||||
|
@ -142,21 +142,6 @@ endef
|
|||
$(eval $(call KernelPackage,input-joydev))
|
||||
|
||||
|
||||
define KernelPackage/input-polldev
|
||||
SUBMENU:=$(INPUT_MODULES_MENU)
|
||||
TITLE:=Polled Input device support
|
||||
DEPENDS:=+kmod-input-core @LINUX_5_10
|
||||
KCONFIG:=CONFIG_INPUT_POLLDEV
|
||||
FILES:=$(LINUX_DIR)/drivers/input/input-polldev.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/input-polldev/description
|
||||
Kernel module for support of polled input devices
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,input-polldev))
|
||||
|
||||
|
||||
define KernelPackage/input-matrixkmap
|
||||
SUBMENU:=$(INPUT_MODULES_MENU)
|
||||
TITLE:=Input matrix devices support
|
||||
|
@ -179,10 +164,8 @@ define KernelPackage/input-touchscreen-ads7846
|
|||
DEPENDS:=+kmod-hwmon-core +kmod-input-core +kmod-spi-bitbang
|
||||
KCONFIG:= \
|
||||
CONFIG_INPUT_TOUCHSCREEN=y \
|
||||
CONFIG_TOUCHSCREEN_PROPERTIES=y@lt5.13 \
|
||||
CONFIG_TOUCHSCREEN_ADS7846
|
||||
FILES:=$(LINUX_DIR)/drivers/input/touchscreen/ads7846.ko \
|
||||
$(LINUX_DIR)/drivers/input/touchscreen/of_touchscreen.ko@lt5.13
|
||||
FILES:=$(LINUX_DIR)/drivers/input/touchscreen/ads7846.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ads7846)
|
||||
endef
|
||||
|
||||
|
@ -199,10 +182,8 @@ define KernelPackage/input-touchscreen-edt-ft5x06
|
|||
DEPENDS:=+kmod-i2c-core +kmod-input-core
|
||||
KCONFIG:= \
|
||||
CONFIG_INPUT_TOUCHSCREEN=y \
|
||||
CONFIG_TOUCHSCREEN_PROPERTIES=y@lt5.13 \
|
||||
CONFIG_TOUCHSCREEN_EDT_FT5X06
|
||||
FILES:=$(LINUX_DIR)/drivers/input/touchscreen/edt-ft5x06.ko \
|
||||
$(LINUX_DIR)/drivers/input/touchscreen/of_touchscreen.ko@lt5.13
|
||||
FILES:=$(LINUX_DIR)/drivers/input/touchscreen/edt-ft5x06.ko
|
||||
AUTOLOAD:=$(call AutoProbe,edt-ft5x06)
|
||||
endef
|
||||
|
||||
|
|
|
@ -118,7 +118,6 @@ $(eval $(call KernelPackage,ledtrig-pattern))
|
|||
define KernelPackage/ledtrig-tty
|
||||
SUBMENU:=$(LEDS_MENU)
|
||||
TITLE:=LED Trigger for TTY devices
|
||||
DEPENDS:=@LINUX_5_15
|
||||
KCONFIG:=CONFIG_LEDS_TRIGGER_TTY
|
||||
FILES:=$(LED_TRIGGER_DIR)/ledtrig-tty.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,ledtrig-tty)
|
||||
|
|
|
@ -1170,7 +1170,7 @@ define KernelPackage/of-mdio
|
|||
KCONFIG:=CONFIG_OF_MDIO
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/net/mdio/of_mdio.ko \
|
||||
$(LINUX_DIR)/drivers/net/mdio/fwnode_mdio.ko@ge5.15
|
||||
$(LINUX_DIR)/drivers/net/mdio/fwnode_mdio.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,of_mdio)
|
||||
endef
|
||||
|
||||
|
@ -1448,7 +1448,6 @@ $(eval $(call KernelPackage,sfc-falcon))
|
|||
define KernelPackage/wwan
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=WWAN Driver Core
|
||||
DEPENDS:=@LINUX_5_15
|
||||
KCONFIG:=CONFIG_WWAN
|
||||
FILES:=$(LINUX_DIR)/drivers/net/wwan/wwan.ko
|
||||
AUTOLOAD:=$(call AutoProbe,wwan)
|
||||
|
@ -1464,7 +1463,7 @@ $(eval $(call KernelPackage,wwan))
|
|||
define KernelPackage/mhi-net
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=MHI Network Device
|
||||
DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-mhi-bus
|
||||
KCONFIG:=CONFIG_MHI_NET
|
||||
FILES:=$(LINUX_DIR)/drivers/net/mhi_net.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mhi_net)
|
||||
|
@ -1479,7 +1478,7 @@ $(eval $(call KernelPackage,mhi-net))
|
|||
define KernelPackage/mhi-wwan-ctrl
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=MHI WWAN Control
|
||||
DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus +kmod-wwan
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-mhi-bus +kmod-wwan
|
||||
KCONFIG:=CONFIG_MHI_WWAN_CTRL
|
||||
FILES:=$(LINUX_DIR)/drivers/net/wwan/mhi_wwan_ctrl.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mhi_wwan_ctrl)
|
||||
|
@ -1495,7 +1494,7 @@ $(eval $(call KernelPackage,mhi-wwan-ctrl))
|
|||
define KernelPackage/mhi-wwan-mbim
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=MHI MBIM
|
||||
DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus +kmod-wwan
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-mhi-bus +kmod-wwan
|
||||
KCONFIG:=CONFIG_MHI_WWAN_MBIM
|
||||
FILES:=$(LINUX_DIR)/drivers/net/wwan/mhi_wwan_mbim.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mhi_wwan_mbim)
|
||||
|
|
|
@ -1141,7 +1141,6 @@ define KernelPackage/nft-bridge
|
|||
FILES:=$(foreach mod,$(NFT_BRIDGE-m),$(LINUX_DIR)/net/$(mod).ko)
|
||||
AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_BRIDGE-m)))
|
||||
KCONFIG:= \
|
||||
CONFIG_NF_LOG_BRIDGE=n@lt5.13 \
|
||||
$(KCONFIG_NFT_BRIDGE)
|
||||
endef
|
||||
|
||||
|
|
|
@ -1187,7 +1187,7 @@ define KernelPackage/sctp
|
|||
FILES:= $(LINUX_DIR)/net/sctp/sctp.ko
|
||||
AUTOLOAD:= $(call AutoLoad,32,sctp)
|
||||
DEPENDS:=+kmod-lib-crc32c +kmod-crypto-md5 +kmod-crypto-hmac \
|
||||
+LINUX_5_15:kmod-udptunnel4 +LINUX_5_15:kmod-udptunnel6
|
||||
+kmod-udptunnel4 +kmod-udptunnel6
|
||||
endef
|
||||
|
||||
define KernelPackage/sctp/description
|
||||
|
@ -1443,7 +1443,6 @@ define KernelPackage/qrtr
|
|||
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||
TITLE:=Qualcomm IPC Router support
|
||||
HIDDEN:=1
|
||||
DEPENDS:=@!LINUX_5_10
|
||||
KCONFIG:=CONFIG_QRTR
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/net/qrtr/qrtr.ko
|
||||
|
|
|
@ -1251,8 +1251,8 @@ $(eval $(call KernelPackage,keys-trusted))
|
|||
define KernelPackage/tpm
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=TPM Hardware Support
|
||||
DEPENDS:= +kmod-random-core +(LINUX_5_15):kmod-asn1-decoder \
|
||||
+(LINUX_5_15):kmod-asn1-encoder +(LINUX_5_15):kmod-oid-registry
|
||||
DEPENDS:= +kmod-random-core +kmod-asn1-decoder \
|
||||
+kmod-asn1-encoder +kmod-oid-registry
|
||||
KCONFIG:= CONFIG_TCG_TPM
|
||||
FILES:= $(LINUX_DIR)/drivers/char/tpm/tpm.ko
|
||||
AUTOLOAD:=$(call AutoLoad,10,tpm,1)
|
||||
|
@ -1336,7 +1336,6 @@ $(eval $(call KernelPackage,i6300esb-wdt))
|
|||
define KernelPackage/mhi-bus
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=MHI bus
|
||||
DEPENDS:=@LINUX_5_15
|
||||
KCONFIG:=CONFIG_MHI_BUS \
|
||||
CONFIG_MHI_BUS_DEBUG=y
|
||||
FILES:=$(LINUX_DIR)/drivers/bus/mhi/core/mhi.ko
|
||||
|
@ -1352,7 +1351,7 @@ $(eval $(call KernelPackage,mhi-bus))
|
|||
define KernelPackage/mhi-pci-generic
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=MHI PCI controller driver
|
||||
DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-mhi-bus
|
||||
KCONFIG:=CONFIG_MHI_BUS_PCI_GENERIC
|
||||
FILES:=$(LINUX_DIR)/drivers/bus/mhi/mhi_pci_generic.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mhi_pci_generic)
|
||||
|
|
|
@ -15,10 +15,9 @@ define KernelPackage/mmc-spi
|
|||
CONFIG_SPI=y \
|
||||
CONFIG_SPI_MASTER=y
|
||||
FILES:=\
|
||||
$(if $(CONFIG_OF),$(LINUX_DIR)/drivers/mmc/host/of_mmc_spi.ko@lt5.13) \
|
||||
$(LINUX_DIR)/drivers/mmc/host/of_mmc_spi.ko@ge5.13 \
|
||||
$(LINUX_DIR)/drivers/mmc/host/of_mmc_spi.ko \
|
||||
$(LINUX_DIR)/drivers/mmc/host/mmc_spi.ko
|
||||
AUTOLOAD:=$(call AutoProbe,$(if $(CONFIG_OF),of_mmc_spi@lt5.13) of_mmc_spi@ge5.13 mmc_spi)
|
||||
AUTOLOAD:=$(call AutoProbe,of_mmc_spi mmc_spi)
|
||||
endef
|
||||
|
||||
define KernelPackage/mmc-spi/description
|
||||
|
|
|
@ -1155,7 +1155,7 @@ $(eval $(call KernelPackage,usb-net-aqc111))
|
|||
|
||||
define KernelPackage/usb-net-asix
|
||||
TITLE:=Kernel module for USB-to-Ethernet Asix convertors
|
||||
DEPENDS:=+kmod-libphy +LINUX_5_15:kmod-net-selftests +LINUX_5_15:kmod-mdio-devres +kmod-phy-ax88796b
|
||||
DEPENDS:=+kmod-libphy +kmod-net-selftests +kmod-mdio-devres +kmod-phy-ax88796b
|
||||
KCONFIG:=CONFIG_USB_NET_AX8817X
|
||||
FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/asix.ko
|
||||
AUTOLOAD:=$(call AutoProbe,asix)
|
||||
|
@ -1394,7 +1394,7 @@ define KernelPackage/usb-net-rtl8152
|
|||
KCONFIG:=CONFIG_USB_RTL8152
|
||||
FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/r8152.ko
|
||||
AUTOLOAD:=$(call AutoProbe,r8152)
|
||||
$(call AddDepends/usb-net, +LINUX_5_10:kmod-crypto-hash)
|
||||
$(call AddDepends/usb-net)
|
||||
endef
|
||||
|
||||
define KernelPackage/usb-net-rtl8152/description
|
||||
|
@ -1823,9 +1823,8 @@ define KernelPackage/usb-xhci-mtk
|
|||
KCONFIG:=CONFIG_USB_XHCI_MTK
|
||||
HIDDEN:=1
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/usb/host/xhci-mtk.ko@lt5.13 \
|
||||
$(LINUX_DIR)/drivers/usb/host/xhci-mtk-hcd.ko@ge5.13
|
||||
AUTOLOAD:=$(call AutoLoad,54,xhci-mtk@lt5.13 xhci-mtk-hcd@gt5.13,1)
|
||||
$(LINUX_DIR)/drivers/usb/host/xhci-mtk-hcd.ko
|
||||
AUTOLOAD:=$(call AutoLoad,54,xhci-mtk-hcd,1)
|
||||
$(call AddDepends/usb)
|
||||
endef
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ define KernelPackage/drm
|
|||
TITLE:=Direct Rendering Manager (DRM) support
|
||||
HIDDEN:=1
|
||||
DEPENDS:=+kmod-dma-buf +kmod-i2c-core +PACKAGE_kmod-backlight:kmod-backlight \
|
||||
+(LINUX_5_15):kmod-fb
|
||||
+kmod-fb
|
||||
KCONFIG:=CONFIG_DRM
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/drm.ko \
|
||||
|
@ -376,7 +376,7 @@ define KernelPackage/drm-imx-ldb
|
|||
CONFIG_DRM_PANEL_SITRONIX_ST7789V=n
|
||||
FILES:=$(LINUX_DIR)/drivers/gpu/drm/imx/imx-ldb.ko \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/panel/panel-simple.ko \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/drm_dp_aux_bus.ko@gt5.10
|
||||
$(LINUX_DIR)/drivers/gpu/drm/drm_dp_aux_bus.ko
|
||||
AUTOLOAD:=$(call AutoLoad,08,imx-ldb)
|
||||
endef
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ define KernelPackage/vfio-pci
|
|||
CONFIG_VFIO_PCI \
|
||||
CONFIG_VFIO_PCI_IGD=y
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/vfio/pci/vfio-pci-core.ko@ge5.15 \
|
||||
$(LINUX_DIR)/drivers/vfio/pci/vfio-pci-core.ko \
|
||||
$(LINUX_DIR)/drivers/vfio/pci/vfio-pci.ko
|
||||
AUTOLOAD:=$(call AutoProbe,vfio-pci)
|
||||
endef
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1413,6 +1413,53 @@ void ath9k_deinit_debug(struct ath_softc
|
||||
@@ -1413,6 +1413,54 @@ void ath9k_deinit_debug(struct ath_softc
|
||||
ath9k_cmn_spectral_deinit_debug(&sc->spec_priv);
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,8 @@
|
|||
+ } else {
|
||||
+ bytes = 2;
|
||||
+ }
|
||||
+ copy_to_user(user_buf, from, bytes);
|
||||
+ if (copy_to_user(user_buf, from, bytes))
|
||||
+ return -EFAULT;
|
||||
+ user_buf += bytes;
|
||||
+ }
|
||||
+ return *ppos - pos;
|
||||
|
|
|
@ -65,22 +65,26 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
|||
+}
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h
|
||||
@@ -5,9 +5,16 @@
|
||||
@@ -5,9 +5,20 @@
|
||||
#ifdef CONFIG_OF
|
||||
void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings);
|
||||
+#ifdef CPTCFG_BRCMFMAC_SDIO
|
||||
+struct brcmf_firmware_mapping *
|
||||
+brcmf_of_fwnames(struct device *dev, u32 *map_count);
|
||||
+#endif
|
||||
#else
|
||||
static void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
|
||||
struct brcmf_mp_device *settings)
|
||||
{
|
||||
}
|
||||
+#ifdef CPTCFG_BRCMFMAC_SDIO
|
||||
+static struct brcmf_firmware_mapping *
|
||||
+brcmf_of_fwnames(struct device *dev, u32 *map_count)
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
+#endif
|
||||
#endif /* CONFIG_OF */
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
|
|
|
@ -0,0 +1,176 @@
|
|||
From ed4422e98ababf956674da3438ac42b3aa32c66e Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Wed, 10 May 2023 00:41:06 +0200
|
||||
Subject: [PATCH] Fix compilation warning with 64 bit system
|
||||
|
||||
Use %zu and %zd where possible for ssize_t and size_t.
|
||||
Use PTR_ERR to correctly convert to negative error.
|
||||
Use universal pointer to support both 32 and 64bit systems.
|
||||
|
||||
Fix compilation warning:
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/fwcmd.c: In function 'mwl_fwcmd_get_fw_core_dump':
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/fwcmd.c:3608:31: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
|
||||
3608 | (const void *)((u32)pcmd +
|
||||
| ^
|
||||
In file included from ./include/linux/device.h:15,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/device.h:3,
|
||||
from ./include/linux/dma-mapping.h:7,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/dma-mapping.h:3,
|
||||
from ./include/linux/skbuff.h:31,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/skbuff.h:3,
|
||||
from ./include/linux/if_ether.h:19,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/if_ether.h:3,
|
||||
from ./include/linux/etherdevice.h:20,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/etherdevice.h:3,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:20:
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c: In function 'pcie_tx_init_ndp':
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:38: error: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Werror=format=]
|
||||
338 | wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
./include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
|
||||
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
|
||||
| ^~~
|
||||
./include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
|
||||
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
|
||||
| ^~~~~~~
|
||||
/home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211/net/cfg80211.h:8828:9: note: in expansion of macro 'dev_err'
|
||||
8828 | dev_err(&(wiphy)->dev, format, ##args)
|
||||
| ^~~~~~~
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:17: note: in expansion of macro 'wiphy_err'
|
||||
338 | wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
|
||||
| ^~~~~~~~~
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:67: note: format string is defined here
|
||||
338 | wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
|
||||
| ~^
|
||||
| |
|
||||
| int
|
||||
| %ld
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:38: error: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Werror=format=]
|
||||
338 | wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
./include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
|
||||
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
|
||||
| ^~~
|
||||
./include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
|
||||
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
|
||||
| ^~~~~~~
|
||||
/home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211/net/cfg80211.h:8828:9: note: in expansion of macro 'dev_err'
|
||||
8828 | dev_err(&(wiphy)->dev, format, ##args)
|
||||
| ^~~~~~~
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:17: note: in expansion of macro 'wiphy_err'
|
||||
338 | wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
|
||||
| ^~~~~~~~~
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:71: note: format string is defined here
|
||||
338 | wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
|
||||
| ~^
|
||||
| |
|
||||
| int
|
||||
| %ld
|
||||
CC [M] /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/debugfs.o
|
||||
In file included from ./include/linux/device.h:15,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/device.h:3,
|
||||
from ./include/linux/dma-mapping.h:7,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/dma-mapping.h:3,
|
||||
from ./include/linux/skbuff.h:31,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/skbuff.h:3,
|
||||
from ./include/linux/if_ether.h:19,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/if_ether.h:3,
|
||||
from ./include/linux/etherdevice.h:20,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/etherdevice.h:3,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/pcie.c:19:
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/pcie.c: In function 'pcie_bf_mimo_ctrl_decode':
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/pcie.c:1325:37: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
|
||||
1325 | filename, (unsigned int)fp_data);
|
||||
| ^
|
||||
./include/linux/dev_printk.h:110:37: note: in definition of macro 'dev_printk_index_wrap'
|
||||
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
|
||||
| ^~~~~~~~~~~
|
||||
/home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211/net/cfg80211.h:8828:9: note: in expansion of macro 'dev_err'
|
||||
8828 | dev_err(&(wiphy)->dev, format, ##args)
|
||||
| ^~~~~~~
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/pcie.c:1324:17: note: in expansion of macro 'wiphy_err'
|
||||
1324 | wiphy_err(priv->hw->wiphy, "Error opening %s! %x\n",
|
||||
| ^~~~~~~~~
|
||||
cc1: all warnings being treated as errors
|
||||
make[4]: *** [scripts/Makefile.build:289: /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.o] Error 1
|
||||
make[4]: *** Waiting for unfinished jobs....
|
||||
cc1: all warnings being treated as errors
|
||||
make[4]: *** [scripts/Makefile.build:289: /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/pcie.o] Error 1
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/debugfs.c: In function 'mwl_debugfs_regrdwr_read':
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/debugfs.c:1335:43: error: format '%d' expects argument of type 'int', but argument 4 has type 'ssize_t' {aka 'long int'} [-Werror=format=]
|
||||
1335 | "error: %d(%u 0x%08x 0x%08x)\n",
|
||||
| ~^
|
||||
| |
|
||||
| int
|
||||
| %ld
|
||||
1336 | ret, priv->reg_type, priv->reg_offset,
|
||||
| ~~~
|
||||
| |
|
||||
| ssize_t {aka long int}
|
||||
cc1: all warnings being treated as errors
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
debugfs.c | 2 +-
|
||||
hif/fwcmd.c | 2 +-
|
||||
hif/pcie/pcie.c | 4 ++--
|
||||
hif/pcie/tx_ndp.c | 2 +-
|
||||
4 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/debugfs.c b/debugfs.c
|
||||
index 39b09fd..42efd28 100644
|
||||
--- a/debugfs.c
|
||||
+++ b/debugfs.c
|
||||
@@ -1332,7 +1332,7 @@ done:
|
||||
priv->reg_value);
|
||||
else
|
||||
len += scnprintf(p + len, size - len,
|
||||
- "error: %d(%u 0x%08x 0x%08x)\n",
|
||||
+ "error: %zd(%u 0x%08x 0x%08x)\n",
|
||||
ret, priv->reg_type, priv->reg_offset,
|
||||
priv->reg_value);
|
||||
|
||||
diff --git a/hif/fwcmd.c b/hif/fwcmd.c
|
||||
index 376b58f..582c8d2 100644
|
||||
--- a/hif/fwcmd.c
|
||||
+++ b/hif/fwcmd.c
|
||||
@@ -3604,7 +3604,7 @@ int mwl_fwcmd_get_fw_core_dump(struct ieee80211_hw *hw,
|
||||
core_dump->size_kb = pcmd->cmd_data.coredump.size_kb;
|
||||
core_dump->flags = pcmd->cmd_data.coredump.flags;
|
||||
memcpy(buff,
|
||||
- (const void *)((u32)pcmd +
|
||||
+ (const void *)((uintptr_t)pcmd +
|
||||
sizeof(struct hostcmd_cmd_get_fw_core_dump) -
|
||||
sizeof(struct hostcmd_cmd_get_fw_core_dump_)),
|
||||
MAX_CORE_DUMP_BUFFER);
|
||||
diff --git a/hif/pcie/pcie.c b/hif/pcie/pcie.c
|
||||
index 24453b6..5b6c633 100644
|
||||
--- a/hif/pcie/pcie.c
|
||||
+++ b/hif/pcie/pcie.c
|
||||
@@ -1320,8 +1320,8 @@ static void pcie_bf_mimo_ctrl_decode(struct mwl_priv *priv,
|
||||
&fp_data->f_pos);
|
||||
filp_close(fp_data, current->files);
|
||||
} else {
|
||||
- wiphy_err(priv->hw->wiphy, "Error opening %s! %x\n",
|
||||
- filename, (unsigned int)fp_data);
|
||||
+ wiphy_err(priv->hw->wiphy, "Error opening %s! %ld\n",
|
||||
+ filename, PTR_ERR(fp_data));
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
|
||||
diff --git a/hif/pcie/tx_ndp.c b/hif/pcie/tx_ndp.c
|
||||
index 6758cde..3140a2e 100644
|
||||
--- a/hif/pcie/tx_ndp.c
|
||||
+++ b/hif/pcie/tx_ndp.c
|
||||
@@ -335,7 +335,7 @@ int pcie_tx_init_ndp(struct ieee80211_hw *hw)
|
||||
|
||||
if (sizeof(struct pcie_tx_ctrl_ndp) >
|
||||
sizeof(tx_info->status.status_driver_data)) {
|
||||
- wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
|
||||
+ wiphy_err(hw->wiphy, "driver data is not enough: %zu (%zu)\n",
|
||||
sizeof(struct pcie_tx_ctrl_ndp),
|
||||
sizeof(tx_info->status.status_driver_data));
|
||||
return -ENOMEM;
|
||||
--
|
||||
2.39.2
|
||||
|
|
@ -3,11 +3,11 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||
|
||||
PKG_NAME:=nat46
|
||||
|
||||
PKG_MIRROR_HASH:=c26b8c60aa991a087011b8b6492e43a6749f0a5d9dc79ffcfd352da5fa20b78d
|
||||
PKG_MIRROR_HASH:=aeff95aa278ec1e197b59700284c0210f32b92c1fb757e5c3088bd00b3b403d4
|
||||
PKG_SOURCE_URL:=https://github.com/ayourtch/nat46.git
|
||||
PKG_SOURCE_DATE:=2022-03-30
|
||||
PKG_SOURCE_DATE:=2022-09-19
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=95ca1c3b99376da2d0306919f2df4a8d3c9bb78b
|
||||
PKG_SOURCE_VERSION:=4c5beee236841724219598fabb1edc93d4f08ce5
|
||||
|
||||
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
@ -15,7 +15,7 @@ PKG_LICENSE:=GPL-2.0
|
|||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/nat46
|
||||
DEPENDS:=@IPV6
|
||||
DEPENDS:=@IPV6 +kmod-nf-conntrack6
|
||||
TITLE:=Stateless NAT46 translation kernel module
|
||||
SECTION:=kernel
|
||||
SUBMENU:=Network Support
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
From 6ee395e1cab32d1d4899d7846ea99e6e2dc0a9e4 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Wed, 12 May 2021 13:41:12 +0200
|
||||
Subject: [PATCH 01/11] SSDK: config: add kernel 5.10
|
||||
|
||||
This is purely to identify it and be able to set
|
||||
flags correctly.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
config | 6 +++++-
|
||||
make/linux_opt.mk | 4 ++--
|
||||
2 files changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/config
|
||||
+++ b/config
|
||||
@@ -24,6 +24,10 @@ ifeq ($(KVER),$(filter 5.4%,$(KVER)))
|
||||
OS_VER=5_4
|
||||
endif
|
||||
|
||||
+ifeq ($(KVER),$(filter 5.10%,$(KVER)))
|
||||
+OS_VER=5_10
|
||||
+endif
|
||||
+
|
||||
ifeq ($(KVER), 3.4.0)
|
||||
OS_VER=3_4
|
||||
endif
|
||||
@@ -132,7 +136,7 @@ ifeq ($(ARCH), arm)
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH), arm64)
|
||||
- ifeq ($(KVER),$(filter 4.1% 4.4% 4.9% 5.4%,$(KVER)))
|
||||
+ ifeq ($(KVER),$(filter 4.1% 4.4% 4.9% 5.4% 5.10%,$(KVER)))
|
||||
CPU_CFLAG= -DMODULE -Os -pipe -march=armv8-a -mcpu=cortex-a53+crypto -fno-caller-saves -fno-strict-aliasing -Werror -fno-common -Wno-format-security -Wno-pointer-sign -Wno-unused-but-set-variable -Wno-error=unused-result -mcmodel=large
|
||||
endif
|
||||
endif
|
||||
--- a/make/linux_opt.mk
|
||||
+++ b/make/linux_opt.mk
|
||||
@@ -437,7 +437,7 @@ ifeq (KSLIB, $(MODULE_TYPE))
|
||||
KASAN_SHADOW_SCALE_SHIFT := 3
|
||||
endif
|
||||
|
||||
- ifeq (5_4, $(OS_VER))
|
||||
+ ifeq ($(OS_VER),$(filter 5_4 5_10, $(OS_VER)))
|
||||
ifeq ($(ARCH), arm64)
|
||||
KASAN_OPTION += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
|
||||
endif
|
||||
@@ -468,7 +468,7 @@ ifeq (KSLIB, $(MODULE_TYPE))
|
||||
|
||||
endif
|
||||
|
||||
- ifeq ($(OS_VER),$(filter 4_4 5_4, $(OS_VER)))
|
||||
+ ifeq ($(OS_VER),$(filter 4_4 5_4 5_10, $(OS_VER)))
|
||||
MODULE_CFLAG += -DKVER34
|
||||
MODULE_CFLAG += -DKVER32
|
||||
MODULE_CFLAG += -DLNX26_22
|
|
@ -14,8 +14,8 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|||
|
||||
--- a/config
|
||||
+++ b/config
|
||||
@@ -28,6 +28,10 @@ ifeq ($(KVER),$(filter 5.10%,$(KVER)))
|
||||
OS_VER=5_10
|
||||
@@ -24,6 +24,10 @@ ifeq ($(KVER),$(filter 5.4%,$(KVER)))
|
||||
OS_VER=5_4
|
||||
endif
|
||||
|
||||
+ifeq ($(KVER),$(filter 5.15%,$(KVER)))
|
||||
|
@ -25,12 +25,12 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|||
ifeq ($(KVER), 3.4.0)
|
||||
OS_VER=3_4
|
||||
endif
|
||||
@@ -136,7 +140,7 @@ ifeq ($(ARCH), arm)
|
||||
@@ -132,7 +136,7 @@ ifeq ($(ARCH), arm)
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH), arm64)
|
||||
- ifeq ($(KVER),$(filter 4.1% 4.4% 4.9% 5.4% 5.10%,$(KVER)))
|
||||
+ ifeq ($(KVER),$(filter 4.1% 4.4% 4.9% 5.4% 5.10% 5.15%,$(KVER)))
|
||||
- ifeq ($(KVER),$(filter 4.1% 4.4% 4.9% 5.4%,$(KVER)))
|
||||
+ ifeq ($(KVER),$(filter 4.1% 4.4% 4.9% 5.4% 5.15%,$(KVER)))
|
||||
CPU_CFLAG= -DMODULE -Os -pipe -march=armv8-a -mcpu=cortex-a53+crypto -fno-caller-saves -fno-strict-aliasing -Werror -fno-common -Wno-format-security -Wno-pointer-sign -Wno-unused-but-set-variable -Wno-error=unused-result -mcmodel=large
|
||||
endif
|
||||
endif
|
||||
|
@ -40,8 +40,8 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|||
KASAN_SHADOW_SCALE_SHIFT := 3
|
||||
endif
|
||||
|
||||
- ifeq ($(OS_VER),$(filter 5_4 5_10, $(OS_VER)))
|
||||
+ ifeq ($(OS_VER),$(filter 5_4 5_10 5_15, $(OS_VER)))
|
||||
- ifeq (5_4, $(OS_VER))
|
||||
+ ifeq (5_4 5_15, $(OS_VER))
|
||||
ifeq ($(ARCH), arm64)
|
||||
KASAN_OPTION += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
|
||||
endif
|
||||
|
@ -49,8 +49,8 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|||
|
||||
endif
|
||||
|
||||
- ifeq ($(OS_VER),$(filter 4_4 5_4 5_10, $(OS_VER)))
|
||||
+ ifeq ($(OS_VER),$(filter 4_4 5_4 5_10 5_15, $(OS_VER)))
|
||||
- ifeq ($(OS_VER),$(filter 4_4 5_4, $(OS_VER)))
|
||||
+ ifeq ($(OS_VER),$(filter 4_4 5_4 5_15, $(OS_VER)))
|
||||
MODULE_CFLAG += -DKVER34
|
||||
MODULE_CFLAG += -DKVER32
|
||||
MODULE_CFLAG += -DLNX26_22
|
||||
|
|
|
@ -19,10 +19,10 @@ Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
|
|||
|
||||
--- a/config
|
||||
+++ b/config
|
||||
@@ -141,7 +141,7 @@ endif
|
||||
@@ -137,7 +137,7 @@ endif
|
||||
|
||||
ifeq ($(ARCH), arm64)
|
||||
ifeq ($(KVER),$(filter 4.1% 4.4% 4.9% 5.4% 5.10% 5.15%,$(KVER)))
|
||||
ifeq ($(KVER),$(filter 4.1% 4.4% 4.9% 5.4% 5.15%,$(KVER)))
|
||||
- CPU_CFLAG= -DMODULE -Os -pipe -march=armv8-a -mcpu=cortex-a53+crypto -fno-caller-saves -fno-strict-aliasing -Werror -fno-common -Wno-format-security -Wno-pointer-sign -Wno-unused-but-set-variable -Wno-error=unused-result -mcmodel=large
|
||||
+ CPU_CFLAG= -DMODULE -Os -pipe -march=armv8-a -mcpu=cortex-a53+crypto -fno-caller-saves -fno-strict-aliasing -fno-common -Wno-format-security -Wno-pointer-sign -Wno-unused-but-set-variable -Wno-error=unused-result -mcmodel=large
|
||||
endif
|
||||
|
|
|
@ -12,9 +12,9 @@ PKG_RELEASE:=20
|
|||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git
|
||||
PKG_SOURCE_DATE:=2022-08-05
|
||||
PKG_SOURCE_VERSION:=7d21e8d8ecd6d776f64b6928f62893c0f5c9747a
|
||||
PKG_MIRROR_HASH:=6d918517de4ec47d83edddb6167bb52f08b2b696f336d5055a45290bb37ac4db
|
||||
PKG_SOURCE_DATE:=2023-05-12
|
||||
PKG_SOURCE_VERSION:=bcd283632ac13391aac3ebdd074d1fd832d76fa3
|
||||
PKG_MIRROR_HASH:=0f3508a5a148ca831ae30b49b21919535f9dfbbd003a942baa6cb5388d207878
|
||||
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ proto_dhcpv6_init_config() {
|
|||
proto_config_add_string "vendorclass"
|
||||
proto_config_add_array "sendopts:list(string)"
|
||||
proto_config_add_boolean delegate
|
||||
proto_config_add_int skpriority
|
||||
proto_config_add_int "soltimeout"
|
||||
proto_config_add_boolean fakeroutes
|
||||
proto_config_add_boolean sourcefilter
|
||||
|
@ -54,8 +55,8 @@ proto_dhcpv6_setup() {
|
|||
local config="$1"
|
||||
local iface="$2"
|
||||
|
||||
local reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig ip6prefix ip6prefixes iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass sendopts delegate zone_dslite zone_map zone_464xlat zone encaplimit_dslite encaplimit_map soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff verbose
|
||||
json_get_vars reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone encaplimit_dslite encaplimit_map soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff verbose
|
||||
local reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig ip6prefix ip6prefixes iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass sendopts delegate zone_dslite zone_map zone_464xlat zone encaplimit_dslite encaplimit_map skpriority soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff verbose
|
||||
json_get_vars reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone encaplimit_dslite encaplimit_map skpriority soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff verbose
|
||||
json_for_each_item proto_dhcpv6_add_prefix ip6prefix ip6prefixes
|
||||
|
||||
# Configure
|
||||
|
@ -89,6 +90,8 @@ proto_dhcpv6_setup() {
|
|||
|
||||
[ "$keep_ra_dnslifetime" = "1" ] && append opts "-L"
|
||||
|
||||
[ -n "$skpriority" ] && append opts "-K$skpriority"
|
||||
|
||||
[ -n "$ra_holdoff" ] && append opts "-m$ra_holdoff"
|
||||
|
||||
[ "$verbose" = "1" ] && append opts "-v"
|
||||
|
|
|
@ -10,9 +10,9 @@ include $(TOPDIR)/rules.mk
|
|||
PKG_NAME:=bridger
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=https://github.com/nbd168/bridger
|
||||
PKG_SOURCE_DATE:=2023-01-27
|
||||
PKG_SOURCE_VERSION:=8be8bb9df789b53a68f08298f610648ebded6063
|
||||
PKG_MIRROR_HASH:=d4f47009bb00c4f129d0959cb00ed90bc14bfe5dd0e67458ddb54176365e65f0
|
||||
PKG_SOURCE_DATE:=2023-05-12
|
||||
PKG_SOURCE_VERSION:=d0f79a16c749ad310d79e1c31f593860619f99eb
|
||||
PKG_MIRROR_HASH:=bee35594767cbcd13764f5c95e4837a4fc73171a91fcdae73aaefe00f4e8f8fa
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
|
|
@ -18,6 +18,7 @@ CONFIG_ARM_AMBA=y
|
|||
CONFIG_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
||||
CONFIG_ARM_CPU_SUSPEND=y
|
||||
CONFIG_ARM_CRYPTO=y
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_GIC_V3=y
|
||||
CONFIG_ARM_GIC_V3_ITS=y
|
||||
|
|
|
@ -1,244 +0,0 @@
|
|||
# CONFIG_40x is not set
|
||||
CONFIG_44x=y
|
||||
CONFIG_4xx=y
|
||||
CONFIG_4xx_SOC=y
|
||||
# CONFIG_ADVANCED_OPTIONS is not set
|
||||
CONFIG_APM821xx=y
|
||||
# CONFIG_APOLLO3G is not set
|
||||
# CONFIG_ARCHES is not set
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS=11
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=17
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MIN=11
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=17
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARCH_WEAK_RELEASE_ACQUIRE=y
|
||||
CONFIG_AUDIT_ARCH=y
|
||||
# CONFIG_BAMBOO is not set
|
||||
# CONFIG_BLK_DEV_INITRD is not set
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLUESTONE=y
|
||||
CONFIG_BOOKE=y
|
||||
CONFIG_BOOKE_WDT=y
|
||||
# CONFIG_CANYONLANDS is not set
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_CMDLINE="rootfstype=squashfs noinitrd"
|
||||
CONFIG_CMDLINE_FROM_BOOTLOADER=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CPU_BIG_ENDIAN=y
|
||||
CONFIG_CRC16=y
|
||||
# CONFIG_CRC32_SARWATE is not set
|
||||
CONFIG_CRC32_SLICEBY8=y
|
||||
CONFIG_CRYPTO_BLAKE2S=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_DEV_PPC4XX=y
|
||||
CONFIG_CRYPTO_HW=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
# CONFIG_CRYPTO_MD5_PPC is not set
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
# CONFIG_CRYPTO_SHA1_PPC is not set
|
||||
CONFIG_DATA_SHIFT=12
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_DIRECT_REMAP=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_REMAP=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_DW_DMAC=y
|
||||
CONFIG_DW_DMAC_CORE=y
|
||||
# CONFIG_E200 is not set
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
# CONFIG_EBONY is not set
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
# CONFIG_EIGER is not set
|
||||
CONFIG_EXTRA_TARGETS="uImage"
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FORCE_PCI=y
|
||||
# CONFIG_FSL_LBC is not set
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_GENERIC_CPU=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_ISA_DMA=y
|
||||
CONFIG_GENERIC_MSI_IRQ=y
|
||||
CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
# CONFIG_GEN_RTC is not set
|
||||
# CONFIG_GLACIER is not set
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
CONFIG_GPIO_GENERIC_PLATFORM=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_PPC4XX=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_IBM_IIC=y
|
||||
CONFIG_IBM_EMAC=y
|
||||
CONFIG_IBM_EMAC_EMAC4=y
|
||||
CONFIG_IBM_EMAC_POLL_WEIGHT=32
|
||||
CONFIG_IBM_EMAC_RGMII=y
|
||||
CONFIG_IBM_EMAC_RXB=128
|
||||
CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256
|
||||
CONFIG_IBM_EMAC_TAH=y
|
||||
CONFIG_IBM_EMAC_TXB=128
|
||||
# CONFIG_ICON is not set
|
||||
CONFIG_ILLEGAL_POINTER_VALUE=0
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_ISA_DMA_API=y
|
||||
# CONFIG_JFFS2_FS is not set
|
||||
# CONFIG_KATMAI is not set
|
||||
CONFIG_KERNEL_START=0xc0000000
|
||||
CONFIG_LEDS_TRIGGER_MTD=y
|
||||
CONFIG_LEDS_TRIGGER_PATTERN=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOWMEM_SIZE=0x30000000
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
# CONFIG_MATH_EMULATION is not set
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMU_GATHER_PAGE_SIZE=y
|
||||
CONFIG_MODULES_USE_ELF_RELA=y
|
||||
CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y
|
||||
CONFIG_MTD_CFI_ADV_OPTIONS=y
|
||||
# CONFIG_MTD_CFI_GEOMETRY is not set
|
||||
# CONFIG_MTD_SPLIT_SQUASHFS_ROOT is not set
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_PER_CPU_KM=y
|
||||
CONFIG_NEED_SG_DMA_LENGTH=y
|
||||
CONFIG_NOT_COHERENT_CACHE=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_IRQS=512
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OF_NET=y
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND=y
|
||||
CONFIG_PACKING=y
|
||||
CONFIG_PAGE_OFFSET=0xc0000000
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIEAER=y
|
||||
CONFIG_PCIEPORTBUS=y
|
||||
CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_MSI=y
|
||||
CONFIG_PCI_MSI_ARCH_FALLBACKS=y
|
||||
CONFIG_PCI_MSI_IRQ_DOMAIN=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYSICAL_START=0x00000000
|
||||
CONFIG_PHYS_64BIT=y
|
||||
CONFIG_PHYS_ADDR_T_64BIT=y
|
||||
# CONFIG_PMU_SYSFS is not set
|
||||
CONFIG_PPC=y
|
||||
CONFIG_PPC32=y
|
||||
CONFIG_PPC44x_SIMPLE=y
|
||||
CONFIG_PPC4xx_GPIO=y
|
||||
CONFIG_PPC4xx_MSI=y
|
||||
CONFIG_PPC4xx_PCI_EXPRESS=y
|
||||
# CONFIG_PPC64 is not set
|
||||
# CONFIG_PPC_47x is not set
|
||||
# CONFIG_PPC_85xx is not set
|
||||
# CONFIG_PPC_8xx is not set
|
||||
CONFIG_PPC_ADV_DEBUG_DACS=2
|
||||
CONFIG_PPC_ADV_DEBUG_DAC_RANGE=y
|
||||
CONFIG_PPC_ADV_DEBUG_DVCS=2
|
||||
CONFIG_PPC_ADV_DEBUG_IACS=4
|
||||
CONFIG_PPC_ADV_DEBUG_REGS=y
|
||||
# CONFIG_PPC_BOOK3S_6xx is not set
|
||||
CONFIG_PPC_DCR=y
|
||||
CONFIG_PPC_DCR_NATIVE=y
|
||||
# CONFIG_PPC_EARLY_DEBUG is not set
|
||||
CONFIG_PPC_FPU=y
|
||||
CONFIG_PPC_INDIRECT_PCI=y
|
||||
# CONFIG_PPC_IRQ_SOFT_MASK_DEBUG is not set
|
||||
CONFIG_PPC_MMU_NOHASH=y
|
||||
CONFIG_PPC_MMU_NOHASH_32=y
|
||||
CONFIG_PPC_MSI_BITMAP=y
|
||||
CONFIG_PPC_PAGE_SHIFT=12
|
||||
# CONFIG_PPC_PTDUMP is not set
|
||||
CONFIG_PPC_UDBG_16550=y
|
||||
CONFIG_PPC_WERROR=y
|
||||
CONFIG_PTE_64BIT=y
|
||||
# CONFIG_RAINIER is not set
|
||||
CONFIG_RAS=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_RSEQ=y
|
||||
# CONFIG_SAM440EP is not set
|
||||
# CONFIG_SCOM_DEBUGFS is not set
|
||||
# CONFIG_SEQUOIA is not set
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
# CONFIG_TAISHAN is not set
|
||||
CONFIG_TASK_SIZE=0xc0000000
|
||||
CONFIG_THREAD_INFO_IN_TASK=y
|
||||
CONFIG_THREAD_SHIFT=13
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TINY_SRCU=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_VDSO32=y
|
||||
# CONFIG_VIRTIO_MENU is not set
|
||||
# CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set
|
||||
# CONFIG_WARP is not set
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
# CONFIG_XILINX_SYSACE is not set
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_XZ_DEC_POWERPC=y
|
||||
# CONFIG_YOSEMITE is not set
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
|
@ -1,29 +0,0 @@
|
|||
From 88ca61467a0897c79b1fbf8f5c30691b43b52613 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Lamparter <chunkeey@gmail.com>
|
||||
Date: Sun, 26 Dec 2021 22:36:29 +0200
|
||||
Subject: [PATCH] dwc2: temporary force to be powered up all times
|
||||
|
||||
the APM821xx's onchip dwc2 misbehaves with 5.4 and 5.10
|
||||
when a USB device gets connected. Instead of announcing
|
||||
and setting up the USB devices it crashes and burns with:
|
||||
|
||||
[ 22.023476] dwc2 4bff80000.usbotg: dwc2_restore_global_registers: no global registers to restore
|
||||
[ 22.032245] dwc2 4bff80000.usbotg: dwc2_exit_partial_power_down: failed to restore registers
|
||||
[ 22.040647] dwc2 4bff80000.usbotg: exit partial_power_down failed
|
||||
[ 22.058765] dwc2 4bff80000.usbotg: HC died; cleaning up
|
||||
|
||||
This is all seemingly fixed with dwc2 from a 5.16-rc6.
|
||||
|
||||
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
---
|
||||
|
||||
--- a/drivers/usb/dwc2/params.c
|
||||
+++ b/drivers/usb/dwc2/params.c
|
||||
@@ -137,6 +137,7 @@ static void dwc2_set_amcc_params(struct
|
||||
struct dwc2_core_params *p = &hsotg->params;
|
||||
|
||||
p->ahbcfg = GAHBCFG_HBSTLEN_INCR16 << GAHBCFG_HBSTLEN_SHIFT;
|
||||
+ p->power_down = DWC2_POWER_DOWN_PARAM_NONE;
|
||||
}
|
||||
|
||||
static void dwc2_set_stm32f4x9_fsotg_params(struct dwc2_hsotg *hsotg)
|
|
@ -1,30 +0,0 @@
|
|||
--- a/arch/powerpc/platforms/44x/Kconfig
|
||||
+++ b/arch/powerpc/platforms/44x/Kconfig
|
||||
@@ -121,6 +121,17 @@ config CANYONLANDS
|
||||
help
|
||||
This option enables support for the AMCC PPC460EX evaluation board.
|
||||
|
||||
+config APOLLO3G
|
||||
+ bool "Apollo3G"
|
||||
+ depends on 44x
|
||||
+ default n
|
||||
+ select PPC44x_SIMPLE
|
||||
+ select APM821xx
|
||||
+ select IBM_EMAC_RGMII
|
||||
+ select 460EX
|
||||
+ help
|
||||
+ This option enables support for the AMCC Apollo 3G board.
|
||||
+
|
||||
config GLACIER
|
||||
bool "Glacier"
|
||||
depends on 44x
|
||||
--- a/arch/powerpc/platforms/44x/ppc44x_simple.c
|
||||
+++ b/arch/powerpc/platforms/44x/ppc44x_simple.c
|
||||
@@ -47,6 +47,7 @@ machine_device_initcall(ppc44x_simple, p
|
||||
* board.c file for it rather than adding it to this list.
|
||||
*/
|
||||
static char *board[] __initdata = {
|
||||
+ "amcc,apollo3g",
|
||||
"amcc,arches",
|
||||
"amcc,bamboo",
|
||||
"apm,bluestone",
|
|
@ -1,51 +0,0 @@
|
|||
--- a/arch/powerpc/platforms/4xx/pci.c
|
||||
+++ b/arch/powerpc/platforms/4xx/pci.c
|
||||
@@ -1060,15 +1060,24 @@ static int __init apm821xx_pciex_init_po
|
||||
u32 val;
|
||||
|
||||
/*
|
||||
- * Do a software reset on PCIe ports.
|
||||
- * This code is to fix the issue that pci drivers doesn't re-assign
|
||||
- * bus number for PCIE devices after Uboot
|
||||
- * scanned and configured all the buses (eg. PCIE NIC IntelPro/1000
|
||||
- * PT quad port, SAS LSI 1064E)
|
||||
+ * Only reset the PHY when no link is currently established.
|
||||
+ * This is for the Atheros PCIe board which has problems to establish
|
||||
+ * the link (again) after this PHY reset. All other currently tested
|
||||
+ * PCIe boards don't show this problem.
|
||||
*/
|
||||
-
|
||||
- mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST, 0x0);
|
||||
- mdelay(10);
|
||||
+ val = mfdcri(SDR0, port->sdr_base + PESDRn_LOOP);
|
||||
+ if (!(val & 0x00001000)) {
|
||||
+ /*
|
||||
+ * Do a software reset on PCIe ports.
|
||||
+ * This code is to fix the issue that pci drivers doesn't re-assign
|
||||
+ * bus number for PCIE devices after Uboot
|
||||
+ * scanned and configured all the buses (eg. PCIE NIC IntelPro/1000
|
||||
+ * PT quad port, SAS LSI 1064E)
|
||||
+ */
|
||||
+
|
||||
+ mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST, 0x0);
|
||||
+ mdelay(10);
|
||||
+ }
|
||||
|
||||
if (port->endpoint)
|
||||
val = PTYPE_LEGACY_ENDPOINT << 20;
|
||||
@@ -1085,9 +1094,12 @@ static int __init apm821xx_pciex_init_po
|
||||
mtdcri(SDR0, PESDR0_460EX_L0DRV, 0x00000130);
|
||||
mtdcri(SDR0, PESDR0_460EX_L0CLK, 0x00000006);
|
||||
|
||||
- mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST, 0x10000000);
|
||||
- mdelay(50);
|
||||
- mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST, 0x30000000);
|
||||
+ val = mfdcri(SDR0, port->sdr_base + PESDRn_LOOP);
|
||||
+ if (!(val & 0x00001000)) {
|
||||
+ mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST, 0x10000000);
|
||||
+ mdelay(50);
|
||||
+ mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST, 0x30000000);
|
||||
+ }
|
||||
|
||||
mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET,
|
||||
mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET) |
|
|
@ -1,14 +0,0 @@
|
|||
--- a/arch/powerpc/platforms/4xx/pci.c
|
||||
+++ b/arch/powerpc/platforms/4xx/pci.c
|
||||
@@ -1902,9 +1902,9 @@ static void __init ppc4xx_configure_pcie
|
||||
* if it works
|
||||
*/
|
||||
out_le32(mbase + PECFG_PIM0LAL, 0x00000000);
|
||||
- out_le32(mbase + PECFG_PIM0LAH, 0x00000000);
|
||||
+ out_le32(mbase + PECFG_PIM0LAH, 0x00000008);
|
||||
out_le32(mbase + PECFG_PIM1LAL, 0x00000000);
|
||||
- out_le32(mbase + PECFG_PIM1LAH, 0x00000000);
|
||||
+ out_le32(mbase + PECFG_PIM1LAH, 0x0000000c);
|
||||
out_le32(mbase + PECFG_PIM01SAH, 0xffff0000);
|
||||
out_le32(mbase + PECFG_PIM01SAL, 0x00000000);
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
From a0dc613140bab907a3d5787a7ae7b0638bf674d0 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Lamparter <chunkeey@gmail.com>
|
||||
Date: Thu, 23 Jun 2016 20:28:20 +0200
|
||||
Subject: [PATCH] usb: xhci: force MSI for uPD720201 and
|
||||
uPD720202
|
||||
|
||||
The APM82181 does not support MSI-X. When probed, it will
|
||||
produce a noisy warning.
|
||||
|
||||
---
|
||||
drivers/usb/host/pci-quirks.c | 362 ++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 362 insertions(+)
|
||||
|
||||
--- a/drivers/usb/host/xhci-pci.c
|
||||
+++ b/drivers/usb/host/xhci-pci.c
|
||||
@@ -279,6 +279,7 @@ static void xhci_pci_quirks(struct devic
|
||||
pdev->device == 0x0015) {
|
||||
xhci->quirks |= XHCI_RESET_ON_RESUME;
|
||||
xhci->quirks |= XHCI_ZERO_64B_REGS;
|
||||
+ xhci->quirks |= XHCI_FORCE_MSI;
|
||||
}
|
||||
if (pdev->vendor == PCI_VENDOR_ID_VIA)
|
||||
xhci->quirks |= XHCI_RESET_ON_RESUME;
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -431,10 +431,14 @@ static int xhci_try_enable_msi(struct us
|
||||
free_irq(hcd->irq, hcd);
|
||||
hcd->irq = 0;
|
||||
|
||||
- ret = xhci_setup_msix(xhci);
|
||||
- if (ret)
|
||||
- /* fall back to msi*/
|
||||
+ if (xhci->quirks & XHCI_FORCE_MSI) {
|
||||
ret = xhci_setup_msi(xhci);
|
||||
+ } else {
|
||||
+ ret = xhci_setup_msix(xhci);
|
||||
+ if (ret)
|
||||
+ /* fall back to msi*/
|
||||
+ ret = xhci_setup_msi(xhci);
|
||||
+ }
|
||||
|
||||
if (!ret) {
|
||||
hcd->msi_enabled = 1;
|
||||
--- a/drivers/usb/host/xhci.h
|
||||
+++ b/drivers/usb/host/xhci.h
|
||||
@@ -1902,6 +1902,7 @@ struct xhci_hcd {
|
||||
struct xhci_hub usb2_rhub;
|
||||
struct xhci_hub usb3_rhub;
|
||||
/* support xHCI 1.0 spec USB2 hardware LPM */
|
||||
+#define XHCI_FORCE_MSI (1 << 24)
|
||||
unsigned hw_lpm_support:1;
|
||||
/* Broken Suspend flag for SNPS Suspend resume issue */
|
||||
unsigned broken_suspend:1;
|
|
@ -1,65 +0,0 @@
|
|||
From 694f9bfb8efaef8a33e8992015ff9d0866faf4a2 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Lamparter <chunkeey@gmail.com>
|
||||
Date: Sun, 17 Dec 2017 17:27:15 +0100
|
||||
Subject: [PATCH 1/2] hwmon: tc654 add detection routine
|
||||
|
||||
This patch adds a detection routine for the TC654/TC655
|
||||
chips. Both IDs are listed in the Datasheet.
|
||||
|
||||
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
---
|
||||
drivers/hwmon/tc654.c | 29 +++++++++++++++++++++++++++++
|
||||
1 file changed, 29 insertions(+)
|
||||
|
||||
--- a/drivers/hwmon/tc654.c
|
||||
+++ b/drivers/hwmon/tc654.c
|
||||
@@ -55,6 +55,11 @@ enum tc654_regs {
|
||||
/* Register data is read (and cached) at most once per second. */
|
||||
#define TC654_UPDATE_INTERVAL HZ
|
||||
|
||||
+/* Manufacturer and Version Identification Register Values */
|
||||
+#define TC654_MFR_ID_MICROCHIP 0x84
|
||||
+#define TC654_VER_ID 0x00
|
||||
+#define TC655_VER_ID 0x01
|
||||
+
|
||||
struct tc654_data {
|
||||
struct i2c_client *client;
|
||||
|
||||
@@ -481,6 +486,29 @@ static const struct i2c_device_id tc654_
|
||||
{}
|
||||
};
|
||||
|
||||
+static int
|
||||
+tc654_detect(struct i2c_client *new_client, struct i2c_board_info *info)
|
||||
+{
|
||||
+ struct i2c_adapter *adapter = new_client->adapter;
|
||||
+ int manufacturer, product;
|
||||
+
|
||||
+ if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ manufacturer = i2c_smbus_read_byte_data(new_client, TC654_REG_MFR_ID);
|
||||
+ if (manufacturer != TC654_MFR_ID_MICROCHIP)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ product = i2c_smbus_read_byte_data(new_client, TC654_REG_VER_ID);
|
||||
+ if (!((product == TC654_VER_ID) || (product == TC655_VER_ID)))
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ strlcpy(info->type, product == TC654_VER_ID ? "tc654" : "tc655",
|
||||
+ I2C_NAME_SIZE);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
MODULE_DEVICE_TABLE(i2c, tc654_id);
|
||||
|
||||
static struct i2c_driver tc654_driver = {
|
||||
@@ -489,6 +517,7 @@ static struct i2c_driver tc654_driver =
|
||||
},
|
||||
.probe_new = tc654_probe,
|
||||
.id_table = tc654_id,
|
||||
+ .detect = tc654_detect,
|
||||
};
|
||||
|
||||
module_i2c_driver(tc654_driver);
|
|
@ -1,166 +0,0 @@
|
|||
From 4d49367c5303e3ebd17502a45b74de280f6be539 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Lamparter <chunkeey@gmail.com>
|
||||
Date: Sun, 13 Feb 2022 01:47:33 +0100
|
||||
Subject: hwmon: (tc654) Add thermal_cooling device support
|
||||
|
||||
Adds thermal_cooling device support to the tc654/tc655
|
||||
driver. This make it possible to integrate it into a
|
||||
device-tree supported thermal-zone node as a
|
||||
cooling device.
|
||||
|
||||
I have been using this patch as part of the Netgear WNDR4700
|
||||
Centria NAS Router support within OpenWrt since 2016.
|
||||
|
||||
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20220213004733.2421193-1-chunkeey@gmail.com
|
||||
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
||||
---
|
||||
--- a/drivers/hwmon/tc654.c
|
||||
+++ b/drivers/hwmon/tc654.c
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/slab.h>
|
||||
+#include <linux/thermal.h>
|
||||
#include <linux/util_macros.h>
|
||||
|
||||
enum tc654_regs {
|
||||
@@ -384,28 +385,20 @@ static ssize_t pwm_show(struct device *d
|
||||
return sprintf(buf, "%d\n", pwm);
|
||||
}
|
||||
|
||||
-static ssize_t pwm_store(struct device *dev, struct device_attribute *da,
|
||||
- const char *buf, size_t count)
|
||||
+static int _set_pwm(struct tc654_data *data, unsigned long val)
|
||||
{
|
||||
- struct tc654_data *data = dev_get_drvdata(dev);
|
||||
struct i2c_client *client = data->client;
|
||||
- unsigned long val;
|
||||
int ret;
|
||||
|
||||
- if (kstrtoul(buf, 10, &val))
|
||||
- return -EINVAL;
|
||||
- if (val > 255)
|
||||
- return -EINVAL;
|
||||
-
|
||||
mutex_lock(&data->update_lock);
|
||||
|
||||
- if (val == 0)
|
||||
+ if (val == 0) {
|
||||
data->config |= TC654_REG_CONFIG_SDM;
|
||||
- else
|
||||
+ data->duty_cycle = 0;
|
||||
+ } else {
|
||||
data->config &= ~TC654_REG_CONFIG_SDM;
|
||||
-
|
||||
- data->duty_cycle = find_closest(val, tc654_pwm_map,
|
||||
- ARRAY_SIZE(tc654_pwm_map));
|
||||
+ data->duty_cycle = val - 1;
|
||||
+ }
|
||||
|
||||
ret = i2c_smbus_write_byte_data(client, TC654_REG_CONFIG, data->config);
|
||||
if (ret < 0)
|
||||
@@ -416,6 +409,24 @@ static ssize_t pwm_store(struct device *
|
||||
|
||||
out:
|
||||
mutex_unlock(&data->update_lock);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static ssize_t pwm_store(struct device *dev, struct device_attribute *da,
|
||||
+ const char *buf, size_t count)
|
||||
+{
|
||||
+ struct tc654_data *data = dev_get_drvdata(dev);
|
||||
+ unsigned long val;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (kstrtoul(buf, 10, &val))
|
||||
+ return -EINVAL;
|
||||
+ if (val > 255)
|
||||
+ return -EINVAL;
|
||||
+ if (val > 0)
|
||||
+ val = find_closest(val, tc654_pwm_map, ARRAY_SIZE(tc654_pwm_map)) + 1;
|
||||
+
|
||||
+ ret = _set_pwm(data, val);
|
||||
return ret < 0 ? ret : count;
|
||||
}
|
||||
|
||||
@@ -448,6 +459,58 @@ static struct attribute *tc654_attrs[] =
|
||||
ATTRIBUTE_GROUPS(tc654);
|
||||
|
||||
/*
|
||||
+ * thermal cooling device functions
|
||||
+ *
|
||||
+ * Account for the "ShutDown Mode (SDM)" state by offsetting
|
||||
+ * the 16 PWM duty cycle states by 1.
|
||||
+ *
|
||||
+ * State 0 = 0% PWM | Shutdown - Fan(s) are off
|
||||
+ * State 1 = 30% PWM | duty_cycle = 0
|
||||
+ * State 2 = ~35% PWM | duty_cycle = 1
|
||||
+ * [...]
|
||||
+ * State 15 = ~95% PWM | duty_cycle = 14
|
||||
+ * State 16 = 100% PWM | duty_cycle = 15
|
||||
+ */
|
||||
+#define TC654_MAX_COOLING_STATE 16
|
||||
+
|
||||
+static int tc654_get_max_state(struct thermal_cooling_device *cdev, unsigned long *state)
|
||||
+{
|
||||
+ *state = TC654_MAX_COOLING_STATE;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int tc654_get_cur_state(struct thermal_cooling_device *cdev, unsigned long *state)
|
||||
+{
|
||||
+ struct tc654_data *data = tc654_update_client(cdev->devdata);
|
||||
+
|
||||
+ if (IS_ERR(data))
|
||||
+ return PTR_ERR(data);
|
||||
+
|
||||
+ if (data->config & TC654_REG_CONFIG_SDM)
|
||||
+ *state = 0; /* FAN is off */
|
||||
+ else
|
||||
+ *state = data->duty_cycle + 1; /* offset PWM States by 1 */
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int tc654_set_cur_state(struct thermal_cooling_device *cdev, unsigned long state)
|
||||
+{
|
||||
+ struct tc654_data *data = tc654_update_client(cdev->devdata);
|
||||
+
|
||||
+ if (IS_ERR(data))
|
||||
+ return PTR_ERR(data);
|
||||
+
|
||||
+ return _set_pwm(data, clamp_val(state, 0, TC654_MAX_COOLING_STATE));
|
||||
+}
|
||||
+
|
||||
+static const struct thermal_cooling_device_ops tc654_fan_cool_ops = {
|
||||
+ .get_max_state = tc654_get_max_state,
|
||||
+ .get_cur_state = tc654_get_cur_state,
|
||||
+ .set_cur_state = tc654_set_cur_state,
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
* device probe and removal
|
||||
*/
|
||||
|
||||
@@ -477,7 +540,18 @@ static int tc654_probe(struct i2c_client
|
||||
hwmon_dev =
|
||||
devm_hwmon_device_register_with_groups(dev, client->name, data,
|
||||
tc654_groups);
|
||||
- return PTR_ERR_OR_ZERO(hwmon_dev);
|
||||
+ if (IS_ERR(hwmon_dev))
|
||||
+ return PTR_ERR(hwmon_dev);
|
||||
+
|
||||
+ if (IS_ENABLED(CONFIG_THERMAL)) {
|
||||
+ struct thermal_cooling_device *cdev;
|
||||
+
|
||||
+ cdev = devm_thermal_of_cooling_device_register(dev, dev->of_node, client->name,
|
||||
+ hwmon_dev, &tc654_fan_cool_ops);
|
||||
+ return PTR_ERR_OR_ZERO(cdev);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static const struct i2c_device_id tc654_id[] = {
|
|
@ -1,29 +0,0 @@
|
|||
From c9395ad54e2cabb87d408becc37566f3d8248933 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Lamparter <chunkeey@gmail.com>
|
||||
Date: Sun, 1 Dec 2019 02:08:23 +0100
|
||||
Subject: [PATCH] powerpc: bootwrapper: force gzip as mkimage's compression
|
||||
method
|
||||
|
||||
Due to CONFIG_KERNEL_XZ symbol, the bootwrapper code tries to
|
||||
instruct the mkimage to use the xz compression, which isn't
|
||||
supported. This patch forces the gzip compression, which is
|
||||
supported and doesn't matter because the generated uImage for
|
||||
the apm821xx target gets ignored as the OpenWrt toolchain will
|
||||
do separate U-Boot kernel images for each device individually.
|
||||
|
||||
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
||||
---
|
||||
arch/powerpc/boot/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/powerpc/boot/Makefile
|
||||
+++ b/arch/powerpc/boot/Makefile
|
||||
@@ -251,7 +251,7 @@ compressor-$(CONFIG_KERNEL_LZO) := lzo
|
||||
|
||||
# args (to if_changed): 1 = (this rule), 2 = platform, 3 = dts 4=dtb 5=initrd
|
||||
quiet_cmd_wrap = WRAP $@
|
||||
- cmd_wrap =$(CONFIG_SHELL) $(wrapper) -Z $(compressor-y) -c -o $@ -p $2 \
|
||||
+ cmd_wrap =$(CONFIG_SHELL) $(wrapper) -Z gzip -c -o $@ -p $2 \
|
||||
$(CROSSWRAP) $(if $3, -s $3)$(if $4, -d $4)$(if $5, -i $5) \
|
||||
vmlinux
|
||||
|
|
@ -1,277 +0,0 @@
|
|||
# CONFIG_16KSTACKS is not set
|
||||
CONFIG_ARC=y
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
|
||||
CONFIG_ARCH_HAS_DMA_COHERENT_TO_PFN=y
|
||||
CONFIG_ARCH_HAS_DMA_PREP_COHERENT=y
|
||||
CONFIG_ARCH_HAS_PTE_SPECIAL=y
|
||||
CONFIG_ARCH_HAS_SETUP_DMA_OPS=y
|
||||
CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y
|
||||
CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y
|
||||
CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
|
||||
CONFIG_ARC_BUILTIN_DTB_NAME=""
|
||||
CONFIG_ARC_CACHE=y
|
||||
CONFIG_ARC_CACHE_LINE_SHIFT=6
|
||||
CONFIG_ARC_CACHE_PAGES=y
|
||||
CONFIG_ARC_CPU_HS=y
|
||||
CONFIG_ARC_CURR_IN_REG=y
|
||||
CONFIG_ARC_DBG=y
|
||||
# CONFIG_ARC_DBG_TLB_PARANOIA is not set
|
||||
CONFIG_ARC_DW2_UNWIND=y
|
||||
CONFIG_ARC_HAS_ACCL_REGS=y
|
||||
CONFIG_ARC_HAS_DCACHE=y
|
||||
# CONFIG_ARC_HAS_DCCM is not set
|
||||
CONFIG_ARC_HAS_DIV_REM=y
|
||||
CONFIG_ARC_HAS_ICACHE=y
|
||||
# CONFIG_ARC_HAS_ICCM is not set
|
||||
CONFIG_ARC_HAS_LL64=y
|
||||
CONFIG_ARC_HAS_LLSC=y
|
||||
# CONFIG_ARC_HAS_PAE40 is not set
|
||||
CONFIG_ARC_HAS_SWAPE=y
|
||||
CONFIG_ARC_IRQ_NO_AUTOSAVE=y
|
||||
CONFIG_ARC_KVADDR_SIZE=256
|
||||
CONFIG_ARC_MCIP=y
|
||||
# CONFIG_ARC_METAWARE_HLINK is not set
|
||||
CONFIG_ARC_MMU_V4=y
|
||||
# CONFIG_ARC_PAGE_SIZE_16K is not set
|
||||
# CONFIG_ARC_PAGE_SIZE_4K is not set
|
||||
CONFIG_ARC_PAGE_SIZE_8K=y
|
||||
CONFIG_ARC_PLAT_AXS10X=y
|
||||
# CONFIG_ARC_PLAT_EZNPS is not set
|
||||
# CONFIG_ARC_PLAT_TB10X is not set
|
||||
# CONFIG_ARC_SMP_HALT_ON_RESET is not set
|
||||
CONFIG_ARC_SOC_HSDK=y
|
||||
CONFIG_ARC_TIMERS=y
|
||||
CONFIG_ARC_TIMERS_64BIT=y
|
||||
CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS=y
|
||||
CONFIG_AXS103=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_COUNT=16
|
||||
CONFIG_BLK_DEV_RAM_SIZE=4096
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_SCSI_REQUEST=y
|
||||
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
|
||||
CONFIG_CC_DISABLE_WARN_MAYBE_UNINITIALIZED=y
|
||||
CONFIG_CC_HAS_KASAN_GENERIC=y
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y
|
||||
CONFIG_CLK_HSDK=y
|
||||
CONFIG_ARC_TUNE_MCPU=""
|
||||
CONFIG_ARC_DSP_NONE=y
|
||||
# CONFIG_ARC_FPU_SAVE_RESTORE is not set
|
||||
# CONFIG_ARC_DSP_KERNEL is not set
|
||||
# CONFIG_ARC_DSP_USERSPACE is not set
|
||||
# CONFIG_ARC_DSP_AGU_USERSPACE is not set
|
||||
# CONFIG_ARC_LPB_DISABLE is not set
|
||||
# CONFIG_SPI_DW_DMA is not set
|
||||
CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y
|
||||
# CONFIG_HARDENED_USERCOPY is not set
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_BLAKE2S=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_DRBG=y
|
||||
CONFIG_CRYPTO_DRBG_HMAC=y
|
||||
CONFIG_CRYPTO_DRBG_MENU=y
|
||||
CONFIG_CRYPTO_ECHAINIV=y
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_NULL=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_DIRECT_REMAP=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_REMAP=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_DWMAC_ANARION=y
|
||||
CONFIG_DWMAC_GENERIC=y
|
||||
CONFIG_DW_APB_ICTL=y
|
||||
CONFIG_DW_AXI_DMAC=y
|
||||
CONFIG_EXT4_FS=y
|
||||
# CONFIG_EZNPS_GIC is not set
|
||||
CONFIG_FAT_FS=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_CMDLINE=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CSUM=y
|
||||
CONFIG_GENERIC_FIND_FIRST_BIT=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PENDING_IRQ=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GPIO_DWAPB=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
CONFIG_GPIO_SNPS_CREG=y
|
||||
CONFIG_GRACE_PERIOD=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
CONFIG_HAVE_ARCH_TRACEHOOK=y
|
||||
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_HAVE_CLK=y
|
||||
CONFIG_HAVE_CLK_PREPARE=y
|
||||
CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
|
||||
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
|
||||
CONFIG_HAVE_FUTEX_CMPXCHG=y
|
||||
CONFIG_HAVE_IOREMAP_PROT=y
|
||||
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
|
||||
CONFIG_HAVE_NET_DSA=y
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
CONFIG_HAVE_PCI=y
|
||||
CONFIG_HAVE_PERF_EVENTS=y
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_IIO=y
|
||||
CONFIG_IIO_BUFFER=y
|
||||
CONFIG_IIO_KFIFO_BUF=y
|
||||
CONFIG_IIO_ST_PRESS=y
|
||||
CONFIG_IIO_ST_PRESS_I2C=y
|
||||
CONFIG_IIO_ST_PRESS_SPI=y
|
||||
CONFIG_IIO_ST_SENSORS_CORE=y
|
||||
CONFIG_IIO_ST_SENSORS_I2C=y
|
||||
CONFIG_IIO_ST_SENSORS_SPI=y
|
||||
CONFIG_IIO_TRIGGER=y
|
||||
CONFIG_IIO_TRIGGERED_BUFFER=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
# CONFIG_ISA_ARCOMPACT is not set
|
||||
CONFIG_ISA_ARCV2=y
|
||||
CONFIG_JBD2=y
|
||||
CONFIG_KALLSYMS=y
|
||||
CONFIG_KERNEL_GZIP=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LINUX_LINK_BASE=0x90000000
|
||||
CONFIG_LINUX_RAM_BASE=0x80000000
|
||||
CONFIG_LOCKD=y
|
||||
CONFIG_LOCKUP_DETECTOR=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MICREL_PHY=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_DW=y
|
||||
# CONFIG_MMC_DW_BLUEFIELD is not set
|
||||
# CONFIG_MMC_DW_EXYNOS is not set
|
||||
# CONFIG_MMC_DW_HI3798CV200 is not set
|
||||
# CONFIG_MMC_DW_K3 is not set
|
||||
CONFIG_MMC_DW_PLTFM=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MODULES_TREE_LOOKUP=y
|
||||
CONFIG_MODULES_USE_ELF_RELA=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_NATIONAL_PHY=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_NS=y
|
||||
CONFIG_NET_PTP_CLASSIFY=y
|
||||
CONFIG_NFS_ACL_SUPPORT=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V3_ACL=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_NO_IOPORT_MAP=y
|
||||
CONFIG_NR_CPUS=4
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OF_NET=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PAGE_POOL=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLINK=y
|
||||
CONFIG_PPS=y
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_PREEMPTION=y
|
||||
CONFIG_PREEMPT_COUNT=y
|
||||
# CONFIG_PREEMPT_NONE is not set
|
||||
CONFIG_PREEMPT_RCU=y
|
||||
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
|
||||
CONFIG_PTP_1588_CLOCK=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGMAP_SPI=y
|
||||
CONFIG_RESET_AXS10X=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_RESET_HSDK=y
|
||||
CONFIG_RESET_SIMPLE=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
|
||||
CONFIG_SERIAL_8250_DW=y
|
||||
CONFIG_SERIAL_8250_DWLIB=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=4
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
|
||||
CONFIG_SERIAL_ARC=y
|
||||
CONFIG_SERIAL_ARC_CONSOLE=y
|
||||
CONFIG_SERIAL_ARC_NR_PORTS=1
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SOFTLOCKUP_DETECTOR=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_DESIGNWARE=y
|
||||
CONFIG_SPI_DW_MMIO=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_STACKTRACE=y
|
||||
# CONFIG_STANDALONE is not set
|
||||
CONFIG_STMMAC_ETH=y
|
||||
CONFIG_STMMAC_PLATFORM=y
|
||||
# CONFIG_STMMAC_SELFTESTS is not set
|
||||
CONFIG_SUNRPC=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_TASKS_RCU=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TI_ADC108S102=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UNINLINE_SPIN_UNLOCK=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
# CONFIG_USER_NS is not set
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_XPS=y
|
|
@ -1,75 +0,0 @@
|
|||
CONFIG_ALIGNMENT_TRAP=y
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
CONFIG_ARCH_MULTI_V6_V7=y
|
||||
CONFIG_ARCH_MULTI_V7=y
|
||||
CONFIG_ARCH_NR_GPIO=0
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
|
||||
CONFIG_ARCH_VIRT=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_CPU_SUSPEND=y
|
||||
CONFIG_ARM_HAS_SG_CHAIN=y
|
||||
CONFIG_ARM_HEAVY_MB=y
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=6
|
||||
CONFIG_ARM_L1_CACHE_SHIFT_6=y
|
||||
CONFIG_ARM_LPAE=y
|
||||
CONFIG_ARM_PATCH_IDIV=y
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
CONFIG_ARM_PSCI=y
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_ARM_VIRT_EXT=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
|
||||
CONFIG_CACHE_L2X0=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CPU_32v6K=y
|
||||
CONFIG_CPU_32v7=y
|
||||
CONFIG_CPU_ABRT_EV7=y
|
||||
CONFIG_CPU_CACHE_V7=y
|
||||
CONFIG_CPU_CACHE_VIPT=y
|
||||
CONFIG_CPU_COPY_V6=y
|
||||
CONFIG_CPU_CP15=y
|
||||
CONFIG_CPU_CP15_MMU=y
|
||||
CONFIG_CPU_HAS_ASID=y
|
||||
CONFIG_CPU_PABRT_V7=y
|
||||
CONFIG_CPU_SPECTRE=y
|
||||
CONFIG_CPU_THUMB_CAPABLE=y
|
||||
CONFIG_CPU_TLB_V7=y
|
||||
CONFIG_CPU_V7=y
|
||||
CONFIG_CRYPTO_BLAKE2S=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
|
||||
CONFIG_DMA_OPS=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_GENERIC_VDSO_32=y
|
||||
CONFIG_HARDEN_BRANCH_PREDICTOR=y
|
||||
CONFIG_HAVE_SMP=y
|
||||
CONFIG_HZ_FIXED=0
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_NEON=y
|
||||
CONFIG_NR_CPUS=4
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_OUTER_CACHE=y
|
||||
CONFIG_OUTER_CACHE_SYNC=y
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_RTC_MC146818_LIB=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SMP_ON_UP=y
|
||||
CONFIG_SWP_EMULATE=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_UNWINDER_ARM=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VFP=y
|
||||
CONFIG_VFPv3=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0
|
|
@ -11,6 +11,7 @@ CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
|||
CONFIG_ARCH_VIRT=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_CPU_SUSPEND=y
|
||||
CONFIG_ARM_CRYPTO=y
|
||||
CONFIG_ARM_HAS_SG_CHAIN=y
|
||||
CONFIG_ARM_HEAVY_MB=y
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=6
|
||||
|
@ -40,7 +41,6 @@ CONFIG_CPU_SPECTRE=y
|
|||
CONFIG_CPU_THUMB_CAPABLE=y
|
||||
CONFIG_CPU_TLB_V7=y
|
||||
CONFIG_CPU_V7=y
|
||||
CONFIG_CRYPTO_BLAKE2S=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
|
||||
CONFIG_DMA_OPS=y
|
||||
|
|
|
@ -1,154 +0,0 @@
|
|||
CONFIG_64BIT=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS=18
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=24
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MIN=18
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
|
||||
CONFIG_ARCH_PROC_KCORE_TEXT=y
|
||||
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
|
||||
CONFIG_ARCH_STACKWALK=y
|
||||
CONFIG_ARCH_VEXPRESS=y
|
||||
CONFIG_ARM64=y
|
||||
CONFIG_ARM64_4K_PAGES=y
|
||||
CONFIG_ARM64_CNP=y
|
||||
CONFIG_ARM64_CRYPTO=y
|
||||
CONFIG_ARM64_ERRATUM_1165522=y
|
||||
CONFIG_ARM64_ERRATUM_1286807=y
|
||||
CONFIG_ARM64_ERRATUM_819472=y
|
||||
CONFIG_ARM64_ERRATUM_824069=y
|
||||
CONFIG_ARM64_ERRATUM_826319=y
|
||||
CONFIG_ARM64_ERRATUM_827319=y
|
||||
CONFIG_ARM64_ERRATUM_832075=y
|
||||
CONFIG_ARM64_ERRATUM_843419=y
|
||||
CONFIG_ARM64_HW_AFDBM=y
|
||||
CONFIG_ARM64_MODULE_PLTS=y
|
||||
CONFIG_ARM64_PAGE_SHIFT=12
|
||||
CONFIG_ARM64_PAN=y
|
||||
CONFIG_ARM64_PA_BITS=48
|
||||
CONFIG_ARM64_PA_BITS_48=y
|
||||
CONFIG_ARM64_PTR_AUTH=y
|
||||
CONFIG_ARM64_SVE=y
|
||||
CONFIG_ARM64_TAGGED_ADDR_ABI=y
|
||||
CONFIG_ARM64_UAO=y
|
||||
CONFIG_ARM64_VA_BITS=39
|
||||
CONFIG_ARM64_VA_BITS_39=y
|
||||
CONFIG_ARM64_VHE=y
|
||||
CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y
|
||||
CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y
|
||||
CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y
|
||||
CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y
|
||||
CONFIG_ARM_SBSA_WATCHDOG=y
|
||||
CONFIG_ATOMIC64_SELFTEST=y
|
||||
CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_CAVIUM_TX2_ERRATUM_219=y
|
||||
CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
|
||||
CONFIG_CLK_SP810=y
|
||||
CONFIG_CLK_VEXPRESS_OSC=y
|
||||
# CONFIG_COMPAT_32BIT_TIME is not set
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
CONFIG_CPU_PM=y
|
||||
CONFIG_CRYPTO_AES_ARM64=y
|
||||
CONFIG_CRYPTO_AES_ARM64_BS=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
|
||||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||
CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y
|
||||
CONFIG_CRYPTO_BLAKE2S=y
|
||||
CONFIG_CRYPTO_CHACHA20=y
|
||||
CONFIG_CRYPTO_CHACHA20_NEON=y
|
||||
CONFIG_CRYPTO_CRYPTD=y
|
||||
CONFIG_CRYPTO_GHASH_ARM64_CE=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_CHACHA_GENERIC=y
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
CONFIG_CRYPTO_SHA1_ARM64_CE=y
|
||||
CONFIG_CRYPTO_SHA256_ARM64=y
|
||||
CONFIG_CRYPTO_SHA2_ARM64_CE=y
|
||||
CONFIG_CRYPTO_SHA512_ARM64=y
|
||||
CONFIG_CRYPTO_SIMD=y
|
||||
CONFIG_DMA_DIRECT_REMAP=y
|
||||
CONFIG_DMA_SHARED_BUFFER=y
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_BOCHS=y
|
||||
CONFIG_DRM_BRIDGE=y
|
||||
CONFIG_DRM_GEM_SHMEM_HELPER=y
|
||||
CONFIG_DRM_KMS_HELPER=y
|
||||
CONFIG_DRM_PANEL=y
|
||||
CONFIG_DRM_PANEL_BRIDGE=y
|
||||
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
|
||||
CONFIG_DRM_QXL=y
|
||||
CONFIG_DRM_TTM=y
|
||||
CONFIG_DRM_TTM_DMA_PAGE_POOL=y
|
||||
CONFIG_DRM_TTM_HELPER=y
|
||||
CONFIG_DRM_VIRTIO_GPU=y
|
||||
CONFIG_DRM_VRAM_HELPER=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_ARMCLCD=y
|
||||
CONFIG_FB_CFB_COPYAREA=y
|
||||
CONFIG_FB_CFB_FILLRECT=y
|
||||
CONFIG_FB_CFB_IMAGEBLIT=y
|
||||
CONFIG_FB_CMDLINE=y
|
||||
CONFIG_FB_MODE_HELPERS=y
|
||||
# CONFIG_FLATMEM_MANUAL is not set
|
||||
CONFIG_FRAME_POINTER=y
|
||||
CONFIG_FSL_ERRATUM_A008585=y
|
||||
CONFIG_FUJITSU_ERRATUM_010001=y
|
||||
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
|
||||
CONFIG_GENERIC_CSUM=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
CONFIG_GPIO_GENERIC_PLATFORM=y
|
||||
CONFIG_HDMI=y
|
||||
CONFIG_HOLES_IN_ZONE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_VIRTIO=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_ALGOBIT=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
# CONFIG_ICST is not set
|
||||
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
||||
CONFIG_KCMP=y
|
||||
CONFIG_LCD_CLASS_DEVICE=m
|
||||
# CONFIG_LCD_PLATFORM is not set
|
||||
CONFIG_MFD_CORE=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MFD_VEXPRESS_SYSREG=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_ARMMMCI=y
|
||||
CONFIG_MODULES_USE_ELF_RELA=y
|
||||
CONFIG_NEED_SG_DMA_LENGTH=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=64
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PM_GENERIC_DOMAINS=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_OF=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_VEXPRESS=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_QUEUED_RWLOCKS=y
|
||||
CONFIG_QUEUED_SPINLOCKS=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
|
||||
CONFIG_RTC_I2C_AND_SPI=y
|
||||
CONFIG_SMC91X=y
|
||||
CONFIG_SPARSEMEM=y
|
||||
CONFIG_SPARSEMEM_EXTREME=y
|
||||
CONFIG_SPARSEMEM_MANUAL=y
|
||||
CONFIG_SPARSEMEM_VMEMMAP=y
|
||||
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
|
||||
CONFIG_SYNC_FILE=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
CONFIG_THREAD_INFO_IN_TASK=y
|
||||
CONFIG_UNMAP_KERNEL_AT_EL0=y
|
||||
CONFIG_VEXPRESS_CONFIG=y
|
||||
CONFIG_VIDEOMODE_HELPERS=y
|
||||
CONFIG_VIRTIO_DMA_SHARED_BUFFER=y
|
||||
CONFIG_VMAP_STACK=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_ZONE_DMA32=y
|
|
@ -1,155 +0,0 @@
|
|||
CONFIG_9P_FS=y
|
||||
# CONFIG_9P_FS_POSIX_ACL is not set
|
||||
# CONFIG_9P_FS_SECURITY is not set
|
||||
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_GIC_V2M=y
|
||||
CONFIG_ARM_GIC_V3=y
|
||||
CONFIG_ARM_GIC_V3_ITS=y
|
||||
CONFIG_ARM_GIC_V3_ITS_PCI=y
|
||||
CONFIG_ARM_PSCI_FW=y
|
||||
CONFIG_BALLOON_COMPACTION=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_MQ_VIRTIO=y
|
||||
CONFIG_BLK_SCSI_REQUEST=y
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_CRC32=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_REMAP=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_F2FS_FS=y
|
||||
CONFIG_FAILOVER=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ARCH_TOPOLOGY=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_MIGRATION=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_MSI_IRQ=y
|
||||
CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_PL061=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_HVC_DRIVER=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_JBD2=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MEMORY_BALLOON=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NET_9P=y
|
||||
# CONFIG_NET_9P_DEBUG is not set
|
||||
CONFIG_NET_9P_VIRTIO=y
|
||||
CONFIG_NET_FAILOVER=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_NET=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PAGE_REPORTING=y
|
||||
CONFIG_PARTITION_PERCPU=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
CONFIG_PCI_ECAM=y
|
||||
CONFIG_PCI_HOST_COMMON=y
|
||||
CONFIG_PCI_HOST_GENERIC=y
|
||||
CONFIG_PCI_MSI=y
|
||||
CONFIG_PCI_MSI_IRQ_DOMAIN=y
|
||||
CONFIG_PGTABLE_LEVELS=3
|
||||
CONFIG_PHYS_ADDR_T_64BIT=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_PL031=y
|
||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_VIRTIO=y
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_SWIOTLB=y
|
||||
CONFIG_SYS_SUPPORTS_HUGETLBFS=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_VIRTIO=y
|
||||
CONFIG_VIRTIO_BALLOON=y
|
||||
CONFIG_VIRTIO_BLK=y
|
||||
CONFIG_VIRTIO_CONSOLE=y
|
||||
CONFIG_VIRTIO_MMIO=y
|
||||
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
|
||||
CONFIG_VIRTIO_NET=y
|
||||
CONFIG_VIRTIO_PCI=y
|
||||
CONFIG_VIRTIO_PCI_LEGACY=y
|
||||
CONFIG_XPS=y
|
|
@ -1,10 +0,0 @@
|
|||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -41,6 +41,7 @@ dtb-$(CONFIG_SOC_AT91SAM9) += \
|
||||
at91-kizboxmini-mb.dtb \
|
||||
at91-kizboxmini-rd.dtb \
|
||||
at91-smartkiz.dtb \
|
||||
+ at91-q5xr5.dtb \
|
||||
at91-wb45n.dtb \
|
||||
at91sam9g15ek.dtb \
|
||||
at91sam9g25-gardena-smart-gateway.dtb \
|
|
@ -1,65 +0,0 @@
|
|||
From 44bb7c72cdd830f54fe18e730205f892d9cbfe39 Mon Sep 17 00:00:00 2001
|
||||
From: Eugen Hristev <eugen.hristev@microchip.com>
|
||||
Date: Thu, 19 Nov 2020 17:43:08 +0200
|
||||
Subject: [PATCH 102/247] dt-bindings: clock: at91: add sama7g5 pll defines
|
||||
|
||||
Add SAMA7G5 specific PLL defines to be referenced in a phandle as a
|
||||
PMC_TYPE_CORE clock.
|
||||
|
||||
Suggested-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
|
||||
[claudiu.beznea@microchip.com: adapt comit message, adapt sama7g5.c]
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/1605800597-16720-3-git-send-email-claudiu.beznea@microchip.com
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/sama7g5.c | 6 +++---
|
||||
include/dt-bindings/clock/at91.h | 10 ++++++++++
|
||||
2 files changed, 13 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/clk/at91/sama7g5.c
|
||||
+++ b/drivers/clk/at91/sama7g5.c
|
||||
@@ -182,13 +182,13 @@ static const struct {
|
||||
.p = "audiopll_fracck",
|
||||
.l = &pll_layout_divpmc,
|
||||
.t = PLL_TYPE_DIV,
|
||||
- .eid = PMC_I2S0_MUX, },
|
||||
+ .eid = PMC_AUDIOPMCPLL, },
|
||||
|
||||
{ .n = "audiopll_diviock",
|
||||
.p = "audiopll_fracck",
|
||||
.l = &pll_layout_divio,
|
||||
.t = PLL_TYPE_DIV,
|
||||
- .eid = PMC_I2S1_MUX, },
|
||||
+ .eid = PMC_AUDIOIOPLL, },
|
||||
},
|
||||
|
||||
[PLL_ID_ETH] = {
|
||||
@@ -835,7 +835,7 @@ static void __init sama7g5_pmc_setup(str
|
||||
if (IS_ERR(regmap))
|
||||
return;
|
||||
|
||||
- sama7g5_pmc = pmc_data_allocate(PMC_I2S1_MUX + 1,
|
||||
+ sama7g5_pmc = pmc_data_allocate(PMC_ETHPLL + 1,
|
||||
nck(sama7g5_systemck),
|
||||
nck(sama7g5_periphck),
|
||||
nck(sama7g5_gck), 8);
|
||||
--- a/include/dt-bindings/clock/at91.h
|
||||
+++ b/include/dt-bindings/clock/at91.h
|
||||
@@ -25,6 +25,16 @@
|
||||
#define PMC_PLLBCK 8
|
||||
#define PMC_AUDIOPLLCK 9
|
||||
|
||||
+/* SAMA7G5 */
|
||||
+#define PMC_CPUPLL (PMC_MAIN + 1)
|
||||
+#define PMC_SYSPLL (PMC_MAIN + 2)
|
||||
+#define PMC_DDRPLL (PMC_MAIN + 3)
|
||||
+#define PMC_IMGPLL (PMC_MAIN + 4)
|
||||
+#define PMC_BAUDPLL (PMC_MAIN + 5)
|
||||
+#define PMC_AUDIOPMCPLL (PMC_MAIN + 6)
|
||||
+#define PMC_AUDIOIOPLL (PMC_MAIN + 7)
|
||||
+#define PMC_ETHPLL (PMC_MAIN + 8)
|
||||
+
|
||||
#ifndef AT91_PMC_MOSCS
|
||||
#define AT91_PMC_MOSCS 0 /* MOSCS Flag */
|
||||
#define AT91_PMC_LOCKA 1 /* PLLA Lock */
|
|
@ -1,41 +0,0 @@
|
|||
From 55c14526f970805a6bf2ed4b820f062334375abe Mon Sep 17 00:00:00 2001
|
||||
From: Eugen Hristev <eugen.hristev@microchip.com>
|
||||
Date: Thu, 19 Nov 2020 17:43:09 +0200
|
||||
Subject: [PATCH 103/247] clk: at91: sama7g5: allow SYS and CPU PLLs to be
|
||||
exported and referenced in DT
|
||||
|
||||
Allow SYSPLL and CPUPLL to be referenced as a PMC_TYPE_CORE clock
|
||||
from phandle in DT.
|
||||
|
||||
Suggested-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
|
||||
[claudiu.beznea@microchip.com: adapt commit message, add CPU PLL]
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/1605800597-16720-4-git-send-email-claudiu.beznea@microchip.com
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/sama7g5.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/clk/at91/sama7g5.c
|
||||
+++ b/drivers/clk/at91/sama7g5.c
|
||||
@@ -117,7 +117,8 @@ static const struct {
|
||||
.p = "cpupll_fracck",
|
||||
.l = &pll_layout_divpmc,
|
||||
.t = PLL_TYPE_DIV,
|
||||
- .c = 1, },
|
||||
+ .c = 1,
|
||||
+ .eid = PMC_CPUPLL, },
|
||||
},
|
||||
|
||||
[PLL_ID_SYS] = {
|
||||
@@ -131,7 +132,8 @@ static const struct {
|
||||
.p = "syspll_fracck",
|
||||
.l = &pll_layout_divpmc,
|
||||
.t = PLL_TYPE_DIV,
|
||||
- .c = 1, },
|
||||
+ .c = 1,
|
||||
+ .eid = PMC_SYSPLL, },
|
||||
},
|
||||
|
||||
[PLL_ID_DDR] = {
|
|
@ -1,42 +0,0 @@
|
|||
From b2349278894bb381fa26a8717d3093d53f08fd36 Mon Sep 17 00:00:00 2001
|
||||
From: Eugen Hristev <eugen.hristev@microchip.com>
|
||||
Date: Thu, 19 Nov 2020 17:43:10 +0200
|
||||
Subject: [PATCH 104/247] clk: at91: clk-master: add 5th divisor for mck master
|
||||
|
||||
clk-master can have 5 divisors with a field width of 3 bits
|
||||
on some products.
|
||||
|
||||
Change the mask and number of divisors accordingly.
|
||||
|
||||
Reported-by: Mihai Sain <mihai.sain@microchip.com>
|
||||
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/1605800597-16720-5-git-send-email-claudiu.beznea@microchip.com
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/clk-master.c | 2 +-
|
||||
drivers/clk/at91/pmc.h | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/clk/at91/clk-master.c
|
||||
+++ b/drivers/clk/at91/clk-master.c
|
||||
@@ -15,7 +15,7 @@
|
||||
#define MASTER_PRES_MASK 0x7
|
||||
#define MASTER_PRES_MAX MASTER_PRES_MASK
|
||||
#define MASTER_DIV_SHIFT 8
|
||||
-#define MASTER_DIV_MASK 0x3
|
||||
+#define MASTER_DIV_MASK 0x7
|
||||
|
||||
#define PMC_MCR 0x30
|
||||
#define PMC_MCR_ID_MSK GENMASK(3, 0)
|
||||
--- a/drivers/clk/at91/pmc.h
|
||||
+++ b/drivers/clk/at91/pmc.h
|
||||
@@ -48,7 +48,7 @@ extern const struct clk_master_layout at
|
||||
|
||||
struct clk_master_characteristics {
|
||||
struct clk_range output;
|
||||
- u32 divisors[4];
|
||||
+ u32 divisors[5];
|
||||
u8 have_div3_pres;
|
||||
};
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
From c41f013e13962dcc78239d5e4834214d44556cfb Mon Sep 17 00:00:00 2001
|
||||
From: Eugen Hristev <eugen.hristev@microchip.com>
|
||||
Date: Thu, 19 Nov 2020 17:43:11 +0200
|
||||
Subject: [PATCH 105/247] clk: at91: sama7g5: add 5th divisor for mck0 layout
|
||||
and characteristics
|
||||
|
||||
This SoC has the 5th divisor for the mck0 master clock.
|
||||
Adapt the characteristics accordingly.
|
||||
|
||||
Reported-by: Mihai Sain <mihai.sain@microchip.com>
|
||||
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/1605800597-16720-6-git-send-email-claudiu.beznea@microchip.com
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/sama7g5.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/clk/at91/sama7g5.c
|
||||
+++ b/drivers/clk/at91/sama7g5.c
|
||||
@@ -775,13 +775,13 @@ static const struct clk_pll_characterist
|
||||
/* MCK0 characteristics. */
|
||||
static const struct clk_master_characteristics mck0_characteristics = {
|
||||
.output = { .min = 140000000, .max = 200000000 },
|
||||
- .divisors = { 1, 2, 4, 3 },
|
||||
+ .divisors = { 1, 2, 4, 3, 5 },
|
||||
.have_div3_pres = 1,
|
||||
};
|
||||
|
||||
/* MCK0 layout. */
|
||||
static const struct clk_master_layout mck0_layout = {
|
||||
- .mask = 0x373,
|
||||
+ .mask = 0x773,
|
||||
.pres_shift = 4,
|
||||
.offset = 0x28,
|
||||
};
|
|
@ -1,510 +0,0 @@
|
|||
From 6fe2927863de96edf35d8357712dbf83a489f556 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Thu, 19 Nov 2020 17:43:12 +0200
|
||||
Subject: [PATCH 106/247] clk: at91: clk-sam9x60-pll: allow runtime changes for
|
||||
pll
|
||||
|
||||
Allow runtime frequency changes for PLLs registered with proper flags.
|
||||
This is necessary for CPU PLL on SAMA7G5 which is used by DVFS.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/1605800597-16720-7-git-send-email-claudiu.beznea@microchip.com
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/clk-sam9x60-pll.c | 145 +++++++++++++++++++++++++----
|
||||
drivers/clk/at91/pmc.h | 4 +-
|
||||
drivers/clk/at91/sam9x60.c | 22 ++++-
|
||||
drivers/clk/at91/sama7g5.c | 67 +++++++++----
|
||||
4 files changed, 197 insertions(+), 41 deletions(-)
|
||||
|
||||
--- a/drivers/clk/at91/clk-sam9x60-pll.c
|
||||
+++ b/drivers/clk/at91/clk-sam9x60-pll.c
|
||||
@@ -229,6 +229,57 @@ static int sam9x60_frac_pll_set_rate(str
|
||||
return sam9x60_frac_pll_compute_mul_frac(core, rate, parent_rate, true);
|
||||
}
|
||||
|
||||
+static int sam9x60_frac_pll_set_rate_chg(struct clk_hw *hw, unsigned long rate,
|
||||
+ unsigned long parent_rate)
|
||||
+{
|
||||
+ struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
|
||||
+ struct sam9x60_frac *frac = to_sam9x60_frac(core);
|
||||
+ struct regmap *regmap = core->regmap;
|
||||
+ unsigned long irqflags;
|
||||
+ unsigned int val, cfrac, cmul;
|
||||
+ long ret;
|
||||
+
|
||||
+ ret = sam9x60_frac_pll_compute_mul_frac(core, rate, parent_rate, true);
|
||||
+ if (ret <= 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ spin_lock_irqsave(core->lock, irqflags);
|
||||
+
|
||||
+ regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, AT91_PMC_PLL_UPDT_ID_MSK,
|
||||
+ core->id);
|
||||
+ regmap_read(regmap, AT91_PMC_PLL_CTRL1, &val);
|
||||
+ cmul = (val & core->layout->mul_mask) >> core->layout->mul_shift;
|
||||
+ cfrac = (val & core->layout->frac_mask) >> core->layout->frac_shift;
|
||||
+
|
||||
+ if (cmul == frac->mul && cfrac == frac->frac)
|
||||
+ goto unlock;
|
||||
+
|
||||
+ regmap_write(regmap, AT91_PMC_PLL_CTRL1,
|
||||
+ (frac->mul << core->layout->mul_shift) |
|
||||
+ (frac->frac << core->layout->frac_shift));
|
||||
+
|
||||
+ regmap_update_bits(regmap, AT91_PMC_PLL_UPDT,
|
||||
+ AT91_PMC_PLL_UPDT_UPDATE | AT91_PMC_PLL_UPDT_ID_MSK,
|
||||
+ AT91_PMC_PLL_UPDT_UPDATE | core->id);
|
||||
+
|
||||
+ regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0,
|
||||
+ AT91_PMC_PLL_CTRL0_ENLOCK | AT91_PMC_PLL_CTRL0_ENPLL,
|
||||
+ AT91_PMC_PLL_CTRL0_ENLOCK |
|
||||
+ AT91_PMC_PLL_CTRL0_ENPLL);
|
||||
+
|
||||
+ regmap_update_bits(regmap, AT91_PMC_PLL_UPDT,
|
||||
+ AT91_PMC_PLL_UPDT_UPDATE | AT91_PMC_PLL_UPDT_ID_MSK,
|
||||
+ AT91_PMC_PLL_UPDT_UPDATE | core->id);
|
||||
+
|
||||
+ while (!sam9x60_pll_ready(regmap, core->id))
|
||||
+ cpu_relax();
|
||||
+
|
||||
+unlock:
|
||||
+ spin_unlock_irqrestore(core->lock, irqflags);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static const struct clk_ops sam9x60_frac_pll_ops = {
|
||||
.prepare = sam9x60_frac_pll_prepare,
|
||||
.unprepare = sam9x60_frac_pll_unprepare,
|
||||
@@ -238,6 +289,15 @@ static const struct clk_ops sam9x60_frac
|
||||
.set_rate = sam9x60_frac_pll_set_rate,
|
||||
};
|
||||
|
||||
+static const struct clk_ops sam9x60_frac_pll_ops_chg = {
|
||||
+ .prepare = sam9x60_frac_pll_prepare,
|
||||
+ .unprepare = sam9x60_frac_pll_unprepare,
|
||||
+ .is_prepared = sam9x60_frac_pll_is_prepared,
|
||||
+ .recalc_rate = sam9x60_frac_pll_recalc_rate,
|
||||
+ .round_rate = sam9x60_frac_pll_round_rate,
|
||||
+ .set_rate = sam9x60_frac_pll_set_rate_chg,
|
||||
+};
|
||||
+
|
||||
static int sam9x60_div_pll_prepare(struct clk_hw *hw)
|
||||
{
|
||||
struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
|
||||
@@ -384,6 +444,44 @@ static int sam9x60_div_pll_set_rate(stru
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int sam9x60_div_pll_set_rate_chg(struct clk_hw *hw, unsigned long rate,
|
||||
+ unsigned long parent_rate)
|
||||
+{
|
||||
+ struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
|
||||
+ struct sam9x60_div *div = to_sam9x60_div(core);
|
||||
+ struct regmap *regmap = core->regmap;
|
||||
+ unsigned long irqflags;
|
||||
+ unsigned int val, cdiv;
|
||||
+
|
||||
+ div->div = DIV_ROUND_CLOSEST(parent_rate, rate) - 1;
|
||||
+
|
||||
+ spin_lock_irqsave(core->lock, irqflags);
|
||||
+ regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, AT91_PMC_PLL_UPDT_ID_MSK,
|
||||
+ core->id);
|
||||
+ regmap_read(regmap, AT91_PMC_PLL_CTRL0, &val);
|
||||
+ cdiv = (val & core->layout->div_mask) >> core->layout->div_shift;
|
||||
+
|
||||
+ /* Stop if nothing changed. */
|
||||
+ if (cdiv == div->div)
|
||||
+ goto unlock;
|
||||
+
|
||||
+ regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0,
|
||||
+ core->layout->div_mask,
|
||||
+ (div->div << core->layout->div_shift));
|
||||
+
|
||||
+ regmap_update_bits(regmap, AT91_PMC_PLL_UPDT,
|
||||
+ AT91_PMC_PLL_UPDT_UPDATE | AT91_PMC_PLL_UPDT_ID_MSK,
|
||||
+ AT91_PMC_PLL_UPDT_UPDATE | core->id);
|
||||
+
|
||||
+ while (!sam9x60_pll_ready(regmap, core->id))
|
||||
+ cpu_relax();
|
||||
+
|
||||
+unlock:
|
||||
+ spin_unlock_irqrestore(core->lock, irqflags);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static const struct clk_ops sam9x60_div_pll_ops = {
|
||||
.prepare = sam9x60_div_pll_prepare,
|
||||
.unprepare = sam9x60_div_pll_unprepare,
|
||||
@@ -393,17 +491,26 @@ static const struct clk_ops sam9x60_div_
|
||||
.set_rate = sam9x60_div_pll_set_rate,
|
||||
};
|
||||
|
||||
+static const struct clk_ops sam9x60_div_pll_ops_chg = {
|
||||
+ .prepare = sam9x60_div_pll_prepare,
|
||||
+ .unprepare = sam9x60_div_pll_unprepare,
|
||||
+ .is_prepared = sam9x60_div_pll_is_prepared,
|
||||
+ .recalc_rate = sam9x60_div_pll_recalc_rate,
|
||||
+ .round_rate = sam9x60_div_pll_round_rate,
|
||||
+ .set_rate = sam9x60_div_pll_set_rate_chg,
|
||||
+};
|
||||
+
|
||||
struct clk_hw * __init
|
||||
sam9x60_clk_register_frac_pll(struct regmap *regmap, spinlock_t *lock,
|
||||
const char *name, const char *parent_name,
|
||||
struct clk_hw *parent_hw, u8 id,
|
||||
const struct clk_pll_characteristics *characteristics,
|
||||
- const struct clk_pll_layout *layout, bool critical)
|
||||
+ const struct clk_pll_layout *layout, u32 flags)
|
||||
{
|
||||
struct sam9x60_frac *frac;
|
||||
struct clk_hw *hw;
|
||||
struct clk_init_data init;
|
||||
- unsigned long parent_rate, flags;
|
||||
+ unsigned long parent_rate, irqflags;
|
||||
unsigned int val;
|
||||
int ret;
|
||||
|
||||
@@ -417,10 +524,12 @@ sam9x60_clk_register_frac_pll(struct reg
|
||||
init.name = name;
|
||||
init.parent_names = &parent_name;
|
||||
init.num_parents = 1;
|
||||
- init.ops = &sam9x60_frac_pll_ops;
|
||||
- init.flags = CLK_SET_RATE_GATE;
|
||||
- if (critical)
|
||||
- init.flags |= CLK_IS_CRITICAL;
|
||||
+ if (flags & CLK_SET_RATE_GATE)
|
||||
+ init.ops = &sam9x60_frac_pll_ops;
|
||||
+ else
|
||||
+ init.ops = &sam9x60_frac_pll_ops_chg;
|
||||
+
|
||||
+ init.flags = flags;
|
||||
|
||||
frac->core.id = id;
|
||||
frac->core.hw.init = &init;
|
||||
@@ -429,7 +538,7 @@ sam9x60_clk_register_frac_pll(struct reg
|
||||
frac->core.regmap = regmap;
|
||||
frac->core.lock = lock;
|
||||
|
||||
- spin_lock_irqsave(frac->core.lock, flags);
|
||||
+ spin_lock_irqsave(frac->core.lock, irqflags);
|
||||
if (sam9x60_pll_ready(regmap, id)) {
|
||||
regmap_update_bits(regmap, AT91_PMC_PLL_UPDT,
|
||||
AT91_PMC_PLL_UPDT_ID_MSK, id);
|
||||
@@ -457,7 +566,7 @@ sam9x60_clk_register_frac_pll(struct reg
|
||||
goto free;
|
||||
}
|
||||
}
|
||||
- spin_unlock_irqrestore(frac->core.lock, flags);
|
||||
+ spin_unlock_irqrestore(frac->core.lock, irqflags);
|
||||
|
||||
hw = &frac->core.hw;
|
||||
ret = clk_hw_register(NULL, hw);
|
||||
@@ -469,7 +578,7 @@ sam9x60_clk_register_frac_pll(struct reg
|
||||
return hw;
|
||||
|
||||
free:
|
||||
- spin_unlock_irqrestore(frac->core.lock, flags);
|
||||
+ spin_unlock_irqrestore(frac->core.lock, irqflags);
|
||||
kfree(frac);
|
||||
return hw;
|
||||
}
|
||||
@@ -478,12 +587,12 @@ struct clk_hw * __init
|
||||
sam9x60_clk_register_div_pll(struct regmap *regmap, spinlock_t *lock,
|
||||
const char *name, const char *parent_name, u8 id,
|
||||
const struct clk_pll_characteristics *characteristics,
|
||||
- const struct clk_pll_layout *layout, bool critical)
|
||||
+ const struct clk_pll_layout *layout, u32 flags)
|
||||
{
|
||||
struct sam9x60_div *div;
|
||||
struct clk_hw *hw;
|
||||
struct clk_init_data init;
|
||||
- unsigned long flags;
|
||||
+ unsigned long irqflags;
|
||||
unsigned int val;
|
||||
int ret;
|
||||
|
||||
@@ -497,11 +606,11 @@ sam9x60_clk_register_div_pll(struct regm
|
||||
init.name = name;
|
||||
init.parent_names = &parent_name;
|
||||
init.num_parents = 1;
|
||||
- init.ops = &sam9x60_div_pll_ops;
|
||||
- init.flags = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE |
|
||||
- CLK_SET_RATE_PARENT;
|
||||
- if (critical)
|
||||
- init.flags |= CLK_IS_CRITICAL;
|
||||
+ if (flags & CLK_SET_RATE_GATE)
|
||||
+ init.ops = &sam9x60_div_pll_ops;
|
||||
+ else
|
||||
+ init.ops = &sam9x60_div_pll_ops_chg;
|
||||
+ init.flags = flags;
|
||||
|
||||
div->core.id = id;
|
||||
div->core.hw.init = &init;
|
||||
@@ -510,14 +619,14 @@ sam9x60_clk_register_div_pll(struct regm
|
||||
div->core.regmap = regmap;
|
||||
div->core.lock = lock;
|
||||
|
||||
- spin_lock_irqsave(div->core.lock, flags);
|
||||
+ spin_lock_irqsave(div->core.lock, irqflags);
|
||||
|
||||
regmap_update_bits(regmap, AT91_PMC_PLL_UPDT,
|
||||
AT91_PMC_PLL_UPDT_ID_MSK, id);
|
||||
regmap_read(regmap, AT91_PMC_PLL_CTRL0, &val);
|
||||
div->div = FIELD_GET(PMC_PLL_CTRL0_DIV_MSK, val);
|
||||
|
||||
- spin_unlock_irqrestore(div->core.lock, flags);
|
||||
+ spin_unlock_irqrestore(div->core.lock, irqflags);
|
||||
|
||||
hw = &div->core.hw;
|
||||
ret = clk_hw_register(NULL, hw);
|
||||
--- a/drivers/clk/at91/pmc.h
|
||||
+++ b/drivers/clk/at91/pmc.h
|
||||
@@ -190,14 +190,14 @@ struct clk_hw * __init
|
||||
sam9x60_clk_register_div_pll(struct regmap *regmap, spinlock_t *lock,
|
||||
const char *name, const char *parent_name, u8 id,
|
||||
const struct clk_pll_characteristics *characteristics,
|
||||
- const struct clk_pll_layout *layout, bool critical);
|
||||
+ const struct clk_pll_layout *layout, u32 flags);
|
||||
|
||||
struct clk_hw * __init
|
||||
sam9x60_clk_register_frac_pll(struct regmap *regmap, spinlock_t *lock,
|
||||
const char *name, const char *parent_name,
|
||||
struct clk_hw *parent_hw, u8 id,
|
||||
const struct clk_pll_characteristics *characteristics,
|
||||
- const struct clk_pll_layout *layout, bool critical);
|
||||
+ const struct clk_pll_layout *layout, u32 flags);
|
||||
|
||||
struct clk_hw * __init
|
||||
at91_clk_register_programmable(struct regmap *regmap, const char *name,
|
||||
--- a/drivers/clk/at91/sam9x60.c
|
||||
+++ b/drivers/clk/at91/sam9x60.c
|
||||
@@ -224,13 +224,24 @@ static void __init sam9x60_pmc_setup(str
|
||||
hw = sam9x60_clk_register_frac_pll(regmap, &pmc_pll_lock, "pllack_fracck",
|
||||
"mainck", sam9x60_pmc->chws[PMC_MAIN],
|
||||
0, &plla_characteristics,
|
||||
- &pll_frac_layout, true);
|
||||
+ &pll_frac_layout,
|
||||
+ /*
|
||||
+ * This feeds pllack_divck which
|
||||
+ * feeds CPU. It should not be
|
||||
+ * disabled.
|
||||
+ */
|
||||
+ CLK_IS_CRITICAL | CLK_SET_RATE_GATE);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
hw = sam9x60_clk_register_div_pll(regmap, &pmc_pll_lock, "pllack_divck",
|
||||
"pllack_fracck", 0, &plla_characteristics,
|
||||
- &pll_div_layout, true);
|
||||
+ &pll_div_layout,
|
||||
+ /*
|
||||
+ * This feeds CPU. It should not
|
||||
+ * be disabled.
|
||||
+ */
|
||||
+ CLK_IS_CRITICAL | CLK_SET_RATE_GATE);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
@@ -239,13 +250,16 @@ static void __init sam9x60_pmc_setup(str
|
||||
hw = sam9x60_clk_register_frac_pll(regmap, &pmc_pll_lock, "upllck_fracck",
|
||||
"main_osc", main_osc_hw, 1,
|
||||
&upll_characteristics,
|
||||
- &pll_frac_layout, false);
|
||||
+ &pll_frac_layout, CLK_SET_RATE_GATE);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
hw = sam9x60_clk_register_div_pll(regmap, &pmc_pll_lock, "upllck_divck",
|
||||
"upllck_fracck", 1, &upll_characteristics,
|
||||
- &pll_div_layout, false);
|
||||
+ &pll_div_layout,
|
||||
+ CLK_SET_RATE_GATE |
|
||||
+ CLK_SET_PARENT_GATE |
|
||||
+ CLK_SET_RATE_PARENT);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
--- a/drivers/clk/at91/sama7g5.c
|
||||
+++ b/drivers/clk/at91/sama7g5.c
|
||||
@@ -95,15 +95,15 @@ static const struct clk_pll_layout pll_l
|
||||
* @p: clock parent
|
||||
* @l: clock layout
|
||||
* @t: clock type
|
||||
- * @f: true if clock is critical and cannot be disabled
|
||||
+ * @f: clock flags
|
||||
* @eid: export index in sama7g5->chws[] array
|
||||
*/
|
||||
static const struct {
|
||||
const char *n;
|
||||
const char *p;
|
||||
const struct clk_pll_layout *l;
|
||||
+ unsigned long f;
|
||||
u8 t;
|
||||
- u8 c;
|
||||
u8 eid;
|
||||
} sama7g5_plls[][PLL_ID_MAX] = {
|
||||
[PLL_ID_CPU] = {
|
||||
@@ -111,13 +111,18 @@ static const struct {
|
||||
.p = "mainck",
|
||||
.l = &pll_layout_frac,
|
||||
.t = PLL_TYPE_FRAC,
|
||||
- .c = 1, },
|
||||
+ /*
|
||||
+ * This feeds cpupll_divpmcck which feeds CPU. It should
|
||||
+ * not be disabled.
|
||||
+ */
|
||||
+ .f = CLK_IS_CRITICAL, },
|
||||
|
||||
{ .n = "cpupll_divpmcck",
|
||||
.p = "cpupll_fracck",
|
||||
.l = &pll_layout_divpmc,
|
||||
.t = PLL_TYPE_DIV,
|
||||
- .c = 1,
|
||||
+ /* This feeds CPU. It should not be disabled. */
|
||||
+ .f = CLK_IS_CRITICAL | CLK_SET_RATE_PARENT,
|
||||
.eid = PMC_CPUPLL, },
|
||||
},
|
||||
|
||||
@@ -126,13 +131,22 @@ static const struct {
|
||||
.p = "mainck",
|
||||
.l = &pll_layout_frac,
|
||||
.t = PLL_TYPE_FRAC,
|
||||
- .c = 1, },
|
||||
+ /*
|
||||
+ * This feeds syspll_divpmcck which may feed critial parts
|
||||
+ * of the systems like timers. Therefore it should not be
|
||||
+ * disabled.
|
||||
+ */
|
||||
+ .f = CLK_IS_CRITICAL | CLK_SET_RATE_GATE, },
|
||||
|
||||
{ .n = "syspll_divpmcck",
|
||||
.p = "syspll_fracck",
|
||||
.l = &pll_layout_divpmc,
|
||||
.t = PLL_TYPE_DIV,
|
||||
- .c = 1,
|
||||
+ /*
|
||||
+ * This may feed critial parts of the systems like timers.
|
||||
+ * Therefore it should not be disabled.
|
||||
+ */
|
||||
+ .f = CLK_IS_CRITICAL | CLK_SET_RATE_GATE,
|
||||
.eid = PMC_SYSPLL, },
|
||||
},
|
||||
|
||||
@@ -141,55 +155,71 @@ static const struct {
|
||||
.p = "mainck",
|
||||
.l = &pll_layout_frac,
|
||||
.t = PLL_TYPE_FRAC,
|
||||
- .c = 1, },
|
||||
+ /*
|
||||
+ * This feeds ddrpll_divpmcck which feeds DDR. It should not
|
||||
+ * be disabled.
|
||||
+ */
|
||||
+ .f = CLK_IS_CRITICAL | CLK_SET_RATE_GATE, },
|
||||
|
||||
{ .n = "ddrpll_divpmcck",
|
||||
.p = "ddrpll_fracck",
|
||||
.l = &pll_layout_divpmc,
|
||||
.t = PLL_TYPE_DIV,
|
||||
- .c = 1, },
|
||||
+ /* This feeds DDR. It should not be disabled. */
|
||||
+ .f = CLK_IS_CRITICAL | CLK_SET_RATE_GATE, },
|
||||
},
|
||||
|
||||
[PLL_ID_IMG] = {
|
||||
{ .n = "imgpll_fracck",
|
||||
.p = "mainck",
|
||||
.l = &pll_layout_frac,
|
||||
- .t = PLL_TYPE_FRAC, },
|
||||
+ .t = PLL_TYPE_FRAC,
|
||||
+ .f = CLK_SET_RATE_GATE, },
|
||||
|
||||
{ .n = "imgpll_divpmcck",
|
||||
.p = "imgpll_fracck",
|
||||
.l = &pll_layout_divpmc,
|
||||
- .t = PLL_TYPE_DIV, },
|
||||
+ .t = PLL_TYPE_DIV,
|
||||
+ .f = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE |
|
||||
+ CLK_SET_RATE_PARENT, },
|
||||
},
|
||||
|
||||
[PLL_ID_BAUD] = {
|
||||
{ .n = "baudpll_fracck",
|
||||
.p = "mainck",
|
||||
.l = &pll_layout_frac,
|
||||
- .t = PLL_TYPE_FRAC, },
|
||||
+ .t = PLL_TYPE_FRAC,
|
||||
+ .f = CLK_SET_RATE_GATE, },
|
||||
|
||||
{ .n = "baudpll_divpmcck",
|
||||
.p = "baudpll_fracck",
|
||||
.l = &pll_layout_divpmc,
|
||||
- .t = PLL_TYPE_DIV, },
|
||||
+ .t = PLL_TYPE_DIV,
|
||||
+ .f = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE |
|
||||
+ CLK_SET_RATE_PARENT, },
|
||||
},
|
||||
|
||||
[PLL_ID_AUDIO] = {
|
||||
{ .n = "audiopll_fracck",
|
||||
.p = "main_xtal",
|
||||
.l = &pll_layout_frac,
|
||||
- .t = PLL_TYPE_FRAC, },
|
||||
+ .t = PLL_TYPE_FRAC,
|
||||
+ .f = CLK_SET_RATE_GATE, },
|
||||
|
||||
{ .n = "audiopll_divpmcck",
|
||||
.p = "audiopll_fracck",
|
||||
.l = &pll_layout_divpmc,
|
||||
.t = PLL_TYPE_DIV,
|
||||
+ .f = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE |
|
||||
+ CLK_SET_RATE_PARENT,
|
||||
.eid = PMC_AUDIOPMCPLL, },
|
||||
|
||||
{ .n = "audiopll_diviock",
|
||||
.p = "audiopll_fracck",
|
||||
.l = &pll_layout_divio,
|
||||
.t = PLL_TYPE_DIV,
|
||||
+ .f = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE |
|
||||
+ CLK_SET_RATE_PARENT,
|
||||
.eid = PMC_AUDIOIOPLL, },
|
||||
},
|
||||
|
||||
@@ -197,12 +227,15 @@ static const struct {
|
||||
{ .n = "ethpll_fracck",
|
||||
.p = "main_xtal",
|
||||
.l = &pll_layout_frac,
|
||||
- .t = PLL_TYPE_FRAC, },
|
||||
+ .t = PLL_TYPE_FRAC,
|
||||
+ .f = CLK_SET_RATE_GATE, },
|
||||
|
||||
{ .n = "ethpll_divpmcck",
|
||||
.p = "ethpll_fracck",
|
||||
.l = &pll_layout_divpmc,
|
||||
- .t = PLL_TYPE_DIV, },
|
||||
+ .t = PLL_TYPE_DIV,
|
||||
+ .f = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE |
|
||||
+ CLK_SET_RATE_PARENT, },
|
||||
},
|
||||
};
|
||||
|
||||
@@ -890,7 +923,7 @@ static void __init sama7g5_pmc_setup(str
|
||||
sama7g5_plls[i][j].p, parent_hw, i,
|
||||
&pll_characteristics,
|
||||
sama7g5_plls[i][j].l,
|
||||
- sama7g5_plls[i][j].c);
|
||||
+ sama7g5_plls[i][j].f);
|
||||
break;
|
||||
|
||||
case PLL_TYPE_DIV:
|
||||
@@ -899,7 +932,7 @@ static void __init sama7g5_pmc_setup(str
|
||||
sama7g5_plls[i][j].p, i,
|
||||
&pll_characteristics,
|
||||
sama7g5_plls[i][j].l,
|
||||
- sama7g5_plls[i][j].c);
|
||||
+ sama7g5_plls[i][j].f);
|
||||
break;
|
||||
|
||||
default:
|
|
@ -1,196 +0,0 @@
|
|||
From 7cfe2dfe5ac7c72b904e4b59b240caa42721ee07 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Thu, 19 Nov 2020 17:43:13 +0200
|
||||
Subject: [PATCH 107/247] clk: at91: sama7g5: remove mck0 from parent list of
|
||||
other clocks
|
||||
|
||||
MCK0 is changed at runtime by DVFS. Due to this, since not all IPs
|
||||
are glitch free aware at MCK0 changes, remove MCK0 from parent list
|
||||
of other clocks (e.g. generic clock, programmable/system clock, MCKX).
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/1605800597-16720-8-git-send-email-claudiu.beznea@microchip.com
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/sama7g5.c | 55 ++++++++++++++++++--------------------
|
||||
1 file changed, 26 insertions(+), 29 deletions(-)
|
||||
|
||||
--- a/drivers/clk/at91/sama7g5.c
|
||||
+++ b/drivers/clk/at91/sama7g5.c
|
||||
@@ -280,7 +280,7 @@ static const struct {
|
||||
.ep = { "syspll_divpmcck", "ddrpll_divpmcck", "imgpll_divpmcck", },
|
||||
.ep_mux_table = { 5, 6, 7, },
|
||||
.ep_count = 3,
|
||||
- .ep_chg_id = 6, },
|
||||
+ .ep_chg_id = 5, },
|
||||
|
||||
{ .n = "mck4",
|
||||
.id = 4,
|
||||
@@ -313,7 +313,7 @@ static const struct {
|
||||
};
|
||||
|
||||
/* Mux table for programmable clocks. */
|
||||
-static u32 sama7g5_prog_mux_table[] = { 0, 1, 2, 3, 5, 6, 7, 8, 9, 10, };
|
||||
+static u32 sama7g5_prog_mux_table[] = { 0, 1, 2, 5, 6, 7, 8, 9, 10, };
|
||||
|
||||
/**
|
||||
* Peripheral clock description
|
||||
@@ -436,7 +436,7 @@ static const struct {
|
||||
.pp = { "audiopll_divpmcck", },
|
||||
.pp_mux_table = { 9, },
|
||||
.pp_count = 1,
|
||||
- .pp_chg_id = 4, },
|
||||
+ .pp_chg_id = 3, },
|
||||
|
||||
{ .n = "csi_gclk",
|
||||
.id = 33,
|
||||
@@ -548,7 +548,7 @@ static const struct {
|
||||
.pp = { "ethpll_divpmcck", },
|
||||
.pp_mux_table = { 10, },
|
||||
.pp_count = 1,
|
||||
- .pp_chg_id = 4, },
|
||||
+ .pp_chg_id = 3, },
|
||||
|
||||
{ .n = "gmac1_gclk",
|
||||
.id = 52,
|
||||
@@ -580,7 +580,7 @@ static const struct {
|
||||
.pp = { "syspll_divpmcck", "audiopll_divpmcck", },
|
||||
.pp_mux_table = { 5, 9, },
|
||||
.pp_count = 2,
|
||||
- .pp_chg_id = 5, },
|
||||
+ .pp_chg_id = 4, },
|
||||
|
||||
{ .n = "i2smcc1_gclk",
|
||||
.id = 58,
|
||||
@@ -588,7 +588,7 @@ static const struct {
|
||||
.pp = { "syspll_divpmcck", "audiopll_divpmcck", },
|
||||
.pp_mux_table = { 5, 9, },
|
||||
.pp_count = 2,
|
||||
- .pp_chg_id = 5, },
|
||||
+ .pp_chg_id = 4, },
|
||||
|
||||
{ .n = "mcan0_gclk",
|
||||
.id = 61,
|
||||
@@ -730,7 +730,7 @@ static const struct {
|
||||
.pp = { "syspll_divpmcck", "baudpll_divpmcck", },
|
||||
.pp_mux_table = { 5, 8, },
|
||||
.pp_count = 2,
|
||||
- .pp_chg_id = 5, },
|
||||
+ .pp_chg_id = 4, },
|
||||
|
||||
{ .n = "sdmmc1_gclk",
|
||||
.id = 81,
|
||||
@@ -738,7 +738,7 @@ static const struct {
|
||||
.pp = { "syspll_divpmcck", "baudpll_divpmcck", },
|
||||
.pp_mux_table = { 5, 8, },
|
||||
.pp_count = 2,
|
||||
- .pp_chg_id = 5, },
|
||||
+ .pp_chg_id = 4, },
|
||||
|
||||
{ .n = "sdmmc2_gclk",
|
||||
.id = 82,
|
||||
@@ -746,7 +746,7 @@ static const struct {
|
||||
.pp = { "syspll_divpmcck", "baudpll_divpmcck", },
|
||||
.pp_mux_table = { 5, 8, },
|
||||
.pp_count = 2,
|
||||
- .pp_chg_id = 5, },
|
||||
+ .pp_chg_id = 4, },
|
||||
|
||||
{ .n = "spdifrx_gclk",
|
||||
.id = 84,
|
||||
@@ -754,7 +754,7 @@ static const struct {
|
||||
.pp = { "syspll_divpmcck", "audiopll_divpmcck", },
|
||||
.pp_mux_table = { 5, 9, },
|
||||
.pp_count = 2,
|
||||
- .pp_chg_id = 5, },
|
||||
+ .pp_chg_id = 4, },
|
||||
|
||||
{ .n = "spdiftx_gclk",
|
||||
.id = 85,
|
||||
@@ -762,7 +762,7 @@ static const struct {
|
||||
.pp = { "syspll_divpmcck", "audiopll_divpmcck", },
|
||||
.pp_mux_table = { 5, 9, },
|
||||
.pp_count = 2,
|
||||
- .pp_chg_id = 5, },
|
||||
+ .pp_chg_id = 4, },
|
||||
|
||||
{ .n = "tcb0_ch0_gclk",
|
||||
.id = 88,
|
||||
@@ -961,9 +961,8 @@ static void __init sama7g5_pmc_setup(str
|
||||
parent_names[0] = md_slck_name;
|
||||
parent_names[1] = td_slck_name;
|
||||
parent_names[2] = "mainck";
|
||||
- parent_names[3] = "mck0";
|
||||
for (i = 0; i < ARRAY_SIZE(sama7g5_mckx); i++) {
|
||||
- u8 num_parents = 4 + sama7g5_mckx[i].ep_count;
|
||||
+ u8 num_parents = 3 + sama7g5_mckx[i].ep_count;
|
||||
u32 *mux_table;
|
||||
|
||||
mux_table = kmalloc_array(num_parents, sizeof(*mux_table),
|
||||
@@ -971,10 +970,10 @@ static void __init sama7g5_pmc_setup(str
|
||||
if (!mux_table)
|
||||
goto err_free;
|
||||
|
||||
- SAMA7G5_INIT_TABLE(mux_table, 4);
|
||||
- SAMA7G5_FILL_TABLE(&mux_table[4], sama7g5_mckx[i].ep_mux_table,
|
||||
+ SAMA7G5_INIT_TABLE(mux_table, 3);
|
||||
+ SAMA7G5_FILL_TABLE(&mux_table[3], sama7g5_mckx[i].ep_mux_table,
|
||||
sama7g5_mckx[i].ep_count);
|
||||
- SAMA7G5_FILL_TABLE(&parent_names[4], sama7g5_mckx[i].ep,
|
||||
+ SAMA7G5_FILL_TABLE(&parent_names[3], sama7g5_mckx[i].ep,
|
||||
sama7g5_mckx[i].ep_count);
|
||||
|
||||
hw = at91_clk_sama7g5_register_master(regmap, sama7g5_mckx[i].n,
|
||||
@@ -997,20 +996,19 @@ static void __init sama7g5_pmc_setup(str
|
||||
parent_names[0] = md_slck_name;
|
||||
parent_names[1] = td_slck_name;
|
||||
parent_names[2] = "mainck";
|
||||
- parent_names[3] = "mck0";
|
||||
- parent_names[4] = "syspll_divpmcck";
|
||||
- parent_names[5] = "ddrpll_divpmcck";
|
||||
- parent_names[6] = "imgpll_divpmcck";
|
||||
- parent_names[7] = "baudpll_divpmcck";
|
||||
- parent_names[8] = "audiopll_divpmcck";
|
||||
- parent_names[9] = "ethpll_divpmcck";
|
||||
+ parent_names[3] = "syspll_divpmcck";
|
||||
+ parent_names[4] = "ddrpll_divpmcck";
|
||||
+ parent_names[5] = "imgpll_divpmcck";
|
||||
+ parent_names[6] = "baudpll_divpmcck";
|
||||
+ parent_names[7] = "audiopll_divpmcck";
|
||||
+ parent_names[8] = "ethpll_divpmcck";
|
||||
for (i = 0; i < 8; i++) {
|
||||
char name[6];
|
||||
|
||||
snprintf(name, sizeof(name), "prog%d", i);
|
||||
|
||||
hw = at91_clk_register_programmable(regmap, name, parent_names,
|
||||
- 10, i,
|
||||
+ 9, i,
|
||||
&programmable_layout,
|
||||
sama7g5_prog_mux_table);
|
||||
if (IS_ERR(hw))
|
||||
@@ -1047,9 +1045,8 @@ static void __init sama7g5_pmc_setup(str
|
||||
parent_names[0] = md_slck_name;
|
||||
parent_names[1] = td_slck_name;
|
||||
parent_names[2] = "mainck";
|
||||
- parent_names[3] = "mck0";
|
||||
for (i = 0; i < ARRAY_SIZE(sama7g5_gck); i++) {
|
||||
- u8 num_parents = 4 + sama7g5_gck[i].pp_count;
|
||||
+ u8 num_parents = 3 + sama7g5_gck[i].pp_count;
|
||||
u32 *mux_table;
|
||||
|
||||
mux_table = kmalloc_array(num_parents, sizeof(*mux_table),
|
||||
@@ -1057,10 +1054,10 @@ static void __init sama7g5_pmc_setup(str
|
||||
if (!mux_table)
|
||||
goto err_free;
|
||||
|
||||
- SAMA7G5_INIT_TABLE(mux_table, 4);
|
||||
- SAMA7G5_FILL_TABLE(&mux_table[4], sama7g5_gck[i].pp_mux_table,
|
||||
+ SAMA7G5_INIT_TABLE(mux_table, 3);
|
||||
+ SAMA7G5_FILL_TABLE(&mux_table[3], sama7g5_gck[i].pp_mux_table,
|
||||
sama7g5_gck[i].pp_count);
|
||||
- SAMA7G5_FILL_TABLE(&parent_names[4], sama7g5_gck[i].pp,
|
||||
+ SAMA7G5_FILL_TABLE(&parent_names[3], sama7g5_gck[i].pp,
|
||||
sama7g5_gck[i].pp_count);
|
||||
|
||||
hw = at91_clk_register_generated(regmap, &pmc_pcr_lock,
|
|
@ -1,30 +0,0 @@
|
|||
From 8b88f1e9918c173b24b43015cdb713cdde9e4d17 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Thu, 19 Nov 2020 17:43:14 +0200
|
||||
Subject: [PATCH 108/247] clk: at91: sama7g5: decrease lower limit for MCK0
|
||||
rate
|
||||
|
||||
On SAMA7G5 CPU clock is changed at run-time by DVFS. Since MCK0 and
|
||||
CPU clock shares the same parent clock (CPUPLL clock) the MCK0 is
|
||||
also changed by DVFS to avoid over/under clocking of MCK0 consumers.
|
||||
The lower limit is changed to be able to set MCK0 accordingly by
|
||||
DVFS.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/1605800597-16720-9-git-send-email-claudiu.beznea@microchip.com
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/sama7g5.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/clk/at91/sama7g5.c
|
||||
+++ b/drivers/clk/at91/sama7g5.c
|
||||
@@ -807,7 +807,7 @@ static const struct clk_pll_characterist
|
||||
|
||||
/* MCK0 characteristics. */
|
||||
static const struct clk_master_characteristics mck0_characteristics = {
|
||||
- .output = { .min = 140000000, .max = 200000000 },
|
||||
+ .output = { .min = 50000000, .max = 200000000 },
|
||||
.divisors = { 1, 2, 4, 3, 5 },
|
||||
.have_div3_pres = 1,
|
||||
};
|
|
@ -1,221 +0,0 @@
|
|||
From 943ed75a2a5ab08582d3bc8025e8111903698763 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Thu, 19 Nov 2020 17:43:15 +0200
|
||||
Subject: [PATCH 109/247] clk: at91: sama7g5: do not allow cpu pll to go higher
|
||||
than 1GHz
|
||||
|
||||
Since CPU PLL feeds both CPU clock and MCK0, MCK0 cannot go higher
|
||||
than 200MHz and MCK0 maximum prescaller is 5 limit the CPU PLL at
|
||||
1GHz to avoid MCK0 overclocking while CPU PLL is changed by DVFS.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/1605800597-16720-10-git-send-email-claudiu.beznea@microchip.com
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/sama7g5.c | 61 +++++++++++++++++++++++++++++---------
|
||||
1 file changed, 47 insertions(+), 14 deletions(-)
|
||||
|
||||
--- a/drivers/clk/at91/sama7g5.c
|
||||
+++ b/drivers/clk/at91/sama7g5.c
|
||||
@@ -89,11 +89,40 @@ static const struct clk_pll_layout pll_l
|
||||
.endiv_shift = 30,
|
||||
};
|
||||
|
||||
+/*
|
||||
+ * CPU PLL output range.
|
||||
+ * Notice: The upper limit has been setup to 1000000002 due to hardware
|
||||
+ * block which cannot output exactly 1GHz.
|
||||
+ */
|
||||
+static const struct clk_range cpu_pll_outputs[] = {
|
||||
+ { .min = 2343750, .max = 1000000002 },
|
||||
+};
|
||||
+
|
||||
+/* PLL output range. */
|
||||
+static const struct clk_range pll_outputs[] = {
|
||||
+ { .min = 2343750, .max = 1200000000 },
|
||||
+};
|
||||
+
|
||||
+/* CPU PLL characteristics. */
|
||||
+static const struct clk_pll_characteristics cpu_pll_characteristics = {
|
||||
+ .input = { .min = 12000000, .max = 50000000 },
|
||||
+ .num_output = ARRAY_SIZE(cpu_pll_outputs),
|
||||
+ .output = cpu_pll_outputs,
|
||||
+};
|
||||
+
|
||||
+/* PLL characteristics. */
|
||||
+static const struct clk_pll_characteristics pll_characteristics = {
|
||||
+ .input = { .min = 12000000, .max = 50000000 },
|
||||
+ .num_output = ARRAY_SIZE(pll_outputs),
|
||||
+ .output = pll_outputs,
|
||||
+};
|
||||
+
|
||||
/**
|
||||
* PLL clocks description
|
||||
* @n: clock name
|
||||
* @p: clock parent
|
||||
* @l: clock layout
|
||||
+ * @c: clock characteristics
|
||||
* @t: clock type
|
||||
* @f: clock flags
|
||||
* @eid: export index in sama7g5->chws[] array
|
||||
@@ -102,6 +131,7 @@ static const struct {
|
||||
const char *n;
|
||||
const char *p;
|
||||
const struct clk_pll_layout *l;
|
||||
+ const struct clk_pll_characteristics *c;
|
||||
unsigned long f;
|
||||
u8 t;
|
||||
u8 eid;
|
||||
@@ -110,6 +140,7 @@ static const struct {
|
||||
{ .n = "cpupll_fracck",
|
||||
.p = "mainck",
|
||||
.l = &pll_layout_frac,
|
||||
+ .c = &cpu_pll_characteristics,
|
||||
.t = PLL_TYPE_FRAC,
|
||||
/*
|
||||
* This feeds cpupll_divpmcck which feeds CPU. It should
|
||||
@@ -120,6 +151,7 @@ static const struct {
|
||||
{ .n = "cpupll_divpmcck",
|
||||
.p = "cpupll_fracck",
|
||||
.l = &pll_layout_divpmc,
|
||||
+ .c = &cpu_pll_characteristics,
|
||||
.t = PLL_TYPE_DIV,
|
||||
/* This feeds CPU. It should not be disabled. */
|
||||
.f = CLK_IS_CRITICAL | CLK_SET_RATE_PARENT,
|
||||
@@ -130,6 +162,7 @@ static const struct {
|
||||
{ .n = "syspll_fracck",
|
||||
.p = "mainck",
|
||||
.l = &pll_layout_frac,
|
||||
+ .c = &pll_characteristics,
|
||||
.t = PLL_TYPE_FRAC,
|
||||
/*
|
||||
* This feeds syspll_divpmcck which may feed critial parts
|
||||
@@ -141,6 +174,7 @@ static const struct {
|
||||
{ .n = "syspll_divpmcck",
|
||||
.p = "syspll_fracck",
|
||||
.l = &pll_layout_divpmc,
|
||||
+ .c = &pll_characteristics,
|
||||
.t = PLL_TYPE_DIV,
|
||||
/*
|
||||
* This may feed critial parts of the systems like timers.
|
||||
@@ -154,6 +188,7 @@ static const struct {
|
||||
{ .n = "ddrpll_fracck",
|
||||
.p = "mainck",
|
||||
.l = &pll_layout_frac,
|
||||
+ .c = &pll_characteristics,
|
||||
.t = PLL_TYPE_FRAC,
|
||||
/*
|
||||
* This feeds ddrpll_divpmcck which feeds DDR. It should not
|
||||
@@ -164,6 +199,7 @@ static const struct {
|
||||
{ .n = "ddrpll_divpmcck",
|
||||
.p = "ddrpll_fracck",
|
||||
.l = &pll_layout_divpmc,
|
||||
+ .c = &pll_characteristics,
|
||||
.t = PLL_TYPE_DIV,
|
||||
/* This feeds DDR. It should not be disabled. */
|
||||
.f = CLK_IS_CRITICAL | CLK_SET_RATE_GATE, },
|
||||
@@ -173,12 +209,14 @@ static const struct {
|
||||
{ .n = "imgpll_fracck",
|
||||
.p = "mainck",
|
||||
.l = &pll_layout_frac,
|
||||
+ .c = &pll_characteristics,
|
||||
.t = PLL_TYPE_FRAC,
|
||||
.f = CLK_SET_RATE_GATE, },
|
||||
|
||||
{ .n = "imgpll_divpmcck",
|
||||
.p = "imgpll_fracck",
|
||||
.l = &pll_layout_divpmc,
|
||||
+ .c = &pll_characteristics,
|
||||
.t = PLL_TYPE_DIV,
|
||||
.f = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE |
|
||||
CLK_SET_RATE_PARENT, },
|
||||
@@ -188,12 +226,14 @@ static const struct {
|
||||
{ .n = "baudpll_fracck",
|
||||
.p = "mainck",
|
||||
.l = &pll_layout_frac,
|
||||
+ .c = &pll_characteristics,
|
||||
.t = PLL_TYPE_FRAC,
|
||||
.f = CLK_SET_RATE_GATE, },
|
||||
|
||||
{ .n = "baudpll_divpmcck",
|
||||
.p = "baudpll_fracck",
|
||||
.l = &pll_layout_divpmc,
|
||||
+ .c = &pll_characteristics,
|
||||
.t = PLL_TYPE_DIV,
|
||||
.f = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE |
|
||||
CLK_SET_RATE_PARENT, },
|
||||
@@ -203,12 +243,14 @@ static const struct {
|
||||
{ .n = "audiopll_fracck",
|
||||
.p = "main_xtal",
|
||||
.l = &pll_layout_frac,
|
||||
+ .c = &pll_characteristics,
|
||||
.t = PLL_TYPE_FRAC,
|
||||
.f = CLK_SET_RATE_GATE, },
|
||||
|
||||
{ .n = "audiopll_divpmcck",
|
||||
.p = "audiopll_fracck",
|
||||
.l = &pll_layout_divpmc,
|
||||
+ .c = &pll_characteristics,
|
||||
.t = PLL_TYPE_DIV,
|
||||
.f = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE |
|
||||
CLK_SET_RATE_PARENT,
|
||||
@@ -217,6 +259,7 @@ static const struct {
|
||||
{ .n = "audiopll_diviock",
|
||||
.p = "audiopll_fracck",
|
||||
.l = &pll_layout_divio,
|
||||
+ .c = &pll_characteristics,
|
||||
.t = PLL_TYPE_DIV,
|
||||
.f = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE |
|
||||
CLK_SET_RATE_PARENT,
|
||||
@@ -227,12 +270,14 @@ static const struct {
|
||||
{ .n = "ethpll_fracck",
|
||||
.p = "main_xtal",
|
||||
.l = &pll_layout_frac,
|
||||
+ .c = &pll_characteristics,
|
||||
.t = PLL_TYPE_FRAC,
|
||||
.f = CLK_SET_RATE_GATE, },
|
||||
|
||||
{ .n = "ethpll_divpmcck",
|
||||
.p = "ethpll_fracck",
|
||||
.l = &pll_layout_divpmc,
|
||||
+ .c = &pll_characteristics,
|
||||
.t = PLL_TYPE_DIV,
|
||||
.f = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE |
|
||||
CLK_SET_RATE_PARENT, },
|
||||
@@ -793,18 +838,6 @@ static const struct {
|
||||
.pp_chg_id = INT_MIN, },
|
||||
};
|
||||
|
||||
-/* PLL output range. */
|
||||
-static const struct clk_range pll_outputs[] = {
|
||||
- { .min = 2343750, .max = 1200000000 },
|
||||
-};
|
||||
-
|
||||
-/* PLL characteristics. */
|
||||
-static const struct clk_pll_characteristics pll_characteristics = {
|
||||
- .input = { .min = 12000000, .max = 50000000 },
|
||||
- .num_output = ARRAY_SIZE(pll_outputs),
|
||||
- .output = pll_outputs,
|
||||
-};
|
||||
-
|
||||
/* MCK0 characteristics. */
|
||||
static const struct clk_master_characteristics mck0_characteristics = {
|
||||
.output = { .min = 50000000, .max = 200000000 },
|
||||
@@ -921,7 +954,7 @@ static void __init sama7g5_pmc_setup(str
|
||||
hw = sam9x60_clk_register_frac_pll(regmap,
|
||||
&pmc_pll_lock, sama7g5_plls[i][j].n,
|
||||
sama7g5_plls[i][j].p, parent_hw, i,
|
||||
- &pll_characteristics,
|
||||
+ sama7g5_plls[i][j].c,
|
||||
sama7g5_plls[i][j].l,
|
||||
sama7g5_plls[i][j].f);
|
||||
break;
|
||||
@@ -930,7 +963,7 @@ static void __init sama7g5_pmc_setup(str
|
||||
hw = sam9x60_clk_register_div_pll(regmap,
|
||||
&pmc_pll_lock, sama7g5_plls[i][j].n,
|
||||
sama7g5_plls[i][j].p, i,
|
||||
- &pll_characteristics,
|
||||
+ sama7g5_plls[i][j].c,
|
||||
sama7g5_plls[i][j].l,
|
||||
sama7g5_plls[i][j].f);
|
||||
break;
|
File diff suppressed because it is too large
Load diff
|
@ -1,65 +0,0 @@
|
|||
From 36e97c421dd9f866e31fe14bcb7af01334791890 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Thu, 19 Nov 2020 17:43:17 +0200
|
||||
Subject: [PATCH 111/247] clk: at91: sama7g5: register cpu clock
|
||||
|
||||
Register CPU clock as being the master clock prescaler. This would
|
||||
be used by DVFS. The block schema of SAMA7G5's PMC contains also a divider
|
||||
between master clock prescaler and CPU (PMC_CPU_RATIO.RATIO) but the
|
||||
frequencies supported by SAMA7G5 could be directly received from
|
||||
CPUPLL + master clock prescaler and the extra divider would do no work in
|
||||
case it would be enabled.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/1605800597-16720-12-git-send-email-claudiu.beznea@microchip.com
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/sama7g5.c | 13 ++++++-------
|
||||
include/dt-bindings/clock/at91.h | 1 +
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/clk/at91/sama7g5.c
|
||||
+++ b/drivers/clk/at91/sama7g5.c
|
||||
@@ -904,7 +904,7 @@ static void __init sama7g5_pmc_setup(str
|
||||
if (IS_ERR(regmap))
|
||||
return;
|
||||
|
||||
- sama7g5_pmc = pmc_data_allocate(PMC_ETHPLL + 1,
|
||||
+ sama7g5_pmc = pmc_data_allocate(PMC_CPU + 1,
|
||||
nck(sama7g5_systemck),
|
||||
nck(sama7g5_periphck),
|
||||
nck(sama7g5_gck), 8);
|
||||
@@ -981,18 +981,17 @@ static void __init sama7g5_pmc_setup(str
|
||||
}
|
||||
}
|
||||
|
||||
- parent_names[0] = md_slck_name;
|
||||
- parent_names[1] = "mainck";
|
||||
- parent_names[2] = "cpupll_divpmcck";
|
||||
- parent_names[3] = "syspll_divpmcck";
|
||||
- hw = at91_clk_register_master_pres(regmap, "mck0_pres", 4, parent_names,
|
||||
+ parent_names[0] = "cpupll_divpmcck";
|
||||
+ hw = at91_clk_register_master_pres(regmap, "cpuck", 1, parent_names,
|
||||
&mck0_layout, &mck0_characteristics,
|
||||
&pmc_mck0_lock,
|
||||
CLK_SET_RATE_PARENT, 0);
|
||||
if (IS_ERR(hw))
|
||||
goto err_free;
|
||||
|
||||
- hw = at91_clk_register_master_div(regmap, "mck0_div", "mck0_pres",
|
||||
+ sama7g5_pmc->chws[PMC_CPU] = hw;
|
||||
+
|
||||
+ hw = at91_clk_register_master_div(regmap, "mck0", "cpuck",
|
||||
&mck0_layout, &mck0_characteristics,
|
||||
&pmc_mck0_lock, 0);
|
||||
if (IS_ERR(hw))
|
||||
--- a/include/dt-bindings/clock/at91.h
|
||||
+++ b/include/dt-bindings/clock/at91.h
|
||||
@@ -34,6 +34,7 @@
|
||||
#define PMC_AUDIOPMCPLL (PMC_MAIN + 6)
|
||||
#define PMC_AUDIOIOPLL (PMC_MAIN + 7)
|
||||
#define PMC_ETHPLL (PMC_MAIN + 8)
|
||||
+#define PMC_CPU (PMC_MAIN + 9)
|
||||
|
||||
#ifndef AT91_PMC_MOSCS
|
||||
#define AT91_PMC_MOSCS 0 /* MOSCS Flag */
|
|
@ -1,181 +0,0 @@
|
|||
From 5a25e2437af0db535b17da352fb16680a8dfdeda Mon Sep 17 00:00:00 2001
|
||||
From: Tudor Ambarus <tudor.ambarus@microchip.com>
|
||||
Date: Wed, 3 Feb 2021 17:43:32 +0200
|
||||
Subject: [PATCH 112/247] clk: at91: Fix the declaration of the clocks
|
||||
|
||||
These are all "early clocks" that require initialization just at
|
||||
of_clk_init() time. Use CLK_OF_DECLARE() to declare them.
|
||||
|
||||
This also fixes a problem that was spotted when fw_devlink was
|
||||
set to 'on' by default: the boards failed to boot. The reason is
|
||||
that CLK_OF_DECLARE_DRIVER() clears the OF_POPULATED and causes
|
||||
the consumers of the clock to be postponed by fw_devlink until
|
||||
the second initialization routine of the clock has been completed.
|
||||
One of the consumers of the clock is the timer, which is used as a
|
||||
clocksource, and needs the clock initialized early. Postponing the
|
||||
timers caused the fail at boot.
|
||||
|
||||
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
|
||||
Link: https://lore.kernel.org/r/20210203154332.470587-1-tudor.ambarus@microchip.com
|
||||
Acked-by: Saravana Kannan <saravanak@google.com>
|
||||
Tested-by: Eugen Hristev <eugen.hristev@microchip.com>
|
||||
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
|
||||
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/at91rm9200.c | 3 +--
|
||||
drivers/clk/at91/at91sam9260.c | 16 ++++++++--------
|
||||
drivers/clk/at91/at91sam9g45.c | 3 +--
|
||||
drivers/clk/at91/at91sam9n12.c | 3 +--
|
||||
drivers/clk/at91/at91sam9rl.c | 3 ++-
|
||||
drivers/clk/at91/at91sam9x5.c | 20 ++++++++++----------
|
||||
drivers/clk/at91/sama5d2.c | 3 ++-
|
||||
drivers/clk/at91/sama5d3.c | 2 +-
|
||||
drivers/clk/at91/sama5d4.c | 3 ++-
|
||||
9 files changed, 28 insertions(+), 28 deletions(-)
|
||||
|
||||
--- a/drivers/clk/at91/at91rm9200.c
|
||||
+++ b/drivers/clk/at91/at91rm9200.c
|
||||
@@ -215,5 +215,4 @@ err_free:
|
||||
* deferring properly. Once this is fixed, this can be switched to a platform
|
||||
* driver.
|
||||
*/
|
||||
-CLK_OF_DECLARE_DRIVER(at91rm9200_pmc, "atmel,at91rm9200-pmc",
|
||||
- at91rm9200_pmc_setup);
|
||||
+CLK_OF_DECLARE(at91rm9200_pmc, "atmel,at91rm9200-pmc", at91rm9200_pmc_setup);
|
||||
--- a/drivers/clk/at91/at91sam9260.c
|
||||
+++ b/drivers/clk/at91/at91sam9260.c
|
||||
@@ -491,26 +491,26 @@ static void __init at91sam9260_pmc_setup
|
||||
{
|
||||
at91sam926x_pmc_setup(np, &at91sam9260_data);
|
||||
}
|
||||
-CLK_OF_DECLARE_DRIVER(at91sam9260_pmc, "atmel,at91sam9260-pmc",
|
||||
- at91sam9260_pmc_setup);
|
||||
+
|
||||
+CLK_OF_DECLARE(at91sam9260_pmc, "atmel,at91sam9260-pmc", at91sam9260_pmc_setup);
|
||||
|
||||
static void __init at91sam9261_pmc_setup(struct device_node *np)
|
||||
{
|
||||
at91sam926x_pmc_setup(np, &at91sam9261_data);
|
||||
}
|
||||
-CLK_OF_DECLARE_DRIVER(at91sam9261_pmc, "atmel,at91sam9261-pmc",
|
||||
- at91sam9261_pmc_setup);
|
||||
+
|
||||
+CLK_OF_DECLARE(at91sam9261_pmc, "atmel,at91sam9261-pmc", at91sam9261_pmc_setup);
|
||||
|
||||
static void __init at91sam9263_pmc_setup(struct device_node *np)
|
||||
{
|
||||
at91sam926x_pmc_setup(np, &at91sam9263_data);
|
||||
}
|
||||
-CLK_OF_DECLARE_DRIVER(at91sam9263_pmc, "atmel,at91sam9263-pmc",
|
||||
- at91sam9263_pmc_setup);
|
||||
+
|
||||
+CLK_OF_DECLARE(at91sam9263_pmc, "atmel,at91sam9263-pmc", at91sam9263_pmc_setup);
|
||||
|
||||
static void __init at91sam9g20_pmc_setup(struct device_node *np)
|
||||
{
|
||||
at91sam926x_pmc_setup(np, &at91sam9g20_data);
|
||||
}
|
||||
-CLK_OF_DECLARE_DRIVER(at91sam9g20_pmc, "atmel,at91sam9g20-pmc",
|
||||
- at91sam9g20_pmc_setup);
|
||||
+
|
||||
+CLK_OF_DECLARE(at91sam9g20_pmc, "atmel,at91sam9g20-pmc", at91sam9g20_pmc_setup);
|
||||
--- a/drivers/clk/at91/at91sam9g45.c
|
||||
+++ b/drivers/clk/at91/at91sam9g45.c
|
||||
@@ -228,5 +228,4 @@ err_free:
|
||||
* The TCB is used as the clocksource so its clock is needed early. This means
|
||||
* this can't be a platform driver.
|
||||
*/
|
||||
-CLK_OF_DECLARE_DRIVER(at91sam9g45_pmc, "atmel,at91sam9g45-pmc",
|
||||
- at91sam9g45_pmc_setup);
|
||||
+CLK_OF_DECLARE(at91sam9g45_pmc, "atmel,at91sam9g45-pmc", at91sam9g45_pmc_setup);
|
||||
--- a/drivers/clk/at91/at91sam9n12.c
|
||||
+++ b/drivers/clk/at91/at91sam9n12.c
|
||||
@@ -255,5 +255,4 @@ err_free:
|
||||
* The TCB is used as the clocksource so its clock is needed early. This means
|
||||
* this can't be a platform driver.
|
||||
*/
|
||||
-CLK_OF_DECLARE_DRIVER(at91sam9n12_pmc, "atmel,at91sam9n12-pmc",
|
||||
- at91sam9n12_pmc_setup);
|
||||
+CLK_OF_DECLARE(at91sam9n12_pmc, "atmel,at91sam9n12-pmc", at91sam9n12_pmc_setup);
|
||||
--- a/drivers/clk/at91/at91sam9rl.c
|
||||
+++ b/drivers/clk/at91/at91sam9rl.c
|
||||
@@ -186,4 +186,5 @@ static void __init at91sam9rl_pmc_setup(
|
||||
err_free:
|
||||
kfree(at91sam9rl_pmc);
|
||||
}
|
||||
-CLK_OF_DECLARE_DRIVER(at91sam9rl_pmc, "atmel,at91sam9rl-pmc", at91sam9rl_pmc_setup);
|
||||
+
|
||||
+CLK_OF_DECLARE(at91sam9rl_pmc, "atmel,at91sam9rl-pmc", at91sam9rl_pmc_setup);
|
||||
--- a/drivers/clk/at91/at91sam9x5.c
|
||||
+++ b/drivers/clk/at91/at91sam9x5.c
|
||||
@@ -302,33 +302,33 @@ static void __init at91sam9g15_pmc_setup
|
||||
{
|
||||
at91sam9x5_pmc_setup(np, at91sam9g15_periphck, true);
|
||||
}
|
||||
-CLK_OF_DECLARE_DRIVER(at91sam9g15_pmc, "atmel,at91sam9g15-pmc",
|
||||
- at91sam9g15_pmc_setup);
|
||||
+
|
||||
+CLK_OF_DECLARE(at91sam9g15_pmc, "atmel,at91sam9g15-pmc", at91sam9g15_pmc_setup);
|
||||
|
||||
static void __init at91sam9g25_pmc_setup(struct device_node *np)
|
||||
{
|
||||
at91sam9x5_pmc_setup(np, at91sam9g25_periphck, false);
|
||||
}
|
||||
-CLK_OF_DECLARE_DRIVER(at91sam9g25_pmc, "atmel,at91sam9g25-pmc",
|
||||
- at91sam9g25_pmc_setup);
|
||||
+
|
||||
+CLK_OF_DECLARE(at91sam9g25_pmc, "atmel,at91sam9g25-pmc", at91sam9g25_pmc_setup);
|
||||
|
||||
static void __init at91sam9g35_pmc_setup(struct device_node *np)
|
||||
{
|
||||
at91sam9x5_pmc_setup(np, at91sam9g35_periphck, true);
|
||||
}
|
||||
-CLK_OF_DECLARE_DRIVER(at91sam9g35_pmc, "atmel,at91sam9g35-pmc",
|
||||
- at91sam9g35_pmc_setup);
|
||||
+
|
||||
+CLK_OF_DECLARE(at91sam9g35_pmc, "atmel,at91sam9g35-pmc", at91sam9g35_pmc_setup);
|
||||
|
||||
static void __init at91sam9x25_pmc_setup(struct device_node *np)
|
||||
{
|
||||
at91sam9x5_pmc_setup(np, at91sam9x25_periphck, false);
|
||||
}
|
||||
-CLK_OF_DECLARE_DRIVER(at91sam9x25_pmc, "atmel,at91sam9x25-pmc",
|
||||
- at91sam9x25_pmc_setup);
|
||||
+
|
||||
+CLK_OF_DECLARE(at91sam9x25_pmc, "atmel,at91sam9x25-pmc", at91sam9x25_pmc_setup);
|
||||
|
||||
static void __init at91sam9x35_pmc_setup(struct device_node *np)
|
||||
{
|
||||
at91sam9x5_pmc_setup(np, at91sam9x35_periphck, true);
|
||||
}
|
||||
-CLK_OF_DECLARE_DRIVER(at91sam9x35_pmc, "atmel,at91sam9x35-pmc",
|
||||
- at91sam9x35_pmc_setup);
|
||||
+
|
||||
+CLK_OF_DECLARE(at91sam9x35_pmc, "atmel,at91sam9x35-pmc", at91sam9x35_pmc_setup);
|
||||
--- a/drivers/clk/at91/sama5d2.c
|
||||
+++ b/drivers/clk/at91/sama5d2.c
|
||||
@@ -372,4 +372,5 @@ static void __init sama5d2_pmc_setup(str
|
||||
err_free:
|
||||
kfree(sama5d2_pmc);
|
||||
}
|
||||
-CLK_OF_DECLARE_DRIVER(sama5d2_pmc, "atmel,sama5d2-pmc", sama5d2_pmc_setup);
|
||||
+
|
||||
+CLK_OF_DECLARE(sama5d2_pmc, "atmel,sama5d2-pmc", sama5d2_pmc_setup);
|
||||
--- a/drivers/clk/at91/sama5d3.c
|
||||
+++ b/drivers/clk/at91/sama5d3.c
|
||||
@@ -255,4 +255,4 @@ err_free:
|
||||
* The TCB is used as the clocksource so its clock is needed early. This means
|
||||
* this can't be a platform driver.
|
||||
*/
|
||||
-CLK_OF_DECLARE_DRIVER(sama5d3_pmc, "atmel,sama5d3-pmc", sama5d3_pmc_setup);
|
||||
+CLK_OF_DECLARE(sama5d3_pmc, "atmel,sama5d3-pmc", sama5d3_pmc_setup);
|
||||
--- a/drivers/clk/at91/sama5d4.c
|
||||
+++ b/drivers/clk/at91/sama5d4.c
|
||||
@@ -286,4 +286,5 @@ static void __init sama5d4_pmc_setup(str
|
||||
err_free:
|
||||
kfree(sama5d4_pmc);
|
||||
}
|
||||
-CLK_OF_DECLARE_DRIVER(sama5d4_pmc, "atmel,sama5d4-pmc", sama5d4_pmc_setup);
|
||||
+
|
||||
+CLK_OF_DECLARE(sama5d4_pmc, "atmel,sama5d4-pmc", sama5d4_pmc_setup);
|
|
@ -1,45 +0,0 @@
|
|||
From 268b36c42b7d1e480dd56ecfec626a46f4b5975e Mon Sep 17 00:00:00 2001
|
||||
From: Bhaskar Chowdhury <unixbhaskar@gmail.com>
|
||||
Date: Sat, 13 Mar 2021 11:02:22 +0530
|
||||
Subject: [PATCH 113/247] clk: at91: Trivial typo fixes in the file sama7g5.c
|
||||
|
||||
s/critial/critical/ ......two different places
|
||||
s/parrent/parent/
|
||||
|
||||
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20210313053222.14706-1-unixbhaskar@gmail.com
|
||||
Acked-by: Randy Dunlap <rdunlap@infradead.org>
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/sama7g5.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/clk/at91/sama7g5.c
|
||||
+++ b/drivers/clk/at91/sama7g5.c
|
||||
@@ -166,7 +166,7 @@ static const struct {
|
||||
.c = &pll_characteristics,
|
||||
.t = PLL_TYPE_FRAC,
|
||||
/*
|
||||
- * This feeds syspll_divpmcck which may feed critial parts
|
||||
+ * This feeds syspll_divpmcck which may feed critical parts
|
||||
* of the systems like timers. Therefore it should not be
|
||||
* disabled.
|
||||
*/
|
||||
@@ -178,7 +178,7 @@ static const struct {
|
||||
.c = &pll_characteristics,
|
||||
.t = PLL_TYPE_DIV,
|
||||
/*
|
||||
- * This may feed critial parts of the systems like timers.
|
||||
+ * This may feed critical parts of the systems like timers.
|
||||
* Therefore it should not be disabled.
|
||||
*/
|
||||
.f = CLK_IS_CRITICAL | CLK_SET_RATE_GATE,
|
||||
@@ -455,7 +455,7 @@ static const struct {
|
||||
* @pp: PLL parents
|
||||
* @pp_mux_table: PLL parents mux table
|
||||
* @r: clock output range
|
||||
- * @pp_chg_id: id in parrent array of changeable PLL parent
|
||||
+ * @pp_chg_id: id in parent array of changeable PLL parent
|
||||
* @pp_count: PLL parents count
|
||||
* @id: clock id
|
||||
*/
|
|
@ -1,90 +0,0 @@
|
|||
From 9997227090cf529675aeb775585ec9f6c2f0f131 Mon Sep 17 00:00:00 2001
|
||||
From: Randy Dunlap <rdunlap@infradead.org>
|
||||
Date: Thu, 19 Aug 2021 15:32:37 -0700
|
||||
Subject: [PATCH 114/247] clk: at91: sama7g5: remove all kernel-doc &
|
||||
kernel-doc warnings
|
||||
|
||||
Remove all "/**" kernel-doc markers from sama7g5.c since they are
|
||||
all internal to this driver source file only.
|
||||
This eliminates 14 warnings that were reported by the kernel test robot.
|
||||
|
||||
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
|
||||
Reported-by: kernel test robot <lkp@intel.com>
|
||||
Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Cc: Michael Turquette <mturquette@baylibre.com>
|
||||
Cc: Stephen Boyd <sboyd@kernel.org>
|
||||
Cc: Eugen Hristev <eugen.hristev@microchip.com>
|
||||
Cc: linux-clk@vger.kernel.org
|
||||
Cc: linux-arm-kernel@lists.infradead.org
|
||||
Link: https://lore.kernel.org/r/20210819223237.20115-1-rdunlap@infradead.org
|
||||
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
||||
---
|
||||
drivers/clk/at91/sama7g5.c | 14 +++++++-------
|
||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/clk/at91/sama7g5.c
|
||||
+++ b/drivers/clk/at91/sama7g5.c
|
||||
@@ -35,7 +35,7 @@ static DEFINE_SPINLOCK(pmc_pll_lock);
|
||||
static DEFINE_SPINLOCK(pmc_mck0_lock);
|
||||
static DEFINE_SPINLOCK(pmc_mckX_lock);
|
||||
|
||||
-/**
|
||||
+/*
|
||||
* PLL clocks identifiers
|
||||
* @PLL_ID_CPU: CPU PLL identifier
|
||||
* @PLL_ID_SYS: System PLL identifier
|
||||
@@ -56,7 +56,7 @@ enum pll_ids {
|
||||
PLL_ID_MAX,
|
||||
};
|
||||
|
||||
-/**
|
||||
+/*
|
||||
* PLL type identifiers
|
||||
* @PLL_TYPE_FRAC: fractional PLL identifier
|
||||
* @PLL_TYPE_DIV: divider PLL identifier
|
||||
@@ -118,7 +118,7 @@ static const struct clk_pll_characterist
|
||||
.output = pll_outputs,
|
||||
};
|
||||
|
||||
-/**
|
||||
+/*
|
||||
* PLL clocks description
|
||||
* @n: clock name
|
||||
* @p: clock parent
|
||||
@@ -285,7 +285,7 @@ static const struct {
|
||||
},
|
||||
};
|
||||
|
||||
-/**
|
||||
+/*
|
||||
* Master clock (MCK[1..4]) description
|
||||
* @n: clock name
|
||||
* @ep: extra parents names array
|
||||
@@ -337,7 +337,7 @@ static const struct {
|
||||
.c = 1, },
|
||||
};
|
||||
|
||||
-/**
|
||||
+/*
|
||||
* System clock description
|
||||
* @n: clock name
|
||||
* @p: clock parent name
|
||||
@@ -361,7 +361,7 @@ static const struct {
|
||||
/* Mux table for programmable clocks. */
|
||||
static u32 sama7g5_prog_mux_table[] = { 0, 1, 2, 5, 6, 7, 8, 9, 10, };
|
||||
|
||||
-/**
|
||||
+/*
|
||||
* Peripheral clock description
|
||||
* @n: clock name
|
||||
* @p: clock parent name
|
||||
@@ -449,7 +449,7 @@ static const struct {
|
||||
{ .n = "uhphs_clk", .p = "mck1", .id = 106, },
|
||||
};
|
||||
|
||||
-/**
|
||||
+/*
|
||||
* Generic clock description
|
||||
* @n: clock name
|
||||
* @pp: PLL parents
|
|
@ -1,179 +0,0 @@
|
|||
From 89f37ac2780d113d3c17d329726c0e92a1400744 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Wed, 9 Dec 2020 15:03:32 +0200
|
||||
Subject: [PATCH 115/247] net: macb: add userio bits as platform configuration
|
||||
|
||||
This is necessary for SAMA7G5 as it uses different values for
|
||||
PHY interface and also introduces hdfctlen bit.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/cadence/macb.h | 10 +++++++++
|
||||
drivers/net/ethernet/cadence/macb_main.c | 28 ++++++++++++++++++++----
|
||||
2 files changed, 34 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/cadence/macb.h
|
||||
+++ b/drivers/net/ethernet/cadence/macb.h
|
||||
@@ -1104,6 +1104,14 @@ struct macb_pm_data {
|
||||
u32 usrio;
|
||||
};
|
||||
|
||||
+struct macb_usrio_config {
|
||||
+ u32 mii;
|
||||
+ u32 rmii;
|
||||
+ u32 rgmii;
|
||||
+ u32 refclk;
|
||||
+ u32 hdfctlen;
|
||||
+};
|
||||
+
|
||||
struct macb_config {
|
||||
u32 caps;
|
||||
unsigned int dma_burst_length;
|
||||
@@ -1112,6 +1120,7 @@ struct macb_config {
|
||||
struct clk **rx_clk, struct clk **tsu_clk);
|
||||
int (*init)(struct platform_device *pdev);
|
||||
int jumbo_max_len;
|
||||
+ const struct macb_usrio_config *usrio;
|
||||
};
|
||||
|
||||
struct tsu_incr {
|
||||
@@ -1244,6 +1253,7 @@ struct macb {
|
||||
u32 rx_intr_mask;
|
||||
|
||||
struct macb_pm_data pm_data;
|
||||
+ const struct macb_usrio_config *usrio;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MACB_USE_HWSTAMP
|
||||
--- a/drivers/net/ethernet/cadence/macb_main.c
|
||||
+++ b/drivers/net/ethernet/cadence/macb_main.c
|
||||
@@ -3828,15 +3828,15 @@ static int macb_init(struct platform_dev
|
||||
if (!(bp->caps & MACB_CAPS_USRIO_DISABLED)) {
|
||||
val = 0;
|
||||
if (phy_interface_mode_is_rgmii(bp->phy_interface))
|
||||
- val = GEM_BIT(RGMII);
|
||||
+ val = bp->usrio->rgmii;
|
||||
else if (bp->phy_interface == PHY_INTERFACE_MODE_RMII &&
|
||||
(bp->caps & MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII))
|
||||
- val = MACB_BIT(RMII);
|
||||
+ val = bp->usrio->rmii;
|
||||
else if (!(bp->caps & MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII))
|
||||
- val = MACB_BIT(MII);
|
||||
+ val = bp->usrio->mii;
|
||||
|
||||
if (bp->caps & MACB_CAPS_USRIO_HAS_CLKEN)
|
||||
- val |= MACB_BIT(CLKEN);
|
||||
+ val |= bp->usrio->refclk;
|
||||
|
||||
macb_or_gem_writel(bp, USRIO, val);
|
||||
}
|
||||
@@ -4354,6 +4354,13 @@ static int fu540_c000_init(struct platfo
|
||||
return macb_init(pdev);
|
||||
}
|
||||
|
||||
+static const struct macb_usrio_config macb_default_usrio = {
|
||||
+ .mii = MACB_BIT(MII),
|
||||
+ .rmii = MACB_BIT(RMII),
|
||||
+ .rgmii = GEM_BIT(RGMII),
|
||||
+ .refclk = MACB_BIT(CLKEN),
|
||||
+};
|
||||
+
|
||||
static const struct macb_config fu540_c000_config = {
|
||||
.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_JUMBO |
|
||||
MACB_CAPS_GEM_HAS_PTP,
|
||||
@@ -4361,12 +4368,14 @@ static const struct macb_config fu540_c0
|
||||
.clk_init = fu540_c000_clk_init,
|
||||
.init = fu540_c000_init,
|
||||
.jumbo_max_len = 10240,
|
||||
+ .usrio = &macb_default_usrio,
|
||||
};
|
||||
|
||||
static const struct macb_config at91sam9260_config = {
|
||||
.caps = MACB_CAPS_USRIO_HAS_CLKEN | MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII,
|
||||
.clk_init = macb_clk_init,
|
||||
.init = macb_init,
|
||||
+ .usrio = &macb_default_usrio,
|
||||
};
|
||||
|
||||
static const struct macb_config sama5d3macb_config = {
|
||||
@@ -4374,6 +4383,7 @@ static const struct macb_config sama5d3m
|
||||
| MACB_CAPS_USRIO_HAS_CLKEN | MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII,
|
||||
.clk_init = macb_clk_init,
|
||||
.init = macb_init,
|
||||
+ .usrio = &macb_default_usrio,
|
||||
};
|
||||
|
||||
static const struct macb_config pc302gem_config = {
|
||||
@@ -4381,6 +4391,7 @@ static const struct macb_config pc302gem
|
||||
.dma_burst_length = 16,
|
||||
.clk_init = macb_clk_init,
|
||||
.init = macb_init,
|
||||
+ .usrio = &macb_default_usrio,
|
||||
};
|
||||
|
||||
static const struct macb_config sama5d2_config = {
|
||||
@@ -4388,6 +4399,7 @@ static const struct macb_config sama5d2_
|
||||
.dma_burst_length = 16,
|
||||
.clk_init = macb_clk_init,
|
||||
.init = macb_init,
|
||||
+ .usrio = &macb_default_usrio,
|
||||
};
|
||||
|
||||
static const struct macb_config sama5d3_config = {
|
||||
@@ -4397,6 +4409,7 @@ static const struct macb_config sama5d3_
|
||||
.clk_init = macb_clk_init,
|
||||
.init = macb_init,
|
||||
.jumbo_max_len = 10240,
|
||||
+ .usrio = &macb_default_usrio,
|
||||
};
|
||||
|
||||
static const struct macb_config sama5d4_config = {
|
||||
@@ -4404,18 +4417,21 @@ static const struct macb_config sama5d4_
|
||||
.dma_burst_length = 4,
|
||||
.clk_init = macb_clk_init,
|
||||
.init = macb_init,
|
||||
+ .usrio = &macb_default_usrio,
|
||||
};
|
||||
|
||||
static const struct macb_config emac_config = {
|
||||
.caps = MACB_CAPS_NEEDS_RSTONUBR | MACB_CAPS_MACB_IS_EMAC,
|
||||
.clk_init = at91ether_clk_init,
|
||||
.init = at91ether_init,
|
||||
+ .usrio = &macb_default_usrio,
|
||||
};
|
||||
|
||||
static const struct macb_config np4_config = {
|
||||
.caps = MACB_CAPS_USRIO_DISABLED,
|
||||
.clk_init = macb_clk_init,
|
||||
.init = macb_init,
|
||||
+ .usrio = &macb_default_usrio,
|
||||
};
|
||||
|
||||
static const struct macb_config zynqmp_config = {
|
||||
@@ -4426,6 +4442,7 @@ static const struct macb_config zynqmp_c
|
||||
.clk_init = macb_clk_init,
|
||||
.init = macb_init,
|
||||
.jumbo_max_len = 10240,
|
||||
+ .usrio = &macb_default_usrio,
|
||||
};
|
||||
|
||||
static const struct macb_config zynq_config = {
|
||||
@@ -4434,6 +4451,7 @@ static const struct macb_config zynq_con
|
||||
.dma_burst_length = 16,
|
||||
.clk_init = macb_clk_init,
|
||||
.init = macb_init,
|
||||
+ .usrio = &macb_default_usrio,
|
||||
};
|
||||
|
||||
static const struct of_device_id macb_dt_ids[] = {
|
||||
@@ -4554,6 +4572,8 @@ static int macb_probe(struct platform_de
|
||||
bp->wol |= MACB_WOL_HAS_MAGIC_PACKET;
|
||||
device_set_wakeup_capable(&pdev->dev, bp->wol & MACB_WOL_HAS_MAGIC_PACKET);
|
||||
|
||||
+ bp->usrio = macb_config->usrio;
|
||||
+
|
||||
spin_lock_init(&bp->lock);
|
||||
|
||||
/* setup capabilities */
|
|
@ -1,85 +0,0 @@
|
|||
From 1b15259551b701f416aa024050a2e619860bd0d8 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Wed, 9 Dec 2020 15:03:33 +0200
|
||||
Subject: [PATCH 116/247] net: macb: add capability to not set the clock rate
|
||||
|
||||
SAMA7G5's ethernet IPs TX clock could be provided by its generic clock or
|
||||
by the external clock provided by the PHY. The internal IP logic divides
|
||||
properly this clock depending on the link speed. The patch adds a new
|
||||
capability so that macb_set_tx_clock() to not be called for IPs having
|
||||
this capability (the clock rate, in case of generic clock, is set at the
|
||||
boot time via device tree and the driver only enables it).
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/cadence/macb.h | 1 +
|
||||
drivers/net/ethernet/cadence/macb_main.c | 18 +++++++++---------
|
||||
2 files changed, 10 insertions(+), 9 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/cadence/macb.h
|
||||
+++ b/drivers/net/ethernet/cadence/macb.h
|
||||
@@ -658,6 +658,7 @@
|
||||
#define MACB_CAPS_GEM_HAS_PTP 0x00000040
|
||||
#define MACB_CAPS_BD_RD_PREFETCH 0x00000080
|
||||
#define MACB_CAPS_NEEDS_RSTONUBR 0x00000100
|
||||
+#define MACB_CAPS_CLK_HW_CHG 0x04000000
|
||||
#define MACB_CAPS_MACB_IS_EMAC 0x08000000
|
||||
#define MACB_CAPS_FIFO_MODE 0x10000000
|
||||
#define MACB_CAPS_GIGABIT_MODE_AVAILABLE 0x20000000
|
||||
--- a/drivers/net/ethernet/cadence/macb_main.c
|
||||
+++ b/drivers/net/ethernet/cadence/macb_main.c
|
||||
@@ -457,15 +457,14 @@ static void macb_init_buffers(struct mac
|
||||
|
||||
/**
|
||||
* macb_set_tx_clk() - Set a clock to a new frequency
|
||||
- * @clk: Pointer to the clock to change
|
||||
+ * @bp: pointer to struct macb
|
||||
* @speed: New frequency in Hz
|
||||
- * @dev: Pointer to the struct net_device
|
||||
*/
|
||||
-static void macb_set_tx_clk(struct clk *clk, int speed, struct net_device *dev)
|
||||
+static void macb_set_tx_clk(struct macb *bp, int speed)
|
||||
{
|
||||
long ferr, rate, rate_rounded;
|
||||
|
||||
- if (!clk)
|
||||
+ if (!bp->tx_clk || !(bp->caps & MACB_CAPS_CLK_HW_CHG))
|
||||
return;
|
||||
|
||||
switch (speed) {
|
||||
@@ -482,7 +481,7 @@ static void macb_set_tx_clk(struct clk *
|
||||
return;
|
||||
}
|
||||
|
||||
- rate_rounded = clk_round_rate(clk, rate);
|
||||
+ rate_rounded = clk_round_rate(bp->tx_clk, rate);
|
||||
if (rate_rounded < 0)
|
||||
return;
|
||||
|
||||
@@ -492,11 +491,12 @@ static void macb_set_tx_clk(struct clk *
|
||||
ferr = abs(rate_rounded - rate);
|
||||
ferr = DIV_ROUND_UP(ferr, rate / 100000);
|
||||
if (ferr > 5)
|
||||
- netdev_warn(dev, "unable to generate target frequency: %ld Hz\n",
|
||||
+ netdev_warn(bp->dev,
|
||||
+ "unable to generate target frequency: %ld Hz\n",
|
||||
rate);
|
||||
|
||||
- if (clk_set_rate(clk, rate_rounded))
|
||||
- netdev_err(dev, "adjusting tx_clk failed.\n");
|
||||
+ if (clk_set_rate(bp->tx_clk, rate_rounded))
|
||||
+ netdev_err(bp->dev, "adjusting tx_clk failed.\n");
|
||||
}
|
||||
|
||||
static void macb_validate(struct phylink_config *config,
|
||||
@@ -649,7 +649,7 @@ static void macb_mac_link_up(struct phyl
|
||||
if (rx_pause)
|
||||
ctrl |= MACB_BIT(PAE);
|
||||
|
||||
- macb_set_tx_clk(bp->tx_clk, speed, ndev);
|
||||
+ macb_set_tx_clk(bp, speed);
|
||||
|
||||
/* Initialize rings & buffers as clearing MACB_BIT(TE) in link down
|
||||
* cleared the pipeline and control registers.
|
|
@ -1,82 +0,0 @@
|
|||
From 935d9aae15ee245a1bc6e322cbef02566a8996cc Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Wed, 9 Dec 2020 15:03:34 +0200
|
||||
Subject: [PATCH 117/247] net: macb: add function to disable all macb clocks
|
||||
|
||||
Add function to disable all macb clocks.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Suggested-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/cadence/macb_main.c | 38 +++++++++++++-----------
|
||||
1 file changed, 21 insertions(+), 17 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/cadence/macb_main.c
|
||||
+++ b/drivers/net/ethernet/cadence/macb_main.c
|
||||
@@ -3603,6 +3603,20 @@ static void macb_probe_queues(void __iom
|
||||
*num_queues = hweight32(*queue_mask);
|
||||
}
|
||||
|
||||
+static void macb_clks_disable(struct clk *pclk, struct clk *hclk, struct clk *tx_clk,
|
||||
+ struct clk *rx_clk, struct clk *tsu_clk)
|
||||
+{
|
||||
+ struct clk_bulk_data clks[] = {
|
||||
+ { .clk = tsu_clk, },
|
||||
+ { .clk = rx_clk, },
|
||||
+ { .clk = pclk, },
|
||||
+ { .clk = hclk, },
|
||||
+ { .clk = tx_clk },
|
||||
+ };
|
||||
+
|
||||
+ clk_bulk_disable_unprepare(ARRAY_SIZE(clks), clks);
|
||||
+}
|
||||
+
|
||||
static int macb_clk_init(struct platform_device *pdev, struct clk **pclk,
|
||||
struct clk **hclk, struct clk **tx_clk,
|
||||
struct clk **rx_clk, struct clk **tsu_clk)
|
||||
@@ -4665,11 +4679,7 @@ err_out_free_netdev:
|
||||
free_netdev(dev);
|
||||
|
||||
err_disable_clocks:
|
||||
- clk_disable_unprepare(tx_clk);
|
||||
- clk_disable_unprepare(hclk);
|
||||
- clk_disable_unprepare(pclk);
|
||||
- clk_disable_unprepare(rx_clk);
|
||||
- clk_disable_unprepare(tsu_clk);
|
||||
+ macb_clks_disable(pclk, hclk, tx_clk, rx_clk, tsu_clk);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
pm_runtime_set_suspended(&pdev->dev);
|
||||
pm_runtime_dont_use_autosuspend(&pdev->dev);
|
||||
@@ -4694,11 +4704,8 @@ static int macb_remove(struct platform_d
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
pm_runtime_dont_use_autosuspend(&pdev->dev);
|
||||
if (!pm_runtime_suspended(&pdev->dev)) {
|
||||
- clk_disable_unprepare(bp->tx_clk);
|
||||
- clk_disable_unprepare(bp->hclk);
|
||||
- clk_disable_unprepare(bp->pclk);
|
||||
- clk_disable_unprepare(bp->rx_clk);
|
||||
- clk_disable_unprepare(bp->tsu_clk);
|
||||
+ macb_clks_disable(bp->pclk, bp->hclk, bp->tx_clk,
|
||||
+ bp->rx_clk, bp->tsu_clk);
|
||||
pm_runtime_set_suspended(&pdev->dev);
|
||||
}
|
||||
phylink_destroy(bp->phylink);
|
||||
@@ -4877,13 +4884,10 @@ static int __maybe_unused macb_runtime_s
|
||||
struct net_device *netdev = dev_get_drvdata(dev);
|
||||
struct macb *bp = netdev_priv(netdev);
|
||||
|
||||
- if (!(device_may_wakeup(dev))) {
|
||||
- clk_disable_unprepare(bp->tx_clk);
|
||||
- clk_disable_unprepare(bp->hclk);
|
||||
- clk_disable_unprepare(bp->pclk);
|
||||
- clk_disable_unprepare(bp->rx_clk);
|
||||
- }
|
||||
- clk_disable_unprepare(bp->tsu_clk);
|
||||
+ if (!(device_may_wakeup(dev)))
|
||||
+ macb_clks_disable(bp->pclk, bp->hclk, bp->tx_clk, bp->rx_clk, bp->tsu_clk);
|
||||
+ else
|
||||
+ macb_clks_disable(NULL, NULL, NULL, NULL, bp->tsu_clk);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
From 9692c07ee8bf8f68b74d553d861d092e33264781 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Wed, 9 Dec 2020 15:03:35 +0200
|
||||
Subject: [PATCH 118/247] net: macb: unprepare clocks in case of failure
|
||||
|
||||
Unprepare clocks in case of any failure in fu540_c000_clk_init().
|
||||
|
||||
Fixes: c218ad559020 ("macb: Add support for SiFive FU540-C000")
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/cadence/macb_main.c | 24 ++++++++++++++++++------
|
||||
1 file changed, 18 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/cadence/macb_main.c
|
||||
+++ b/drivers/net/ethernet/cadence/macb_main.c
|
||||
@@ -4335,8 +4335,10 @@ static int fu540_c000_clk_init(struct pl
|
||||
return err;
|
||||
|
||||
mgmt = devm_kzalloc(&pdev->dev, sizeof(*mgmt), GFP_KERNEL);
|
||||
- if (!mgmt)
|
||||
- return -ENOMEM;
|
||||
+ if (!mgmt) {
|
||||
+ err = -ENOMEM;
|
||||
+ goto err_disable_clks;
|
||||
+ }
|
||||
|
||||
init.name = "sifive-gemgxl-mgmt";
|
||||
init.ops = &fu540_c000_ops;
|
||||
@@ -4347,16 +4349,26 @@ static int fu540_c000_clk_init(struct pl
|
||||
mgmt->hw.init = &init;
|
||||
|
||||
*tx_clk = devm_clk_register(&pdev->dev, &mgmt->hw);
|
||||
- if (IS_ERR(*tx_clk))
|
||||
- return PTR_ERR(*tx_clk);
|
||||
+ if (IS_ERR(*tx_clk)) {
|
||||
+ err = PTR_ERR(*tx_clk);
|
||||
+ goto err_disable_clks;
|
||||
+ }
|
||||
|
||||
err = clk_prepare_enable(*tx_clk);
|
||||
- if (err)
|
||||
+ if (err) {
|
||||
dev_err(&pdev->dev, "failed to enable tx_clk (%u)\n", err);
|
||||
- else
|
||||
+ *tx_clk = NULL;
|
||||
+ goto err_disable_clks;
|
||||
+ } else {
|
||||
dev_info(&pdev->dev, "Registered clk switch '%s'\n", init.name);
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
+
|
||||
+err_disable_clks:
|
||||
+ macb_clks_disable(*pclk, *hclk, *tx_clk, *rx_clk, *tsu_clk);
|
||||
+
|
||||
+ return err;
|
||||
}
|
||||
|
||||
static int fu540_c000_init(struct platform_device *pdev)
|
|
@ -1,54 +0,0 @@
|
|||
From 0085cd8576ceeaddeedf973b939b41ba96e3f77c Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Wed, 9 Dec 2020 15:03:38 +0200
|
||||
Subject: [PATCH 119/247] net: macb: add support for sama7g5 gem interface
|
||||
|
||||
Add support for SAMA7G5 gigabit ethernet interface.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/cadence/macb_main.c | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
--- a/drivers/net/ethernet/cadence/macb_main.c
|
||||
+++ b/drivers/net/ethernet/cadence/macb_main.c
|
||||
@@ -4387,6 +4387,14 @@ static const struct macb_usrio_config ma
|
||||
.refclk = MACB_BIT(CLKEN),
|
||||
};
|
||||
|
||||
+static const struct macb_usrio_config sama7g5_usrio = {
|
||||
+ .mii = 0,
|
||||
+ .rmii = 1,
|
||||
+ .rgmii = 2,
|
||||
+ .refclk = BIT(2),
|
||||
+ .hdfctlen = BIT(6),
|
||||
+};
|
||||
+
|
||||
static const struct macb_config fu540_c000_config = {
|
||||
.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_JUMBO |
|
||||
MACB_CAPS_GEM_HAS_PTP,
|
||||
@@ -4480,6 +4488,14 @@ static const struct macb_config zynq_con
|
||||
.usrio = &macb_default_usrio,
|
||||
};
|
||||
|
||||
+static const struct macb_config sama7g5_gem_config = {
|
||||
+ .caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_CLK_HW_CHG,
|
||||
+ .dma_burst_length = 16,
|
||||
+ .clk_init = macb_clk_init,
|
||||
+ .init = macb_init,
|
||||
+ .usrio = &sama7g5_usrio,
|
||||
+};
|
||||
+
|
||||
static const struct of_device_id macb_dt_ids[] = {
|
||||
{ .compatible = "cdns,at32ap7000-macb" },
|
||||
{ .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config },
|
||||
@@ -4497,6 +4513,7 @@ static const struct of_device_id macb_dt
|
||||
{ .compatible = "cdns,zynqmp-gem", .data = &zynqmp_config},
|
||||
{ .compatible = "cdns,zynq-gem", .data = &zynq_config },
|
||||
{ .compatible = "sifive,fu540-c000-gem", .data = &fu540_c000_config },
|
||||
+ { .compatible = "microchip,sama7g5-gem", .data = &sama7g5_gem_config },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, macb_dt_ids);
|
|
@ -1,39 +0,0 @@
|
|||
From a42f90357cfcfcf5cdade4594ad79a1eae633a9f Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Wed, 9 Dec 2020 15:03:39 +0200
|
||||
Subject: [PATCH 120/247] net: macb: add support for sama7g5 emac interface
|
||||
|
||||
Add support for SAMA7G5 10/100Mbps interface.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/cadence/macb_main.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
--- a/drivers/net/ethernet/cadence/macb_main.c
|
||||
+++ b/drivers/net/ethernet/cadence/macb_main.c
|
||||
@@ -4496,6 +4496,14 @@ static const struct macb_config sama7g5_
|
||||
.usrio = &sama7g5_usrio,
|
||||
};
|
||||
|
||||
+static const struct macb_config sama7g5_emac_config = {
|
||||
+ .caps = MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII | MACB_CAPS_USRIO_HAS_CLKEN,
|
||||
+ .dma_burst_length = 16,
|
||||
+ .clk_init = macb_clk_init,
|
||||
+ .init = macb_init,
|
||||
+ .usrio = &sama7g5_usrio,
|
||||
+};
|
||||
+
|
||||
static const struct of_device_id macb_dt_ids[] = {
|
||||
{ .compatible = "cdns,at32ap7000-macb" },
|
||||
{ .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config },
|
||||
@@ -4514,6 +4522,7 @@ static const struct of_device_id macb_dt
|
||||
{ .compatible = "cdns,zynq-gem", .data = &zynq_config },
|
||||
{ .compatible = "sifive,fu540-c000-gem", .data = &fu540_c000_config },
|
||||
{ .compatible = "microchip,sama7g5-gem", .data = &sama7g5_gem_config },
|
||||
+ { .compatible = "microchip,sama7g5-emac", .data = &sama7g5_emac_config },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, macb_dt_ids);
|
|
@ -1,28 +0,0 @@
|
|||
From 5ac0e1f5577b266543756521b1a749003b0f3686 Mon Sep 17 00:00:00 2001
|
||||
From: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
|
||||
Date: Mon, 12 Oct 2020 17:19:11 +0300
|
||||
Subject: [PATCH 121/247] ASoC: pcm5102a: Make codec selectable
|
||||
|
||||
The TI PCM5102A codec driver can be used with the generic sound card
|
||||
drivers, so it should be selectable. For example, with the addition
|
||||
of #sound-dai-cells = <0> property in DT, it can be used with simple/graph
|
||||
card drivers.
|
||||
|
||||
Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
|
||||
Link: https://lore.kernel.org/r/20201012141911.3150996-1-codrin.ciubotariu@microchip.com
|
||||
Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
---
|
||||
sound/soc/codecs/Kconfig | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/sound/soc/codecs/Kconfig
|
||||
+++ b/sound/soc/codecs/Kconfig
|
||||
@@ -1007,7 +1007,7 @@ config SND_SOC_PCM3168A_SPI
|
||||
select REGMAP_SPI
|
||||
|
||||
config SND_SOC_PCM5102A
|
||||
- tristate
|
||||
+ tristate "Texas Instruments PCM5102A CODEC"
|
||||
|
||||
config SND_SOC_PCM512x
|
||||
tristate
|
|
@ -1,30 +0,0 @@
|
|||
From f4389949bf422fe04775c17b833100fa0e95ea68 Mon Sep 17 00:00:00 2001
|
||||
From: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
|
||||
Date: Tue, 3 Nov 2020 12:05:54 +0200
|
||||
Subject: [PATCH 122/247] ASoC: atmel-i2s: do not warn if muxclk is missing
|
||||
|
||||
Besides the fact that muxclk is optional, muxclk can be set using
|
||||
assigned-clocks, removing the need to set it in driver. The warning is
|
||||
thus unneeded, so we can transform it in a debug print, eventually to just
|
||||
reflect that muxclk was not set by the driver.
|
||||
|
||||
Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
|
||||
Link: https://lore.kernel.org/r/20201103100554.1307190-1-codrin.ciubotariu@microchip.com
|
||||
Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
---
|
||||
sound/soc/atmel/atmel-i2s.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/sound/soc/atmel/atmel-i2s.c
|
||||
+++ b/sound/soc/atmel/atmel-i2s.c
|
||||
@@ -581,8 +581,8 @@ static int atmel_i2s_sama5d2_mck_init(st
|
||||
err = PTR_ERR(muxclk);
|
||||
if (err == -EPROBE_DEFER)
|
||||
return -EPROBE_DEFER;
|
||||
- dev_warn(dev->dev,
|
||||
- "failed to get the I2S clock control: %d\n", err);
|
||||
+ dev_dbg(dev->dev,
|
||||
+ "failed to get the I2S clock control: %d\n", err);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From f5a73f3bb600b96b6149f2115360e1d0d51fbac4 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Fri, 13 Nov 2020 17:21:07 +0200
|
||||
Subject: [PATCH 123/247] regulator: mcp16502: add linear_min_sel
|
||||
|
||||
Selectors b/w zero and VDD_LOW_SEL are not valid. Use linear_min_sel.
|
||||
|
||||
Fixes: 919261c03e7ca ("regulator: mcp16502: add regulator driver for MCP16502")
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/1605280870-32432-4-git-send-email-claudiu.beznea@microchip.com
|
||||
Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
---
|
||||
drivers/regulator/mcp16502.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/drivers/regulator/mcp16502.c
|
||||
+++ b/drivers/regulator/mcp16502.c
|
||||
@@ -93,6 +93,7 @@ static unsigned int mcp16502_of_map_mode
|
||||
.owner = THIS_MODULE, \
|
||||
.n_voltages = MCP16502_VSEL + 1, \
|
||||
.linear_ranges = _ranges, \
|
||||
+ .linear_min_sel = VDD_LOW_SEL, \
|
||||
.n_linear_ranges = ARRAY_SIZE(_ranges), \
|
||||
.of_match = of_match_ptr(_name), \
|
||||
.of_map_mode = mcp16502_of_map_mode, \
|
|
@ -1,117 +0,0 @@
|
|||
From 5295f4c122258a11fb6012b7e043248e681db5a2 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Fri, 13 Nov 2020 17:21:08 +0200
|
||||
Subject: [PATCH 124/247] regulator: mcp16502: adapt for get/set on other
|
||||
registers
|
||||
|
||||
MCP16502 have multiple registers for each regulator (as described
|
||||
in enum mcp16502_reg). Adapt the code to be able to get/set all these
|
||||
registers. This is necessary for the following commits.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/1605280870-32432-5-git-send-email-claudiu.beznea@microchip.com
|
||||
Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
---
|
||||
drivers/regulator/mcp16502.c | 43 ++++++++++++++++++++++--------------
|
||||
1 file changed, 27 insertions(+), 16 deletions(-)
|
||||
|
||||
--- a/drivers/regulator/mcp16502.c
|
||||
+++ b/drivers/regulator/mcp16502.c
|
||||
@@ -54,13 +54,9 @@
|
||||
* This function is useful for iterating over all regulators and accessing their
|
||||
* registers in a generic way or accessing a regulator device by its id.
|
||||
*/
|
||||
-#define MCP16502_BASE(i) (((i) + 1) << 4)
|
||||
+#define MCP16502_REG_BASE(i, r) ((((i) + 1) << 4) + MCP16502_REG_##r)
|
||||
#define MCP16502_STAT_BASE(i) ((i) + 5)
|
||||
|
||||
-#define MCP16502_OFFSET_MODE_A 0
|
||||
-#define MCP16502_OFFSET_MODE_LPM 1
|
||||
-#define MCP16502_OFFSET_MODE_HIB 2
|
||||
-
|
||||
#define MCP16502_OPMODE_ACTIVE REGULATOR_MODE_NORMAL
|
||||
#define MCP16502_OPMODE_LPM REGULATOR_MODE_IDLE
|
||||
#define MCP16502_OPMODE_HIB REGULATOR_MODE_STANDBY
|
||||
@@ -75,6 +71,23 @@
|
||||
#define MCP16502_MIN_REG 0x0
|
||||
#define MCP16502_MAX_REG 0x65
|
||||
|
||||
+/**
|
||||
+ * enum mcp16502_reg - MCP16502 regulators's registers
|
||||
+ * @MCP16502_REG_A: active state register
|
||||
+ * @MCP16502_REG_LPM: low power mode state register
|
||||
+ * @MCP16502_REG_HIB: hibernate state register
|
||||
+ * @MCP16502_REG_SEQ: startup sequence register
|
||||
+ * @MCP16502_REG_CFG: configuration register
|
||||
+ */
|
||||
+enum mcp16502_reg {
|
||||
+ MCP16502_REG_A,
|
||||
+ MCP16502_REG_LPM,
|
||||
+ MCP16502_REG_HIB,
|
||||
+ MCP16502_REG_HPM,
|
||||
+ MCP16502_REG_SEQ,
|
||||
+ MCP16502_REG_CFG,
|
||||
+};
|
||||
+
|
||||
static unsigned int mcp16502_of_map_mode(unsigned int mode)
|
||||
{
|
||||
if (mode == REGULATOR_MODE_NORMAL || mode == REGULATOR_MODE_IDLE)
|
||||
@@ -144,22 +157,20 @@ static void mcp16502_gpio_set_mode(struc
|
||||
}
|
||||
|
||||
/*
|
||||
- * mcp16502_get_reg() - get the PMIC's configuration register for opmode
|
||||
+ * mcp16502_get_reg() - get the PMIC's state configuration register for opmode
|
||||
*
|
||||
* @rdev: the regulator whose register we are searching
|
||||
* @opmode: the PMIC's operating mode ACTIVE, Low-power, Hibernate
|
||||
*/
|
||||
-static int mcp16502_get_reg(struct regulator_dev *rdev, int opmode)
|
||||
+static int mcp16502_get_state_reg(struct regulator_dev *rdev, int opmode)
|
||||
{
|
||||
- int reg = MCP16502_BASE(rdev_get_id(rdev));
|
||||
-
|
||||
switch (opmode) {
|
||||
case MCP16502_OPMODE_ACTIVE:
|
||||
- return reg + MCP16502_OFFSET_MODE_A;
|
||||
+ return MCP16502_REG_BASE(rdev_get_id(rdev), A);
|
||||
case MCP16502_OPMODE_LPM:
|
||||
- return reg + MCP16502_OFFSET_MODE_LPM;
|
||||
+ return MCP16502_REG_BASE(rdev_get_id(rdev), LPM);
|
||||
case MCP16502_OPMODE_HIB:
|
||||
- return reg + MCP16502_OFFSET_MODE_HIB;
|
||||
+ return MCP16502_REG_BASE(rdev_get_id(rdev), HIB);
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -179,7 +190,7 @@ static unsigned int mcp16502_get_mode(st
|
||||
unsigned int val;
|
||||
int ret, reg;
|
||||
|
||||
- reg = mcp16502_get_reg(rdev, MCP16502_OPMODE_ACTIVE);
|
||||
+ reg = mcp16502_get_state_reg(rdev, MCP16502_OPMODE_ACTIVE);
|
||||
if (reg < 0)
|
||||
return reg;
|
||||
|
||||
@@ -210,7 +221,7 @@ static int _mcp16502_set_mode(struct reg
|
||||
int val;
|
||||
int reg;
|
||||
|
||||
- reg = mcp16502_get_reg(rdev, op_mode);
|
||||
+ reg = mcp16502_get_state_reg(rdev, op_mode);
|
||||
if (reg < 0)
|
||||
return reg;
|
||||
|
||||
@@ -269,10 +280,10 @@ static int mcp16502_suspend_get_target_r
|
||||
{
|
||||
switch (pm_suspend_target_state) {
|
||||
case PM_SUSPEND_STANDBY:
|
||||
- return mcp16502_get_reg(rdev, MCP16502_OPMODE_LPM);
|
||||
+ return mcp16502_get_state_reg(rdev, MCP16502_OPMODE_LPM);
|
||||
case PM_SUSPEND_ON:
|
||||
case PM_SUSPEND_MEM:
|
||||
- return mcp16502_get_reg(rdev, MCP16502_OPMODE_HIB);
|
||||
+ return mcp16502_get_state_reg(rdev, MCP16502_OPMODE_HIB);
|
||||
default:
|
||||
dev_err(&rdev->dev, "invalid suspend target: %d\n",
|
||||
pm_suspend_target_state);
|
|
@ -1,141 +0,0 @@
|
|||
From 7f13433e11a3c88f1fd6417c4c5e5a6c98370b9a Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Fri, 13 Nov 2020 17:21:09 +0200
|
||||
Subject: [PATCH 125/247] regulator: mcp16502: add support for ramp delay
|
||||
|
||||
MCP16502 have configurable ramp delay support (via DVSR bits in
|
||||
regulators' CFG register).
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/1605280870-32432-6-git-send-email-claudiu.beznea@microchip.com
|
||||
Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
---
|
||||
drivers/regulator/mcp16502.c | 89 +++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 87 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/regulator/mcp16502.c
|
||||
+++ b/drivers/regulator/mcp16502.c
|
||||
@@ -22,8 +22,9 @@
|
||||
#define VDD_LOW_SEL 0x0D
|
||||
#define VDD_HIGH_SEL 0x3F
|
||||
|
||||
-#define MCP16502_FLT BIT(7)
|
||||
-#define MCP16502_ENS BIT(0)
|
||||
+#define MCP16502_FLT BIT(7)
|
||||
+#define MCP16502_DVSR GENMASK(3, 2)
|
||||
+#define MCP16502_ENS BIT(0)
|
||||
|
||||
/*
|
||||
* The PMIC has four sets of registers corresponding to four power modes:
|
||||
@@ -88,6 +89,12 @@ enum mcp16502_reg {
|
||||
MCP16502_REG_CFG,
|
||||
};
|
||||
|
||||
+/* Ramp delay (uV/us) for buck1, ldo1, ldo2. */
|
||||
+static const int mcp16502_ramp_b1l12[] = { 6250, 3125, 2083, 1563 };
|
||||
+
|
||||
+/* Ramp delay (uV/us) for buck2, buck3, buck4. */
|
||||
+static const int mcp16502_ramp_b234[] = { 3125, 1563, 1042, 781 };
|
||||
+
|
||||
static unsigned int mcp16502_of_map_mode(unsigned int mode)
|
||||
{
|
||||
if (mode == REGULATOR_MODE_NORMAL || mode == REGULATOR_MODE_IDLE)
|
||||
@@ -271,6 +278,80 @@ static int mcp16502_get_status(struct re
|
||||
return REGULATOR_STATUS_UNDEFINED;
|
||||
}
|
||||
|
||||
+static int mcp16502_set_voltage_time_sel(struct regulator_dev *rdev,
|
||||
+ unsigned int old_sel,
|
||||
+ unsigned int new_sel)
|
||||
+{
|
||||
+ static const u8 us_ramp[] = { 8, 16, 24, 32 };
|
||||
+ int id = rdev_get_id(rdev);
|
||||
+ unsigned int uV_delta, val;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = regmap_read(rdev->regmap, MCP16502_REG_BASE(id, CFG), &val);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ val = (val & MCP16502_DVSR) >> 2;
|
||||
+ uV_delta = abs(new_sel * rdev->desc->linear_ranges->step -
|
||||
+ old_sel * rdev->desc->linear_ranges->step);
|
||||
+ switch (id) {
|
||||
+ case BUCK1:
|
||||
+ case LDO1:
|
||||
+ case LDO2:
|
||||
+ ret = DIV_ROUND_CLOSEST(uV_delta * us_ramp[val],
|
||||
+ mcp16502_ramp_b1l12[val]);
|
||||
+ break;
|
||||
+
|
||||
+ case BUCK2:
|
||||
+ case BUCK3:
|
||||
+ case BUCK4:
|
||||
+ ret = DIV_ROUND_CLOSEST(uV_delta * us_ramp[val],
|
||||
+ mcp16502_ramp_b234[val]);
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int mcp16502_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
|
||||
+{
|
||||
+ const int *ramp;
|
||||
+ int id = rdev_get_id(rdev);
|
||||
+ unsigned int i, size;
|
||||
+
|
||||
+ switch (id) {
|
||||
+ case BUCK1:
|
||||
+ case LDO1:
|
||||
+ case LDO2:
|
||||
+ ramp = mcp16502_ramp_b1l12;
|
||||
+ size = ARRAY_SIZE(mcp16502_ramp_b1l12);
|
||||
+ break;
|
||||
+
|
||||
+ case BUCK2:
|
||||
+ case BUCK3:
|
||||
+ case BUCK4:
|
||||
+ ramp = mcp16502_ramp_b234;
|
||||
+ size = ARRAY_SIZE(mcp16502_ramp_b234);
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < size; i++) {
|
||||
+ if (ramp[i] == ramp_delay)
|
||||
+ break;
|
||||
+ }
|
||||
+ if (i == size)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ return regmap_update_bits(rdev->regmap, MCP16502_REG_BASE(id, CFG),
|
||||
+ MCP16502_DVSR, (i << 2));
|
||||
+}
|
||||
+
|
||||
#ifdef CONFIG_SUSPEND
|
||||
/*
|
||||
* mcp16502_suspend_get_target_reg() - get the reg of the target suspend PMIC
|
||||
@@ -365,6 +446,8 @@ static const struct regulator_ops mcp165
|
||||
.disable = regulator_disable_regmap,
|
||||
.is_enabled = regulator_is_enabled_regmap,
|
||||
.get_status = mcp16502_get_status,
|
||||
+ .set_voltage_time_sel = mcp16502_set_voltage_time_sel,
|
||||
+ .set_ramp_delay = mcp16502_set_ramp_delay,
|
||||
|
||||
.set_mode = mcp16502_set_mode,
|
||||
.get_mode = mcp16502_get_mode,
|
||||
@@ -389,6 +472,8 @@ static const struct regulator_ops mcp165
|
||||
.disable = regulator_disable_regmap,
|
||||
.is_enabled = regulator_is_enabled_regmap,
|
||||
.get_status = mcp16502_get_status,
|
||||
+ .set_voltage_time_sel = mcp16502_set_voltage_time_sel,
|
||||
+ .set_ramp_delay = mcp16502_set_ramp_delay,
|
||||
|
||||
#ifdef CONFIG_SUSPEND
|
||||
.set_suspend_voltage = mcp16502_set_suspend_voltage,
|
|
@ -1,27 +0,0 @@
|
|||
From 8dcbcb052f682478dcbfa7fc9abdd909e1deab87 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Fri, 13 Nov 2020 17:21:10 +0200
|
||||
Subject: [PATCH 126/247] regulator: mcp16502: remove void documentation of
|
||||
struct mcp16502
|
||||
|
||||
struct mcp16502 has no members called rdev or rmap. Remove the
|
||||
documentation.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/1605280870-32432-7-git-send-email-claudiu.beznea@microchip.com
|
||||
Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
---
|
||||
drivers/regulator/mcp16502.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
--- a/drivers/regulator/mcp16502.c
|
||||
+++ b/drivers/regulator/mcp16502.c
|
||||
@@ -135,8 +135,6 @@ enum {
|
||||
|
||||
/*
|
||||
* struct mcp16502 - PMIC representation
|
||||
- * @rdev: the regulators belonging to this chip
|
||||
- * @rmap: regmap to be used for I2C communication
|
||||
* @lpm: LPM GPIO descriptor
|
||||
*/
|
||||
struct mcp16502 {
|
|
@ -1,64 +0,0 @@
|
|||
From 3aee4f22ed0a22d3d6d22fc49812c03d876c7637 Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Fri, 13 Nov 2020 17:21:05 +0200
|
||||
Subject: [PATCH 127/247] regulator: core: validate selector against
|
||||
linear_min_sel
|
||||
|
||||
There are regulators who's min selector is not zero. Selectors loops
|
||||
(looping b/w zero and regulator::desc::n_voltages) might throw errors
|
||||
because invalid selectors are used (lower than
|
||||
regulator::desc::linear_min_sel). For this situations validate selectors
|
||||
against regulator::desc::linear_min_sel.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/1605280870-32432-2-git-send-email-claudiu.beznea@microchip.com
|
||||
Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
---
|
||||
drivers/regulator/core.c | 9 +++++++--
|
||||
drivers/regulator/helpers.c | 3 ++-
|
||||
2 files changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/regulator/core.c
|
||||
+++ b/drivers/regulator/core.c
|
||||
@@ -3000,7 +3000,8 @@ static int _regulator_list_voltage(struc
|
||||
return rdev->desc->fixed_uV;
|
||||
|
||||
if (ops->list_voltage) {
|
||||
- if (selector >= rdev->desc->n_voltages)
|
||||
+ if (selector >= rdev->desc->n_voltages ||
|
||||
+ selector < rdev->desc->linear_min_sel)
|
||||
return -EINVAL;
|
||||
if (lock)
|
||||
regulator_lock(rdev);
|
||||
@@ -3151,7 +3152,8 @@ int regulator_list_hardware_vsel(struct
|
||||
struct regulator_dev *rdev = regulator->rdev;
|
||||
const struct regulator_ops *ops = rdev->desc->ops;
|
||||
|
||||
- if (selector >= rdev->desc->n_voltages)
|
||||
+ if (selector >= rdev->desc->n_voltages ||
|
||||
+ selector < rdev->desc->linear_min_sel)
|
||||
return -EINVAL;
|
||||
if (ops->set_voltage_sel != regulator_set_voltage_sel_regmap)
|
||||
return -EOPNOTSUPP;
|
||||
@@ -4074,6 +4076,9 @@ int regulator_set_voltage_time(struct re
|
||||
|
||||
for (i = 0; i < rdev->desc->n_voltages; i++) {
|
||||
/* We only look for exact voltage matches here */
|
||||
+ if (i < rdev->desc->linear_min_sel)
|
||||
+ continue;
|
||||
+
|
||||
voltage = regulator_list_voltage(regulator, i);
|
||||
if (voltage < 0)
|
||||
return -EINVAL;
|
||||
--- a/drivers/regulator/helpers.c
|
||||
+++ b/drivers/regulator/helpers.c
|
||||
@@ -647,7 +647,8 @@ int regulator_list_voltage_table(struct
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- if (selector >= rdev->desc->n_voltages)
|
||||
+ if (selector >= rdev->desc->n_voltages ||
|
||||
+ selector < rdev->desc->linear_min_sel)
|
||||
return -EINVAL;
|
||||
|
||||
return rdev->desc->volt_table[selector];
|
|
@ -1,26 +0,0 @@
|
|||
From 42b56e8bd343f34d5f2a601d8a8a05d8c861c08c Mon Sep 17 00:00:00 2001
|
||||
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Date: Fri, 13 Nov 2020 19:56:04 +0200
|
||||
Subject: [PATCH 128/247] regulator: core: do not continue if selector match
|
||||
|
||||
Do not continue if selector has already been located.
|
||||
|
||||
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
||||
Link: https://lore.kernel.org/r/1605290164-11556-1-git-send-email-claudiu.beznea@microchip.com
|
||||
Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
---
|
||||
drivers/regulator/core.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/drivers/regulator/core.c
|
||||
+++ b/drivers/regulator/core.c
|
||||
@@ -4079,6 +4079,9 @@ int regulator_set_voltage_time(struct re
|
||||
if (i < rdev->desc->linear_min_sel)
|
||||
continue;
|
||||
|
||||
+ if (old_sel >= 0 && new_sel >= 0)
|
||||
+ break;
|
||||
+
|
||||
voltage = regulator_list_voltage(regulator, i);
|
||||
if (voltage < 0)
|
||||
return -EINVAL;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue