Skip to content

Commit a17b783

Browse files
authored
Merge pull request #82 from rayxhuangEC/support_linux_6.1
[Edgecore] Upgrade AS5835-54X to kernel 6.1
2 parents d5e8577 + 377782e commit a17b783

20 files changed

Lines changed: 170 additions & 45 deletions

File tree

builds/any/rootfs/buster/standard/standard.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ Multistrap:
4343

4444
ONL:
4545
packages: *Packages
46-
source: http://apt.opennetlinux.org/debian
47-
suite: unstable
46+
source: http://archive.debian.org/debian/
47+
suite: ${ONL_DEBIAN_SUITE}
48+
keyring: debian-archive-keyring
4849
omitdebsrc: true
49-
arches: amd64, arm64, armel
5050

5151
ONL-Local:
5252
packages: *Packages
53-
source: http://${APT_CACHE}apt.opennetlinux.org/debian
54-
suite: unstable
53+
source: http://${APT_CACHE}archive.debian.org/debian/
54+
suite: ${ONL_DEBIAN_SUITE}
55+
keyring: debian-archive-keyring
5556
omitdebsrc: true
56-
arches: amd64, arm64, armel
5757

5858
Local-All:
5959
source: ${ONLPM_OPTION_REPO}/${ONL_DEBIAN_SUITE}/packages/binary-all

builds/any/rootfs/jessie/standard/standard.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,16 @@ Multistrap:
4343

4444
ONL:
4545
packages: *Packages
46-
source: http://apt.opennetlinux.org/debian
47-
suite: unstable
46+
source: http://archive.debian.org/debian/
47+
suite: ${ONL_DEBIAN_SUITE}
48+
keyring: debian-archive-keyring
4849
omitdebsrc: true
4950

5051
ONL-Local:
5152
packages: *Packages
52-
source: http://${APT_CACHE}apt.opennetlinux.org/debian
53-
suite: unstable
53+
source: http://${APT_CACHE}archive.debian.org/debian/
54+
suite: ${ONL_DEBIAN_SUITE}
55+
keyring: debian-archive-keyring
5456
omitdebsrc: true
5557

5658
Local-All:

builds/any/rootfs/stretch/common/amd64-base-packages.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
- smartmontools
99
- grub2
1010
- onl-upgrade
11-
- hw-management
1211
- onl-kernel-4.9-lts-x86-64-all-modules
1312
- onl-kernel-4.14-lts-x86-64-all-modules
1413
- onl-kernel-4.19-lts-x86-64-all-modules

builds/any/rootfs/stretch/standard/standard.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ Multistrap:
4343

4444
ONL:
4545
packages: *Packages
46-
source: http://apt.opennetlinux.org/debian
47-
suite: unstable
46+
source: http://archive.debian.org/debian/
47+
suite: ${ONL_DEBIAN_SUITE}
48+
keyring: debian-archive-keyring
4849
omitdebsrc: true
49-
arches: amd64, arm64, armel
5050

5151
ONL-Local:
5252
packages: *Packages
53-
source: http://${APT_CACHE}apt.opennetlinux.org/debian
54-
suite: unstable
53+
source: http://${APT_CACHE}archive.debian.org/debian/
54+
suite: ${ONL_DEBIAN_SUITE}
55+
keyring: debian-archive-keyring
5556
omitdebsrc: true
56-
arches: amd64, arm64, armel
5757

5858
Local-All:
5959
source: ${ONLPM_OPTION_REPO}/${ONL_DEBIAN_SUITE}/packages/binary-all
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
Add 'delay' module param to the driver.
2+
3+
From: Cumulus Networks <support@cumulusnetworks.com>
4+
5+
This is needed on S6000 for safe PMBUS access.
6+
Without setting the 'delay', the ismt driver throws 'completion wait
7+
timed out' error message.
8+
---
9+
drivers/i2c/busses/i2c-ismt.c | 13 ++++++++++---
10+
1 file changed, 10 insertions(+), 3 deletions(-)
11+
12+
diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c
13+
index a35a27c32..b89fbb60d 100644
14+
--- a/drivers/i2c/busses/i2c-ismt.c
15+
+++ b/drivers/i2c/busses/i2c-ismt.c
16+
@@ -66,6 +66,7 @@
17+
#include <linux/i2c.h>
18+
#include <linux/acpi.h>
19+
#include <linux/interrupt.h>
20+
+#include <linux/delay.h>
21+
22+
#include <linux/io-64-nonatomic-lo-hi.h>
23+
24+
@@ -190,9 +191,12 @@ static const struct pci_device_id ismt_ids[] = {
25+
MODULE_DEVICE_TABLE(pci, ismt_ids);
26+
27+
/* Bus speed control bits for slow debuggers - refer to the docs for usage */
28+
-static unsigned int bus_speed;
29+
+static unsigned int bus_speed = 100;
30+
+static unsigned int delay = 1000;
31+
module_param(bus_speed, uint, S_IRUGO);
32+
-MODULE_PARM_DESC(bus_speed, "Bus Speed in kHz (0 = BIOS default)");
33+
+MODULE_PARM_DESC(bus_speed, "Bus Speed in kHz (1000 by default)");
34+
+module_param(delay, uint, S_IRUGO);
35+
+MODULE_PARM_DESC(delay, "Delay in microsecs before access (1000 by default)");
36+
37+
/**
38+
* __ismt_desc_dump() - dump the contents of a specific descriptor
39+
@@ -400,6 +404,9 @@ static int ismt_access(struct i2c_adapter *adap, u16 addr,
40+
struct device *dev = &priv->pci_dev->dev;
41+
u8 *dma_buffer = PTR_ALIGN(&priv->buffer[0], 16);
42+
43+
+ if (delay > 0)
44+
+ udelay(delay);
45+
+
46+
desc = &priv->hw[priv->head];
47+
48+
/* Initialize the DMA buffer */
49+
@@ -759,7 +766,7 @@ static void ismt_hw_init(struct ismt_priv *priv)
50+
bus_speed = 1000;
51+
break;
52+
}
53+
- dev_dbg(dev, "SMBus clock is running at %d kHz\n", bus_speed);
54+
+ dev_info(dev, "SMBus clock is running at %d kHz with delay %d us\n", bus_speed, delay);
55+
}
56+
57+
/**
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
driver-i2c-bus-intel-ismt-add-delay-param.patch
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
!include $ONL_TEMPLATES/platform-modules.yml VENDOR=accton BASENAME=x86-64-accton-as5835-54x ARCH=amd64 KERNELS="onl-kernel-4.14-lts-x86-64-all:amd64"
1+
!include $ONL_TEMPLATES/platform-modules.yml VENDOR=accton BASENAME=x86-64-accton-as5835-54x ARCH=amd64 KERNELS="onl-kernel-6.1-lts-x86-64-all:amd64"

packages/platforms/accton/x86-64/as5835-54x/modules/builds/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
KERNELS := onl-kernel-4.14-lts-x86-64-all:amd64
2-
KMODULES := $(wildcard *.c)
1+
KERNELS := onl-kernel-6.1-lts-x86-64-all:amd64
2+
KMODULES := src
33
VENDOR := accton
44
BASENAME := x86-64-accton-as5835-54x
55
ARCH := x86_64
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
obj-m += x86-64-accton-as5835-54x-cpld.o
2+
obj-m += x86-64-accton-as5835-54x-fan.o
3+
obj-m += x86-64-accton-as5835-54x-leds.o
4+
obj-m += x86-64-accton-as5835-54x-psu.o

packages/platforms/accton/x86-64/as5835-54x/modules/builds/x86-64-accton-as5835-54x-cpld.c renamed to packages/platforms/accton/x86-64/as5835-54x/modules/builds/src/x86-64-accton-as5835-54x-cpld.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ static int as5835_54x_cpld_probe(struct i2c_client *client,
10561056
return ret;
10571057
}
10581058

1059-
static int as5835_54x_cpld_remove(struct i2c_client *client)
1059+
static void as5835_54x_cpld_remove(struct i2c_client *client)
10601060
{
10611061
struct as5835_54x_cpld_data *data = i2c_get_clientdata(client);
10621062
const struct attribute_group *group = NULL;
@@ -1083,8 +1083,6 @@ static int as5835_54x_cpld_remove(struct i2c_client *client)
10831083
}
10841084

10851085
kfree(data);
1086-
1087-
return 0;
10881086
}
10891087

10901088
static int as5835_54x_cpld_read_internal(struct i2c_client *client, u8 reg)

0 commit comments

Comments
 (0)