brcm2708: update to latest patches and firmware (#2965)
Signed-off-by: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com>
This commit is contained in:
parent
6901278ef0
commit
dacc7eb844
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2019 OpenWrt.org
|
||||
# Copyright (C) 2019-2020 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@ -10,14 +10,14 @@ include $(TOPDIR)/rules.mk
|
||||
UNPACK_CMD=unzip -q -p $(DL_DIR)/$(PKG_SOURCE) $(PKG_SOURCE_UNZIP) | gzip -dc | $(HOST_TAR) -C $(1) $(TAR_OPTIONS)
|
||||
|
||||
PKG_NAME:=cypress-firmware
|
||||
PKG_VERSION:=v4.14.77-2019_1031
|
||||
PKG_VERSION:=v4.14.77-2020_0115
|
||||
|
||||
PKG_SOURCE_UNZIP:=cypress-firmware-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE:=cypress-fmac-$(PKG_VERSION).zip
|
||||
PKG_SOURCE_URL:=https://community.cypress.com/servlet/JiveServlet/download/17441-2-50210/
|
||||
PKG_HASH:=bc2eec0d144a88e3105a06cac8039a7f13becde67dfe2a86793ba66f6a2510e0
|
||||
PKG_SOURCE_URL:=https://community.cypress.com/servlet/JiveServlet/download/19000-1-51721/
|
||||
PKG_HASH:=a5510f82aacf585b5d29732b6d6777d4a4b26a667154d91cfcfc0d6d5dc4fef5
|
||||
|
||||
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
PKG_MAINTAINER:=?lvaro Fern?ndez Rojas <noltari@gmail.com>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -31,6 +31,24 @@ define Build/Compile
|
||||
true
|
||||
endef
|
||||
|
||||
# Cypress 43012 SDIO Firmware
|
||||
define Package/cypress-firmware-43012-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW43012 FullMac SDIO firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-43012-sdio/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43012-sdio.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43012-sdio.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43012-sdio.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43012-sdio.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-43012-sdio))
|
||||
|
||||
# Cypress 43340 SDIO Firmware
|
||||
define Package/cypress-firmware-43340-sdio
|
||||
$(Package/cypress-firmware-default)
|
||||
@ -166,6 +184,24 @@ endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-4356-sdio))
|
||||
|
||||
# Cypress 43570 PCIe Firmware
|
||||
define Package/cypress-firmware-43570-pcie
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW43570 FullMac PCIe firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-43570-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43570-pcie.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43570-pcie.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac43570-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac43570-pcie.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-43570-pcie))
|
||||
|
||||
# Cypress 4359 PCIe Firmware
|
||||
define Package/cypress-firmware-4359-pcie
|
||||
$(Package/cypress-firmware-default)
|
||||
@ -237,3 +273,21 @@ define Package/cypress-firmware-4373-usb/install
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-4373-usb))
|
||||
|
||||
# Cypress 89459 PCIe Firmware
|
||||
define Package/cypress-firmware-89459-pcie
|
||||
$(Package/cypress-firmware-default)
|
||||
TITLE:=CYW89459 FullMac PCIe firmware
|
||||
endef
|
||||
|
||||
define Package/cypress-firmware-89459-pcie/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/brcm
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac89459-pcie.bin \
|
||||
$(1)/lib/firmware/brcm/brcmfmac89459-pcie.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/firmware/brcmfmac89459-pcie.clm_blob \
|
||||
$(1)/lib/firmware/brcm/brcmfmac89459-pcie.clm_blob
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,cypress-firmware-89459-pcie))
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2012-2019 OpenWrt.org
|
||||
# Copyright (C) 2012-2020 OpenWrt.org
|
||||
# Copyright (C) 2017 LEDE project
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=brcm2708-gpu-fw
|
||||
PKG_VERSION:=2019-12-11
|
||||
PKG_RELEASE:=0c01dbefba45a08c47f8538d5a071a0fba6b7e83
|
||||
PKG_VERSION:=2020-01-30
|
||||
PKG_RELEASE:=63bdbe0ea609a69f5c0a2212d608ef3d9915a7ad
|
||||
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE)
|
||||
|
||||
@ -41,7 +41,7 @@ define Download/fixup_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup.dat
|
||||
HASH:=85a54bf460aa3ff0d04ee54bc606bf3af39a2c5194e519ab278cf74ecf75f7a8
|
||||
HASH:=7ca06846314d7a0d0335cadd6081ea50578f450ed0ec98d284220cea1021199f
|
||||
endef
|
||||
$(eval $(call Download,fixup_dat))
|
||||
|
||||
@ -49,7 +49,7 @@ define Download/fixup_cd_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup_cd.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup_cd.dat
|
||||
HASH:=4d9ffff3719fff6b14f142cbb4b3f62df175e59be4ad382b0f39830dab18d760
|
||||
HASH:=fb8e8b196f9fd7bd16b00b8ed8a4d3231fb24c2910a4a10929b5f4f693ad69ef
|
||||
endef
|
||||
$(eval $(call Download,fixup_cd_dat))
|
||||
|
||||
@ -57,7 +57,7 @@ define Download/fixup_x_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup_x.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup_x.dat
|
||||
HASH:=81aae9581c120fbbf5020fa6b84b355ed342ead7185db0916cbce7a7849307eb
|
||||
HASH:=65e0c34b5d17009d7a79f5d0ae81ced8b3649cc77258f29edb7e9b15d197634c
|
||||
endef
|
||||
$(eval $(call Download,fixup_x_dat))
|
||||
|
||||
@ -65,7 +65,7 @@ define Download/fixup4_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup4.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup4.dat
|
||||
HASH:=611ea1ec1384931c785687e78a50369aae3a0a29e37bed354862cf5fe6d23ade
|
||||
HASH:=d040dff3e48d645e474ef9c108651e9d4d6708f75aa50799148a1917724e5d27
|
||||
endef
|
||||
$(eval $(call Download,fixup4_dat))
|
||||
|
||||
@ -73,7 +73,7 @@ define Download/fixup4cd_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup4cd.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup4cd.dat
|
||||
HASH:=f82da018c2d9fe1ec54fcfe76514dbc3b9f27f53712bb5f5b90f0d38124370eb
|
||||
HASH:=2a3366d0f7ea5c2d39da41f9a2c68aa84a14641dbf122dccc275e0d548296c0d
|
||||
endef
|
||||
$(eval $(call Download,fixup4cd_dat))
|
||||
|
||||
@ -81,7 +81,7 @@ define Download/fixup4x_dat
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-fixup4x.dat
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=fixup4x.dat
|
||||
HASH:=36c1cdb7b5ff8c39c1c0cd962ea1095f79c5c290fc11813869cbb662240386d7
|
||||
HASH:=6c6e9fec9e769d1bff3cf6775b12a5f640fbd810c3a1427318509a929b854a5b
|
||||
endef
|
||||
$(eval $(call Download,fixup4x_dat))
|
||||
|
||||
@ -89,7 +89,7 @@ define Download/start_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start.elf
|
||||
HASH:=442919907e4b7d8f007b79df1aa1e12f98e09ab393da65b48cd2b2af04301b7d
|
||||
HASH:=2cde27f015b244b35b2261fe468924298b4c3d0ea12b69f99cd0bd9d1fcadf9c
|
||||
endef
|
||||
$(eval $(call Download,start_elf))
|
||||
|
||||
@ -97,7 +97,7 @@ define Download/start_cd_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start_cd.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start_cd.elf
|
||||
HASH:=0942b6ab8eec7e6116a3fc366cb0d4a94b5869c429292da600f92a37e361ec8d
|
||||
HASH:=5151679b5128c3cedbeb2992d8c6f8f13ce919282f6a98e87af0fe13b2686142
|
||||
endef
|
||||
$(eval $(call Download,start_cd_elf))
|
||||
|
||||
@ -105,7 +105,7 @@ define Download/start_x_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start_x.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start_x.elf
|
||||
HASH:=e83dc1fbb5a9cb29e1db5f9ca0f9bd847f5b57a1e421cc79e39640a865456fe6
|
||||
HASH:=e4ee556a657adf5f5b1c006bfd7f7278e3cd76807adc3eb23f192f37759b674e
|
||||
endef
|
||||
$(eval $(call Download,start_x_elf))
|
||||
|
||||
@ -113,7 +113,7 @@ define Download/start4_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start4.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start4.elf
|
||||
HASH:=550b55577075f4056a71b0faa2b1150290b2e8d61e5bc330a54452f28cc1b2d8
|
||||
HASH:=fc9a3b7a07bc901f677cc15420ac1c66d5b55bd1c697b07ee54ee5bbf92a7cc5
|
||||
endef
|
||||
$(eval $(call Download,start4_elf))
|
||||
|
||||
@ -121,7 +121,7 @@ define Download/start4cd_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start4cd.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start4cd.elf
|
||||
HASH:=1c8206a854fba486b7996aa3735aaca8aaeee7bf20fdbf190acdea4516794f1c
|
||||
HASH:=b75ef404d1e222e84b64e7410e9c9633a643db196421c144ace51454a2a0f504
|
||||
endef
|
||||
$(eval $(call Download,start4cd_elf))
|
||||
|
||||
@ -129,7 +129,7 @@ define Download/start4x_elf
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-start4x.elf
|
||||
URL:=$(RPI_FIRMWARE_URL)
|
||||
URL_FILE:=start4x.elf
|
||||
HASH:=3ca2e259861fd31b77a536ccb33637e5305ec44b9e0c62e898e7e1d97e776f22
|
||||
HASH:=db639727412e80d1a7b0dfd9f8cb0b71318f8663ece7e6b20a3804526c6a330d
|
||||
endef
|
||||
$(eval $(call Download,start4x_elf))
|
||||
|
||||
|
@ -532,6 +532,33 @@ endef
|
||||
$(eval $(call KernelPackage,sound-soc-hifiberry-dacplusdsp))
|
||||
|
||||
|
||||
define KernelPackage/sound-soc-hifiberry-dacplushd
|
||||
TITLE:=Support for HifiBerry DAC+HD
|
||||
KCONFIG:= \
|
||||
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSHD \
|
||||
CONFIG_SND_SOC_PCM179X \
|
||||
CONFIG_SND_SOC_PCM179X_I2C
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/clk/clk-hifiberry-dachd.ko \
|
||||
$(LINUX_DIR)/sound/soc/bcm/snd-soc-hifiberry-dacplushd.ko \
|
||||
$(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm179x-codec.ko \
|
||||
$(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm179x-i2c.ko
|
||||
AUTOLOAD:=$(call AutoLoad,68,clk-hifiberry-dachd snd-soc-pcm179x-codec \
|
||||
snd-soc-pcm179x-i2c snd-soc-hifiberry-dacplushd)
|
||||
DEPENDS:= \
|
||||
kmod-sound-soc-bcm2835-i2s \
|
||||
+kmod-i2c-bcm2835 \
|
||||
+kmod-regmap-i2c
|
||||
$(call AddDepends/sound)
|
||||
endef
|
||||
|
||||
define KernelPackage/sound-soc-hifiberry-dacplushd/description
|
||||
This package contains support for HifiBerry DAC+HD
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,sound-soc-hifiberry-dacplushd))
|
||||
|
||||
|
||||
define KernelPackage/sound-soc-hifiberry-dacplusadc-pro
|
||||
TITLE:=Support for HifiBerry DAC+ADC PRO
|
||||
KCONFIG:= \
|
||||
@ -704,6 +731,32 @@ endef
|
||||
$(eval $(call KernelPackage,sound-soc-i-sabe-q2m))
|
||||
|
||||
|
||||
define KernelPackage/sound-soc-justboom-both
|
||||
TITLE:=Support for JustBoom DAC and Digi
|
||||
KCONFIG:= \
|
||||
CONFIG_SND_BCM2708_SOC_JUSTBOOM_BOTH \
|
||||
CONFIG_SND_SOC_PCM512x \
|
||||
CONFIG_SND_SOC_WM8804
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/sound/soc/bcm/snd-soc-justboom-both.ko \
|
||||
$(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm512x.ko \
|
||||
$(LINUX_DIR)/sound/soc/codecs/snd-soc-wm8804.ko
|
||||
AUTOLOAD:=$(call AutoLoad,68,snd-soc-pcm512x snd-soc-wm8804 \
|
||||
snd-soc-justboom-both)
|
||||
DEPENDS:= \
|
||||
kmod-sound-soc-bcm2835-i2s \
|
||||
+kmod-sound-soc-rpi-wm8804-soundcard \
|
||||
+kmod-i2c-bcm2835
|
||||
$(call AddDepends/sound)
|
||||
endef
|
||||
|
||||
define KernelPackage/sound-soc-justboom-both/description
|
||||
This package contains support for JustBoom DAC and Digi
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,sound-soc-justboom-both))
|
||||
|
||||
|
||||
define KernelPackage/sound-soc-justboom-dac
|
||||
TITLE:=Support for JustBoom DAC
|
||||
KCONFIG:= \
|
||||
|
@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -2476,6 +2476,11 @@ static int lan78xx_reset(struct lan78xx_
|
||||
@@ -2477,6 +2477,11 @@ static int lan78xx_reset(struct lan78xx_
|
||||
int ret = 0;
|
||||
unsigned long timeout;
|
||||
u8 sig;
|
||||
@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
ret = lan78xx_read_reg(dev, HW_CFG, &buf);
|
||||
buf |= HW_CFG_LRST_;
|
||||
@@ -2529,6 +2534,9 @@ static int lan78xx_reset(struct lan78xx_
|
||||
@@ -2530,6 +2535,9 @@ static int lan78xx_reset(struct lan78xx_
|
||||
|
||||
ret = lan78xx_read_reg(dev, HW_CFG, &buf);
|
||||
buf |= HW_CFG_MEF_;
|
||||
@ -36,7 +36,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
ret = lan78xx_write_reg(dev, HW_CFG, buf);
|
||||
|
||||
ret = lan78xx_read_reg(dev, USB_CFG0, &buf);
|
||||
@@ -2584,6 +2592,9 @@ static int lan78xx_reset(struct lan78xx_
|
||||
@@ -2585,6 +2593,9 @@ static int lan78xx_reset(struct lan78xx_
|
||||
buf |= MAC_CR_AUTO_DUPLEX_ | MAC_CR_AUTO_SPEED_;
|
||||
}
|
||||
}
|
||||
|
@ -2119,17 +2119,6 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
+ <&cpu3>, "clock-frequency:0";
|
||||
+ };
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
mailbox@7e00b840 {
|
||||
compatible = "brcm,bcm2835-vchiq";
|
||||
- reg = <0x7e00b840 0xf>;
|
||||
+ reg = <0x7e00b840 0x3c>;
|
||||
interrupts = <0 2>;
|
||||
};
|
||||
};
|
||||
--- a/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
|
||||
@@ -21,7 +21,24 @@
|
||||
|
@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -2658,6 +2658,22 @@ static int lan78xx_open(struct net_devic
|
||||
@@ -2659,6 +2659,22 @@ static int lan78xx_open(struct net_devic
|
||||
|
||||
netif_dbg(dev, ifup, dev->net, "phy initialised successfully");
|
||||
|
||||
|
@ -21,7 +21,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -439,6 +439,15 @@ static int msg_level = -1;
|
||||
@@ -440,6 +440,15 @@ static int msg_level = -1;
|
||||
module_param(msg_level, int, 0);
|
||||
MODULE_PARM_DESC(msg_level, "Override default message level");
|
||||
|
||||
@ -37,7 +37,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
||||
static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data)
|
||||
{
|
||||
u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL);
|
||||
@@ -3009,8 +3018,14 @@ static int lan78xx_bind(struct lan78xx_n
|
||||
@@ -3010,8 +3019,14 @@ static int lan78xx_bind(struct lan78xx_n
|
||||
if (DEFAULT_RX_CSUM_ENABLE)
|
||||
dev->net->features |= NETIF_F_RXCSUM;
|
||||
|
||||
|
@ -16,7 +16,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -2190,6 +2190,22 @@ static int lan78xx_phy_init(struct lan78
|
||||
@@ -2191,6 +2191,22 @@ static int lan78xx_phy_init(struct lan78
|
||||
mii_adv = (u32)mii_advertise_flowctrl(dev->fc_request_control);
|
||||
phydev->advertising |= mii_adv_to_ethtool_adv_t(mii_adv);
|
||||
|
||||
@ -39,7 +39,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
if (phydev->mdio.dev.of_node) {
|
||||
u32 reg;
|
||||
int len;
|
||||
@@ -2667,22 +2683,6 @@ static int lan78xx_open(struct net_devic
|
||||
@@ -2668,22 +2684,6 @@ static int lan78xx_open(struct net_devic
|
||||
|
||||
netif_dbg(dev, ifup, dev->net, "phy initialised successfully");
|
||||
|
||||
|
@ -26,7 +26,7 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
int bcm2835_v4l2_debug;
|
||||
module_param_named(debug, bcm2835_v4l2_debug, int, 0644);
|
||||
MODULE_PARM_DESC(bcm2835_v4l2_debug, "Debug level 0-2");
|
||||
@@ -1980,3 +1974,9 @@ static struct platform_driver bcm2835_ca
|
||||
@@ -1989,3 +1983,9 @@ static struct platform_driver bcm2835_ca
|
||||
};
|
||||
|
||||
module_platform_driver(bcm2835_camera_driver)
|
@ -1,24 +0,0 @@
|
||||
From 8b6e9f2a951b38becf5b8a1e99ba1993f7751aac Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Date: Sat, 20 Oct 2018 19:26:18 +0200
|
||||
Subject: [PATCH] staging: bcm2835-camera: fix module autoloading
|
||||
|
||||
In order to make the module bcm2835-camera load automatically, we need to
|
||||
add a module alias.
|
||||
|
||||
Fixes: 4bebb0312ea9 ("staging/bcm2835-camera: Set ourselves up as a platform driver.")
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
---
|
||||
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
|
||||
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
|
||||
@@ -47,6 +47,7 @@ MODULE_DESCRIPTION("Broadcom 2835 MMAL v
|
||||
MODULE_AUTHOR("Vincent Sanders");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_VERSION(BM2835_MMAL_VERSION);
|
||||
+MODULE_ALIAS("platform:bcm2835-camera");
|
||||
|
||||
int bcm2835_v4l2_debug;
|
||||
module_param_named(debug, bcm2835_v4l2_debug, int, 0644);
|
@ -98,7 +98,7 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -1880,21 +1891,29 @@ static int bcm2835_mmal_probe(struct pla
|
||||
@@ -1886,21 +1897,29 @@ static int bcm2835_mmal_probe(struct pla
|
||||
snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name),
|
||||
"%s", BM2835_MMAL_MODULE_NAME);
|
||||
ret = v4l2_device_register(NULL, &dev->v4l2_dev);
|
||||
@ -132,7 +132,7 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
/* initialize queue */
|
||||
q = &dev->capture.vb_vidq;
|
||||
memset(q, 0, sizeof(*q));
|
||||
@@ -1912,16 +1931,19 @@ static int bcm2835_mmal_probe(struct pla
|
||||
@@ -1918,16 +1937,19 @@ static int bcm2835_mmal_probe(struct pla
|
||||
|
||||
/* initialise video devices */
|
||||
ret = bm2835_mmal_init_device(dev, &dev->vdev);
|
||||
@ -155,12 +155,12 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
goto unreg_dev;
|
||||
}
|
||||
|
||||
@@ -1945,8 +1967,6 @@ cleanup_gdev:
|
||||
@@ -1951,8 +1973,6 @@ cleanup_gdev:
|
||||
bcm2835_cleanup_instance(gdev[i]);
|
||||
gdev[i] = NULL;
|
||||
}
|
||||
- pr_info("%s: error %d while loading driver\n",
|
||||
- BM2835_MMAL_MODULE_NAME, ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
cleanup_mmal:
|
||||
vchiq_mmal_finalise(instance);
|
@ -1,41 +0,0 @@
|
||||
From b0ebcf556b543b0b509ad071584ca6b41076a2da Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
Date: Mon, 22 Oct 2018 11:09:18 +0200
|
||||
Subject: [PATCH] staging: bcm2835: Don't probe if no camera is
|
||||
detected
|
||||
|
||||
It is a waste of resources to load the camera driver in case there isn't
|
||||
a camera actually connected to the Raspberry Pi. This solution also
|
||||
avoids a NULL ptr dereference of mmal instance on driver unload.
|
||||
|
||||
Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.")
|
||||
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
|
||||
---
|
||||
.../vc04_services/bcm2835-camera/bcm2835-camera.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
|
||||
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
|
||||
@@ -1860,6 +1860,12 @@ static int bcm2835_mmal_probe(struct pla
|
||||
num_cameras = get_num_cameras(instance,
|
||||
resolutions,
|
||||
MAX_BCM2835_CAMERAS);
|
||||
+
|
||||
+ if (num_cameras < 1) {
|
||||
+ ret = -ENODEV;
|
||||
+ goto cleanup_mmal;
|
||||
+ }
|
||||
+
|
||||
if (num_cameras > MAX_BCM2835_CAMERAS)
|
||||
num_cameras = MAX_BCM2835_CAMERAS;
|
||||
|
||||
@@ -1968,6 +1974,9 @@ cleanup_gdev:
|
||||
gdev[i] = NULL;
|
||||
}
|
||||
|
||||
+cleanup_mmal:
|
||||
+ vchiq_mmal_finalise(instance);
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ See: https://github.com/raspberrypi/linux/issues/2447
|
||||
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -448,6 +448,11 @@ static bool enable_tso;
|
||||
@@ -449,6 +449,11 @@ static bool enable_tso;
|
||||
module_param(enable_tso, bool, 0644);
|
||||
MODULE_PARM_DESC(enable_tso, "Enables TCP segmentation offload");
|
||||
|
||||
@ -28,7 +28,7 @@ See: https://github.com/raspberrypi/linux/issues/2447
|
||||
static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data)
|
||||
{
|
||||
u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL);
|
||||
@@ -3823,7 +3828,12 @@ static int lan78xx_probe(struct usb_inte
|
||||
@@ -3838,7 +3843,12 @@ static int lan78xx_probe(struct usb_inte
|
||||
dev->pipe_intr = usb_rcvintpipe(dev->udev,
|
||||
dev->ep_intr->desc.bEndpointAddress &
|
||||
USB_ENDPOINT_NUMBER_MASK);
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user