From a7faf1a528501d605bc5d1255500a2832f62ad90 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Thu, 23 Feb 2017 01:27:00 +0000 Subject: [PATCH 1/9] linux: update to linux-4.10.0 --- packages/linux/package.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/linux/package.mk b/packages/linux/package.mk index e0f40ff065..0cf40b60e4 100644 --- a/packages/linux/package.mk +++ b/packages/linux/package.mk @@ -59,7 +59,7 @@ case "$LINUX" in PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET imx6-status-led imx6-soc-fan irqbalanced" ;; *) - PKG_VERSION="4.9.9" + PKG_VERSION="4.10" PKG_URL="http://www.kernel.org/pub/linux/kernel/v4.x/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_PATCH_DIRS="default" ;; From 491b7010f2f60a773caa3d41a52aac1bebc01851 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Thu, 23 Feb 2017 01:27:00 +0000 Subject: [PATCH 2/9] linux: update config options --- projects/Generic/linux/linux.x86_64.conf | 98 +++++++++++++++++------- projects/RPi/linux/linux.arm.conf | 72 ++++++++++++----- projects/RPi2/linux/linux.arm.conf | 74 +++++++++++++----- 3 files changed, 176 insertions(+), 68 deletions(-) diff --git a/projects/Generic/linux/linux.x86_64.conf b/projects/Generic/linux/linux.x86_64.conf index 6fe671ae08..76d4a70d0a 100644 --- a/projects/Generic/linux/linux.x86_64.conf +++ b/projects/Generic/linux/linux.x86_64.conf @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86_64 4.9.0 Kernel Configuration +# Linux/x86_64 4.10.0 Kernel Configuration # CONFIG_64BIT=y CONFIG_X86_64=y @@ -164,6 +164,7 @@ CONFIG_CGROUP_DEVICE=y CONFIG_CGROUP_CPUACCT=y CONFIG_CGROUP_PERF=y # CONFIG_CGROUP_DEBUG is not set +# CONFIG_SOCK_CGROUP_DATA is not set # CONFIG_CHECKPOINT_RESTORE is not set CONFIG_NAMESPACES=y CONFIG_UTS_NS=y @@ -184,6 +185,7 @@ CONFIG_RD_GZIP=y # CONFIG_RD_XZ is not set # CONFIG_RD_LZO is not set # CONFIG_RD_LZ4 is not set +CONFIG_INITRAMFS_COMPRESSION=".gz" CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SYSCTL=y @@ -198,6 +200,7 @@ CONFIG_MULTIUSER=y # CONFIG_SGETMASK_SYSCALL is not set # CONFIG_SYSFS_SYSCALL is not set # CONFIG_SYSCTL_SYSCALL is not set +CONFIG_POSIX_TIMERS=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_ABSOLUTE_PERCPU=y @@ -330,8 +333,10 @@ CONFIG_BLOCK=y CONFIG_BLK_DEV_BSG=y CONFIG_BLK_DEV_BSGLIB=y # CONFIG_BLK_DEV_INTEGRITY is not set +# CONFIG_BLK_DEV_ZONED is not set # CONFIG_BLK_DEV_THROTTLING is not set # CONFIG_BLK_CMDLINE_PARSER is not set +# CONFIG_BLK_WBT is not set # # Partition Types @@ -395,6 +400,7 @@ CONFIG_X86_FAST_FEATURE_TESTS=y # CONFIG_X86_X2APIC is not set CONFIG_X86_MPPARSE=y # CONFIG_GOLDFISH is not set +# CONFIG_INTEL_RDT_A is not set # CONFIG_X86_EXTENDED_PLATFORM is not set CONFIG_X86_INTEL_LPSS=y CONFIG_X86_AMD_PLATFORM_DEVICE=y @@ -439,6 +445,7 @@ CONFIG_IOMMU_HELPER=y CONFIG_NR_CPUS=16 CONFIG_SCHED_SMT=y CONFIG_SCHED_MC=y +CONFIG_SCHED_MC_PRIO=y # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set @@ -607,6 +614,7 @@ CONFIG_ACPI_FAN=y CONFIG_ACPI_CPU_FREQ_PSS=y CONFIG_ACPI_PROCESSOR_CSTATE=y CONFIG_ACPI_PROCESSOR_IDLE=y +CONFIG_ACPI_CPPC_LIB=y CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_HOTPLUG_CPU=y CONFIG_ACPI_PROCESSOR_AGGREGATOR=y @@ -681,11 +689,6 @@ CONFIG_CPU_IDLE_GOV_MENU=y # CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set CONFIG_INTEL_IDLE=y -# -# Memory power savings -# -# CONFIG_I7300_IDLE is not set - # # Bus options (PCI etc.) # @@ -745,6 +748,7 @@ CONFIG_COREDUMP=y CONFIG_IA32_EMULATION=y # CONFIG_IA32_AOUT is not set # CONFIG_X86_X32 is not set +CONFIG_COMPAT_32=y CONFIG_COMPAT=y CONFIG_COMPAT_FOR_U64_ALIGNMENT=y CONFIG_SYSVIPC_COMPAT=y @@ -815,6 +819,8 @@ CONFIG_IPV6_NDISC_NODETYPE=y # CONFIG_IPV6_FOU_TUNNEL is not set # CONFIG_IPV6_MULTIPLE_TABLES is not set # CONFIG_IPV6_MROUTE is not set +# CONFIG_IPV6_SEG6_LWTUNNEL is not set +# CONFIG_IPV6_SEG6_HMAC is not set # CONFIG_NETWORK_SECMARK is not set CONFIG_NET_PTP_CLASSIFY=y # CONFIG_NETWORK_PHY_TIMESTAMPING is not set @@ -832,6 +838,7 @@ CONFIG_NETFILTER_NETLINK=m # CONFIG_NETFILTER_NETLINK_QUEUE is not set CONFIG_NETFILTER_NETLINK_LOG=m CONFIG_NF_CONNTRACK=m +# CONFIG_NF_LOG_NETDEV is not set # CONFIG_NF_CONNTRACK_MARK is not set # CONFIG_NF_CONNTRACK_PROCFS is not set # CONFIG_NF_CONNTRACK_EVENTS is not set @@ -935,7 +942,6 @@ CONFIG_NETFILTER_XT_MATCH_OWNER=m # CONFIG_NETFILTER_XT_MATCH_REALM is not set # CONFIG_NETFILTER_XT_MATCH_RECENT is not set # CONFIG_NETFILTER_XT_MATCH_SCTP is not set -# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set CONFIG_NETFILTER_XT_MATCH_STATE=m # CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set # CONFIG_NETFILTER_XT_MATCH_STRING is not set @@ -950,6 +956,7 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m # CONFIG_NF_DEFRAG_IPV4=m CONFIG_NF_CONNTRACK_IPV4=m +# CONFIG_NF_SOCKET_IPV4 is not set # CONFIG_NF_DUP_IPV4 is not set # CONFIG_NF_LOG_ARP is not set # CONFIG_NF_LOG_IPV4 is not set @@ -982,6 +989,7 @@ CONFIG_IP_NF_MANGLE=m # CONFIG_NF_DEFRAG_IPV6=m CONFIG_NF_CONNTRACK_IPV6=m +# CONFIG_NF_SOCKET_IPV6 is not set # CONFIG_NF_DUP_IPV6 is not set CONFIG_NF_REJECT_IPV6=m # CONFIG_NF_LOG_IPV6 is not set @@ -1046,7 +1054,6 @@ CONFIG_DNS_RESOLVER=y CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y -# CONFIG_SOCK_CGROUP_DATA is not set # CONFIG_CGROUP_NET_PRIO is not set # CONFIG_CGROUP_NET_CLASSID is not set CONFIG_NET_RX_BUSY_POLL=y @@ -1165,13 +1172,14 @@ CONFIG_WANT_DEV_COREDUMP=y # CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DEVRES is not set # CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set +# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set # CONFIG_SYS_HYPERVISOR is not set # CONFIG_GENERIC_CPU_DEVICES is not set CONFIG_GENERIC_CPU_AUTOPROBE=y CONFIG_REGMAP=y CONFIG_REGMAP_I2C=y CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_FENCE_TRACE is not set +# CONFIG_DMA_FENCE_TRACE is not set # # Bus devices @@ -1216,6 +1224,7 @@ CONFIG_VIRTIO_BLK=y CONFIG_NVME_CORE=y CONFIG_BLK_DEV_NVME=y # CONFIG_BLK_DEV_NVME_SCSI is not set +# CONFIG_NVME_FC is not set # # Misc devices @@ -1542,6 +1551,7 @@ CONFIG_VORTEX=y # CONFIG_TYPHOON is not set # CONFIG_NET_VENDOR_ADAPTEC is not set # CONFIG_NET_VENDOR_AGERE is not set +# CONFIG_NET_VENDOR_ALACRITECH is not set # CONFIG_NET_VENDOR_ALTEON is not set # CONFIG_ALTERA_TSE is not set CONFIG_NET_VENDOR_AMAZON=y @@ -1549,6 +1559,8 @@ CONFIG_NET_VENDOR_AMAZON=y CONFIG_NET_VENDOR_AMD=y # CONFIG_AMD8111_ETH is not set CONFIG_PCNET32=y +# CONFIG_AMD_XGBE is not set +# CONFIG_AMD_XGBE_HAVE_ECC is not set CONFIG_NET_VENDOR_ARC=y CONFIG_NET_VENDOR_ATHEROS=y CONFIG_ATL2=y @@ -1576,6 +1588,7 @@ CONFIG_NET_VENDOR_CAVIUM=y # CONFIG_THUNDER_NIC_BGX is not set # CONFIG_THUNDER_NIC_RGX is not set # CONFIG_LIQUIDIO is not set +# CONFIG_LIQUIDIO_VF is not set # CONFIG_NET_VENDOR_CHELSIO is not set # CONFIG_NET_VENDOR_CISCO is not set # CONFIG_CX_ECAT is not set @@ -1612,7 +1625,6 @@ CONFIG_NET_VENDOR_I825XX=y CONFIG_JME=y CONFIG_NET_VENDOR_MARVELL=y # CONFIG_MVMDIO is not set -# CONFIG_MVNETA_BM is not set CONFIG_SKGE=y # CONFIG_SKGE_DEBUG is not set CONFIG_SKGE_GENESIS=y @@ -1654,7 +1666,7 @@ CONFIG_NET_VENDOR_ROCKER=y CONFIG_NET_VENDOR_SIS=y CONFIG_SIS900=y CONFIG_SIS190=y -# CONFIG_SFC is not set +# CONFIG_NET_VENDOR_SOLARFLARE is not set # CONFIG_NET_VENDOR_SMSC is not set # CONFIG_NET_VENDOR_STMICRO is not set # CONFIG_NET_VENDOR_SUN is not set @@ -1670,6 +1682,7 @@ CONFIG_VIA_VELOCITY=y # CONFIG_HIPPI is not set # CONFIG_NET_SB1000 is not set CONFIG_PHYLIB=y +# CONFIG_LED_TRIGGER_PHY is not set # # MDIO bus device drivers @@ -1758,6 +1771,7 @@ CONFIG_USB_IPHETH=m # CONFIG_USB_VL600 is not set # CONFIG_USB_NET_CH9200 is not set CONFIG_WLAN=y +# CONFIG_WIRELESS_WDS is not set CONFIG_WLAN_VENDOR_ADMTEK=y # CONFIG_ADM8211 is not set CONFIG_ATH_COMMON=m @@ -2248,6 +2262,7 @@ CONFIG_I2C_MUX=m # CONFIG_I2C_MUX_PCA954x is not set # CONFIG_I2C_MUX_PINCTRL is not set # CONFIG_I2C_MUX_REG is not set +# CONFIG_I2C_MUX_MLXCPLD is not set CONFIG_I2C_HELPER_AUTO=y CONFIG_I2C_SMBUS=y CONFIG_I2C_ALGOBIT=y @@ -2309,6 +2324,7 @@ CONFIG_I2C_DESIGNWARE_PLATFORM=y # # Other I2C/SMBus bus drivers # +# CONFIG_I2C_MLXCPLD is not set # CONFIG_I2C_STUB is not set # CONFIG_I2C_SLAVE is not set # CONFIG_I2C_DEBUG_CORE is not set @@ -2353,6 +2369,7 @@ CONFIG_PINCONF=y CONFIG_GENERIC_PINCONF=y # CONFIG_DEBUG_PINCTRL is not set # CONFIG_PINCTRL_AMD is not set +# CONFIG_PINCTRL_SX150X is not set CONFIG_PINCTRL_BAYTRAIL=y CONFIG_PINCTRL_CHERRYVIEW=y # CONFIG_PINCTRL_BROXTON is not set @@ -2373,7 +2390,6 @@ CONFIG_GPIOLIB_IRQCHIP=y # CONFIG_GPIO_LYNXPOINT is not set # CONFIG_GPIO_MOCKUP is not set # CONFIG_GPIO_VX855 is not set -# CONFIG_GPIO_ZX is not set # # Port-mapped I/O GPIO drivers @@ -2393,7 +2409,6 @@ CONFIG_GPIOLIB_IRQCHIP=y # CONFIG_GPIO_PCF857X is not set # CONFIG_GPIO_SX150X is not set # CONFIG_GPIO_TPIC2810 is not set -# CONFIG_GPIO_TS4900 is not set # # MFD GPIO expanders @@ -2506,6 +2521,7 @@ CONFIG_SENSORS_IT87=m # CONFIG_SENSORS_MAX6697 is not set # CONFIG_SENSORS_MAX31790 is not set # CONFIG_SENSORS_MCP3021 is not set +# CONFIG_SENSORS_TC654 is not set # CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM73 is not set # CONFIG_SENSORS_LM75 is not set @@ -2555,6 +2571,7 @@ CONFIG_SENSORS_IT87=m # CONFIG_SENSORS_THMC50 is not set # CONFIG_SENSORS_TMP102 is not set # CONFIG_SENSORS_TMP103 is not set +# CONFIG_SENSORS_TMP108 is not set # CONFIG_SENSORS_TMP401 is not set # CONFIG_SENSORS_TMP421 is not set # CONFIG_SENSORS_VIA_CPUTEMP is not set @@ -2570,6 +2587,7 @@ CONFIG_SENSORS_IT87=m # CONFIG_SENSORS_W83L786NG is not set # CONFIG_SENSORS_W83627HF is not set CONFIG_SENSORS_W83627EHF=y +# CONFIG_SENSORS_XGENE is not set # # ACPI drivers @@ -2647,7 +2665,6 @@ CONFIG_MFD_CORE=y # CONFIG_MFD_DA9063 is not set # CONFIG_MFD_DA9150 is not set # CONFIG_MFD_DLN2 is not set -# CONFIG_MFD_EXYNOS_LPASS is not set # CONFIG_MFD_MC13XXX_I2C is not set # CONFIG_HTC_PASIC3 is not set # CONFIG_HTC_I2CPLD is not set @@ -2726,6 +2743,7 @@ CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y # CONFIG_MEDIA_RADIO_SUPPORT is not set # CONFIG_MEDIA_SDR_SUPPORT is not set CONFIG_MEDIA_RC_SUPPORT=y +# CONFIG_MEDIA_CEC_SUPPORT is not set # CONFIG_MEDIA_CONTROLLER is not set CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L2=m @@ -2746,6 +2764,7 @@ CONFIG_DVB_NET=y CONFIG_TTPCI_EEPROM=m CONFIG_DVB_MAX_ADAPTERS=8 # CONFIG_DVB_DYNAMIC_MINORS is not set +# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set # # Media drivers @@ -2781,6 +2800,7 @@ CONFIG_IR_IGUANA=m CONFIG_IR_TTUSBIR=m # CONFIG_RC_LOOPBACK is not set # CONFIG_IR_GPIO_CIR is not set +# CONFIG_IR_SERIAL is not set CONFIG_MEDIA_USB_SUPPORT=y # @@ -3221,6 +3241,7 @@ CONFIG_VGA_SWITCHEROO=y CONFIG_DRM=y CONFIG_DRM_MIPI_DSI=y # CONFIG_DRM_DP_AUX_CHARDEV is not set +# CONFIG_DRM_DEBUG_MM is not set CONFIG_DRM_KMS_HELPER=y CONFIG_DRM_KMS_FB_HELPER=y CONFIG_DRM_FBDEV_EMULATION=y @@ -3247,7 +3268,9 @@ CONFIG_DRM_AMDGPU_CIK=y CONFIG_DRM_AMD_ACP=y # CONFIG_DRM_NOUVEAU is not set CONFIG_DRM_I915=y -# CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT is not set +# CONFIG_DRM_I915_ALPHA_SUPPORT is not set +CONFIG_DRM_I915_CAPTURE_ERROR=y +CONFIG_DRM_I915_COMPRESS_ERROR=y CONFIG_DRM_I915_USERPTR=y # CONFIG_DRM_I915_GVT is not set @@ -3278,6 +3301,7 @@ CONFIG_DRM_BRIDGE=y # Display Interface Bridges # # CONFIG_DRM_ANALOGIX_ANX78XX is not set +# CONFIG_DRM_HISI_HIBMC is not set # CONFIG_DRM_LEGACY is not set # @@ -3588,6 +3612,8 @@ CONFIG_SND_SOC_I2C_AND_SPI=y # CONFIG_SND_SOC_BT_SCO is not set # CONFIG_SND_SOC_CS35L32 is not set # CONFIG_SND_SOC_CS35L33 is not set +# CONFIG_SND_SOC_CS35L34 is not set +# CONFIG_SND_SOC_CS42L42 is not set # CONFIG_SND_SOC_CS42L51_I2C is not set # CONFIG_SND_SOC_CS42L52 is not set # CONFIG_SND_SOC_CS42L56 is not set @@ -3604,6 +3630,7 @@ CONFIG_SND_SOC_I2C_AND_SPI=y CONFIG_SND_SOC_MAX98090=m # CONFIG_SND_SOC_MAX98504 is not set # CONFIG_SND_SOC_MAX9860 is not set +# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set # CONFIG_SND_SOC_PCM1681 is not set # CONFIG_SND_SOC_PCM179X_I2C is not set # CONFIG_SND_SOC_PCM3168A_I2C is not set @@ -3714,6 +3741,7 @@ CONFIG_LOGIRUMBLEPAD2_FF=y CONFIG_LOGIG940_FF=y CONFIG_LOGIWHEELS_FF=y # CONFIG_HID_MAGICMOUSE is not set +# CONFIG_HID_MAYFLASH is not set CONFIG_HID_MICROSOFT=y CONFIG_HID_MONTEREY=y CONFIG_HID_MULTITOUCH=m @@ -3744,6 +3772,7 @@ CONFIG_HID_TIVO=y CONFIG_HID_TOPSEED=y # CONFIG_HID_THINGM is not set # CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_UDRAW_PS3 is not set # CONFIG_HID_WACOM is not set CONFIG_HID_WIIMOTE=m CONFIG_HID_XINMO=y @@ -3880,6 +3909,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=m # CONFIG_USB_SERIAL_EDGEPORT is not set # CONFIG_USB_SERIAL_EDGEPORT_TI is not set # CONFIG_USB_SERIAL_F81232 is not set +# CONFIG_USB_SERIAL_F8153X is not set # CONFIG_USB_SERIAL_GARMIN is not set # CONFIG_USB_SERIAL_IPW is not set CONFIG_USB_SERIAL_IUU=m @@ -3956,10 +3986,6 @@ CONFIG_USB_SERIAL_PL2303=m # CONFIG_UWB is not set CONFIG_MMC=y # CONFIG_MMC_DEBUG is not set - -# -# MMC/SD/SDIO Card Drivers -# CONFIG_MMC_BLOCK=y CONFIG_MMC_BLOCK_MINORS=32 CONFIG_MMC_BLOCK_BOUNCE=y @@ -4036,6 +4062,8 @@ CONFIG_LEDS_CLASS_FLASH=y # # CONFIG_LEDS_BLINKM is not set # CONFIG_LEDS_MLXCPLD is not set +# CONFIG_LEDS_USER is not set +# CONFIG_LEDS_NIC78BX is not set # # LED Triggers @@ -4172,7 +4200,8 @@ CONFIG_DMA_ENGINE_RAID=y # # DMABUF options # -# CONFIG_SYNC_FILE is not set +CONFIG_SYNC_FILE=y +# CONFIG_SW_SYNC is not set CONFIG_DCA=m # CONFIG_AUXDISPLAY is not set CONFIG_UIO=y @@ -4203,7 +4232,6 @@ CONFIG_VIRTIO_MMIO=y # # CONFIG_HYPERV is not set CONFIG_STAGING=y -# CONFIG_SLICOSS is not set # CONFIG_PRISM2_USB is not set # CONFIG_COMEDI is not set CONFIG_RTL8192U=m @@ -4221,14 +4249,11 @@ CONFIG_VT6656=m # # CONFIG_SPEAKUP is not set CONFIG_STAGING_MEDIA=y -# CONFIG_MEDIA_CEC is not set CONFIG_DVB_CXD2099=m CONFIG_LIRC_STAGING=y # CONFIG_LIRC_BT829 is not set # CONFIG_LIRC_IMON is not set # CONFIG_LIRC_SASEM is not set -CONFIG_LIRC_SERIAL=m -CONFIG_LIRC_SERIAL_TRANSMITTER=y # CONFIG_LIRC_SIR is not set CONFIG_LIRC_XBOX=m # CONFIG_LIRC_ZILOG is not set @@ -4262,6 +4287,13 @@ CONFIG_COMMON_CLK=y # CONFIG_COMMON_CLK_NXP is not set # CONFIG_COMMON_CLK_PXA is not set # CONFIG_COMMON_CLK_PIC32 is not set +# CONFIG_COMMON_CLK_MT2701 is not set +# CONFIG_COMMON_CLK_MT2701_MMSYS is not set +# CONFIG_COMMON_CLK_MT2701_IMGSYS is not set +# CONFIG_COMMON_CLK_MT2701_VDECSYS is not set +# CONFIG_COMMON_CLK_MT2701_HIFSYS is not set +# CONFIG_COMMON_CLK_MT2701_ETHSYS is not set +# CONFIG_COMMON_CLK_MT2701_BDPSYS is not set # # Hardware Spinlock drivers @@ -4277,13 +4309,15 @@ CONFIG_CLKBLD_I8253=y # CONFIG_SH_TIMER_MTU2 is not set # CONFIG_SH_TIMER_TMU is not set # CONFIG_EM_TIMER_STI is not set -# CONFIG_MAILBOX is not set +CONFIG_MAILBOX=y +CONFIG_PCC=y +# CONFIG_ALTERA_MBOX is not set # CONFIG_IOMMU_SUPPORT is not set # # Remoteproc drivers # -# CONFIG_STE_MODEM_RPROC is not set +# CONFIG_REMOTEPROC is not set # # Rpmsg drivers @@ -4345,6 +4379,7 @@ CONFIG_THUNDERBOLT=m # # Firmware Drivers # +# CONFIG_ARM_SCPI_PROTOCOL is not set # CONFIG_EDD is not set CONFIG_FIRMWARE_MEMMAP=y # CONFIG_DELL_RBU is not set @@ -4367,6 +4402,12 @@ CONFIG_EFI_RUNTIME_WRAPPERS=y # CONFIG_EFI_BOOTLOADER_CONTROL is not set # CONFIG_EFI_CAPSULE_LOADER is not set # CONFIG_EFI_TEST is not set +CONFIG_APPLE_PROPERTIES=y +CONFIG_EFI_DEV_PATH_PARSER=y + +# +# Tegra firmware driver +# # # File systems @@ -4429,6 +4470,7 @@ CONFIG_AUTOFS4_FS=y CONFIG_FUSE_FS=m # CONFIG_CUSE is not set CONFIG_OVERLAY_FS=m +# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set # # Caches @@ -4484,7 +4526,6 @@ CONFIG_HFSPLUS_FS=m # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set -# CONFIG_LOGFS is not set # CONFIG_CRAMFS is not set CONFIG_SQUASHFS=y # CONFIG_SQUASHFS_FILE_CACHE is not set @@ -4611,6 +4652,7 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y # printk and dmesg options # CONFIG_PRINTK_TIME=y +CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 # CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_DYNAMIC_DEBUG is not set @@ -4766,6 +4808,7 @@ CONFIG_TRACING_SUPPORT=y # CONFIG_TEST_UDELAY is not set # CONFIG_MEMTEST is not set # CONFIG_TEST_STATIC_KEYS is not set +# CONFIG_BUG_ON_DATA_CORRUPTION is not set # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y # CONFIG_KGDB is not set @@ -4840,6 +4883,7 @@ CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=m CONFIG_CRYPTO_AKCIPHER2=y CONFIG_CRYPTO_KPP2=y +CONFIG_CRYPTO_ACOMP2=y # CONFIG_CRYPTO_RSA is not set # CONFIG_CRYPTO_DH is not set # CONFIG_CRYPTO_ECDH is not set diff --git a/projects/RPi/linux/linux.arm.conf b/projects/RPi/linux/linux.arm.conf index 0bb77feb60..458d9d2aef 100644 --- a/projects/RPi/linux/linux.arm.conf +++ b/projects/RPi/linux/linux.arm.conf @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm 4.9.8 Kernel Configuration +# Linux/arm 4.10.0 Kernel Configuration # CONFIG_ARM=y CONFIG_ARM_HAS_SG_CHAIN=y @@ -123,6 +123,7 @@ CONFIG_PROC_PID_CPUSET=y CONFIG_CGROUP_DEVICE=y CONFIG_CGROUP_CPUACCT=y # CONFIG_CGROUP_DEBUG is not set +# CONFIG_SOCK_CGROUP_DATA is not set # CONFIG_CHECKPOINT_RESTORE is not set CONFIG_NAMESPACES=y CONFIG_UTS_NS=y @@ -143,6 +144,7 @@ CONFIG_RD_GZIP=y # CONFIG_RD_XZ is not set # CONFIG_RD_LZO is not set # CONFIG_RD_LZ4 is not set +CONFIG_INITRAMFS_COMPRESSION=".gz" CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SYSCTL=y @@ -155,6 +157,7 @@ CONFIG_MULTIUSER=y # CONFIG_SGETMASK_SYSCALL is not set # CONFIG_SYSFS_SYSCALL is not set CONFIG_SYSCTL_SYSCALL=y +CONFIG_POSIX_TIMERS=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_ABSOLUTE_PERCPU is not set @@ -265,8 +268,10 @@ CONFIG_LBDAF=y CONFIG_BLK_DEV_BSG=y CONFIG_BLK_DEV_BSGLIB=y # CONFIG_BLK_DEV_INTEGRITY is not set +# CONFIG_BLK_DEV_ZONED is not set # CONFIG_BLK_DEV_THROTTLING is not set # CONFIG_BLK_CMDLINE_PARSER is not set +# CONFIG_BLK_WBT is not set # # Partition Types @@ -373,6 +378,7 @@ CONFIG_BCM2835_FAST_MEMCPY=y # # CONFIG_ARCH_OMAP2 is not set # CONFIG_ARCH_PICOXCELL is not set +# CONFIG_ARCH_OXNAS is not set # CONFIG_ARCH_REALVIEW is not set # CONFIG_ARCH_S3C64XX is not set # CONFIG_ARCH_WM8750 is not set @@ -645,6 +651,8 @@ CONFIG_IPV6_NDISC_NODETYPE=y # CONFIG_IPV6_FOU_TUNNEL is not set # CONFIG_IPV6_MULTIPLE_TABLES is not set # CONFIG_IPV6_MROUTE is not set +# CONFIG_IPV6_SEG6_LWTUNNEL is not set +# CONFIG_IPV6_SEG6_HMAC is not set # CONFIG_NETWORK_SECMARK is not set # CONFIG_NET_PTP_CLASSIFY is not set # CONFIG_NETWORK_PHY_TIMESTAMPING is not set @@ -662,6 +670,7 @@ CONFIG_NETFILTER_NETLINK=m # CONFIG_NETFILTER_NETLINK_QUEUE is not set CONFIG_NETFILTER_NETLINK_LOG=m CONFIG_NF_CONNTRACK=m +# CONFIG_NF_LOG_NETDEV is not set # CONFIG_NF_CONNTRACK_MARK is not set # CONFIG_NF_CONNTRACK_PROCFS is not set # CONFIG_NF_CONNTRACK_EVENTS is not set @@ -765,7 +774,6 @@ CONFIG_NETFILTER_XT_MATCH_OWNER=m # CONFIG_NETFILTER_XT_MATCH_REALM is not set # CONFIG_NETFILTER_XT_MATCH_RECENT is not set # CONFIG_NETFILTER_XT_MATCH_SCTP is not set -# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set CONFIG_NETFILTER_XT_MATCH_STATE=m # CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set # CONFIG_NETFILTER_XT_MATCH_STRING is not set @@ -780,6 +788,7 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m # CONFIG_NF_DEFRAG_IPV4=m CONFIG_NF_CONNTRACK_IPV4=m +# CONFIG_NF_SOCKET_IPV4 is not set # CONFIG_NF_DUP_IPV4 is not set # CONFIG_NF_LOG_ARP is not set # CONFIG_NF_LOG_IPV4 is not set @@ -812,6 +821,7 @@ CONFIG_IP_NF_MANGLE=m # CONFIG_NF_DEFRAG_IPV6=m CONFIG_NF_CONNTRACK_IPV6=m +# CONFIG_NF_SOCKET_IPV6 is not set # CONFIG_NF_DUP_IPV6 is not set CONFIG_NF_REJECT_IPV6=m # CONFIG_NF_LOG_IPV6 is not set @@ -873,7 +883,6 @@ CONFIG_DNS_RESOLVER=y # CONFIG_NET_SWITCHDEV is not set # CONFIG_NET_L3_MASTER_DEV is not set # CONFIG_NET_NCSI is not set -# CONFIG_SOCK_CGROUP_DATA is not set # CONFIG_CGROUP_NET_PRIO is not set # CONFIG_CGROUP_NET_CLASSID is not set CONFIG_NET_RX_BUSY_POLL=y @@ -994,6 +1003,7 @@ CONFIG_EXTRA_FIRMWARE="" # CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DEVRES is not set # CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set +# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set # CONFIG_SYS_HYPERVISOR is not set # CONFIG_GENERIC_CPU_DEVICES is not set CONFIG_REGMAP=y @@ -1002,7 +1012,7 @@ CONFIG_REGMAP_SPI=y CONFIG_REGMAP_MMIO=m CONFIG_REGMAP_IRQ=y CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_FENCE_TRACE is not set +# CONFIG_DMA_FENCE_TRACE is not set CONFIG_DMA_CMA=y # @@ -1053,6 +1063,7 @@ CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_ATA_OVER_ETH is not set # CONFIG_MG_DISK is not set # CONFIG_BLK_DEV_RBD is not set +# CONFIG_NVME_FC is not set # CONFIG_NVME_TARGET is not set # @@ -1209,6 +1220,7 @@ CONFIG_VETH=m # CONFIG_ETHERNET is not set CONFIG_PHYLIB=y CONFIG_SWPHY=y +# CONFIG_LED_TRIGGER_PHY is not set # # MDIO bus device drivers @@ -1298,6 +1310,7 @@ CONFIG_USB_IPHETH=m # CONFIG_USB_VL600 is not set # CONFIG_USB_NET_CH9200 is not set CONFIG_WLAN=y +# CONFIG_WIRELESS_WDS is not set CONFIG_WLAN_VENDOR_ADMTEK=y CONFIG_ATH_COMMON=m CONFIG_WLAN_VENDOR_ATH=y @@ -1649,7 +1662,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_FSL_LPUART is not set # CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set # CONFIG_SERIAL_ST_ASC is not set -# CONFIG_SERIAL_STM32 is not set # CONFIG_TTY_PRINTK is not set # CONFIG_HVC_DCC is not set # CONFIG_IPMI_HANDLER is not set @@ -1680,6 +1692,7 @@ CONFIG_I2C_MUX=m # CONFIG_I2C_MUX_PINCTRL is not set # CONFIG_I2C_MUX_REG is not set # CONFIG_I2C_DEMUX_PINCTRL is not set +# CONFIG_I2C_MUX_MLXCPLD is not set CONFIG_I2C_HELPER_AUTO=y CONFIG_I2C_ALGOBIT=y @@ -1784,6 +1797,7 @@ CONFIG_PINCONF=y # CONFIG_DEBUG_PINCTRL is not set # CONFIG_PINCTRL_AMD is not set # CONFIG_PINCTRL_SINGLE is not set +# CONFIG_PINCTRL_SX150X is not set CONFIG_PINCTRL_BCM2835=y CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y CONFIG_GPIOLIB=y @@ -1798,7 +1812,6 @@ CONFIG_GPIO_SYSFS=y # CONFIG_GPIO_ALTERA is not set CONFIG_GPIO_BCM_VIRT=y # CONFIG_GPIO_DWAPB is not set -# CONFIG_GPIO_EM is not set # CONFIG_GPIO_GENERIC_PLATFORM is not set # CONFIG_GPIO_GRGPIO is not set # CONFIG_GPIO_MOCKUP is not set @@ -1806,7 +1819,6 @@ CONFIG_GPIO_BCM_VIRT=y # CONFIG_GPIO_PL061 is not set # CONFIG_GPIO_XILINX is not set # CONFIG_GPIO_ZEVIO is not set -# CONFIG_GPIO_ZX is not set # # I2C GPIO expanders @@ -1819,7 +1831,6 @@ CONFIG_GPIO_BCM_VIRT=y # CONFIG_GPIO_PCF857X is not set # CONFIG_GPIO_SX150X is not set # CONFIG_GPIO_TPIC2810 is not set -# CONFIG_GPIO_TS4900 is not set # # MFD GPIO expanders @@ -1961,6 +1972,7 @@ CONFIG_HWMON=y # CONFIG_SENSORS_MAX6697 is not set # CONFIG_SENSORS_MAX31790 is not set # CONFIG_SENSORS_MCP3021 is not set +# CONFIG_SENSORS_TC654 is not set # CONFIG_SENSORS_ADCXX is not set # CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM70 is not set @@ -2014,6 +2026,7 @@ CONFIG_HWMON=y # CONFIG_SENSORS_THMC50 is not set # CONFIG_SENSORS_TMP102 is not set # CONFIG_SENSORS_TMP103 is not set +# CONFIG_SENSORS_TMP108 is not set # CONFIG_SENSORS_TMP401 is not set # CONFIG_SENSORS_TMP421 is not set # CONFIG_SENSORS_VT1211 is not set @@ -2123,7 +2136,6 @@ CONFIG_MFD_CORE=y # CONFIG_MFD_DA9063 is not set # CONFIG_MFD_DA9150 is not set # CONFIG_MFD_DLN2 is not set -# CONFIG_MFD_EXYNOS_LPASS is not set # CONFIG_MFD_MC13XXX_SPI is not set # CONFIG_MFD_MC13XXX_I2C is not set # CONFIG_MFD_HI6421_PMIC is not set @@ -2150,7 +2162,7 @@ CONFIG_MFD_CORE=y # CONFIG_MFD_RETU is not set # CONFIG_MFD_PCF50633 is not set # CONFIG_UCB1400_CORE is not set -# CONFIG_MFD_PM8921_CORE is not set +# CONFIG_MFD_PM8XXX is not set # CONFIG_MFD_RT5033 is not set CONFIG_MFD_RTSX_USB=y # CONFIG_MFD_RC5T583 is not set @@ -2249,6 +2261,7 @@ CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y CONFIG_MEDIA_RADIO_SUPPORT=y # CONFIG_MEDIA_SDR_SUPPORT is not set CONFIG_MEDIA_RC_SUPPORT=y +# CONFIG_MEDIA_CEC_SUPPORT is not set # CONFIG_MEDIA_CONTROLLER is not set CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L2=m @@ -2266,6 +2279,7 @@ CONFIG_DVB_NET=y CONFIG_TTPCI_EEPROM=m CONFIG_DVB_MAX_ADAPTERS=8 # CONFIG_DVB_DYNAMIC_MINORS is not set +# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set # # Media drivers @@ -2296,6 +2310,7 @@ CONFIG_IR_IGUANA=m CONFIG_IR_TTUSBIR=m # CONFIG_RC_LOOPBACK is not set CONFIG_IR_GPIO_CIR=m +# CONFIG_IR_SERIAL is not set CONFIG_MEDIA_USB_SUPPORT=y # @@ -2830,6 +2845,8 @@ CONFIG_SND_SOC_ADAU7002=m # CONFIG_SND_SOC_BT_SCO is not set # CONFIG_SND_SOC_CS35L32 is not set # CONFIG_SND_SOC_CS35L33 is not set +# CONFIG_SND_SOC_CS35L34 is not set +# CONFIG_SND_SOC_CS42L42 is not set # CONFIG_SND_SOC_CS42L51_I2C is not set # CONFIG_SND_SOC_CS42L52 is not set # CONFIG_SND_SOC_CS42L56 is not set @@ -2846,6 +2863,7 @@ CONFIG_SND_SOC_ADAU7002=m # CONFIG_SND_SOC_INNO_RK3036 is not set # CONFIG_SND_SOC_MAX98504 is not set # CONFIG_SND_SOC_MAX9860 is not set +# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set # CONFIG_SND_SOC_PCM1681 is not set # CONFIG_SND_SOC_PCM179X_I2C is not set # CONFIG_SND_SOC_PCM179X_SPI is not set @@ -2932,7 +2950,6 @@ CONFIG_HID_CHICONY=y # CONFIG_HID_CORSAIR is not set # CONFIG_HID_PRODIKEYS is not set # CONFIG_HID_CMEDIA is not set -# CONFIG_HID_CP2112 is not set CONFIG_HID_CYPRESS=y CONFIG_HID_DRAGONRISE=m CONFIG_DRAGONRISE_FF=y @@ -2963,6 +2980,7 @@ CONFIG_LOGIRUMBLEPAD2_FF=y CONFIG_LOGIG940_FF=y CONFIG_LOGIWHEELS_FF=y # CONFIG_HID_MAGICMOUSE is not set +# CONFIG_HID_MAYFLASH is not set CONFIG_HID_MICROSOFT=y CONFIG_HID_MONTEREY=y CONFIG_HID_MULTITOUCH=m @@ -2993,6 +3011,7 @@ CONFIG_HID_TIVO=y CONFIG_HID_TOPSEED=y # CONFIG_HID_THINGM is not set # CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_UDRAW_PS3 is not set # CONFIG_HID_WACOM is not set CONFIG_HID_WIIMOTE=m CONFIG_HID_XINMO=y @@ -3115,6 +3134,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=m # CONFIG_USB_SERIAL_EDGEPORT is not set # CONFIG_USB_SERIAL_EDGEPORT_TI is not set # CONFIG_USB_SERIAL_F81232 is not set +# CONFIG_USB_SERIAL_F8153X is not set # CONFIG_USB_SERIAL_GARMIN is not set # CONFIG_USB_SERIAL_IPW is not set CONFIG_USB_SERIAL_IUU=m @@ -3192,10 +3212,6 @@ CONFIG_MMC=y # CONFIG_MMC_DEBUG is not set CONFIG_PWRSEQ_EMMC=y CONFIG_PWRSEQ_SIMPLE=y - -# -# MMC/SD/SDIO Card Drivers -# CONFIG_MMC_BLOCK=y CONFIG_MMC_BLOCK_MINORS=32 CONFIG_MMC_BLOCK_BOUNCE=y @@ -3214,6 +3230,7 @@ CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PLTFM=y # CONFIG_MMC_SDHCI_OF_ARASAN is not set # CONFIG_MMC_SDHCI_OF_AT91 is not set +# CONFIG_MMC_SDHCI_CADENCE is not set # CONFIG_MMC_SDHCI_F_SDH30 is not set # CONFIG_MMC_SDHCI_IPROC is not set # CONFIG_MMC_SPI is not set @@ -3261,6 +3278,7 @@ CONFIG_LEDS_GPIO=y # LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) # # CONFIG_LEDS_BLINKM is not set +# CONFIG_LEDS_USER is not set # # LED Triggers @@ -3384,6 +3402,7 @@ CONFIG_RTC_DRV_PCF2127=m # CONFIG_RTC_DRV_PL030 is not set # CONFIG_RTC_DRV_PL031 is not set # CONFIG_RTC_DRV_SNVS is not set +# CONFIG_RTC_DRV_R7301 is not set # # HID Sensor RTC drivers @@ -3444,12 +3463,10 @@ CONFIG_VT6656=m # # CONFIG_SPEAKUP is not set CONFIG_STAGING_MEDIA=y -# CONFIG_MEDIA_CEC is not set CONFIG_LIRC_STAGING=y # CONFIG_LIRC_IMON is not set CONFIG_LIRC_RPI=m # CONFIG_LIRC_SASEM is not set -# CONFIG_LIRC_SERIAL is not set # CONFIG_LIRC_SIR is not set # CONFIG_LIRC_XBOX is not set # CONFIG_LIRC_ZILOG is not set @@ -3468,7 +3485,7 @@ CONFIG_LIRC_RPI=m # CONFIG_MOST is not set # CONFIG_KS7010 is not set # CONFIG_GREYBUS is not set -CONFIG_BCM2708_VCHIQ=y +CONFIG_BCM2835_VCHIQ=y # CONFIG_GOLDFISH is not set # CONFIG_CHROME_PLATFORMS is not set CONFIG_CLKDEV_LOOKUP=y @@ -3488,6 +3505,13 @@ CONFIG_COMMON_CLK=y # CONFIG_COMMON_CLK_NXP is not set # CONFIG_COMMON_CLK_PXA is not set # CONFIG_COMMON_CLK_PIC32 is not set +# CONFIG_COMMON_CLK_MT2701 is not set +# CONFIG_COMMON_CLK_MT2701_MMSYS is not set +# CONFIG_COMMON_CLK_MT2701_IMGSYS is not set +# CONFIG_COMMON_CLK_MT2701_VDECSYS is not set +# CONFIG_COMMON_CLK_MT2701_HIFSYS is not set +# CONFIG_COMMON_CLK_MT2701_ETHSYS is not set +# CONFIG_COMMON_CLK_MT2701_BDPSYS is not set # # Hardware Spinlock drivers @@ -3518,7 +3542,7 @@ CONFIG_BCM2835_MBOX=y # # Remoteproc drivers # -# CONFIG_STE_MODEM_RPROC is not set +# CONFIG_REMOTEPROC is not set # # Rpmsg drivers @@ -3565,6 +3589,7 @@ CONFIG_RESET_CONTROLLER=y # CONFIG_RESET_SUNXI is not set # CONFIG_TI_SYSCON_RESET is not set # CONFIG_RESET_ZYNQ is not set +# CONFIG_RESET_TEGRA_BPMP is not set # CONFIG_FMC is not set # @@ -3603,6 +3628,10 @@ CONFIG_RESET_CONTROLLER=y CONFIG_RASPBERRYPI_FIRMWARE=y # CONFIG_FW_CFG_SYSFS is not set +# +# Tegra firmware driver +# + # # File systems # @@ -3664,6 +3693,7 @@ CONFIG_AUTOFS4_FS=y CONFIG_FUSE_FS=m # CONFIG_CUSE is not set CONFIG_OVERLAY_FS=m +# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set # # Caches @@ -3715,7 +3745,6 @@ CONFIG_HFSPLUS_FS=y # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set -# CONFIG_LOGFS is not set # CONFIG_CRAMFS is not set CONFIG_SQUASHFS=y # CONFIG_SQUASHFS_FILE_CACHE is not set @@ -3842,6 +3871,7 @@ CONFIG_NLS_UTF8=y # printk and dmesg options # CONFIG_PRINTK_TIME=y +CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 # CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_DYNAMIC_DEBUG is not set @@ -3973,6 +4003,7 @@ CONFIG_TRACING_SUPPORT=y # CONFIG_TEST_UDELAY is not set # CONFIG_MEMTEST is not set # CONFIG_TEST_STATIC_KEYS is not set +# CONFIG_BUG_ON_DATA_CORRUPTION is not set # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y # CONFIG_KGDB is not set @@ -4025,6 +4056,7 @@ CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=m CONFIG_CRYPTO_AKCIPHER2=y CONFIG_CRYPTO_KPP2=y +CONFIG_CRYPTO_ACOMP2=y # CONFIG_CRYPTO_RSA is not set # CONFIG_CRYPTO_DH is not set # CONFIG_CRYPTO_ECDH is not set diff --git a/projects/RPi2/linux/linux.arm.conf b/projects/RPi2/linux/linux.arm.conf index e1a2eecc40..1c0a83ef01 100644 --- a/projects/RPi2/linux/linux.arm.conf +++ b/projects/RPi2/linux/linux.arm.conf @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm 4.9.8 Kernel Configuration +# Linux/arm 4.10.0 Kernel Configuration # CONFIG_ARM=y CONFIG_ARM_HAS_SG_CHAIN=y @@ -127,6 +127,7 @@ CONFIG_PROC_PID_CPUSET=y CONFIG_CGROUP_DEVICE=y CONFIG_CGROUP_CPUACCT=y # CONFIG_CGROUP_DEBUG is not set +# CONFIG_SOCK_CGROUP_DATA is not set # CONFIG_CHECKPOINT_RESTORE is not set CONFIG_NAMESPACES=y CONFIG_UTS_NS=y @@ -147,6 +148,7 @@ CONFIG_RD_GZIP=y # CONFIG_RD_XZ is not set # CONFIG_RD_LZO is not set # CONFIG_RD_LZ4 is not set +CONFIG_INITRAMFS_COMPRESSION=".gz" CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SYSCTL=y @@ -159,6 +161,7 @@ CONFIG_MULTIUSER=y # CONFIG_SGETMASK_SYSCALL is not set # CONFIG_SYSFS_SYSCALL is not set CONFIG_SYSCTL_SYSCALL=y +CONFIG_POSIX_TIMERS=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_ABSOLUTE_PERCPU is not set @@ -270,8 +273,10 @@ CONFIG_LBDAF=y CONFIG_BLK_DEV_BSG=y CONFIG_BLK_DEV_BSGLIB=y # CONFIG_BLK_DEV_INTEGRITY is not set +# CONFIG_BLK_DEV_ZONED is not set # CONFIG_BLK_DEV_THROTTLING is not set # CONFIG_BLK_CMDLINE_PARSER is not set +# CONFIG_BLK_WBT is not set # # Partition Types @@ -729,6 +734,8 @@ CONFIG_IPV6_NDISC_NODETYPE=y # CONFIG_IPV6_FOU_TUNNEL is not set # CONFIG_IPV6_MULTIPLE_TABLES is not set # CONFIG_IPV6_MROUTE is not set +# CONFIG_IPV6_SEG6_LWTUNNEL is not set +# CONFIG_IPV6_SEG6_HMAC is not set # CONFIG_NETWORK_SECMARK is not set # CONFIG_NET_PTP_CLASSIFY is not set # CONFIG_NETWORK_PHY_TIMESTAMPING is not set @@ -746,6 +753,7 @@ CONFIG_NETFILTER_NETLINK=m # CONFIG_NETFILTER_NETLINK_QUEUE is not set CONFIG_NETFILTER_NETLINK_LOG=m CONFIG_NF_CONNTRACK=m +# CONFIG_NF_LOG_NETDEV is not set # CONFIG_NF_CONNTRACK_MARK is not set # CONFIG_NF_CONNTRACK_PROCFS is not set # CONFIG_NF_CONNTRACK_EVENTS is not set @@ -849,7 +857,6 @@ CONFIG_NETFILTER_XT_MATCH_OWNER=m # CONFIG_NETFILTER_XT_MATCH_REALM is not set # CONFIG_NETFILTER_XT_MATCH_RECENT is not set # CONFIG_NETFILTER_XT_MATCH_SCTP is not set -# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set CONFIG_NETFILTER_XT_MATCH_STATE=m # CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set # CONFIG_NETFILTER_XT_MATCH_STRING is not set @@ -864,6 +871,7 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m # CONFIG_NF_DEFRAG_IPV4=m CONFIG_NF_CONNTRACK_IPV4=m +# CONFIG_NF_SOCKET_IPV4 is not set # CONFIG_NF_DUP_IPV4 is not set # CONFIG_NF_LOG_ARP is not set # CONFIG_NF_LOG_IPV4 is not set @@ -896,6 +904,7 @@ CONFIG_IP_NF_MANGLE=m # CONFIG_NF_DEFRAG_IPV6=m CONFIG_NF_CONNTRACK_IPV6=m +# CONFIG_NF_SOCKET_IPV6 is not set # CONFIG_NF_DUP_IPV6 is not set CONFIG_NF_REJECT_IPV6=m # CONFIG_NF_LOG_IPV6 is not set @@ -960,7 +969,6 @@ CONFIG_DNS_RESOLVER=y CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y -# CONFIG_SOCK_CGROUP_DATA is not set # CONFIG_CGROUP_NET_PRIO is not set # CONFIG_CGROUP_NET_CLASSID is not set CONFIG_NET_RX_BUSY_POLL=y @@ -1082,6 +1090,7 @@ CONFIG_EXTRA_FIRMWARE="" # CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DEVRES is not set # CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set +# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set # CONFIG_SYS_HYPERVISOR is not set # CONFIG_GENERIC_CPU_DEVICES is not set CONFIG_REGMAP=y @@ -1090,7 +1099,7 @@ CONFIG_REGMAP_SPI=y CONFIG_REGMAP_MMIO=y CONFIG_REGMAP_IRQ=y CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_FENCE_TRACE is not set +# CONFIG_DMA_FENCE_TRACE is not set CONFIG_DMA_CMA=y # @@ -1141,6 +1150,7 @@ CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_ATA_OVER_ETH is not set # CONFIG_MG_DISK is not set # CONFIG_BLK_DEV_RBD is not set +# CONFIG_NVME_FC is not set # CONFIG_NVME_TARGET is not set # @@ -1297,6 +1307,7 @@ CONFIG_VETH=m # CONFIG_ETHERNET is not set CONFIG_PHYLIB=y CONFIG_SWPHY=y +# CONFIG_LED_TRIGGER_PHY is not set # # MDIO bus device drivers @@ -1386,6 +1397,7 @@ CONFIG_USB_IPHETH=m # CONFIG_USB_VL600 is not set # CONFIG_USB_NET_CH9200 is not set CONFIG_WLAN=y +# CONFIG_WIRELESS_WDS is not set CONFIG_WLAN_VENDOR_ADMTEK=y CONFIG_ATH_COMMON=m CONFIG_WLAN_VENDOR_ATH=y @@ -1736,7 +1748,6 @@ CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_FSL_LPUART is not set # CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set # CONFIG_SERIAL_ST_ASC is not set -# CONFIG_SERIAL_STM32 is not set # CONFIG_TTY_PRINTK is not set # CONFIG_HVC_DCC is not set # CONFIG_IPMI_HANDLER is not set @@ -1767,6 +1778,7 @@ CONFIG_I2C_MUX=m # CONFIG_I2C_MUX_PINCTRL is not set # CONFIG_I2C_MUX_REG is not set # CONFIG_I2C_DEMUX_PINCTRL is not set +# CONFIG_I2C_MUX_MLXCPLD is not set CONFIG_I2C_HELPER_AUTO=y CONFIG_I2C_ALGOBIT=y @@ -1871,6 +1883,7 @@ CONFIG_PINCONF=y # CONFIG_DEBUG_PINCTRL is not set # CONFIG_PINCTRL_AMD is not set # CONFIG_PINCTRL_SINGLE is not set +# CONFIG_PINCTRL_SX150X is not set CONFIG_PINCTRL_BCM2835=y CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y CONFIG_GPIOLIB=y @@ -1885,7 +1898,6 @@ CONFIG_GPIO_SYSFS=y # CONFIG_GPIO_ALTERA is not set CONFIG_GPIO_BCM_VIRT=y # CONFIG_GPIO_DWAPB is not set -# CONFIG_GPIO_EM is not set # CONFIG_GPIO_GENERIC_PLATFORM is not set # CONFIG_GPIO_GRGPIO is not set # CONFIG_GPIO_MOCKUP is not set @@ -1894,7 +1906,6 @@ CONFIG_GPIO_BCM_VIRT=y # CONFIG_GPIO_SYSCON is not set # CONFIG_GPIO_XILINX is not set # CONFIG_GPIO_ZEVIO is not set -# CONFIG_GPIO_ZX is not set # # I2C GPIO expanders @@ -1907,7 +1918,6 @@ CONFIG_GPIO_BCM_VIRT=y # CONFIG_GPIO_PCF857X is not set # CONFIG_GPIO_SX150X is not set # CONFIG_GPIO_TPIC2810 is not set -# CONFIG_GPIO_TS4900 is not set # # MFD GPIO expanders @@ -2052,6 +2062,7 @@ CONFIG_HWMON=y # CONFIG_SENSORS_MAX6697 is not set # CONFIG_SENSORS_MAX31790 is not set # CONFIG_SENSORS_MCP3021 is not set +# CONFIG_SENSORS_TC654 is not set # CONFIG_SENSORS_ADCXX is not set # CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM70 is not set @@ -2105,6 +2116,7 @@ CONFIG_HWMON=y # CONFIG_SENSORS_THMC50 is not set # CONFIG_SENSORS_TMP102 is not set # CONFIG_SENSORS_TMP103 is not set +# CONFIG_SENSORS_TMP108 is not set # CONFIG_SENSORS_TMP401 is not set # CONFIG_SENSORS_TMP421 is not set # CONFIG_SENSORS_VT1211 is not set @@ -2214,7 +2226,6 @@ CONFIG_MFD_CORE=y # CONFIG_MFD_DA9063 is not set # CONFIG_MFD_DA9150 is not set # CONFIG_MFD_DLN2 is not set -# CONFIG_MFD_EXYNOS_LPASS is not set # CONFIG_MFD_MC13XXX_SPI is not set # CONFIG_MFD_MC13XXX_I2C is not set # CONFIG_MFD_HI6421_PMIC is not set @@ -2241,7 +2252,7 @@ CONFIG_MFD_CORE=y # CONFIG_MFD_RETU is not set # CONFIG_MFD_PCF50633 is not set # CONFIG_UCB1400_CORE is not set -# CONFIG_MFD_PM8921_CORE is not set +# CONFIG_MFD_PM8XXX is not set # CONFIG_MFD_RT5033 is not set CONFIG_MFD_RTSX_USB=y # CONFIG_MFD_RC5T583 is not set @@ -2341,6 +2352,7 @@ CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y CONFIG_MEDIA_RADIO_SUPPORT=y # CONFIG_MEDIA_SDR_SUPPORT is not set CONFIG_MEDIA_RC_SUPPORT=y +# CONFIG_MEDIA_CEC_SUPPORT is not set # CONFIG_MEDIA_CONTROLLER is not set CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L2=m @@ -2358,6 +2370,7 @@ CONFIG_DVB_NET=y CONFIG_TTPCI_EEPROM=m CONFIG_DVB_MAX_ADAPTERS=8 # CONFIG_DVB_DYNAMIC_MINORS is not set +# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set # # Media drivers @@ -2388,6 +2401,7 @@ CONFIG_IR_IGUANA=m CONFIG_IR_TTUSBIR=m # CONFIG_RC_LOOPBACK is not set CONFIG_IR_GPIO_CIR=m +# CONFIG_IR_SERIAL is not set CONFIG_MEDIA_USB_SUPPORT=y # @@ -2922,6 +2936,8 @@ CONFIG_SND_SOC_ADAU7002=m # CONFIG_SND_SOC_BT_SCO is not set # CONFIG_SND_SOC_CS35L32 is not set # CONFIG_SND_SOC_CS35L33 is not set +# CONFIG_SND_SOC_CS35L34 is not set +# CONFIG_SND_SOC_CS42L42 is not set # CONFIG_SND_SOC_CS42L51_I2C is not set # CONFIG_SND_SOC_CS42L52 is not set # CONFIG_SND_SOC_CS42L56 is not set @@ -2938,6 +2954,7 @@ CONFIG_SND_SOC_ADAU7002=m # CONFIG_SND_SOC_INNO_RK3036 is not set # CONFIG_SND_SOC_MAX98504 is not set # CONFIG_SND_SOC_MAX9860 is not set +# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set # CONFIG_SND_SOC_PCM1681 is not set # CONFIG_SND_SOC_PCM179X_I2C is not set # CONFIG_SND_SOC_PCM179X_SPI is not set @@ -3024,7 +3041,6 @@ CONFIG_HID_CHICONY=y # CONFIG_HID_CORSAIR is not set # CONFIG_HID_PRODIKEYS is not set # CONFIG_HID_CMEDIA is not set -# CONFIG_HID_CP2112 is not set CONFIG_HID_CYPRESS=y CONFIG_HID_DRAGONRISE=m CONFIG_DRAGONRISE_FF=y @@ -3055,6 +3071,7 @@ CONFIG_LOGIRUMBLEPAD2_FF=y CONFIG_LOGIG940_FF=y CONFIG_LOGIWHEELS_FF=y # CONFIG_HID_MAGICMOUSE is not set +# CONFIG_HID_MAYFLASH is not set CONFIG_HID_MICROSOFT=y CONFIG_HID_MONTEREY=y CONFIG_HID_MULTITOUCH=m @@ -3085,6 +3102,7 @@ CONFIG_HID_TIVO=y CONFIG_HID_TOPSEED=y # CONFIG_HID_THINGM is not set # CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_UDRAW_PS3 is not set # CONFIG_HID_WACOM is not set CONFIG_HID_WIIMOTE=m CONFIG_HID_XINMO=y @@ -3207,6 +3225,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=m # CONFIG_USB_SERIAL_EDGEPORT is not set # CONFIG_USB_SERIAL_EDGEPORT_TI is not set # CONFIG_USB_SERIAL_F81232 is not set +# CONFIG_USB_SERIAL_F8153X is not set # CONFIG_USB_SERIAL_GARMIN is not set # CONFIG_USB_SERIAL_IPW is not set CONFIG_USB_SERIAL_IUU=m @@ -3284,10 +3303,6 @@ CONFIG_MMC=y # CONFIG_MMC_DEBUG is not set CONFIG_PWRSEQ_EMMC=y CONFIG_PWRSEQ_SIMPLE=y - -# -# MMC/SD/SDIO Card Drivers -# CONFIG_MMC_BLOCK=y CONFIG_MMC_BLOCK_MINORS=32 CONFIG_MMC_BLOCK_BOUNCE=y @@ -3306,6 +3321,7 @@ CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PLTFM=y # CONFIG_MMC_SDHCI_OF_ARASAN is not set # CONFIG_MMC_SDHCI_OF_AT91 is not set +# CONFIG_MMC_SDHCI_CADENCE is not set # CONFIG_MMC_SDHCI_F_SDH30 is not set # CONFIG_MMC_SDHCI_IPROC is not set # CONFIG_MMC_SPI is not set @@ -3354,6 +3370,7 @@ CONFIG_LEDS_GPIO=y # # CONFIG_LEDS_BLINKM is not set # CONFIG_LEDS_SYSCON is not set +# CONFIG_LEDS_USER is not set # # LED Triggers @@ -3477,6 +3494,7 @@ CONFIG_RTC_DRV_PCF2127=m # CONFIG_RTC_DRV_PL030 is not set # CONFIG_RTC_DRV_PL031 is not set # CONFIG_RTC_DRV_SNVS is not set +# CONFIG_RTC_DRV_R7301 is not set # # HID Sensor RTC drivers @@ -3537,12 +3555,10 @@ CONFIG_VT6656=m # # CONFIG_SPEAKUP is not set CONFIG_STAGING_MEDIA=y -# CONFIG_MEDIA_CEC is not set CONFIG_LIRC_STAGING=y # CONFIG_LIRC_IMON is not set CONFIG_LIRC_RPI=m # CONFIG_LIRC_SASEM is not set -# CONFIG_LIRC_SERIAL is not set # CONFIG_LIRC_SIR is not set # CONFIG_LIRC_XBOX is not set # CONFIG_LIRC_ZILOG is not set @@ -3561,7 +3577,7 @@ CONFIG_LIRC_RPI=m # CONFIG_MOST is not set # CONFIG_KS7010 is not set # CONFIG_GREYBUS is not set -CONFIG_BCM2708_VCHIQ=y +CONFIG_BCM2835_VCHIQ=y # CONFIG_GOLDFISH is not set # CONFIG_CHROME_PLATFORMS is not set CONFIG_CLKDEV_LOOKUP=y @@ -3581,6 +3597,13 @@ CONFIG_COMMON_CLK=y # CONFIG_COMMON_CLK_NXP is not set # CONFIG_COMMON_CLK_PXA is not set # CONFIG_COMMON_CLK_PIC32 is not set +# CONFIG_COMMON_CLK_MT2701 is not set +# CONFIG_COMMON_CLK_MT2701_MMSYS is not set +# CONFIG_COMMON_CLK_MT2701_IMGSYS is not set +# CONFIG_COMMON_CLK_MT2701_VDECSYS is not set +# CONFIG_COMMON_CLK_MT2701_HIFSYS is not set +# CONFIG_COMMON_CLK_MT2701_ETHSYS is not set +# CONFIG_COMMON_CLK_MT2701_BDPSYS is not set # # Hardware Spinlock drivers @@ -3613,7 +3636,7 @@ CONFIG_BCM2835_MBOX=y # # Remoteproc drivers # -# CONFIG_STE_MODEM_RPROC is not set +# CONFIG_REMOTEPROC is not set # # Rpmsg drivers @@ -3660,6 +3683,7 @@ CONFIG_RESET_CONTROLLER=y # CONFIG_RESET_SUNXI is not set # CONFIG_TI_SYSCON_RESET is not set # CONFIG_RESET_ZYNQ is not set +# CONFIG_RESET_TEGRA_BPMP is not set # CONFIG_FMC is not set # @@ -3699,6 +3723,10 @@ CONFIG_RASPBERRYPI_FIRMWARE=y # CONFIG_FW_CFG_SYSFS is not set CONFIG_HAVE_ARM_SMCCC=y +# +# Tegra firmware driver +# + # # File systems # @@ -3760,6 +3788,7 @@ CONFIG_AUTOFS4_FS=y CONFIG_FUSE_FS=m # CONFIG_CUSE is not set CONFIG_OVERLAY_FS=m +# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set # # Caches @@ -3811,7 +3840,6 @@ CONFIG_HFSPLUS_FS=y # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set -# CONFIG_LOGFS is not set # CONFIG_CRAMFS is not set CONFIG_SQUASHFS=y # CONFIG_SQUASHFS_FILE_CACHE is not set @@ -3938,6 +3966,7 @@ CONFIG_NLS_UTF8=y # printk and dmesg options # CONFIG_PRINTK_TIME=y +CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 # CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_DYNAMIC_DEBUG is not set @@ -4071,6 +4100,7 @@ CONFIG_TRACING_SUPPORT=y # CONFIG_TEST_UDELAY is not set # CONFIG_MEMTEST is not set # CONFIG_TEST_STATIC_KEYS is not set +# CONFIG_BUG_ON_DATA_CORRUPTION is not set # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y # CONFIG_KGDB is not set @@ -4123,6 +4153,7 @@ CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=m CONFIG_CRYPTO_AKCIPHER2=y CONFIG_CRYPTO_KPP2=y +CONFIG_CRYPTO_ACOMP2=y # CONFIG_CRYPTO_RSA is not set # CONFIG_CRYPTO_DH is not set # CONFIG_CRYPTO_ECDH is not set @@ -4139,7 +4170,7 @@ CONFIG_CRYPTO_CRYPTD=m # CONFIG_CRYPTO_MCRYPTD is not set # CONFIG_CRYPTO_AUTHENC is not set # CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_ABLK_HELPER=m +CONFIG_CRYPTO_SIMD=m # # Authenticated Encryption with Associated Data @@ -4252,6 +4283,7 @@ CONFIG_CRYPTO_AES_ARM=m CONFIG_CRYPTO_AES_ARM_BS=m # CONFIG_CRYPTO_AES_ARM_CE is not set # CONFIG_CRYPTO_GHASH_ARM_CE is not set +CONFIG_CRYPTO_CRC32_ARM_CE=y # CONFIG_BINARY_PRINTF is not set # From 966978ef92f708c2d57354f70b57fe8af9a84830 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Thu, 23 Feb 2017 01:27:00 +0000 Subject: [PATCH 3/9] linux: fix eMMC patch --- ...MC-Don-t-initialize-partitions-on-RPMB-flagged-are.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/linux/patches/default/linux-999.05-eMMC-Don-t-initialize-partitions-on-RPMB-flagged-are.patch b/packages/linux/patches/default/linux-999.05-eMMC-Don-t-initialize-partitions-on-RPMB-flagged-are.patch index b3eb8b34b0..02ff57e6e9 100644 --- a/packages/linux/patches/default/linux-999.05-eMMC-Don-t-initialize-partitions-on-RPMB-flagged-are.patch +++ b/packages/linux/patches/default/linux-999.05-eMMC-Don-t-initialize-partitions-on-RPMB-flagged-are.patch @@ -8,10 +8,10 @@ Prevents a lot of pointless hanging at boot on some devices. drivers/mmc/card/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c +diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index 4409d79..56df902 100644 ---- a/drivers/mmc/card/block.c -+++ b/drivers/mmc/card/block.c +--- a/drivers/mmc/core/block.c ++++ b/drivers/mmc/core/block.c @@ -2254,7 +2254,7 @@ static int mmc_blk_alloc_parts(struct mmc_card *card, struct mmc_blk_data *md) return 0; From 46dec136c43e0dbae1f63d6b01f45a4e76c953fa Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Thu, 23 Feb 2017 01:27:00 +0000 Subject: [PATCH 4/9] linux: drop obsolete patches, fix incompatible patches --- ...lson-limit-depth-of-display-pipeline.patch | 60 ------------- ...5-fixes-and-diagnostics-for-braswell.patch | 86 ------------------- 2 files changed, 146 deletions(-) delete mode 100644 packages/linux/patches/default/linux-999-i915-chris-wilson-limit-depth-of-display-pipeline.patch diff --git a/packages/linux/patches/default/linux-999-i915-chris-wilson-limit-depth-of-display-pipeline.patch b/packages/linux/patches/default/linux-999-i915-chris-wilson-limit-depth-of-display-pipeline.patch deleted file mode 100644 index e484b89c2f..0000000000 --- a/packages/linux/patches/default/linux-999-i915-chris-wilson-limit-depth-of-display-pipeline.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 428ce1a022a0bc30cf2d09cde4c1352a88d70d0a Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Fri, 26 Aug 2016 19:26:01 +0100 -Subject: [PATCH] drm/i915: Limit the depth of the display pipeline to the - framebuffer - -There is little point in using higher bitdepth inside the pipeline if -the endpoints are of lower accuracy. Using the higher bitdepth requires -extra bandwidth, often to the point of failure - such as signal loss and -blank displays. - -Since commit 7a0baa623446 ("Revert "drm/i915: Disable 12bpc hdmi for -now"") we have had users reporting blank screens and rightfully -complaining about the regressions. Whilst these are using due to some -other underlying bug, they have lingered and still remain unresolved. So -let's try a different tact and avoid using higher bitdepths than -required. - -Signed-off-by: Chris Wilson ---- - drivers/gpu/drm/i915/intel_display.c | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c -index af551a2c89ba..05ad77dae2e8 100644 ---- a/drivers/gpu/drm/i915/intel_display.c -+++ b/drivers/gpu/drm/i915/intel_display.c -@@ -12695,9 +12695,11 @@ compute_baseline_pipe_bpp(struct intel_crtc *crtc, - struct intel_crtc_state *pipe_config) - { - struct drm_device *dev = crtc->base.dev; -- struct drm_atomic_state *state; -+ struct drm_atomic_state *state = pipe_config->base.state; -+ - struct drm_connector *connector; - struct drm_connector_state *connector_state; -+ struct drm_plane_state *plane_state; - int bpp, i; - - if ((IS_G4X(dev) || IS_VALLEYVIEW(dev) || IS_CHERRYVIEW(dev))) -@@ -12707,11 +12709,14 @@ compute_baseline_pipe_bpp(struct intel_crtc *crtc, - else - bpp = 8*3; - -+ plane_state = drm_atomic_get_plane_state(state, crtc->base.primary); -+ if (plane_state->fb->depth < bpp) -+ bpp = 8*3; - -+ DRM_DEBUG_KMS("initial pipeline bpp = %d (fb depth %d)\n", -+ bpp, plane_state->fb->depth); - pipe_config->pipe_bpp = bpp; - -- state = pipe_config->base.state; -- - /* Clamp display bpp to EDID value */ - for_each_connector_in_state(state, connector, connector_state, i) { - if (connector_state->crtc != &crtc->base) --- -2.9.3 - diff --git a/packages/linux/patches/default/linux-999-i915-fixes-and-diagnostics-for-braswell.patch b/packages/linux/patches/default/linux-999-i915-fixes-and-diagnostics-for-braswell.patch index f07daafe09..2f23642755 100644 --- a/packages/linux/patches/default/linux-999-i915-fixes-and-diagnostics-for-braswell.patch +++ b/packages/linux/patches/default/linux-999-i915-fixes-and-diagnostics-for-braswell.patch @@ -1,89 +1,3 @@ -From 0db9810b18ffc46709ad00831c426712d5489aea Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Sat, 13 Aug 2016 21:32:17 +0100 -Subject: [PATCH 1/2] drm/i915: Show RPS autotuning thresholds along waitboost - ---- - drivers/gpu/drm/i915/i915_debugfs.c | 62 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 62 insertions(+) - -diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c -index 1035468..2cff44a 100644 ---- a/drivers/gpu/drm/i915/i915_debugfs.c -+++ b/drivers/gpu/drm/i915/i915_debugfs.c -@@ -2434,6 +2434,68 @@ static int i915_rps_boost_info(struct seq_file *m, void *data) - spin_unlock(&dev_priv->rps.client_lock); - mutex_unlock(&dev->filelist_mutex); - -+ if (INTEL_INFO(dev)->gen >= 6) { -+ u32 rpmodectl, rpinclimit, rpdeclimit; -+ u32 rpstat, cagf; -+ u32 rpupei, rpcurup, rpprevup; -+ u32 rpdownei, rpcurdown, rpprevdown; -+ -+ intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL); -+ -+ rpmodectl = I915_READ(GEN6_RP_CONTROL); -+ rpinclimit = I915_READ(GEN6_RP_UP_THRESHOLD); -+ rpdeclimit = I915_READ(GEN6_RP_DOWN_THRESHOLD); -+ -+ rpstat = I915_READ(GEN6_RPSTAT1); -+ rpupei = I915_READ(GEN6_RP_CUR_UP_EI) & GEN6_CURICONT_MASK; -+ rpcurup = I915_READ(GEN6_RP_CUR_UP) & GEN6_CURBSYTAVG_MASK; -+ rpprevup = I915_READ(GEN6_RP_PREV_UP) & GEN6_CURBSYTAVG_MASK; -+ rpdownei = I915_READ(GEN6_RP_CUR_DOWN_EI) & GEN6_CURIAVG_MASK; -+ rpcurdown = I915_READ(GEN6_RP_CUR_DOWN) & GEN6_CURBSYTAVG_MASK; -+ rpprevdown = I915_READ(GEN6_RP_PREV_DOWN) & GEN6_CURBSYTAVG_MASK; -+ intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL); -+ -+ if (IS_GEN9(dev)) -+ cagf = (rpstat & GEN9_CAGF_MASK) >> GEN9_CAGF_SHIFT; -+ else if (IS_HASWELL(dev) || IS_BROADWELL(dev)) -+ cagf = (rpstat & HSW_CAGF_MASK) >> HSW_CAGF_SHIFT; -+ else -+ cagf = (rpstat & GEN6_CAGF_MASK) >> GEN6_CAGF_SHIFT; -+ cagf = intel_gpu_freq(dev_priv, cagf); -+ -+ -+ seq_printf(m, "RP CUR UP EI: %d (%dus)\n", -+ rpupei, GT_PM_INTERVAL_TO_US(dev_priv, rpupei)); -+ seq_printf(m, "RP CUR UP: %d (%dus)\n", -+ rpcurup, GT_PM_INTERVAL_TO_US(dev_priv, rpcurup)); -+ seq_printf(m, "RP PREV UP: %d (%dus)\n", -+ rpprevup, GT_PM_INTERVAL_TO_US(dev_priv, rpprevup)); -+ seq_printf(m, "Up threshold: %d%%\n", -+ dev_priv->rps.up_threshold); -+ -+ seq_printf(m, "RP CUR DOWN EI: %d (%dus)\n", -+ rpdownei, GT_PM_INTERVAL_TO_US(dev_priv, rpdownei)); -+ seq_printf(m, "RP CUR DOWN: %d (%dus)\n", -+ rpcurdown, GT_PM_INTERVAL_TO_US(dev_priv, rpcurdown)); -+ seq_printf(m, "RP PREV DOWN: %d (%dus)\n", -+ rpprevdown, GT_PM_INTERVAL_TO_US(dev_priv, rpprevdown)); -+ seq_printf(m, "Down threshold: %d%%\n", -+ dev_priv->rps.down_threshold); -+ -+ seq_printf(m, "Current freq: %d MHz\n", -+ intel_gpu_freq(dev_priv, dev_priv->rps.cur_freq)); -+ seq_printf(m, "Actual freq: %d MHz\n", cagf); -+ seq_printf(m, "Idle freq: %d MHz\n", -+ intel_gpu_freq(dev_priv, dev_priv->rps.idle_freq)); -+ seq_printf(m, "Min freq: %d MHz\n", -+ intel_gpu_freq(dev_priv, dev_priv->rps.min_freq)); -+ seq_printf(m, "Max freq: %d MHz\n", -+ intel_gpu_freq(dev_priv, dev_priv->rps.max_freq)); -+ seq_printf(m, -+ "efficient (RPe) frequency: %d MHz\n", -+ intel_gpu_freq(dev_priv, dev_priv->rps.efficient_freq)); -+ } -+ - return 0; - } - --- -2.7.4 - - From d77c081cd5ea0d278b314ee2043556d2bd9aacaf Mon Sep 17 00:00:00 2001 From: fritsch Date: Sat, 13 Aug 2016 22:56:37 +0200 From 8d3956f72d79ea3648b19f4c705a38307bb03efb Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Thu, 23 Feb 2017 01:27:00 +0000 Subject: [PATCH 5/9] xf86-video-nvidia-legacy: kernel 4.10, no hotplug cpu support, bump 340.102 --- ...xf86-video-nvidia-legacy-kernel-4.10.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-kernel-4.10.patch diff --git a/packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-kernel-4.10.patch b/packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-kernel-4.10.patch new file mode 100644 index 0000000000..533ff3902e --- /dev/null +++ b/packages/x11/driver/xf86-video-nvidia-legacy/patches/xf86-video-nvidia-legacy-kernel-4.10.patch @@ -0,0 +1,33 @@ +diff --git a/kernel/nv-linux.h b/kernel/nv-linux.h +index e7068e3..3ac3c0b 100644 +--- a/kernel/nv-linux.h ++++ b/kernel/nv-linux.h +@@ -270,7 +270,7 @@ RM_STATUS nvos_forward_error_to_cray(struct pci_dev *, NvU32, + + extern int nv_pat_mode; + +-#if !defined(NV_VMWARE) && defined(CONFIG_HOTPLUG_CPU) ++#if 0 + #define NV_ENABLE_HOTPLUG_CPU + #include /* CPU hotplug support */ + #include /* struct notifier_block, etc */ +diff --git a/kernel/nv-pat.c b/kernel/nv-pat.c +index a725533..91070e0 100644 +--- a/kernel/nv-pat.c ++++ b/kernel/nv-pat.c +@@ -210,14 +210,13 @@ nvidia_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu + + switch (action) + { +- case CPU_DOWN_FAILED: + case CPU_ONLINE: + if (cpu == (NvUPtr)hcpu) + nv_setup_pat_entries(NULL); + else + NV_SMP_CALL_FUNCTION(nv_setup_pat_entries, hcpu, 1); + break; +- case CPU_DOWN_PREPARE: ++ case CPU_DOWN_PREPARE_FROZEN: + if (cpu == (NvUPtr)hcpu) + nv_restore_pat_entries(NULL); + else From c23c406f0d58ad35dddcf84bff7aead47a015982 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Thu, 23 Feb 2017 01:27:00 +0000 Subject: [PATCH 6/9] xf86-video-nvidia: kernel 4.10, no hotplug cpu support, bump 375.39 --- .../xf86-video-nvidia-kernel-4.10.patch | 282 ++++++++++++++++++ 1 file changed, 282 insertions(+) create mode 100644 packages/x11/driver/xf86-video-nvidia/patches/xf86-video-nvidia-kernel-4.10.patch diff --git a/packages/x11/driver/xf86-video-nvidia/patches/xf86-video-nvidia-kernel-4.10.patch b/packages/x11/driver/xf86-video-nvidia/patches/xf86-video-nvidia-kernel-4.10.patch new file mode 100644 index 0000000000..d37de31828 --- /dev/null +++ b/packages/x11/driver/xf86-video-nvidia/patches/xf86-video-nvidia-kernel-4.10.patch @@ -0,0 +1,282 @@ +diff --git a/kernel/common/inc/nv-linux.h b/kernel/common/inc/nv-linux.h +index e512ae2..8f58e63 100644 +--- a/kernel/common/inc/nv-linux.h ++++ b/kernel/common/inc/nv-linux.h +@@ -294,7 +294,8 @@ NV_STATUS nvos_forward_error_to_cray(struct pci_dev *, NvU32, + + extern int nv_pat_mode; + +-#if defined(CONFIG_HOTPLUG_CPU) ++//#if defined(CONFIG_HOTPLUG_CPU) ++#if 0 + #define NV_ENABLE_HOTPLUG_CPU + #include /* CPU hotplug support */ + #include /* struct notifier_block, etc */ +diff --git a/kernel/nvidia-drm/nvidia-drm-fence.c b/kernel/nvidia-drm/nvidia-drm-fence.c +index 5e98c5f..ec5eadc 100644 +--- a/kernel/nvidia-drm/nvidia-drm-fence.c ++++ b/kernel/nvidia-drm/nvidia-drm-fence.c +@@ -31,7 +31,7 @@ + + #if defined(NV_DRM_DRIVER_HAS_GEM_PRIME_RES_OBJ) + struct nv_fence { +- struct fence base; ++ struct dma_fence base; + spinlock_t lock; + + struct nvidia_drm_device *nv_dev; +@@ -51,7 +51,7 @@ nv_fence_ready_to_signal(struct nv_fence *nv_fence) + + static const char *nvidia_drm_gem_prime_fence_op_get_driver_name + ( +- struct fence *fence ++ struct dma_fence *fence + ) + { + return "NVIDIA"; +@@ -59,7 +59,7 @@ static const char *nvidia_drm_gem_prime_fence_op_get_driver_name + + static const char *nvidia_drm_gem_prime_fence_op_get_timeline_name + ( +- struct fence *fence ++ struct dma_fence *fence + ) + { + return "nvidia.prime"; +@@ -67,7 +67,7 @@ static const char *nvidia_drm_gem_prime_fence_op_get_timeline_name + + static bool nvidia_drm_gem_prime_fence_op_signaled + ( +- struct fence *fence ++ struct dma_fence *fence + ) + { + struct nv_fence *nv_fence = container_of(fence, struct nv_fence, base); +@@ -99,7 +99,7 @@ unlock_struct_mutex: + + static bool nvidia_drm_gem_prime_fence_op_enable_signaling + ( +- struct fence *fence ++ struct dma_fence *fence + ) + { + bool ret = true; +@@ -107,7 +107,7 @@ static bool nvidia_drm_gem_prime_fence_op_enable_signaling + struct nvidia_drm_gem_object *nv_gem = nv_fence->nv_gem; + struct nvidia_drm_device *nv_dev = nv_fence->nv_dev; + +- if (fence_is_signaled(fence)) ++ if (dma_fence_is_signaled(fence)) + { + return false; + } +@@ -136,7 +136,7 @@ static bool nvidia_drm_gem_prime_fence_op_enable_signaling + } + + nv_gem->fenceContext.softFence = fence; +- fence_get(fence); ++ dma_fence_get(fence); + + unlock_struct_mutex: + mutex_unlock(&nv_dev->dev->struct_mutex); +@@ -146,7 +146,7 @@ unlock_struct_mutex: + + static void nvidia_drm_gem_prime_fence_op_release + ( +- struct fence *fence ++ struct dma_fence *fence + ) + { + struct nv_fence *nv_fence = container_of(fence, struct nv_fence, base); +@@ -155,7 +155,7 @@ static void nvidia_drm_gem_prime_fence_op_release + + static signed long nvidia_drm_gem_prime_fence_op_wait + ( +- struct fence *fence, ++ struct dma_fence *fence, + bool intr, + signed long timeout + ) +@@ -170,12 +170,12 @@ static signed long nvidia_drm_gem_prime_fence_op_wait + * that it should never get hit during normal operation, but not so long + * that the system becomes unresponsive. + */ +- return fence_default_wait(fence, intr, ++ return dma_fence_default_wait(fence, intr, + (timeout == MAX_SCHEDULE_TIMEOUT) ? + msecs_to_jiffies(96) : timeout); + } + +-static const struct fence_ops nvidia_drm_gem_prime_fence_ops = { ++static const struct dma_fence_ops nvidia_drm_gem_prime_fence_ops = { + .get_driver_name = nvidia_drm_gem_prime_fence_op_get_driver_name, + .get_timeline_name = nvidia_drm_gem_prime_fence_op_get_timeline_name, + .signaled = nvidia_drm_gem_prime_fence_op_signaled, +@@ -285,7 +285,7 @@ static void nvidia_drm_gem_prime_fence_signal + bool force + ) + { +- struct fence *fence = nv_gem->fenceContext.softFence; ++ struct dma_fence *fence = nv_gem->fenceContext.softFence; + + WARN_ON(!mutex_is_locked(&nv_dev->dev->struct_mutex)); + +@@ -301,10 +301,10 @@ static void nvidia_drm_gem_prime_fence_signal + + if (force || nv_fence_ready_to_signal(nv_fence)) + { +- fence_signal(&nv_fence->base); ++ dma_fence_signal(&nv_fence->base); + + nv_gem->fenceContext.softFence = NULL; +- fence_put(&nv_fence->base); ++ dma_fence_put(&nv_fence->base); + + nvKms->disableChannelEvent(nv_dev->pDevice, + nv_gem->fenceContext.cb); +@@ -320,7 +320,7 @@ static void nvidia_drm_gem_prime_fence_signal + + nv_fence = container_of(fence, struct nv_fence, base); + +- fence_signal(&nv_fence->base); ++ dma_fence_signal(&nv_fence->base); + } + } + +@@ -513,7 +513,7 @@ int nvidia_drm_gem_prime_fence_init + * fence_context_alloc() cannot fail, so we do not need to check a return + * value. + */ +- nv_gem->fenceContext.context = fence_context_alloc(1); ++ nv_gem->fenceContext.context = dma_fence_context_alloc(1); + + ret = nvidia_drm_gem_prime_fence_import_semaphore( + nv_dev, nv_gem, p->index, +@@ -670,7 +670,7 @@ int nvidia_drm_gem_prime_fence_attach + nv_fence->nv_gem = nv_gem; + + spin_lock_init(&nv_fence->lock); +- fence_init(&nv_fence->base, &nvidia_drm_gem_prime_fence_ops, ++ dma_fence_init(&nv_fence->base, &nvidia_drm_gem_prime_fence_ops, + &nv_fence->lock, nv_gem->fenceContext.context, + p->sem_thresh); + +@@ -680,7 +680,7 @@ int nvidia_drm_gem_prime_fence_attach + + reservation_object_add_excl_fence(&nv_gem->fenceContext.resv, + &nv_fence->base); +- fence_put(&nv_fence->base); /* Reservation object has reference */ ++ dma_fence_put(&nv_fence->base); /* Reservation object has reference */ + + ret = 0; + +diff --git a/kernel/nvidia-drm/nvidia-drm-gem.h b/kernel/nvidia-drm/nvidia-drm-gem.h +index 4ff45e8..a2e518a 100644 +--- a/kernel/nvidia-drm/nvidia-drm-gem.h ++++ b/kernel/nvidia-drm/nvidia-drm-gem.h +@@ -98,7 +98,7 @@ struct nvidia_drm_gem_object + /* Software signaling structures */ + struct NvKmsKapiChannelEvent *cb; + struct nvidia_drm_gem_prime_soft_fence_event_args *cbArgs; +- struct fence *softFence; /* Fence for software signaling */ ++ struct dma_fence *softFence; /* Fence for software signaling */ + } fenceContext; + #endif + }; +diff --git a/kernel/nvidia-drm/nvidia-drm-priv.h b/kernel/nvidia-drm/nvidia-drm-priv.h +index 1e9b9f9..e3dbe73 100644 +--- a/kernel/nvidia-drm/nvidia-drm-priv.h ++++ b/kernel/nvidia-drm/nvidia-drm-priv.h +@@ -34,7 +34,7 @@ + #endif + + #if defined(NV_DRM_DRIVER_HAS_GEM_PRIME_RES_OBJ) +-#include ++#include + #include + #endif + +diff --git a/kernel/nvidia-uvm/uvm8_test.c b/kernel/nvidia-uvm/uvm8_test.c +index 0e99917..abc8dcc 100644 +--- a/kernel/nvidia-uvm/uvm8_test.c ++++ b/kernel/nvidia-uvm/uvm8_test.c +@@ -103,7 +103,7 @@ static NV_STATUS uvm8_test_nv_kthread_q( + return NV_ERR_INVALID_STATE; + } + +-static NV_STATUS uvm8_test_get_kernel_virtual_address( ++static NV_STATUS uvm8_test_get_kernel_address( + UVM_TEST_GET_KERNEL_VIRTUAL_ADDRESS_PARAMS *params, + struct file *filp) + { +@@ -173,7 +173,7 @@ long uvm8_test_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) + UVM_ROUTE_CMD_STACK(UVM_TEST_RANGE_GROUP_RANGE_COUNT, uvm8_test_range_group_range_count); + UVM_ROUTE_CMD_STACK(UVM_TEST_GET_PREFETCH_FAULTS_REENABLE_LAPSE, uvm8_test_get_prefetch_faults_reenable_lapse); + UVM_ROUTE_CMD_STACK(UVM_TEST_SET_PREFETCH_FAULTS_REENABLE_LAPSE, uvm8_test_set_prefetch_faults_reenable_lapse); +- UVM_ROUTE_CMD_STACK(UVM_TEST_GET_KERNEL_VIRTUAL_ADDRESS, uvm8_test_get_kernel_virtual_address); ++ UVM_ROUTE_CMD_STACK(UVM_TEST_GET_KERNEL_VIRTUAL_ADDRESS, uvm8_test_get_kernel_address); + UVM_ROUTE_CMD_STACK(UVM_TEST_PMA_ALLOC_FREE, uvm8_test_pma_alloc_free); + UVM_ROUTE_CMD_STACK(UVM_TEST_PMM_ALLOC_FREE_ROOT, uvm8_test_pmm_alloc_free_root); + UVM_ROUTE_CMD_STACK(UVM_TEST_PMM_INJECT_PMA_EVICT_ERROR, uvm8_test_pmm_inject_pma_evict_error); +diff --git a/kernel/nvidia/nv-p2p.c b/kernel/nvidia/nv-p2p.c +index ed2e180..9aec502 100644 +--- a/kernel/nvidia/nv-p2p.c ++++ b/kernel/nvidia/nv-p2p.c +@@ -146,7 +146,7 @@ EXPORT_SYMBOL(nvidia_p2p_destroy_mapping); + int nvidia_p2p_get_pages( + uint64_t p2p_token, + uint32_t va_space, +- uint64_t virtual_address, ++ uint64_t address, + uint64_t length, + struct nvidia_p2p_page_table **page_table, + void (*free_callback)(void * data), +@@ -211,7 +211,7 @@ int nvidia_p2p_get_pages( + } + + status = rm_p2p_get_pages(sp, p2p_token, va_space, +- virtual_address, length, physical_addresses, wreqmb_h, ++ address, length, physical_addresses, wreqmb_h, + rreqmb_h, &entries, &gpu_uuid, *page_table, + free_callback, data); + if (status != NV_OK) +@@ -286,7 +286,7 @@ failed: + + if (bGetPages) + { +- rm_p2p_put_pages(sp, p2p_token, va_space, virtual_address, ++ rm_p2p_put_pages(sp, p2p_token, va_space, address, + gpu_uuid, *page_table); + } + +@@ -329,7 +329,7 @@ EXPORT_SYMBOL(nvidia_p2p_free_page_table); + int nvidia_p2p_put_pages( + uint64_t p2p_token, + uint32_t va_space, +- uint64_t virtual_address, ++ uint64_t address, + struct nvidia_p2p_page_table *page_table + ) + { +@@ -343,7 +343,7 @@ int nvidia_p2p_put_pages( + return rc; + } + +- status = rm_p2p_put_pages(sp, p2p_token, va_space, virtual_address, ++ status = rm_p2p_put_pages(sp, p2p_token, va_space, address, + page_table->gpu_uuid, page_table); + if (status == NV_OK) + nvidia_p2p_free_page_table(page_table); +diff --git a/kernel/nvidia/nv-pat.c b/kernel/nvidia/nv-pat.c +index df78020..78e8a69 100644 +--- a/kernel/nvidia/nv-pat.c ++++ b/kernel/nvidia/nv-pat.c +@@ -217,7 +217,7 @@ nvidia_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu + else + NV_SMP_CALL_FUNCTION(nv_setup_pat_entries, hcpu, 1); + break; +- case CPU_DOWN_PREPARE: ++ case CPU_DOWN_PREPARE_FROZEN: + if (cpu == (NvUPtr)hcpu) + nv_restore_pat_entries(NULL); + else From a4277b496bddfe999eb85bd4c1ddfbed498dc3bc Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Thu, 23 Feb 2017 01:27:00 +0000 Subject: [PATCH 7/9] Generic: Update support for Legacy HDMI audio drivers --- .../linux-030-LPE-audio-hdmi-BYT-CHT.patch | 545 ++++++++++-------- 1 file changed, 296 insertions(+), 249 deletions(-) diff --git a/projects/Generic/patches/linux/linux-030-LPE-audio-hdmi-BYT-CHT.patch b/projects/Generic/patches/linux/linux-030-LPE-audio-hdmi-BYT-CHT.patch index 9778657b37..dc6ca87ec1 100644 --- a/projects/Generic/patches/linux/linux-030-LPE-audio-hdmi-BYT-CHT.patch +++ b/projects/Generic/patches/linux/linux-030-LPE-audio-hdmi-BYT-CHT.patch @@ -1,7 +1,15 @@ -From b6c2cac5f8ddc368f455dcccfec397898c77bca4 Mon Sep 17 00:00:00 2001 +From patchwork Sat Jan 7 01:21:03 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 8bit +Subject: [V2,1/7] drm/i915: setup bridge for HDMI LPE audio driver From: Jerome Anand -Date: Mon, 12 Dec 2016 23:40:37 +0530 -Subject: [PATCH 1/7] drm/i915: setup bridge for HDMI LPE audio driver +X-Patchwork-Id: 131670 +Message-Id: <20170107012109.25744-2-jerome.anand@intel.com> +To: intel-gfx@lists.freedesktop.org, + alsa-devel@alsa-project.org +Cc: tiwai@suse.de, broonie@kernel.org, rakesh.a.ughreja@intel.com +Date: Sat, 7 Jan 2017 06:51:03 +0530 Enable support for HDMI LPE audio mode on Baytrail and Cherrytrail when HDaudio controller is not detected @@ -17,22 +25,43 @@ LPE audio device and creates a new sound card. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Jerome Anand --- + Documentation/gpu/i915.rst | 9 + drivers/gpu/drm/i915/Makefile | 3 + drivers/gpu/drm/i915/i915_drv.c | 8 +- drivers/gpu/drm/i915/i915_drv.h | 15 ++ - drivers/gpu/drm/i915/i915_irq.c | 27 +++ + drivers/gpu/drm/i915/i915_irq.c | 16 ++ drivers/gpu/drm/i915/i915_reg.h | 3 + - drivers/gpu/drm/i915/intel_lpe_audio.c | 363 +++++++++++++++++++++++++++++++++ - include/drm/intel_lpe_audio.h | 45 ++++ - 7 files changed, 462 insertions(+), 2 deletions(-) + drivers/gpu/drm/i915/intel_lpe_audio.c | 355 +++++++++++++++++++++++++++++++++ + include/drm/intel_lpe_audio.h | 45 +++++ + 8 files changed, 452 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_lpe_audio.c create mode 100644 include/drm/intel_lpe_audio.h +diff --git a/Documentation/gpu/i915.rst b/Documentation/gpu/i915.rst +index 104296d..bd9b767 100644 +--- a/Documentation/gpu/i915.rst ++++ b/Documentation/gpu/i915.rst +@@ -225,6 +225,15 @@ Display PLLs + .. kernel-doc:: drivers/gpu/drm/i915/intel_dpll_mgr.h + :internal: + ++intel hdmi lpe audio support ++---------------------------- ++ ++.. kernel-doc:: drivers/gpu/drm/i915/intel_lpe_audio.c ++ :doc: LPE Audio integration for HDMI or DP playback ++ ++.. kernel-doc:: drivers/gpu/drm/i915/intel_lpe_audio.c ++ :internal: ++ + Memory Management and Command Submission + ======================================== + diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile -index a998c2b..31a03caf 100644 +index 5196509..2bca239 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile -@@ -115,6 +115,9 @@ i915-y += intel_gvt.o +@@ -127,6 +127,9 @@ i915-y += intel_gvt.o include $(src)/gvt/Makefile endif @@ -43,10 +72,10 @@ index a998c2b..31a03caf 100644 CFLAGS_i915_trace_points.o := -I$(src) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c -index 18dfdd5..f15e7f6 100644 +index 4d22b4b..70d728b 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c -@@ -1134,7 +1134,8 @@ static void i915_driver_register(struct drm_i915_private *dev_priv) +@@ -1131,7 +1131,8 @@ static void i915_driver_register(struct drm_i915_private *dev_priv) if (IS_GEN5(dev_priv)) intel_gpu_ips_init(dev_priv); @@ -56,7 +85,7 @@ index 18dfdd5..f15e7f6 100644 /* * Some ports require correctly set-up hpd registers for detection to -@@ -1152,7 +1153,10 @@ static void i915_driver_register(struct drm_i915_private *dev_priv) +@@ -1149,7 +1150,10 @@ static void i915_driver_register(struct drm_i915_private *dev_priv) */ static void i915_driver_unregister(struct drm_i915_private *dev_priv) { @@ -69,12 +98,12 @@ index 18dfdd5..f15e7f6 100644 intel_gpu_ips_teardown(); acpi_video_unregister(); diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h -index 685e9e06..0970d6a 100644 +index 7b43662..2f8165e 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h -@@ -2081,6 +2081,12 @@ struct drm_i915_private { - - struct intel_encoder *dig_port_map[I915_MAX_PORTS]; +@@ -2460,6 +2460,12 @@ struct drm_i915_private { + /* Used to save the pipe-to-encoder mapping for audio */ + struct intel_encoder *av_enc_map[I915_MAX_PIPES]; + /* necessary resource sharing with HDMI LPE audio driver. */ + struct { @@ -85,16 +114,16 @@ index 685e9e06..0970d6a 100644 /* * NOTE: This is the dri1/ums dungeon, don't add stuff here. Your patch * will be rejected. Instead look for a better place. -@@ -2819,6 +2825,8 @@ struct drm_i915_cmd_table { +@@ -2859,6 +2865,8 @@ intel_info(const struct drm_i915_private *dev_priv) - #define HAS_POOLED_EU(dev) (INTEL_INFO(dev)->has_pooled_eu) + #define HAS_POOLED_EU(dev_priv) ((dev_priv)->info.has_pooled_eu) +#define HAS_LPE_AUDIO(dev_priv) ((dev_priv)->lpe_audio.platdev != NULL) + #define INTEL_PCH_DEVICE_ID_MASK 0xff00 #define INTEL_PCH_IBX_DEVICE_ID_TYPE 0x3b00 #define INTEL_PCH_CPT_DEVICE_ID_TYPE 0x1c00 -@@ -3569,6 +3577,13 @@ extern int i915_restore_state(struct drm_device *dev); +@@ -3620,6 +3628,13 @@ extern int i915_restore_state(struct drm_i915_private *dev_priv); void i915_setup_sysfs(struct drm_i915_private *dev_priv); void i915_teardown_sysfs(struct drm_i915_private *dev_priv); @@ -106,44 +135,36 @@ index 685e9e06..0970d6a 100644 +bool intel_lpe_audio_detect(struct drm_i915_private *dev_priv); + /* intel_i2c.c */ - extern int intel_setup_gmbus(struct drm_device *dev); - extern void intel_teardown_gmbus(struct drm_device *dev); + extern int intel_setup_gmbus(struct drm_i915_private *dev_priv); + extern void intel_teardown_gmbus(struct drm_i915_private *dev_priv); diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c -index 3fc286c..1af76e5 100644 +index a0e70f5..d9393d6a 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c -@@ -1797,6 +1797,14 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg) +@@ -1893,6 +1893,10 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg) + * signalled in iir */ valleyview_pipestat_irq_ack(dev_priv, iir, pipe_stats); - /* -+ * LPE audio interrupts are only enabled on Baytrail and -+ * CherryView platforms without HDaudio -+ */ + if (iir & (I915_LPE_PIPE_A_INTERRUPT | + I915_LPE_PIPE_B_INTERRUPT)) + intel_lpe_audio_irq_handler(dev_priv); + -+ /* + /* * VLV_IIR is single buffered, and reflects the level * from PIPESTAT/PORT_HOTPLUG_STAT, hence clear it last. - */ -@@ -1877,6 +1885,15 @@ static irqreturn_t cherryview_irq_handler(int irq, void *arg) +@@ -1973,6 +1977,11 @@ static irqreturn_t cherryview_irq_handler(int irq, void *arg) + * signalled in iir */ valleyview_pipestat_irq_ack(dev_priv, iir, pipe_stats); - /* -+ * LPE audio interrupts are only enabled on Baytrail and -+ * CherryView platforms without HDaudio -+ */ + if (iir & (I915_LPE_PIPE_A_INTERRUPT | + I915_LPE_PIPE_B_INTERRUPT | + I915_LPE_PIPE_C_INTERRUPT)) + intel_lpe_audio_irq_handler(dev_priv); + -+ /* + /* * VLV_IIR is single buffered, and reflects the level * from PIPESTAT/PORT_HOTPLUG_STAT, hence clear it last. - */ -@@ -3263,6 +3280,7 @@ static void vlv_display_irq_postinstall(struct drm_i915_private *dev_priv) +@@ -2914,6 +2923,7 @@ static void vlv_display_irq_postinstall(struct drm_i915_private *dev_priv) u32 pipestat_mask; u32 enable_mask; enum pipe pipe; @@ -151,13 +172,10 @@ index 3fc286c..1af76e5 100644 pipestat_mask = PLANE_FLIP_DONE_INT_STATUS_VLV | PIPE_CRC_DONE_INTERRUPT_STATUS; -@@ -3279,6 +3297,15 @@ static void vlv_display_irq_postinstall(struct drm_i915_private *dev_priv) +@@ -2930,6 +2940,12 @@ static void vlv_display_irq_postinstall(struct drm_i915_private *dev_priv) WARN_ON(dev_priv->irq_mask != ~0); -+ /* add interrupt masks unconditially here, the actual unmask -+ * will take place only if the LPE_AUDIO mode is detected -+ */ + val = (I915_LPE_PIPE_A_INTERRUPT | + I915_LPE_PIPE_B_INTERRUPT | + I915_LPE_PIPE_C_INTERRUPT); @@ -168,10 +186,10 @@ index 3fc286c..1af76e5 100644 GEN5_IRQ_INIT(VLV_, dev_priv->irq_mask, enable_mask); diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h -index 70d9616..570d293 100644 +index 00970aa..643bc6e 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h -@@ -2133,6 +2133,9 @@ enum skl_disp_power_wells { +@@ -2428,6 +2428,9 @@ enum skl_disp_power_wells { #define I915_ASLE_INTERRUPT (1<<0) #define I915_BSD_USER_INTERRUPT (1<<25) @@ -183,10 +201,10 @@ index 70d9616..570d293 100644 #define GEN7_FF_THREAD_MODE _MMIO(0x20a0) diff --git a/drivers/gpu/drm/i915/intel_lpe_audio.c b/drivers/gpu/drm/i915/intel_lpe_audio.c new file mode 100644 -index 0000000..e12e5f7 +index 0000000..05f5e4e --- /dev/null +++ b/drivers/gpu/drm/i915/intel_lpe_audio.c -@@ -0,0 +1,363 @@ +@@ -0,0 +1,355 @@ +/* + * Copyright © 2016 Intel Corporation + * @@ -257,7 +275,7 @@ index 0000000..e12e5f7 +#include +#include + -+static struct platform_device* ++static struct platform_device * +lpe_audio_platdev_create(struct drm_i915_private *dev_priv) +{ + struct drm_device *dev = &dev_priv->drm; @@ -347,10 +365,6 @@ index 0000000..e12e5f7 + + spin_lock_irqsave(&dev_priv->irq_lock, irqflags); + -+ /* -+ * VLV_IER is already set in the vlv_display_postinstall(), -+ * we only change VLV_IIR and VLV_IMR -+ */ + dev_priv->irq_mask &= ~val; + I915_WRITE(VLV_IIR, val); + I915_WRITE(VLV_IIR, val); @@ -369,10 +383,6 @@ index 0000000..e12e5f7 + + spin_lock_irqsave(&dev_priv->irq_lock, irqflags); + -+ /* -+ * VLV_IER is already set in the vlv_display_postinstall(), -+ * we only change VLV_IIR and VLV_IMR -+ */ + dev_priv->irq_mask |= val; + I915_WRITE(VLV_IMR, dev_priv->irq_mask); + I915_WRITE(VLV_IIR, val); @@ -412,6 +422,9 @@ index 0000000..e12e5f7 +{ + int ret; + ++ if (!HAS_LPE_AUDIO(dev_priv)) ++ return; ++ + ret = generic_handle_irq(dev_priv->lpe_audio.irq); + if (ret) + DRM_ERROR_RATELIMITED("error handling LPE audio irq: %d\n", @@ -537,9 +550,6 @@ index 0000000..e12e5f7 + + desc = irq_to_desc(dev_priv->lpe_audio.irq); + -+ /** -+ * mask LPE audio irq before destroying -+ */ + lpe_audio_irq_mask(&desc->irq_data); + + spin_lock_irqsave(&dev_priv->irq_lock, irqflags); @@ -602,10 +612,18 @@ index 0000000..a64c449 + +#endif /* _I915_LPE_AUDIO_H_ */ -From 026d0fa9c02c44917e07aaac6542ff79313bea25 Mon Sep 17 00:00:00 2001 +From patchwork Sat Jan 7 01:21:04 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [V2,2/7] drm/i915: Add support for audio driver notifications From: Jerome Anand -Date: Mon, 12 Dec 2016 23:40:38 +0530 -Subject: [PATCH 2/7] drm/i915: Add support for audio driver notifications +X-Patchwork-Id: 131671 +Message-Id: <20170107012109.25744-3-jerome.anand@intel.com> +To: intel-gfx@lists.freedesktop.org, + alsa-devel@alsa-project.org +Cc: tiwai@suse.de, broonie@kernel.org, rakesh.a.ughreja@intel.com +Date: Sat, 7 Jan 2017 06:51:04 +0530 Notifiations like mode change, hot plug and edid to the audio driver are added. This is inturn used by the @@ -625,10 +643,10 @@ Signed-off-by: Jerome Anand 5 files changed, 59 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h -index 0970d6a..c7c6c3a 100644 +index 2f8165e..263bc48 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h -@@ -3583,6 +3583,9 @@ int intel_lpe_audio_setup(struct drm_i915_private *dev_priv); +@@ -3634,6 +3634,9 @@ int intel_lpe_audio_setup(struct drm_i915_private *dev_priv); void intel_lpe_audio_teardown(struct drm_i915_private *dev_priv); void intel_lpe_audio_irq_handler(struct drm_i915_private *dev_priv); bool intel_lpe_audio_detect(struct drm_i915_private *dev_priv); @@ -637,9 +655,9 @@ index 0970d6a..c7c6c3a 100644 + bool connected); /* intel_i2c.c */ - extern int intel_setup_gmbus(struct drm_device *dev); + extern int intel_setup_gmbus(struct drm_i915_private *dev_priv); diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c -index 6c70a5b..bb2817a 100644 +index 16c2027..aeb37c2 100644 --- a/drivers/gpu/drm/i915/intel_audio.c +++ b/drivers/gpu/drm/i915/intel_audio.c @@ -24,6 +24,7 @@ @@ -650,29 +668,29 @@ index 6c70a5b..bb2817a 100644 #include "intel_drv.h" #include -@@ -525,6 +526,10 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder) - +@@ -630,6 +631,10 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder, if (acomp && acomp->audio_ops && acomp->audio_ops->pin_eld_notify) - acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr, (int) port); + acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr, + (int) port, (int) pipe); + + if (HAS_LPE_AUDIO(dev_priv)) + intel_lpe_audio_notify(dev_priv, connector->eld, port, -+ crtc->config->port_clock, true); ++ crtc_state->port_clock, true); } /** -@@ -553,6 +558,9 @@ void intel_audio_codec_disable(struct intel_encoder *intel_encoder) - +@@ -663,6 +668,9 @@ void intel_audio_codec_disable(struct intel_encoder *intel_encoder) if (acomp && acomp->audio_ops && acomp->audio_ops->pin_eld_notify) - acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr, (int) port); + acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr, + (int) port, (int) pipe); + + if (HAS_LPE_AUDIO(dev_priv)) -+ intel_lpe_audio_notify(dev_priv, NULL, port, 0, true); ++ intel_lpe_audio_notify(dev_priv, NULL, port, 0, false); } /** diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c -index 13c30617..188e935 100644 +index 0bcfead..377584e1 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c @@ -36,6 +36,7 @@ @@ -684,10 +702,10 @@ index 13c30617..188e935 100644 static struct drm_device *intel_hdmi_to_dev(struct intel_hdmi *intel_hdmi) diff --git a/drivers/gpu/drm/i915/intel_lpe_audio.c b/drivers/gpu/drm/i915/intel_lpe_audio.c -index e12e5f7..a141a9c 100644 +index 05f5e4e..2a3c1e8 100644 --- a/drivers/gpu/drm/i915/intel_lpe_audio.c +++ b/drivers/gpu/drm/i915/intel_lpe_audio.c -@@ -361,3 +361,49 @@ void intel_lpe_audio_teardown(struct drm_i915_private *dev_priv) +@@ -353,3 +353,49 @@ void intel_lpe_audio_teardown(struct drm_i915_private *dev_priv) spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags); } @@ -709,33 +727,33 @@ index e12e5f7..a141a9c 100644 + bool connected) +{ + unsigned long irq_flags; ++ struct intel_hdmi_lpe_audio_pdata *pdata = NULL; + -+ if (HAS_LPE_AUDIO(dev_priv)) { -+ struct intel_hdmi_lpe_audio_pdata *pdata = dev_get_platdata( -+ &(dev_priv->lpe_audio.platdev->dev)); ++ if (!HAS_LPE_AUDIO(dev_priv)) ++ return; + -+ spin_lock_irqsave(&pdata->lpe_audio_slock, -+ irq_flags); ++ pdata = dev_get_platdata( ++ &(dev_priv->lpe_audio.platdev->dev)); + -+ if (eld != NULL) { -+ memcpy(pdata->eld.eld_data, eld, -+ HDMI_MAX_ELD_BYTES); -+ pdata->eld.port_id = port; ++ spin_lock_irqsave(&pdata->lpe_audio_slock, irq_flags); + -+ if (tmds_clk_speed) -+ pdata->tmds_clock_speed = -+ tmds_clk_speed; -+ } -+ pdata->hdmi_connected = connected; -+ if (pdata->notify_audio_lpe) -+ pdata->notify_audio_lpe( -+ (eld != NULL) ? &pdata->eld : NULL); -+ else -+ pdata->notify_pending = true; ++ if (eld != NULL) { ++ memcpy(pdata->eld.eld_data, eld, ++ HDMI_MAX_ELD_BYTES); ++ pdata->eld.port_id = port; + -+ spin_unlock_irqrestore(&pdata->lpe_audio_slock, -+ irq_flags); ++ if (tmds_clk_speed) ++ pdata->tmds_clock_speed = tmds_clk_speed; + } ++ pdata->hdmi_connected = connected; ++ if (pdata->notify_audio_lpe) ++ pdata->notify_audio_lpe( ++ (eld != NULL) ? &pdata->eld : NULL); ++ else ++ pdata->notify_pending = true; ++ ++ spin_unlock_irqrestore(&pdata->lpe_audio_slock, ++ irq_flags); +} diff --git a/include/drm/intel_lpe_audio.h b/include/drm/intel_lpe_audio.h index a64c449..952de05 100644 @@ -750,10 +768,18 @@ index a64c449..952de05 100644 #define HDMI_MAX_ELD_BYTES 128 -From 583eb2ed11912125c7a63147a7e861c615dcb134 Mon Sep 17 00:00:00 2001 +From patchwork Sat Jan 7 01:21:05 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [V2,3/7] ALSA: add shell for Intel HDMI LPE audio driver From: Jerome Anand -Date: Mon, 12 Dec 2016 23:40:39 +0530 -Subject: [PATCH 3/7] ALSA: add shell for Intel HDMI LPE audio driver +X-Patchwork-Id: 131672 +Message-Id: <20170107012109.25744-4-jerome.anand@intel.com> +To: intel-gfx@lists.freedesktop.org, + alsa-devel@alsa-project.org +Cc: tiwai@suse.de, broonie@kernel.org, rakesh.a.ughreja@intel.com +Date: Sat, 7 Jan 2017 06:51:05 +0530 On Baytrail and Cherrytrail, HDaudio may be fused out or disabled by the BIOS. This driver enables an alternate path to the i915 @@ -775,10 +801,10 @@ Signed-off-by: Jerome Anand sound/Kconfig | 2 + sound/Makefile | 2 +- sound/x86/Kconfig | 16 + - sound/x86/Makefile | 8 + - sound/x86/intel_hdmi_lpe_audio.c | 622 +++++++++++++++++++++++++++++++++++ - sound/x86/intel_hdmi_lpe_audio.h | 692 +++++++++++++++++++++++++++++++++++++++ - 6 files changed, 1341 insertions(+), 1 deletion(-) + sound/x86/Makefile | 6 + + sound/x86/intel_hdmi_lpe_audio.c | 623 +++++++++++++++++++++++++++++++++++ + sound/x86/intel_hdmi_lpe_audio.h | 685 +++++++++++++++++++++++++++++++++++++++ + 6 files changed, 1333 insertions(+), 1 deletion(-) create mode 100644 sound/x86/Kconfig create mode 100644 sound/x86/Makefile create mode 100644 sound/x86/intel_hdmi_lpe_audio.c @@ -812,7 +838,7 @@ index c41bdf5..6de45d2 100644 # This one must be compilable even if sound is configured out diff --git a/sound/x86/Kconfig b/sound/x86/Kconfig new file mode 100644 -index 0000000..182adf3 +index 0000000..e9297d0 --- /dev/null +++ b/sound/x86/Kconfig @@ -0,0 +1,16 @@ @@ -827,31 +853,29 @@ index 0000000..182adf3 +config HDMI_LPE_AUDIO + tristate "HDMI audio without HDaudio on Intel Atom platforms" + depends on DRM_I915 -+ default n -+ help -+ Choose this option to support HDMI LPE Audio mode ++ default n ++ help ++ Choose this option to support HDMI LPE Audio mode + +endif # SND_X86 diff --git a/sound/x86/Makefile b/sound/x86/Makefile new file mode 100644 -index 0000000..78b2ae1 +index 0000000..baa6333 --- /dev/null +++ b/sound/x86/Makefile -@@ -0,0 +1,8 @@ -+DRIVER_NAME := hdmi_lpe_audio -+ +@@ -0,0 +1,6 @@ +ccflags-y += -Idrivers/gpu/drm/i915 + -+$(DRIVER_NAME)-objs += \ ++snd-hdmi-lpe-audio-objs += \ + intel_hdmi_lpe_audio.o + -+obj-$(CONFIG_HDMI_LPE_AUDIO) += $(DRIVER_NAME).o ++obj-$(CONFIG_HDMI_LPE_AUDIO) += snd-hdmi-lpe-audio.o diff --git a/sound/x86/intel_hdmi_lpe_audio.c b/sound/x86/intel_hdmi_lpe_audio.c new file mode 100644 -index 0000000..f31ab72 +index 0000000..61347ab --- /dev/null +++ b/sound/x86/intel_hdmi_lpe_audio.c -@@ -0,0 +1,622 @@ +@@ -0,0 +1,623 @@ +/* + * intel_hdmi_lpe_audio.c - Intel HDMI LPE audio driver for Atom platforms + * @@ -892,9 +916,9 @@ index 0000000..f31ab72 +#include "intel_hdmi_lpe_audio.h" + +/* globals*/ -+struct platform_device *gpdev; -+int _hdmi_state; -+union otm_hdmi_eld_t hdmi_eld; ++struct platform_device *hlpe_pdev; ++int hlpe_state; ++union otm_hdmi_eld_t hlpe_eld; + +struct hdmi_lpe_audio_ctx { + int irq; @@ -910,29 +934,30 @@ index 0000000..f31ab72 + +static inline void hdmi_set_eld(void *eld) +{ -+ int size = (sizeof(hdmi_eld)) > HDMI_MAX_ELD_BYTES ? -+ HDMI_MAX_ELD_BYTES : -+ (sizeof(hdmi_eld)); ++ int size; + -+ memcpy((void *)&hdmi_eld, eld, size); ++ BUILD_BUG_ON(sizeof(hlpe_eld) > HDMI_MAX_ELD_BYTES); ++ ++ size = sizeof(hlpe_eld); ++ memcpy((void *)&hlpe_eld, eld, size); +} + +static inline int hdmi_get_eld(void *eld) +{ -+ memcpy(eld, (void *)&hdmi_eld, sizeof(hdmi_eld)); ++ memcpy(eld, (void *)&hlpe_eld, sizeof(hlpe_eld)); + + { + int i; -+ uint8_t *eld_data = (uint8_t *)&hdmi_eld; ++ uint8_t *eld_data = (uint8_t *)&hlpe_eld; + + pr_debug("hdmi_get_eld:\n{{"); + -+ for (i = 0; i < sizeof(hdmi_eld); i++) ++ for (i = 0; i < sizeof(hlpe_eld); i++) + pr_debug("0x%x, ", eld_data[i]); + + pr_debug("}}\n"); + } -+ return HAD_SUCCESS; ++ return 0; +} + + @@ -940,7 +965,7 @@ index 0000000..f31ab72 +{ + struct hdmi_lpe_audio_ctx *ctx; + -+ ctx = platform_get_drvdata(gpdev); ++ ctx = platform_get_drvdata(hlpe_pdev); + return ctx; +} + @@ -955,9 +980,9 @@ index 0000000..f31ab72 + + pr_debug("%s: Enter", __func__); + -+ ctx = platform_get_drvdata(gpdev); ++ ctx = platform_get_drvdata(hlpe_pdev); + -+ if (_hdmi_state == hdmi_connector_status_disconnected) { ++ if (hlpe_state == hdmi_connector_status_disconnected) { + /* HDMI is not connected, assuming audio device is idle. */ + return false; + } @@ -981,17 +1006,17 @@ index 0000000..f31ab72 + struct hdmi_audio_event hdmi_audio_event; + int ret = 0; + -+ ctx = platform_get_drvdata(gpdev); ++ ctx = platform_get_drvdata(hlpe_pdev); + -+ if (_hdmi_state == hdmi_connector_status_disconnected) { ++ if (hlpe_state == hdmi_connector_status_disconnected) { + /* HDMI is not connected, assuming audio device + * is suspended already. + */ + return true; + } + -+ pr_debug("%s: _hdmi_state %d", __func__, -+ _hdmi_state); ++ pr_debug("%s: hlpe_state %d", __func__, ++ hlpe_state); + + if (ctx->had_interface) { + hdmi_audio_event.type = 0; @@ -1006,16 +1031,16 @@ index 0000000..f31ab72 +{ + struct hdmi_lpe_audio_ctx *ctx; + -+ ctx = platform_get_drvdata(gpdev); ++ ctx = platform_get_drvdata(hlpe_pdev); + -+ if (_hdmi_state == hdmi_connector_status_disconnected) { ++ if (hlpe_state == hdmi_connector_status_disconnected) { + /* HDMI is not connected, there is no need + * to resume audio device. + */ + return; + } + -+ pr_debug("%s: _hdmi_state %d", __func__, _hdmi_state); ++ pr_debug("%s: hlpe_state %d", __func__, hlpe_state); + + if (ctx->had_interface) + ctx->had_interface->resume(ctx->had_pvt_data); @@ -1027,7 +1052,7 @@ index 0000000..f31ab72 + + pr_debug("%s: Enter\n", __func__); + -+ ctx = platform_get_drvdata(gpdev); ++ ctx = platform_get_drvdata(hlpe_pdev); + + if (ctx->had_event_callbacks) + (*ctx->had_event_callbacks)(event, @@ -1043,13 +1068,13 @@ index 0000000..f31ab72 +{ + struct hdmi_lpe_audio_ctx *ctx; + -+ ctx = platform_get_drvdata(gpdev); ++ ctx = platform_get_drvdata(hlpe_pdev); + + pr_debug("%s: reg[0x%x] = 0x%x\n", __func__, reg, val); + + iowrite32(val, (ctx->mmio_start+reg)); + -+ return HAD_SUCCESS; ++ return 0; +} + +/** @@ -1061,10 +1086,10 @@ index 0000000..f31ab72 +{ + struct hdmi_lpe_audio_ctx *ctx; + -+ ctx = platform_get_drvdata(gpdev); ++ ctx = platform_get_drvdata(hlpe_pdev); + *val = ioread32(ctx->mmio_start+reg); + pr_debug("%s: reg[0x%x] = 0x%x\n", __func__, reg, *val); -+ return HAD_SUCCESS; ++ return 0; +} + +/** @@ -1077,7 +1102,7 @@ index 0000000..f31ab72 + struct hdmi_lpe_audio_ctx *ctx; + uint32_t val_tmp = 0; + -+ ctx = platform_get_drvdata(gpdev); ++ ctx = platform_get_drvdata(hlpe_pdev); + + val_tmp = (val & mask) | + ((ioread32(ctx->mmio_start + reg)) & ~mask); @@ -1085,7 +1110,7 @@ index 0000000..f31ab72 + iowrite32(val_tmp, (ctx->mmio_start+reg)); + pr_debug("%s: reg[0x%x] = 0x%x\n", __func__, reg, val_tmp); + -+ return HAD_SUCCESS; ++ return 0; +} + +/** @@ -1097,7 +1122,7 @@ index 0000000..f31ab72 + void *capabilities) +{ + struct hdmi_lpe_audio_ctx *ctx; -+ int ret = HAD_SUCCESS; ++ int ret = 0; + + ctx = get_hdmi_context(); + @@ -1130,12 +1155,12 @@ index 0000000..f31ab72 +{ + struct hdmi_lpe_audio_ctx *ctx; + -+ ctx = platform_get_drvdata(gpdev); ++ ctx = platform_get_drvdata(hlpe_pdev); + *reg_base = (uint32_t *)(ctx->mmio_start); + *config_offset = ctx->had_config_offset; + pr_debug("%s: reg_base = 0x%p, cfg_off = 0x%x\n", __func__, + *reg_base, *config_offset); -+ return HAD_SUCCESS; ++ return 0; +} + +/** @@ -1148,7 +1173,7 @@ index 0000000..f31ab72 +{ + struct hdmi_lpe_audio_ctx *ctx; + -+ ctx = platform_get_drvdata(gpdev); ++ ctx = platform_get_drvdata(hlpe_pdev); + + pr_debug("%s: cap_id = 0x%x\n", __func__, set_element); + @@ -1172,7 +1197,7 @@ index 0000000..f31ab72 + break; + } + -+ return HAD_SUCCESS; ++ return 0; +} + +static struct hdmi_audio_registers_ops hdmi_audio_reg_ops = { @@ -1194,7 +1219,7 @@ index 0000000..f31ab72 +{ + struct hdmi_lpe_audio_ctx *ctx; + -+ ctx = platform_get_drvdata(gpdev); ++ ctx = platform_get_drvdata(hlpe_pdev); + + pr_debug("%s: called\n", __func__); + @@ -1213,7 +1238,7 @@ index 0000000..f31ab72 + + ctx->had_event_callbacks = audio_callbacks; + -+ return HAD_SUCCESS; ++ return 0; +} + +void _had_wq(struct work_struct *work) @@ -1226,7 +1251,7 @@ index 0000000..f31ab72 +{ + struct hdmi_lpe_audio_ctx *ctx; + -+ ctx = platform_get_drvdata(gpdev); ++ ctx = platform_get_drvdata(hlpe_pdev); + + pr_debug("%s: called\n", __func__); + @@ -1240,7 +1265,7 @@ index 0000000..f31ab72 + pr_debug("%s: Scheduling HDMI audio work queue\n", __func__); + schedule_work(&ctx->hdmi_audio_wq); + -+ return HAD_SUCCESS; ++ return 0; +} + +static irqreturn_t display_pipe_interrupt_handler(int irq, void *dev_id) @@ -1251,7 +1276,7 @@ index 0000000..f31ab72 + + pr_debug("%s: Enter\n", __func__); + -+ ctx = platform_get_drvdata(gpdev); ++ ctx = platform_get_drvdata(hlpe_pdev); + + audio_reg = ctx->had_config_offset + AUD_HDMI_STATUS_v2; + hdmi_audio_read(audio_reg, &audio_stat); @@ -1274,7 +1299,7 @@ index 0000000..f31ab72 +static void notify_audio_lpe(void *audio_ptr) +{ + struct hdmi_lpe_audio_ctx *ctx = get_hdmi_context(); -+ struct intel_hdmi_lpe_audio_pdata *pdata = gpdev->dev.platform_data; ++ struct intel_hdmi_lpe_audio_pdata *pdata = hlpe_pdev->dev.platform_data; + struct intel_hdmi_lpe_audio_eld *eld = audio_ptr; + + if (pdata->hdmi_connected != true) { @@ -1282,9 +1307,9 @@ index 0000000..f31ab72 + pr_debug("%s: Event: HAD_NOTIFY_HOT_UNPLUG\n", + __func__); + -+ if (_hdmi_state == hdmi_connector_status_connected) { ++ if (hlpe_state == hdmi_connector_status_connected) { + -+ _hdmi_state = ++ hlpe_state = + hdmi_connector_status_disconnected; + + mid_hdmi_audio_signal_event( @@ -1298,7 +1323,7 @@ index 0000000..f31ab72 + + mid_hdmi_audio_signal_event(HAD_EVENT_HOT_PLUG); + -+ _hdmi_state = hdmi_connector_status_connected; ++ hlpe_state = hdmi_connector_status_connected; + + pr_debug("%s: HAD_NOTIFY_ELD : port = %d, tmds = %d\n", + __func__, eld->port_id, @@ -1328,7 +1353,7 @@ index 0000000..f31ab72 + void __iomem *mmio_start; + int ret = 0; + unsigned long flag_irq; -+ const struct pci_device_id cherryview_ids[] = { ++ static const struct pci_device_id cherryview_ids[] = { + {PCI_DEVICE(0x8086, 0x22b0)}, + {PCI_DEVICE(0x8086, 0x22b1)}, + {PCI_DEVICE(0x8086, 0x22b2)}, @@ -1339,8 +1364,8 @@ index 0000000..f31ab72 + pr_debug("Enter %s\n", __func__); + + /*TBD:remove globals*/ -+ gpdev = pdev; -+ _hdmi_state = hdmi_connector_status_disconnected; ++ hlpe_pdev = pdev; ++ hlpe_state = hdmi_connector_status_disconnected; + + /* get resources */ + irq = platform_get_irq(pdev, 0); @@ -1368,7 +1393,7 @@ index 0000000..f31ab72 + + /* setup interrupt handler */ + ret = request_irq(irq, display_pipe_interrupt_handler, -+ 0, /* FIXME: is IRQF_SHARED needed ? */ ++ 0, + pdev->name, + NULL); + if (ret < 0) { @@ -1443,7 +1468,7 @@ index 0000000..f31ab72 + iounmap(ctx->mmio_start); + free_irq(ctx->irq, NULL); + kfree(ctx); -+ return HAD_SUCCESS; ++ return 0; +} + +static int hdmi_lpe_audio_suspend(struct platform_device *pt_dev, @@ -1451,14 +1476,14 @@ index 0000000..f31ab72 +{ + pr_debug("Enter %s\n", __func__); + mid_hdmi_audio_suspend(NULL); -+ return HAD_SUCCESS; ++ return 0; +} + +static int hdmi_lpe_audio_resume(struct platform_device *pt_dev) +{ + pr_debug("Enter %s\n", __func__); + mid_hdmi_audio_resume(NULL); -+ return HAD_SUCCESS; ++ return 0; +} + +static struct platform_driver hdmi_lpe_audio_driver = { @@ -1476,10 +1501,10 @@ index 0000000..f31ab72 +MODULE_ALIAS("platform:hdmi_lpe_audio"); diff --git a/sound/x86/intel_hdmi_lpe_audio.h b/sound/x86/intel_hdmi_lpe_audio.h new file mode 100644 -index 0000000..d4b94f0a +index 0000000..8d92931 --- /dev/null +++ b/sound/x86/intel_hdmi_lpe_audio.h -@@ -0,0 +1,692 @@ +@@ -0,0 +1,685 @@ +/* + * intel_hdmi_lpe_audio.h - Intel HDMI LPE audio driver + * @@ -1514,16 +1539,11 @@ index 0000000..d4b94f0a +#include + +#define HMDI_LPE_AUDIO_DRIVER_NAME "intel-hdmi-lpe-audio" -+#define HAD_DRIVER_VERSION "0.01.003" +#define HAD_MAX_DEVICES 1 +#define HAD_MIN_CHANNEL 2 +#define HAD_MAX_CHANNEL 8 +#define HAD_NUM_OF_RING_BUFS 4 + -+/* HDMI Audio LPE Error Codes */ -+#define HAD_SUCCESS 0 -+#define HAD_FAIL 1 -+ +/* Assume 192KHz, 8channel, 25msec period */ +#define HAD_MAX_BUFFER (600*1024) +#define HAD_MIN_BUFFER (32*1024) @@ -1568,15 +1588,14 @@ index 0000000..d4b94f0a +#define OTM_HDMI_ELD_SIZE 128 + +union otm_hdmi_eld_t { -+ uint8_t eld_data[OTM_HDMI_ELD_SIZE]; -+ #pragma pack(1) ++ unsigned char eld_data[OTM_HDMI_ELD_SIZE]; + struct { + /* Byte[0] = ELD Version Number */ + union { -+ uint8_t byte0; ++ unsigned char byte0; + struct { -+ uint8_t reserved:3; /* Reserf */ -+ uint8_t eld_ver:5; /* ELD Version Number */ ++ unsigned char reserved:3; /* Reserf */ ++ unsigned char eld_ver:5; /* ELD Version Number */ + /* 00000b - reserved + * 00001b - first rev, obsoleted + * 00010b - version 2, supporting CEA version @@ -1589,10 +1608,10 @@ index 0000000..d4b94f0a + + /* Byte[1] = Vendor Version Field */ + union { -+ uint8_t vendor_version; ++ unsigned char vendor_version; + struct { -+ uint8_t reserved1:3; -+ uint8_t veld_ver:5; /* Version number of the ELD ++ unsigned char reserved1:3; ++ unsigned char veld_ver:5; /* Version number of the ELD + * extension. This value is + * provisioned and unique to + * each vendor. @@ -1601,79 +1620,79 @@ index 0000000..d4b94f0a + }; + + /* Byte[2] = Baseline Length field */ -+ uint8_t baseline_eld_length; /* Length of the Baseline structure ++ unsigned char baseline_eld_length; /* Length of the Baseline structure + * divided by Four. + */ + + /* Byte [3] = Reserved for future use */ -+ uint8_t byte3; ++ unsigned char byte3; + + /* Starting of the BaseLine EELD structure + * Byte[4] = Monitor Name Length + */ + union { -+ uint8_t byte4; ++ unsigned char byte4; + struct { -+ uint8_t mnl:5; -+ uint8_t cea_edid_rev_id:3; ++ unsigned char mnl:5; ++ unsigned char cea_edid_rev_id:3; + }; + }; + + /* Byte[5] = Capabilities */ + union { -+ uint8_t capabilities; ++ unsigned char capabilities; + struct { -+ uint8_t hdcp:1; /* HDCP support */ -+ uint8_t ai_support:1; /* AI support */ -+ uint8_t connection_type:2; /* Connection type ++ unsigned char hdcp:1; /* HDCP support */ ++ unsigned char ai_support:1; /* AI support */ ++ unsigned char connection_type:2; /* Connection type + * 00 - HDMI + * 01 - DP + * 10 -11 Reserved + * for future + * connection types + */ -+ uint8_t sadc:4; /* Indicates number of 3 bytes ++ unsigned char sadc:4; /* Indicates number of 3 bytes + * Short Audio Descriptors. + */ + }; + }; + + /* Byte[6] = Audio Synch Delay */ -+ uint8_t audio_synch_delay; /* Amount of time reported by the ++ unsigned char audio_synch_delay; /* Amount of time reported by the + * sink that the video trails audio + * in milliseconds. + */ + + /* Byte[7] = Speaker Allocation Block */ + union { -+ uint8_t speaker_allocation_block; ++ unsigned char speaker_allocation_block; + struct { -+ uint8_t flr:1; /*Front Left and Right channels*/ -+ uint8_t lfe:1; /*Low Frequency Effect channel*/ -+ uint8_t fc:1; /*Center transmission channel*/ -+ uint8_t rlr:1; /*Rear Left and Right channels*/ -+ uint8_t rc:1; /*Rear Center channel*/ -+ uint8_t flrc:1; /*Front left and Right of Center ++ unsigned char flr:1; /*Front Left and Right channels*/ ++ unsigned char lfe:1; /*Low Frequency Effect channel*/ ++ unsigned char fc:1; /*Center transmission channel*/ ++ unsigned char rlr:1; /*Rear Left and Right channels*/ ++ unsigned char rc:1; /*Rear Center channel*/ ++ unsigned char flrc:1; /*Front left and Right of Center + *transmission channels + */ -+ uint8_t rlrc:1; /*Rear left and Right of Center ++ unsigned char rlrc:1; /*Rear left and Right of Center + *transmission channels + */ -+ uint8_t reserved3:1; /* Reserved */ ++ unsigned char reserved3:1; /* Reserved */ + }; + }; + + /* Byte[8 - 15] - 8 Byte port identification value */ -+ uint8_t port_id_value[8]; ++ unsigned char port_id_value[8]; + + /* Byte[16 - 17] - 2 Byte Manufacturer ID */ -+ uint8_t manufacturer_id[2]; ++ unsigned char manufacturer_id[2]; + + /* Byte[18 - 19] - 2 Byte Product ID */ -+ uint8_t product_id[2]; ++ unsigned char product_id[2]; + + /* Byte [20-83] - 64 Bytes of BaseLine Data */ -+ uint8_t mn_sand_sads[64]; /* This will include ++ unsigned char mn_sand_sads[64]; /* This will include + * - ASCII string of Monitor name + * - List of 3 byte SADs + * - Zero padding @@ -1682,8 +1701,7 @@ index 0000000..d4b94f0a + /* Vendor ELD Block should continue here! + * No Vendor ELD block defined as of now. + */ -+ }; -+ #pragma pack() ++ } __packed; +}; + +/** @@ -2173,10 +2191,18 @@ index 0000000..d4b94f0a + +#endif -From ab09831890c2b114beb548e8a6de8e23534e5d62 Mon Sep 17 00:00:00 2001 +From patchwork Sat Jan 7 01:21:06 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [V2,4/7] ALSA: x86: hdmi: Add audio support for BYT and CHT From: Jerome Anand -Date: Mon, 12 Dec 2016 23:40:40 +0530 -Subject: [PATCH 4/7] ALSA: x86: hdmi: Add audio support for BYT and CHT +X-Patchwork-Id: 131675 +Message-Id: <20170107012109.25744-5-jerome.anand@intel.com> +To: intel-gfx@lists.freedesktop.org, + alsa-devel@alsa-project.org +Cc: tiwai@suse.de, broonie@kernel.org, rakesh.a.ughreja@intel.com +Date: Sat, 7 Jan 2017 06:51:06 +0530 Hdmi audio driver based on the child platform device created by gfx driver is implemented. @@ -2192,34 +2218,34 @@ Signed-off-by: Pierre-Louis Bossart Signed-off-by: Jerome Anand --- sound/x86/Makefile | 2 + - sound/x86/intel_hdmi_audio.c | 1907 ++++++++++++++++++++++++++++++++++++++ + sound/x86/intel_hdmi_audio.c | 1903 ++++++++++++++++++++++++++++++++++++++ sound/x86/intel_hdmi_audio.h | 201 ++++ sound/x86/intel_hdmi_audio_if.c | 551 +++++++++++ sound/x86/intel_hdmi_lpe_audio.c | 16 +- - 5 files changed, 2671 insertions(+), 6 deletions(-) + 5 files changed, 2667 insertions(+), 6 deletions(-) create mode 100644 sound/x86/intel_hdmi_audio.c create mode 100644 sound/x86/intel_hdmi_audio.h create mode 100644 sound/x86/intel_hdmi_audio_if.c diff --git a/sound/x86/Makefile b/sound/x86/Makefile -index 78b2ae1..bc074d0 100644 +index baa6333..e405280 100644 --- a/sound/x86/Makefile +++ b/sound/x86/Makefile -@@ -3,6 +3,8 @@ DRIVER_NAME := hdmi_lpe_audio +@@ -1,6 +1,8 @@ ccflags-y += -Idrivers/gpu/drm/i915 - $(DRIVER_NAME)-objs += \ + snd-hdmi-lpe-audio-objs += \ + intel_hdmi_audio.o \ + intel_hdmi_audio_if.o \ intel_hdmi_lpe_audio.o - obj-$(CONFIG_HDMI_LPE_AUDIO) += $(DRIVER_NAME).o + obj-$(CONFIG_HDMI_LPE_AUDIO) += snd-hdmi-lpe-audio.o diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c new file mode 100644 -index 0000000..461b7d7 +index 0000000..d7b57658 --- /dev/null +++ b/sound/x86/intel_hdmi_audio.c -@@ -0,0 +1,1907 @@ +@@ -0,0 +1,1903 @@ +/* + * intel_hdmi_audio.c - Intel HDMI audio driver + * @@ -2266,11 +2292,11 @@ index 0000000..461b7d7 +static char *hdmi_card_id = SNDRV_DEFAULT_STR1; +static struct snd_intelhad *had_data; + -+module_param(hdmi_card_index, int, 0444); -+MODULE_PARM_DESC(hdmi_card_index, ++module_param_named(index, hdmi_card_index, int, 0444); ++MODULE_PARM_DESC(index, + "Index value for INTEL Intel HDMI Audio controller."); -+module_param(hdmi_card_id, charp, 0444); -+MODULE_PARM_DESC(hdmi_card_id, ++module_param_named(id, hdmi_card_id, charp, 0444); ++MODULE_PARM_DESC(id, + "ID string for INTEL Intel HDMI Audio controller."); + +/* @@ -3567,9 +3593,7 @@ index 0000000..461b7d7 + } + stream->stream_status = STREAM_RUNNING; + -+ spin_lock_irqsave(&intelhaddata->had_spinlock, flag_irq); + had_stream->stream_type = HAD_RUNNING_STREAM; -+ spin_unlock_irqrestore(&intelhaddata->had_spinlock, flag_irq); + + /* Enable Audio */ + /* @@ -3639,7 +3663,6 @@ index 0000000..461b7d7 + + if (had_get_hwstate(intelhaddata)) { + pr_err("%s: HDMI cable plugged-out\n", __func__); -+ snd_pcm_stop(substream, SNDRV_PCM_STATE_DISCONNECTED); + retval = -ENODEV; + goto prep_end; + } @@ -4126,7 +4149,6 @@ index 0000000..461b7d7 +MODULE_DESCRIPTION("Intel HDMI Audio driver"); +MODULE_LICENSE("GPL v2"); +MODULE_SUPPORTED_DEVICE("{Intel,Intel_HAD}"); -+MODULE_VERSION(HAD_DRIVER_VERSION); diff --git a/sound/x86/intel_hdmi_audio.h b/sound/x86/intel_hdmi_audio.h new file mode 100644 index 0000000..1ef25b6 @@ -4892,7 +4914,7 @@ index 0000000..c650ba4 + return retval; +} diff --git a/sound/x86/intel_hdmi_lpe_audio.c b/sound/x86/intel_hdmi_lpe_audio.c -index f31ab72..16194c6 100644 +index 61347ab..bee1bb4 100644 --- a/sound/x86/intel_hdmi_lpe_audio.c +++ b/sound/x86/intel_hdmi_lpe_audio.c @@ -36,6 +36,7 @@ @@ -4902,8 +4924,8 @@ index f31ab72..16194c6 100644 +#include "intel_hdmi_audio.h" /* globals*/ - struct platform_device *gpdev; -@@ -461,9 +462,9 @@ static void notify_audio_lpe(void *audio_ptr) + struct platform_device *hlpe_pdev; +@@ -462,9 +463,9 @@ static void notify_audio_lpe(void *audio_ptr) /** * hdmi_lpe_audio_probe - start bridge with i915 * @@ -4916,7 +4938,7 @@ index f31ab72..16194c6 100644 */ static int hdmi_lpe_audio_probe(struct platform_device *pdev) { -@@ -505,8 +506,8 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev) +@@ -506,8 +507,8 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev) (unsigned int)res_mmio->start, (unsigned int)res_mmio->end); mmio_start = ioremap_nocache(res_mmio->start, @@ -4927,7 +4949,7 @@ index f31ab72..16194c6 100644 if (!mmio_start) { pr_err("Could not get ioremap\n"); return -EACCES; -@@ -556,11 +557,12 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev) +@@ -557,11 +558,12 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev) platform_set_drvdata(pdev, ctx); @@ -4941,7 +4963,7 @@ index f31ab72..16194c6 100644 if (pdata->notify_pending) { pr_debug("%s: handle pending notification\n", __func__); -@@ -584,6 +586,8 @@ static int hdmi_lpe_audio_remove(struct platform_device *pdev) +@@ -585,6 +587,8 @@ static int hdmi_lpe_audio_remove(struct platform_device *pdev) pr_debug("Enter %s\n", __func__); @@ -4951,10 +4973,18 @@ index f31ab72..16194c6 100644 ctx = platform_get_drvdata(pdev); iounmap(ctx->mmio_start); -From c87ce8ee9ca9f95c04ce71301a3cdff449613623 Mon Sep 17 00:00:00 2001 +From patchwork Sat Jan 7 01:21:07 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [V2,5/7] ALSA: x86: hdmi: Improve position reporting From: Jerome Anand -Date: Mon, 12 Dec 2016 23:40:41 +0530 -Subject: [PATCH 5/7] ALSA: x86: hdmi: Improve position reporting +X-Patchwork-Id: 131673 +Message-Id: <20170107012109.25744-6-jerome.anand@intel.com> +To: intel-gfx@lists.freedesktop.org, + alsa-devel@alsa-project.org +Cc: tiwai@suse.de, broonie@kernel.org, rakesh.a.ughreja@intel.com +Date: Sat, 7 Jan 2017 06:51:07 +0530 Use a hw register to calculate sub-period position reports. This makes PulseAudio happier. @@ -4967,10 +4997,10 @@ Signed-off-by: Jerome Anand 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c -index 461b7d7..d9ce750 100644 +index d7b57658..d2036bc 100644 --- a/sound/x86/intel_hdmi_audio.c +++ b/sound/x86/intel_hdmi_audio.c -@@ -1492,6 +1492,8 @@ static snd_pcm_uframes_t snd_intelhad_pcm_pointer( +@@ -1489,6 +1489,8 @@ static snd_pcm_uframes_t snd_intelhad_pcm_pointer( { struct snd_intelhad *intelhaddata; u32 bytes_rendered = 0; @@ -4979,7 +5009,7 @@ index 461b7d7..d9ce750 100644 /* pr_debug("snd_intelhad_pcm_pointer called\n"); */ -@@ -1502,6 +1504,14 @@ static snd_pcm_uframes_t snd_intelhad_pcm_pointer( +@@ -1499,6 +1501,14 @@ static snd_pcm_uframes_t snd_intelhad_pcm_pointer( return SNDRV_PCM_POS_XRUN; } @@ -4994,7 +5024,7 @@ index 461b7d7..d9ce750 100644 if (intelhaddata->stream_info.buffer_rendered) div_u64_rem(intelhaddata->stream_info.buffer_rendered, intelhaddata->stream_info.ring_buf_size, -@@ -1509,7 +1519,7 @@ static snd_pcm_uframes_t snd_intelhad_pcm_pointer( +@@ -1506,7 +1516,7 @@ static snd_pcm_uframes_t snd_intelhad_pcm_pointer( intelhaddata->stream_info.buffer_ptr = bytes_to_frames( substream->runtime, @@ -5004,10 +5034,18 @@ index 461b7d7..d9ce750 100644 } -From a23162c1f0c53395a827e2e092cd06065f5e5593 Mon Sep 17 00:00:00 2001 +From patchwork Sat Jan 7 01:21:08 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [V2,6/7] ALSA: x86: hdmi: Fixup some monitor From: Jerome Anand -Date: Mon, 12 Dec 2016 23:40:42 +0530 -Subject: [PATCH 6/7] ALSA: x86: hdmi: Fixup some monitor +X-Patchwork-Id: 131674 +Message-Id: <20170107012109.25744-7-jerome.anand@intel.com> +To: intel-gfx@lists.freedesktop.org, + alsa-devel@alsa-project.org +Cc: tiwai@suse.de, broonie@kernel.org, rakesh.a.ughreja@intel.com +Date: Sat, 7 Jan 2017 06:51:08 +0530 This change was given to Canonical apparently to fix an issue with on some monitor brand. It's not clear what this patch does but it doesn't @@ -5021,7 +5059,7 @@ Signed-off-by: Jerome Anand 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c -index d9ce750..9249521 100644 +index d2036bc..91efbeb 100644 --- a/sound/x86/intel_hdmi_audio.c +++ b/sound/x86/intel_hdmi_audio.c @@ -337,6 +337,7 @@ static void snd_intelhad_reset_audio_v2(u8 reset) @@ -5057,11 +5095,20 @@ index d9ce750..9249521 100644 return 0; } -From b499980493120fe978ddccdf0f48d0a3e2af279f Mon Sep 17 00:00:00 2001 +From patchwork Sat Jan 7 01:21:09 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [V2, + 7/7] ALSA: x86: hdmi: continue playback even when display resolution + changes From: Jerome Anand -Date: Mon, 12 Dec 2016 23:40:43 +0530 -Subject: [PATCH 7/7] ALSA: x86: hdmi: continue playback even when display - resolution changes +X-Patchwork-Id: 131676 +Message-Id: <20170107012109.25744-8-jerome.anand@intel.com> +To: intel-gfx@lists.freedesktop.org, + alsa-devel@alsa-project.org +Cc: tiwai@suse.de, broonie@kernel.org, rakesh.a.ughreja@intel.com +Date: Sat, 7 Jan 2017 06:51:09 +0530 When the display resolution changes, the drm disables the display pipes due to which audio rendering stops. At this @@ -5076,7 +5123,7 @@ Signed-off-by: Jerome Anand 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c -index 9249521..d6fd638 100644 +index 91efbeb..f4042f8 100644 --- a/sound/x86/intel_hdmi_audio.c +++ b/sound/x86/intel_hdmi_audio.c @@ -43,6 +43,7 @@ static DEFINE_MUTEX(had_mutex); @@ -5085,8 +5132,8 @@ index 9249521..d6fd638 100644 static struct snd_intelhad *had_data; +static int underrun_count; - module_param(hdmi_card_index, int, 0444); - MODULE_PARM_DESC(hdmi_card_index, + module_param_named(index, hdmi_card_index, int, 0444); + MODULE_PARM_DESC(index, @@ -1114,6 +1115,7 @@ static int snd_intelhad_open(struct snd_pcm_substream *substream) intelhaddata = snd_pcm_substream_chip(substream); had_stream = intelhaddata->private_data; @@ -5095,7 +5142,7 @@ index 9249521..d6fd638 100644 pm_runtime_get(intelhaddata->dev); -@@ -1506,10 +1508,23 @@ static snd_pcm_uframes_t snd_intelhad_pcm_pointer( +@@ -1503,10 +1505,23 @@ static snd_pcm_uframes_t snd_intelhad_pcm_pointer( buf_id = intelhaddata->curr_buf % 4; had_read_register(AUD_BUF_A_LENGTH + (buf_id * HAD_REG_WIDTH), &t); From 1dbd7771c0d9dc4e876357deb852d00bb592c6e9 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Thu, 23 Feb 2017 01:27:00 +0000 Subject: [PATCH 8/9] RPi/RPi2: update linux support patches for linux 4.10 --- .../patches/linux/linux-01-RPi_support.patch | 6128 +++++++---------- .../patches/linux/linux-01-RPi_support.patch | 6128 +++++++---------- 2 files changed, 4986 insertions(+), 7270 deletions(-) diff --git a/projects/RPi/patches/linux/linux-01-RPi_support.patch b/projects/RPi/patches/linux/linux-01-RPi_support.patch index 6274aff4d9..797c5d6065 100644 --- a/projects/RPi/patches/linux/linux-01-RPi_support.patch +++ b/projects/RPi/patches/linux/linux-01-RPi_support.patch @@ -1,7 +1,7 @@ -From 0e347ed3c42098c4a689cdfd4fa77ee2ae4d4827 Mon Sep 17 00:00:00 2001 +From 468cd1d3694d2c7fa2126c4dff4c92cfe1c71c70 Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 -Subject: [PATCH 001/149] smsx95xx: fix crimes against truesize +Subject: [PATCH 001/143] smsx95xx: fix crimes against truesize smsc95xx is adjusting truesize when it shouldn't, and following a recent patch from Eric this is now triggering warnings. @@ -48,10 +48,10 @@ index 831aa33d078ae7d2dd57fdded5de71d1eb915f99..b77935bded8c0ff7808b00f170ff10e5 usbnet_skb_return(dev, ax_skb); } -From a4da7e5e3bab197a11523bc13fb30c13b9e6fe13 Mon Sep 17 00:00:00 2001 +From bc9f373027da6cd14af74a5ceb6a250f9f26a704 Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Fri, 1 Apr 2016 17:27:21 +0100 -Subject: [PATCH 002/149] smsc95xx: Experimental: Enable turbo_mode and +Subject: [PATCH 002/143] smsc95xx: Experimental: Enable turbo_mode and packetsize=2560 by default See: http://forum.kodi.tv/showthread.php?tid=285288 @@ -94,10 +94,10 @@ index b77935bded8c0ff7808b00f170ff10e594300ad0..693f163684de921404738e33244881e0 netif_dbg(dev, ifup, dev->net, "rx_urb_size=%ld\n", -From 36e789c817dd0b0244956daa0d228cf8a0211fac Mon Sep 17 00:00:00 2001 +From d7e10b62fb345e91e63aa5e9033508150adc835c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 003/149] Allow mac address to be set in smsc95xx +Subject: [PATCH 003/143] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -193,10 +193,10 @@ index 693f163684de921404738e33244881e0aab92ec9..df60c989fc229bf0aab3c27e95ccd453 eth_hw_addr_random(dev->net); netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); -From d5ba600d5e4e64e6b76c595f22aeb0110e1a787c Mon Sep 17 00:00:00 2001 +From 1ce0d09afcddde03315a95fbdd9eb451e9d5beb5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 12:43:36 +0000 -Subject: [PATCH 004/149] Protect __release_resource against resources without +Subject: [PATCH 004/143] Protect __release_resource against resources without parents Without this patch, removing a device tree overlay can crash here. @@ -224,10 +224,10 @@ index 9b5f04404152c296af3a96132f27cfc80ffa9af9..f8a9af6e6b915812be2ba2c1c2b40106 for (;;) { tmp = *p; -From 83de4b4437aabfdb96ffc010e46b8f3cc4a0de75 Mon Sep 17 00:00:00 2001 +From f1efecc4cc9a7bc17bcd05b760c56abd3c35b1c7 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 -Subject: [PATCH 005/149] mm: Remove the PFN busy warning +Subject: [PATCH 005/143] mm: Remove the PFN busy warning See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is expected sometimes when using CMA. However, that commit still spams @@ -239,10 +239,10 @@ Signed-off-by: Eric Anholt 1 file changed, 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index f4a02e240fb68acbaa0d3a0c7ac5a498c051a272..0e1fba92702858ceaf2f92a1d5fa53d5b16b52fe 100644 +index f3e0c69a97b76997d9fa65cda0b7e1b1fb8fa29a..c0ef4472377fe5eea65b73d9764e464d72985b70 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -7323,8 +7323,6 @@ int alloc_contig_range(unsigned long start, unsigned long end, +@@ -7361,8 +7361,6 @@ int alloc_contig_range(unsigned long start, unsigned long end, /* Make sure the range is really isolated. */ if (test_pages_isolated(outer_start, end, false)) { @@ -252,10 +252,10 @@ index f4a02e240fb68acbaa0d3a0c7ac5a498c051a272..0e1fba92702858ceaf2f92a1d5fa53d5 goto done; } -From 5eb94a3232a3754f1a1c2dce8756d66f1d650504 Mon Sep 17 00:00:00 2001 +From a6ed755bf9e4e175e8316ce5ca49475c925b06b7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 -Subject: [PATCH 006/149] irq-bcm2836: Prevent spurious interrupts, and trap +Subject: [PATCH 006/143] irq-bcm2836: Prevent spurious interrupts, and trap them early The old arch-specific IRQ macros included a dsb to ensure the @@ -270,7 +270,7 @@ though, so trap them early. 1 file changed, 1 insertion(+) diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c -index d96b2c947e74e3edab3917551c64fbd1ced0f34c..93e3f7660c4230c9f1dd3b195958cb498949b0ca 100644 +index e7463e3c08143acae3e8cc5682f918c6a0b07ebd..a8db33b50ad9ff83d284fa54fe4d3b65f859df0f 100644 --- a/drivers/irqchip/irq-bcm2836.c +++ b/drivers/irqchip/irq-bcm2836.c @@ -175,6 +175,7 @@ __exception_irq_entry bcm2836_arm_irqchip_handle_irq(struct pt_regs *regs) @@ -282,10 +282,10 @@ index d96b2c947e74e3edab3917551c64fbd1ced0f34c..93e3f7660c4230c9f1dd3b195958cb49 #endif } else if (stat) { -From 6dd338f42784ff60e2f6fb8a3540da0d22b37be6 Mon Sep 17 00:00:00 2001 +From 1a63d13766b406f3c98a86c063e7d80e25f584bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 12 Jun 2015 19:01:05 +0200 -Subject: [PATCH 007/149] irqchip: bcm2835: Add FIQ support +Subject: [PATCH 007/143] irqchip: bcm2835: Add FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -414,10 +414,10 @@ index 44d7c38dde479d771f3552e914bf8c1c1f5019f7..42ff5e6a8e0d532f5b60a1e7af7cc4d9 } -From 32ed8089c2a560cbc6b61a572c8e487834a5486a Mon Sep 17 00:00:00 2001 +From 98c24bb5c2f7eab74c8307fde5c638cd44e1cc68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 23 Oct 2015 16:26:55 +0200 -Subject: [PATCH 008/149] irqchip: irq-bcm2835: Add 2836 FIQ support +Subject: [PATCH 008/143] irqchip: irq-bcm2835: Add 2836 FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -516,10 +516,10 @@ index 42ff5e6a8e0d532f5b60a1e7af7cc4d941bd5008..eccf6ed025299cb480884f5bcbe77abf for (b = 0; b < NR_BANKS; b++) { for (i = 0; i < bank_irqs[b]; i++) { -From afc7a2e2b8953f9cc380979e40f0faad0c79d94f Mon Sep 17 00:00:00 2001 +From 44c736dd9491af829bd0c5684f5bbe883e09c2d1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 -Subject: [PATCH 009/149] spidev: Add "spidev" compatible string to silence +Subject: [PATCH 009/143] spidev: Add "spidev" compatible string to silence warning See: https://github.com/raspberrypi/linux/issues/1054 @@ -528,29 +528,29 @@ See: https://github.com/raspberrypi/linux/issues/1054 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c -index 2e05046f866bd01bf87edcdeff0d5b76d4d0aea7..d780491b8013a4e97fa843958964454e4463fe5e 100644 +index 9e2e099baf8ca5cc6510912a36d4ca03daeb8273..e59640942826db2ea14d0bde0ff5ab22ec34c9dd 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c -@@ -696,6 +696,7 @@ static struct class *spidev_class; - static const struct of_device_id spidev_dt_ids[] = { +@@ -697,6 +697,7 @@ static const struct of_device_id spidev_dt_ids[] = { { .compatible = "rohm,dh2228fv" }, { .compatible = "lineartechnology,ltc2488" }, + { .compatible = "ge,achc" }, + { .compatible = "spidev" }, {}, }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); -From aff7309ce3e6d5eb8ccf3beef4f9950bcabc8bea Mon Sep 17 00:00:00 2001 +From 4679b462878b70c11be6f05d70aaf411af8f0c94 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 30 Jun 2015 14:12:42 +0100 -Subject: [PATCH 010/149] serial: 8250: Don't crash when nr_uarts is 0 +Subject: [PATCH 010/143] serial: 8250: Don't crash when nr_uarts is 0 --- drivers/tty/serial/8250/8250_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c -index e8819aa20415603c80547e382838a8fa3ce54792..cf9c7d2e3f95e1a19410247a89c2e49c1a2747a8 100644 +index 76e03a7de9cc3d790a230948f599ef2db4b93249..0a172c2e6fa288de1e080463e897ea85aa98399f 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -509,6 +509,8 @@ static void __init serial8250_isa_init_ports(void) @@ -563,10 +563,307 @@ index e8819aa20415603c80547e382838a8fa3ce54792..cf9c7d2e3f95e1a19410247a89c2e49c for (i = 0; i < nr_uarts; i++) { struct uart_8250_port *up = &serial8250_ports[i]; -From e55b069860e2ce8c3a367c98c5844a6ec46ce855 Mon Sep 17 00:00:00 2001 +From 7afdc575c0f1518aad2b980b7ff34571d9d5963f Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 3 Jan 2017 18:25:01 +0000 +Subject: [PATCH 011/143] Revert "pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP" + +This reverts commit 85ae9e512f437cd09bf61564bdba29ab88bab3e3. +--- + drivers/pinctrl/bcm/Kconfig | 1 - + drivers/pinctrl/bcm/pinctrl-bcm2835.c | 140 ++++++++++++++++++---------------- + 2 files changed, 76 insertions(+), 65 deletions(-) + +diff --git a/drivers/pinctrl/bcm/Kconfig b/drivers/pinctrl/bcm/Kconfig +index 8968dd7aebed2133b0103b39d7b752916dbfaab0..63246770bd74b9dcd3804cee66a960f2404b7092 100644 +--- a/drivers/pinctrl/bcm/Kconfig ++++ b/drivers/pinctrl/bcm/Kconfig +@@ -20,7 +20,6 @@ config PINCTRL_BCM2835 + bool + select PINMUX + select PINCONF +- select GPIOLIB_IRQCHIP + + config PINCTRL_IPROC_GPIO + bool "Broadcom iProc GPIO (with PINCONF) driver" +diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c +index 85d0091128644c446aed878e87769e82c77c3ebf..4f2621272bfd5cbc0d691d2fabe89e2ee428d6db 100644 +--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c ++++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c +@@ -24,9 +24,11 @@ + #include + #include + #include ++#include + #include + #include + #include ++#include + #include + #include + #include +@@ -79,6 +81,11 @@ enum bcm2835_pinconf_param { + #define BCM2835_PINCONF_UNPACK_PARAM(_conf_) ((_conf_) >> 16) + #define BCM2835_PINCONF_UNPACK_ARG(_conf_) ((_conf_) & 0xffff) + ++struct bcm2835_gpio_irqdata { ++ struct bcm2835_pinctrl *pc; ++ int irqgroup; ++}; ++ + struct bcm2835_pinctrl { + struct device *dev; + void __iomem *base; +@@ -89,13 +96,16 @@ struct bcm2835_pinctrl { + unsigned int irq_type[BCM2835_NUM_GPIOS]; + + struct pinctrl_dev *pctl_dev; ++ struct irq_domain *irq_domain; + struct gpio_chip gpio_chip; + struct pinctrl_gpio_range gpio_range; + +- int irq_group[BCM2835_NUM_IRQS]; ++ struct bcm2835_gpio_irqdata irq_data[BCM2835_NUM_IRQS]; + spinlock_t irq_lock[BCM2835_NUM_BANKS]; + }; + ++static struct lock_class_key gpio_lock_class; ++ + /* pins are just named GPIO0..GPIO53 */ + #define BCM2835_GPIO_PIN(a) PINCTRL_PIN(a, "gpio" #a) + static struct pinctrl_pin_desc bcm2835_gpio_pins[] = { +@@ -353,6 +363,13 @@ static int bcm2835_gpio_direction_output(struct gpio_chip *chip, + return pinctrl_gpio_direction_output(chip->base + offset); + } + ++static int bcm2835_gpio_to_irq(struct gpio_chip *chip, unsigned offset) ++{ ++ struct bcm2835_pinctrl *pc = gpiochip_get_data(chip); ++ ++ return irq_linear_revmap(pc->irq_domain, offset); ++} ++ + static struct gpio_chip bcm2835_gpio_chip = { + .label = MODULE_NAME, + .owner = THIS_MODULE, +@@ -363,13 +380,14 @@ static struct gpio_chip bcm2835_gpio_chip = { + .get_direction = bcm2835_gpio_get_direction, + .get = bcm2835_gpio_get, + .set = bcm2835_gpio_set, ++ .to_irq = bcm2835_gpio_to_irq, + .base = -1, + .ngpio = BCM2835_NUM_GPIOS, + .can_sleep = false, + }; + +-static void bcm2835_gpio_irq_handle_bank(struct bcm2835_pinctrl *pc, +- unsigned int bank, u32 mask) ++static int bcm2835_gpio_irq_handle_bank(struct bcm2835_pinctrl *pc, ++ unsigned int bank, u32 mask) + { + unsigned long events; + unsigned offset; +@@ -381,49 +399,34 @@ static void bcm2835_gpio_irq_handle_bank(struct bcm2835_pinctrl *pc, + events &= pc->enabled_irq_map[bank]; + for_each_set_bit(offset, &events, 32) { + gpio = (32 * bank) + offset; +- /* FIXME: no clue why the code looks up the type here */ + type = pc->irq_type[gpio]; + +- generic_handle_irq(irq_linear_revmap(pc->gpio_chip.irqdomain, +- gpio)); ++ generic_handle_irq(irq_linear_revmap(pc->irq_domain, gpio)); + } ++ ++ return (events != 0); + } + +-static void bcm2835_gpio_irq_handler(struct irq_desc *desc) ++static irqreturn_t bcm2835_gpio_irq_handler(int irq, void *dev_id) + { +- struct gpio_chip *chip = irq_desc_get_handler_data(desc); +- struct bcm2835_pinctrl *pc = gpiochip_get_data(chip); +- struct irq_chip *host_chip = irq_desc_get_chip(desc); +- int irq = irq_desc_get_irq(desc); +- int group; +- int i; +- +- for (i = 0; i < ARRAY_SIZE(pc->irq); i++) { +- if (pc->irq[i] == irq) { +- group = pc->irq_group[i]; +- break; +- } +- } +- /* This should not happen, every IRQ has a bank */ +- if (i == ARRAY_SIZE(pc->irq)) +- BUG(); ++ struct bcm2835_gpio_irqdata *irqdata = dev_id; ++ struct bcm2835_pinctrl *pc = irqdata->pc; ++ int handled = 0; + +- chained_irq_enter(host_chip, desc); +- +- switch (group) { ++ switch (irqdata->irqgroup) { + case 0: /* IRQ0 covers GPIOs 0-27 */ +- bcm2835_gpio_irq_handle_bank(pc, 0, 0x0fffffff); ++ handled = bcm2835_gpio_irq_handle_bank(pc, 0, 0x0fffffff); + break; + case 1: /* IRQ1 covers GPIOs 28-45 */ +- bcm2835_gpio_irq_handle_bank(pc, 0, 0xf0000000); +- bcm2835_gpio_irq_handle_bank(pc, 1, 0x00003fff); ++ handled = bcm2835_gpio_irq_handle_bank(pc, 0, 0xf0000000) | ++ bcm2835_gpio_irq_handle_bank(pc, 1, 0x00003fff); + break; + case 2: /* IRQ2 covers GPIOs 46-53 */ +- bcm2835_gpio_irq_handle_bank(pc, 1, 0x003fc000); ++ handled = bcm2835_gpio_irq_handle_bank(pc, 1, 0x003fc000); + break; + } + +- chained_irq_exit(host_chip, desc); ++ return handled ? IRQ_HANDLED : IRQ_NONE; + } + + static inline void __bcm2835_gpio_irq_config(struct bcm2835_pinctrl *pc, +@@ -469,8 +472,7 @@ static void bcm2835_gpio_irq_config(struct bcm2835_pinctrl *pc, + + static void bcm2835_gpio_irq_enable(struct irq_data *data) + { +- struct gpio_chip *chip = irq_data_get_irq_chip_data(data); +- struct bcm2835_pinctrl *pc = gpiochip_get_data(chip); ++ struct bcm2835_pinctrl *pc = irq_data_get_irq_chip_data(data); + unsigned gpio = irqd_to_hwirq(data); + unsigned offset = GPIO_REG_SHIFT(gpio); + unsigned bank = GPIO_REG_OFFSET(gpio); +@@ -484,8 +486,7 @@ static void bcm2835_gpio_irq_enable(struct irq_data *data) + + static void bcm2835_gpio_irq_disable(struct irq_data *data) + { +- struct gpio_chip *chip = irq_data_get_irq_chip_data(data); +- struct bcm2835_pinctrl *pc = gpiochip_get_data(chip); ++ struct bcm2835_pinctrl *pc = irq_data_get_irq_chip_data(data); + unsigned gpio = irqd_to_hwirq(data); + unsigned offset = GPIO_REG_SHIFT(gpio); + unsigned bank = GPIO_REG_OFFSET(gpio); +@@ -591,8 +592,7 @@ static int __bcm2835_gpio_irq_set_type_enabled(struct bcm2835_pinctrl *pc, + + static int bcm2835_gpio_irq_set_type(struct irq_data *data, unsigned int type) + { +- struct gpio_chip *chip = irq_data_get_irq_chip_data(data); +- struct bcm2835_pinctrl *pc = gpiochip_get_data(chip); ++ struct bcm2835_pinctrl *pc = irq_data_get_irq_chip_data(data); + unsigned gpio = irqd_to_hwirq(data); + unsigned offset = GPIO_REG_SHIFT(gpio); + unsigned bank = GPIO_REG_OFFSET(gpio); +@@ -618,8 +618,7 @@ static int bcm2835_gpio_irq_set_type(struct irq_data *data, unsigned int type) + + static void bcm2835_gpio_irq_ack(struct irq_data *data) + { +- struct gpio_chip *chip = irq_data_get_irq_chip_data(data); +- struct bcm2835_pinctrl *pc = gpiochip_get_data(chip); ++ struct bcm2835_pinctrl *pc = irq_data_get_irq_chip_data(data); + unsigned gpio = irqd_to_hwirq(data); + + bcm2835_gpio_set_bit(pc, GPEDS0, gpio); +@@ -662,11 +661,10 @@ static void bcm2835_pctl_pin_dbg_show(struct pinctrl_dev *pctldev, + unsigned offset) + { + struct bcm2835_pinctrl *pc = pinctrl_dev_get_drvdata(pctldev); +- struct gpio_chip *chip = &pc->gpio_chip; + enum bcm2835_fsel fsel = bcm2835_pinctrl_fsel_get(pc, offset); + const char *fname = bcm2835_functions[fsel]; + int value = bcm2835_gpio_get_bit(pc, GPLEV0, offset); +- int irq = irq_find_mapping(chip->irqdomain, offset); ++ int irq = irq_find_mapping(pc->irq_domain, offset); + + seq_printf(s, "function %s in %s; irq %d (%s)", + fname, value ? "hi" : "lo", +@@ -1012,6 +1010,21 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) + pc->gpio_chip.parent = dev; + pc->gpio_chip.of_node = np; + ++ pc->irq_domain = irq_domain_add_linear(np, BCM2835_NUM_GPIOS, ++ &irq_domain_simple_ops, NULL); ++ if (!pc->irq_domain) { ++ dev_err(dev, "could not create IRQ domain\n"); ++ return -ENOMEM; ++ } ++ ++ for (i = 0; i < BCM2835_NUM_GPIOS; i++) { ++ int irq = irq_create_mapping(pc->irq_domain, i); ++ irq_set_lockdep_class(irq, &gpio_lock_class); ++ irq_set_chip_and_handler(irq, &bcm2835_gpio_irq_chip, ++ handle_level_irq); ++ irq_set_chip_data(irq, pc); ++ } ++ + for (i = 0; i < BCM2835_NUM_BANKS; i++) { + unsigned long events; + unsigned offset; +@@ -1032,35 +1045,34 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) + spin_lock_init(&pc->irq_lock[i]); + } + +- err = gpiochip_add_data(&pc->gpio_chip, pc); +- if (err) { +- dev_err(dev, "could not add GPIO chip\n"); +- return err; ++ for (i = 0; i < BCM2835_NUM_IRQS; i++) { ++ int len; ++ char *name; ++ pc->irq[i] = irq_of_parse_and_map(np, i); ++ pc->irq_data[i].pc = pc; ++ pc->irq_data[i].irqgroup = i; ++ ++ len = strlen(dev_name(pc->dev)) + 16; ++ name = devm_kzalloc(pc->dev, len, GFP_KERNEL); ++ if (!name) ++ return -ENOMEM; ++ snprintf(name, len, "%s:bank%d", dev_name(pc->dev), i); ++ ++ err = devm_request_irq(dev, pc->irq[i], ++ bcm2835_gpio_irq_handler, IRQF_SHARED, ++ name, &pc->irq_data[i]); ++ if (err) { ++ dev_err(dev, "unable to request IRQ %d\n", pc->irq[i]); ++ return err; ++ } + } + +- err = gpiochip_irqchip_add(&pc->gpio_chip, &bcm2835_gpio_irq_chip, +- 0, handle_level_irq, IRQ_TYPE_NONE); ++ err = gpiochip_add_data(&pc->gpio_chip, pc); + if (err) { +- dev_info(dev, "could not add irqchip\n"); ++ dev_err(dev, "could not add GPIO chip\n"); + return err; + } + +- for (i = 0; i < BCM2835_NUM_IRQS; i++) { +- pc->irq[i] = irq_of_parse_and_map(np, i); +- pc->irq_group[i] = i; +- /* +- * Use the same handler for all groups: this is necessary +- * since we use one gpiochip to cover all lines - the +- * irq handler then needs to figure out which group and +- * bank that was firing the IRQ and look up the per-group +- * and bank data. +- */ +- gpiochip_set_chained_irqchip(&pc->gpio_chip, +- &bcm2835_gpio_irq_chip, +- pc->irq[i], +- bcm2835_gpio_irq_handler); +- } +- + pc->pctl_dev = devm_pinctrl_register(dev, &bcm2835_pinctrl_desc, pc); + if (IS_ERR(pc->pctl_dev)) { + gpiochip_remove(&pc->gpio_chip); + +From bf0a2edf0c0a2ebdd6e83fd18cb83e7723425ce4 Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 011/149] pinctrl-bcm2835: Set base to 0 give expected gpio +Subject: [PATCH 012/143] pinctrl-bcm2835: Set base to 0 give expected gpio numbering Signed-off-by: Noralf Tronnes @@ -575,10 +872,10 @@ Signed-off-by: Noralf Tronnes 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -index fa77165fab2c1348163979da507df17e7168c49b..d11e2e4ea189466e686d762cb6c6fef9111ecf8e 100644 +index 4f2621272bfd5cbc0d691d2fabe89e2ee428d6db..5b7cb4c415e19f98e25b221ab0ad36b6885dae4c 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -@@ -386,7 +386,7 @@ static struct gpio_chip bcm2835_gpio_chip = { +@@ -381,7 +381,7 @@ static struct gpio_chip bcm2835_gpio_chip = { .get = bcm2835_gpio_get, .set = bcm2835_gpio_set, .to_irq = bcm2835_gpio_to_irq, @@ -588,159 +885,10 @@ index fa77165fab2c1348163979da507df17e7168c49b..d11e2e4ea189466e686d762cb6c6fef9 .can_sleep = false, }; -From 972d0891026ffcb9d457c59efa9b452c9ee4f8eb Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 24 Feb 2015 13:40:50 +0000 -Subject: [PATCH 012/149] pinctrl-bcm2835: Fix interrupt handling for GPIOs - 28-31 and 46-53 - -Contrary to the documentation, the BCM2835 GPIO controller actually has -four interrupt lines - one each for the three IRQ groups and one common. Rather -confusingly, the GPIO interrupt groups don't correspond directly with the GPIO -control banks. Instead, GPIOs 0-27 generate IRQ GPIO0, 28-45 GPIO1 and -46-53 GPIO2. - -Awkwardly, the GPIOS for IRQ GPIO1 straddle two 32-entry GPIO banks, so it is -cleaner to split out a function to process the interrupts for a single GPIO -bank. - -This bug has only just been observed because GPIOs above 27 can only be -accessed on an old Raspberry Pi with the optional P5 header fitted, where -the pins are often used for I2S instead. ---- - drivers/pinctrl/bcm/pinctrl-bcm2835.c | 51 ++++++++++++++++++++++++++--------- - 1 file changed, 39 insertions(+), 12 deletions(-) - -diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -index d11e2e4ea189466e686d762cb6c6fef9111ecf8e..107ad7d58de8f8a7f55e09c9cdcf7d66fa7ab66b 100644 ---- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c -+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -@@ -47,6 +47,7 @@ - #define MODULE_NAME "pinctrl-bcm2835" - #define BCM2835_NUM_GPIOS 54 - #define BCM2835_NUM_BANKS 2 -+#define BCM2835_NUM_IRQS 3 - - #define BCM2835_PIN_BITMAP_SZ \ - DIV_ROUND_UP(BCM2835_NUM_GPIOS, sizeof(unsigned long) * 8) -@@ -88,13 +89,13 @@ enum bcm2835_pinconf_pull { - - struct bcm2835_gpio_irqdata { - struct bcm2835_pinctrl *pc; -- int bank; -+ int irqgroup; - }; - - struct bcm2835_pinctrl { - struct device *dev; - void __iomem *base; -- int irq[BCM2835_NUM_BANKS]; -+ int irq[BCM2835_NUM_IRQS]; - - /* note: locking assumes each bank will have its own unsigned long */ - unsigned long enabled_irq_map[BCM2835_NUM_BANKS]; -@@ -105,7 +106,7 @@ struct bcm2835_pinctrl { - struct gpio_chip gpio_chip; - struct pinctrl_gpio_range gpio_range; - -- struct bcm2835_gpio_irqdata irq_data[BCM2835_NUM_BANKS]; -+ struct bcm2835_gpio_irqdata irq_data[BCM2835_NUM_IRQS]; - spinlock_t irq_lock[BCM2835_NUM_BANKS]; - }; - -@@ -391,17 +392,16 @@ static struct gpio_chip bcm2835_gpio_chip = { - .can_sleep = false, - }; - --static irqreturn_t bcm2835_gpio_irq_handler(int irq, void *dev_id) -+static int bcm2835_gpio_irq_handle_bank(struct bcm2835_pinctrl *pc, -+ unsigned int bank, u32 mask) - { -- struct bcm2835_gpio_irqdata *irqdata = dev_id; -- struct bcm2835_pinctrl *pc = irqdata->pc; -- int bank = irqdata->bank; - unsigned long events; - unsigned offset; - unsigned gpio; - unsigned int type; - - events = bcm2835_gpio_rd(pc, GPEDS0 + bank * 4); -+ events &= mask; - events &= pc->enabled_irq_map[bank]; - for_each_set_bit(offset, &events, 32) { - gpio = (32 * bank) + offset; -@@ -409,7 +409,30 @@ static irqreturn_t bcm2835_gpio_irq_handler(int irq, void *dev_id) - - generic_handle_irq(irq_linear_revmap(pc->irq_domain, gpio)); - } -- return events ? IRQ_HANDLED : IRQ_NONE; -+ -+ return (events != 0); -+} -+ -+static irqreturn_t bcm2835_gpio_irq_handler(int irq, void *dev_id) -+{ -+ struct bcm2835_gpio_irqdata *irqdata = dev_id; -+ struct bcm2835_pinctrl *pc = irqdata->pc; -+ int handled = 0; -+ -+ switch (irqdata->irqgroup) { -+ case 0: /* IRQ0 covers GPIOs 0-27 */ -+ handled = bcm2835_gpio_irq_handle_bank(pc, 0, 0x0fffffff); -+ break; -+ case 1: /* IRQ1 covers GPIOs 28-45 */ -+ handled = bcm2835_gpio_irq_handle_bank(pc, 0, 0xf0000000) | -+ bcm2835_gpio_irq_handle_bank(pc, 1, 0x00003fff); -+ break; -+ case 2: /* IRQ2 covers GPIOs 46-53 */ -+ handled = bcm2835_gpio_irq_handle_bank(pc, 1, 0x003fc000); -+ break; -+ } -+ -+ return handled ? IRQ_HANDLED : IRQ_NONE; - } - - static inline void __bcm2835_gpio_irq_config(struct bcm2835_pinctrl *pc, -@@ -998,8 +1021,6 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) - for (i = 0; i < BCM2835_NUM_BANKS; i++) { - unsigned long events; - unsigned offset; -- int len; -- char *name; - - /* clear event detection flags */ - bcm2835_gpio_wr(pc, GPREN0 + i * 4, 0); -@@ -1014,10 +1035,15 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) - for_each_set_bit(offset, &events, 32) - bcm2835_gpio_wr(pc, GPEDS0 + i * 4, BIT(offset)); - -+ spin_lock_init(&pc->irq_lock[i]); -+ } -+ -+ for (i = 0; i < BCM2835_NUM_IRQS; i++) { -+ int len; -+ char *name; - pc->irq[i] = irq_of_parse_and_map(np, i); - pc->irq_data[i].pc = pc; -- pc->irq_data[i].bank = i; -- spin_lock_init(&pc->irq_lock[i]); -+ pc->irq_data[i].irqgroup = i; - - len = strlen(dev_name(pc->dev)) + 16; - name = devm_kzalloc(pc->dev, len, GFP_KERNEL); -@@ -1074,6 +1100,7 @@ static struct platform_driver bcm2835_pinctrl_driver = { - .remove = bcm2835_pinctrl_remove, - .driver = { - .name = MODULE_NAME, -+ .owner = THIS_MODULE, - .of_match_table = bcm2835_pinctrl_match, - }, - }; - -From e62249a05d430a8e79b4ff7f49c9f0f20f165c7c Mon Sep 17 00:00:00 2001 +From b769e2efdc8f7c809c5d83c0daa8a1a452e890db Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 26 Feb 2015 09:58:22 +0000 -Subject: [PATCH 013/149] pinctrl-bcm2835: Only request the interrupts listed +Subject: [PATCH 013/143] pinctrl-bcm2835: Only request the interrupts listed in the DTB Although the GPIO controller can generate three interrupts (four counting @@ -754,10 +902,10 @@ interface, is unlikely to be a problem. 1 file changed, 2 insertions(+) diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -index 107ad7d58de8f8a7f55e09c9cdcf7d66fa7ab66b..644bdecbcfcb79d3b84a33769265fca5d3d0c9e5 100644 +index 5b7cb4c415e19f98e25b221ab0ad36b6885dae4c..6351fe7f8e314ac5ebb102dd20847b383fd5b857 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -@@ -1042,6 +1042,8 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) +@@ -1049,6 +1049,8 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) int len; char *name; pc->irq[i] = irq_of_parse_and_map(np, i); @@ -767,54 +915,10 @@ index 107ad7d58de8f8a7f55e09c9cdcf7d66fa7ab66b..644bdecbcfcb79d3b84a33769265fca5 pc->irq_data[i].irqgroup = i; -From dc01289f705c8b672c3f03c431c9738df66d7c4d Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Fri, 6 May 2016 12:32:47 +0100 -Subject: [PATCH 014/149] pinctrl-bcm2835: Return pins to inputs when freed - -When dynamically unloading overlays, it is important that freed pins are -restored to being inputs to prevent functions from being enabled in -multiple places at once. - -Signed-off-by: Phil Elwell ---- - drivers/pinctrl/bcm/pinctrl-bcm2835.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -index 644bdecbcfcb79d3b84a33769265fca5d3d0c9e5..81a66cba2ab0f7e3ae179de7edd10122630e7abc 100644 ---- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c -+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -@@ -844,6 +844,16 @@ static const struct pinctrl_ops bcm2835_pctl_ops = { - .dt_free_map = bcm2835_pctl_dt_free_map, - }; - -+static int bcm2835_pmx_free(struct pinctrl_dev *pctldev, -+ unsigned offset) -+{ -+ struct bcm2835_pinctrl *pc = pinctrl_dev_get_drvdata(pctldev); -+ -+ /* disable by setting to GPIO_IN */ -+ bcm2835_pinctrl_fsel_set(pc, offset, BCM2835_FSEL_GPIO_IN); -+ return 0; -+} -+ - static int bcm2835_pmx_get_functions_count(struct pinctrl_dev *pctldev) - { - return BCM2835_FSEL_COUNT; -@@ -903,6 +913,7 @@ static int bcm2835_pmx_gpio_set_direction(struct pinctrl_dev *pctldev, - } - - static const struct pinmux_ops bcm2835_pmx_ops = { -+ .free = bcm2835_pmx_free, - .get_functions_count = bcm2835_pmx_get_functions_count, - .get_function_name = bcm2835_pmx_get_function_name, - .get_function_groups = bcm2835_pmx_get_function_groups, - -From 28df47ea6cf569de329a52f19a511f730524625a Mon Sep 17 00:00:00 2001 +From c7575d85ded4666e609af7c4a65663379c5b7ffb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 -Subject: [PATCH 015/149] spi-bcm2835: Support pin groups other than 7-11 +Subject: [PATCH 014/143] spi-bcm2835: Support pin groups other than 7-11 The spi-bcm2835 driver automatically uses GPIO chip-selects due to some unreliability of the native ones. In doing so it chooses the @@ -895,10 +999,10 @@ index f35cc10772f6670397ea923ad30158270dd68578..5dfe20ffc2866fa6789825016c585175 /* and set up the "mode" and level */ dev_info(&spi->dev, "setting up native-CS%i as GPIO %i\n", -From 709c58337cc3d267916130868a9376c07a900130 Mon Sep 17 00:00:00 2001 +From 4059c76642b41887bff173ca7c36d738a1d12daf Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 Jul 2016 22:09:24 +0100 -Subject: [PATCH 016/149] spi-bcm2835: Disable forced software CS +Subject: [PATCH 015/143] spi-bcm2835: Disable forced software CS Select software CS in bcm2708_common.dtsi, and disable the automatic conversion in the driver to allow hardware CS to be re-enabled with an @@ -932,10 +1036,10 @@ index 5dfe20ffc2866fa6789825016c585175a29705b6..8493474d286f7a1ac6454a22c61c8c2c return 0; } -From 493e176fe020de1f3c9eb3117e9c7dbfb4e0b2d6 Mon Sep 17 00:00:00 2001 +From 3946ca2d555be10ee4025995a896a261546dbb16 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 8 Nov 2016 21:35:38 +0000 -Subject: [PATCH 017/149] spi-bcm2835: Remove unused code +Subject: [PATCH 016/143] spi-bcm2835: Remove unused code --- drivers/spi/spi-bcm2835.c | 61 ----------------------------------------------- @@ -1023,10 +1127,10 @@ index 8493474d286f7a1ac6454a22c61c8c2cef9121bf..33d75ad38a7f77d085321ace9101900a } -From 4083f9d43537bff9852ea18093c7e4a5acd49114 Mon Sep 17 00:00:00 2001 +From 3e2637b9690a7170181a28e173be2df710bc42b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Wed, 3 Jun 2015 12:26:13 +0200 -Subject: [PATCH 018/149] ARM: bcm2835: Set Serial number and Revision +Subject: [PATCH 017/143] ARM: bcm2835: Set Serial number and Revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1079,10 +1183,10 @@ index 0c1edfc98696da0e0bb7f4a18cdfbcdd27a9795d..8f152266ba9b470df2eaaed9ebcf158e static const char * const bcm2835_compat[] = { -From 388dc1a192ecb414adeb2e991fa7e494c8f3fee9 Mon Sep 17 00:00:00 2001 +From 5ae2a094dc3d45ed43fc10955946a455614deed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 3 Oct 2015 22:22:55 +0200 -Subject: [PATCH 019/149] dmaengine: bcm2835: Load driver early and support +Subject: [PATCH 018/143] dmaengine: bcm2835: Load driver early and support legacy API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -1100,7 +1204,7 @@ Signed-off-by: Noralf Trønnes 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig -index 141aefbe37ec93d1f4f38d1be5e2cf8d93266725..9c931d36c6a499a02f4f215f8cd77d3f2254a3b9 100644 +index 263495d0adbdfd0a5e079c3ba5c6f71247ee7fde..4415a37a1d84c696efa96bf0b17840d6c0dd3b12 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -108,7 +108,7 @@ config COH901318 @@ -1185,17 +1289,17 @@ index e18dc596cf2447fa9ef7e41b62d9396e29043426..80d35f760b4a4a51e60c355a84d538ba MODULE_ALIAS("platform:bcm2835-dma"); MODULE_DESCRIPTION("BCM2835 DMA engine driver"); -From 86ccc8437f0ac5c223f8fe798ed7cbb5b0b26bbc Mon Sep 17 00:00:00 2001 +From ec29a80aa532673f479214b409dca3bbda1ad682 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jan 2016 17:25:12 +0000 -Subject: [PATCH 020/149] firmware: Updated mailbox header +Subject: [PATCH 019/143] firmware: Updated mailbox header --- - include/soc/bcm2835/raspberrypi-firmware.h | 11 +++++++++++ - 1 file changed, 11 insertions(+) + include/soc/bcm2835/raspberrypi-firmware.h | 9 +++++++++ + 1 file changed, 9 insertions(+) diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index 3fb357193f09914fe21f8555a4b8613f74f22bc3..227a107214a02deadcca3db202da265eba1fdd21 100644 +index cb979ad90401e299344dd5fae38d09c489d8bd58..30fb37fe175df604a738258a2a632bca3bfff33f 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -63,6 +63,7 @@ enum rpi_firmware_property_tag { @@ -1239,63 +1343,20 @@ index 3fb357193f09914fe21f8555a4b8613f74f22bc3..227a107214a02deadcca3db202da265e RPI_FIRMWARE_FRAMEBUFFER_SET_PHYSICAL_WIDTH_HEIGHT = 0x00048003, RPI_FIRMWARE_FRAMEBUFFER_SET_VIRTUAL_WIDTH_HEIGHT = 0x00048004, RPI_FIRMWARE_FRAMEBUFFER_SET_DEPTH = 0x00048005, -@@ -108,6 +115,10 @@ enum rpi_firmware_property_tag { +@@ -108,6 +115,8 @@ enum rpi_firmware_property_tag { RPI_FIRMWARE_FRAMEBUFFER_SET_VIRTUAL_OFFSET = 0x00048009, RPI_FIRMWARE_FRAMEBUFFER_SET_OVERSCAN = 0x0004800a, RPI_FIRMWARE_FRAMEBUFFER_SET_PALETTE = 0x0004800b, + RPI_FIRMWARE_FRAMEBUFFER_SET_VSYNC = 0x0004800e, + RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -+ -+ RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, - RPI_FIRMWARE_GET_COMMAND_LINE = 0x00050001, - RPI_FIRMWARE_GET_DMA_CHANNELS = 0x00060001, - -From daf743cd1a82da917d117f50be11062970361cd3 Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Mon, 9 May 2016 17:28:18 -0700 -Subject: [PATCH 021/149] clk: bcm2835: Mark GPIO clocks enabled at boot as - critical. - -These divide off of PLLD_PER and are used for the ethernet and wifi -PHYs source PLLs. Neither of them is currently represented by a phy -device that would grab the clock for us. - -This keeps other drivers from killing the networking PHYs when they -disable their own clocks and trigger PLLD_PER's refcount going to 0. - -v2: Skip marking as critical if they aren't on at boot. - -Signed-off-by: Eric Anholt ---- - drivers/clk/bcm/clk-bcm2835.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index 3bbd2a58db470a89b870a793e59ddf9fc4f48e57..7040c6426e35c11608121893b662c601cd8d6543 100644 ---- a/drivers/clk/bcm/clk-bcm2835.c -+++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1262,6 +1262,15 @@ static struct clk_hw *bcm2835_register_clock(struct bcm2835_cprman *cprman, - init.name = data->name; - init.flags = data->flags | CLK_IGNORE_UNUSED; + RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, -+ /* -+ * Some GPIO clocks for ethernet/wifi PLLs are marked as -+ * critical (since some platforms use them), but if the -+ * firmware didn't have them turned on then they clearly -+ * aren't actually critical. -+ */ -+ if ((cprman_read(cprman, data->ctl_reg) & CM_ENABLE) == 0) -+ init.flags &= ~CLK_IS_CRITICAL; -+ - if (data->is_vpu_clock) { - init.ops = &bcm2835_vpu_clock_clk_ops; - } else { -From c72bcf90c5ef8b983c182d3eec5278fe3ad95326 Mon Sep 17 00:00:00 2001 +From 574fd69f5a7a477bbdb4b702fbd9ed4c771754ec Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 15 Jun 2016 16:48:41 +0100 -Subject: [PATCH 022/149] rtc: Add SPI alias for pcf2123 driver +Subject: [PATCH 020/143] rtc: Add SPI alias for pcf2123 driver Without this alias, Device Tree won't cause the driver to be loaded. @@ -1315,10 +1376,10 @@ index 8895f77726e8da5444afcd602dceff8f25a9b3fd..1833b8853ceb0e6147cceb93a00e558c MODULE_LICENSE("GPL"); +MODULE_ALIAS("spi:rtc-pcf2123"); -From 6244f2c8864ea2b82532fecf2fa43ef2b5b6ac73 Mon Sep 17 00:00:00 2001 +From 9caaab7c7d8bed852d27b583965a6058b98f57af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 7 Oct 2016 16:50:59 +0200 -Subject: [PATCH 023/149] watchdog: bcm2835: Support setting reboot partition +Subject: [PATCH 021/143] watchdog: bcm2835: Support setting reboot partition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1337,7 +1398,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c -index 4dddd8298a227d64862f2e92954a465f2e44b3f6..1f545e024422f59280932713e6a1b05150b39b22 100644 +index c32c45bd8b097889c8f322255fa63c8ed507d6ab..ef02dfa23aa774e1cdf75f935c5de98535718767 100644 --- a/drivers/watchdog/bcm2835_wdt.c +++ b/drivers/watchdog/bcm2835_wdt.c @@ -35,13 +35,7 @@ @@ -1355,7 +1416,7 @@ index 4dddd8298a227d64862f2e92954a465f2e44b3f6..1f545e024422f59280932713e6a1b051 #define SECS_TO_WDOG_TICKS(x) ((x) << 16) #define WDOG_TICKS_TO_SECS(x) ((x) >> 16) -@@ -111,15 +105,28 @@ static struct watchdog_device bcm2835_wdt_wdd = { +@@ -120,15 +114,28 @@ static struct watchdog_device bcm2835_wdt_wdd = { .timeout = WDOG_TICKS_TO_SECS(PM_WDOG_TIME_SET), }; @@ -1389,7 +1450,7 @@ index 4dddd8298a227d64862f2e92954a465f2e44b3f6..1f545e024422f59280932713e6a1b051 val = readl_relaxed(wdt->base + PM_RSTC); val &= PM_RSTC_WRCFG_CLR; val |= PM_PASSWORD | PM_RSTC_WRCFG_FULL_RESET; -@@ -127,6 +134,20 @@ bcm2835_restart(struct notifier_block *this, unsigned long mode, void *cmd) +@@ -136,6 +143,20 @@ bcm2835_restart(struct notifier_block *this, unsigned long mode, void *cmd) /* No sleeping, possibly atomic. */ mdelay(1); @@ -1410,7 +1471,7 @@ index 4dddd8298a227d64862f2e92954a465f2e44b3f6..1f545e024422f59280932713e6a1b051 return 0; } -@@ -142,19 +163,9 @@ static void bcm2835_power_off(void) +@@ -151,19 +172,9 @@ static void bcm2835_power_off(void) of_find_compatible_node(NULL, NULL, "brcm,bcm2835-pm-wdt"); struct platform_device *pdev = of_find_device_by_node(np); struct bcm2835_wdt *wdt = platform_get_drvdata(pdev); @@ -1432,7 +1493,7 @@ index 4dddd8298a227d64862f2e92954a465f2e44b3f6..1f545e024422f59280932713e6a1b051 } static int bcm2835_wdt_probe(struct platform_device *pdev) -@@ -188,7 +199,7 @@ static int bcm2835_wdt_probe(struct platform_device *pdev) +@@ -208,7 +219,7 @@ static int bcm2835_wdt_probe(struct platform_device *pdev) return err; } @@ -1442,10 +1503,10 @@ index 4dddd8298a227d64862f2e92954a465f2e44b3f6..1f545e024422f59280932713e6a1b051 register_restart_handler(&wdt->restart_handler); if (pm_power_off == NULL) -From dccb6995542d49841e8f2788760c018a71825519 Mon Sep 17 00:00:00 2001 +From 232d0798c565f9ebf55bf1e2d2311b3c5ccdd393 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Apr 2016 19:40:12 +0100 -Subject: [PATCH 024/149] reboot: Use power off rather than busy spinning when +Subject: [PATCH 022/143] reboot: Use power off rather than busy spinning when halt is requested --- @@ -1468,10 +1529,10 @@ index 3fa867a2aae672755c6ce6448f4148c989dbf964..80dca8dcd6709034b643c6a3f35729e0 /* -From 67818faac095861e49851760554ce737c91089a0 Mon Sep 17 00:00:00 2001 +From efde81aa7c10d0d6e9c24e7cc8503ce0996faca9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 9 Nov 2016 13:02:52 +0000 -Subject: [PATCH 025/149] bcm: Make RASPBERRYPI_POWER depend on PM +Subject: [PATCH 023/143] bcm: Make RASPBERRYPI_POWER depend on PM --- drivers/soc/bcm/Kconfig | 1 + @@ -1490,10 +1551,10 @@ index a39b0d58ddd0fdf0ac1cc7295f8aafb12546e226..e037a6dd79d1881a09e3ca9115782709 help This enables support for the RPi power domains which can be enabled -From 5ff58aca38d86f9ae61dd259b603173638e756b1 Mon Sep 17 00:00:00 2001 +From a0c1361b3b8584885facacada6d30f09470ce3bb Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Fri, 2 Sep 2016 16:45:27 +0100 -Subject: [PATCH 026/149] Register the clocks early during the boot process, so +Subject: [PATCH 024/143] Register the clocks early during the boot process, so that special/critical clocks can get enabled early on in the boot process avoiding the risk of disabling a clock, pll_divider or pll when a claiming driver fails to install propperly - maybe it needs to defer. @@ -1504,10 +1565,10 @@ Signed-off-by: Martin Sperl 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index 7040c6426e35c11608121893b662c601cd8d6543..21e2a538ff0d0ab4e63adff9b93705f3d45fa15d 100644 +index 0d14409097e777ce4546de30e9278fdebf74ec44..093694e00caec6e133eb26712f890691cad999aa 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1903,8 +1903,15 @@ static int bcm2835_clk_probe(struct platform_device *pdev) +@@ -1958,8 +1958,15 @@ static int bcm2835_clk_probe(struct platform_device *pdev) if (ret) return ret; @@ -1524,7 +1585,7 @@ index 7040c6426e35c11608121893b662c601cd8d6543..21e2a538ff0d0ab4e63adff9b93705f3 } static const struct of_device_id bcm2835_clk_of_match[] = { -@@ -1921,7 +1928,11 @@ static struct platform_driver bcm2835_clk_driver = { +@@ -1976,7 +1983,11 @@ static struct platform_driver bcm2835_clk_driver = { .probe = bcm2835_clk_probe, }; @@ -1538,10 +1599,10 @@ index 7040c6426e35c11608121893b662c601cd8d6543..21e2a538ff0d0ab4e63adff9b93705f3 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("BCM2835 clock driver"); -From 9f222e7751a552f0702001e8bb65f6542d099a01 Mon Sep 17 00:00:00 2001 +From c3b7ffe0ce627827234c4012de92f199831caefb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 6 Dec 2016 17:05:39 +0000 -Subject: [PATCH 027/149] bcm2835-rng: Avoid initialising if already enabled +Subject: [PATCH 025/143] bcm2835-rng: Avoid initialising if already enabled Avoids the 0x40000 cycles of warmup again if firmware has already used it --- @@ -1567,10 +1628,10 @@ index 574211a495491d9d6021dcaefe4274a63ed02055..e66c0fca8c6090e32f72796c0877a1cf err = hwrng_register(&bcm2835_rng_ops); if (err) { -From 172f29ac319b70f9cbdee8eb6bf1effcf4228339 Mon Sep 17 00:00:00 2001 +From 5bfe6e7bc831a0e96fa156a19886809aff0328ca Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Aug 2016 16:28:44 +0100 -Subject: [PATCH 028/149] kbuild: Ignore dtco targets when filtering symbols +Subject: [PATCH 026/143] kbuild: Ignore dtco targets when filtering symbols --- scripts/Kbuild.include | 2 +- @@ -1590,10 +1651,10 @@ index 179219845dfcdfbeb586d12c5ec1296095d9fbf4..e0743e44f84188667a0c322e8c3d36f1 esac | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' -From 6b5d699e1c3fac9703817ab771fb6b76f9c5b697 Mon Sep 17 00:00:00 2001 +From 591508cc26f195e95549de1146bc05d8f21c5dee Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 -Subject: [PATCH 029/149] BCM2835_DT: Fix I2S register map +Subject: [PATCH 027/143] BCM2835_DT: Fix I2S register map --- Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 ++-- @@ -1631,10 +1692,10 @@ index 65783de0aedf3da79adc36fd077b7a89954ddb6b..a89fe4220fdc3f26f75ee66daf187554 dmas = <&dma 2>, <&dma 3>; -From 0f754ef76f4a4273014129871e8c7db707f62171 Mon Sep 17 00:00:00 2001 +From 01804d5ae241e785859bd18934674c00fa692dc3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 030/149] Main bcm2708/bcm2709 linux port +Subject: [PATCH 028/143] Main bcm2708/bcm2709 linux port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1841,10 +1902,10 @@ index cfb4b4496dd9f61362dea012176c146120fada07..d9c6c217c4d6a2408abe2665bf7f2700 MODULE_AUTHOR("Lubomir Rintel "); MODULE_DESCRIPTION("BCM2835 mailbox IPC driver"); -From 831b20cc672acd4b3109d7e707967248424e784b Mon Sep 17 00:00:00 2001 +From 228c89bd9ddd3b365c7eaa3c03d575bc794f7de7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 031/149] Add dwc_otg driver +Subject: [PATCH 029/143] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2522,7 +2583,7 @@ index 8dd26e1a9bd69051a1548d99c157cad2e65ba81b..eef484756af2179be8acd76b9ddbd3e9 + mov pc, r8 +ENDPROC(__FIQ_Branch) diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile -index dca78565eb5500263051e9e1c889d84d6afd8fd9..5c467de6914e742b2ba25eb16e0c08b2e363532c 100644 +index 7791af6c102c7f4ea2c8ecdeda5cbc08fb03a55c..4f9e217700551a55b64b8ee8eaebbd8822741d4e 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile @@ -7,6 +7,7 @@ @@ -2534,10 +2595,10 @@ index dca78565eb5500263051e9e1c889d84d6afd8fd9..5c467de6914e742b2ba25eb16e0c08b2 obj-$(CONFIG_USB_DWC2) += dwc2/ obj-$(CONFIG_USB_ISP1760) += isp1760/ diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c -index 358ca8dd784fe43700ae070764fa783500a792fe..abaac7c7142d8887c1516957fc52162c0e1683f7 100644 +index bd3e0c5a6db25e7a162d922c6508de1ad0b68025..15c80079c97bb9eeec478932af88a293b5c51ca9 100644 --- a/drivers/usb/core/generic.c +++ b/drivers/usb/core/generic.c -@@ -152,6 +152,7 @@ int usb_choose_configuration(struct usb_device *udev) +@@ -154,6 +154,7 @@ int usb_choose_configuration(struct usb_device *udev) dev_warn(&udev->dev, "no configuration chosen from %d choice%s\n", num_configs, plural(num_configs)); @@ -2546,10 +2607,10 @@ index 358ca8dd784fe43700ae070764fa783500a792fe..abaac7c7142d8887c1516957fc52162c return i; } diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index aef81a16e2c8534701b8583392400faf77971d23..4197a5b5fb7abae67bd4aa32c29cb84c1f2fe22e 100644 +index a56c75e09786d5fa1e064a8e56e58e4095e4d716..466eeaeee74b271946384e6bfde8a5fd1c722f4f 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5009,7 +5009,7 @@ static void port_event(struct usb_hub *hub, int port1) +@@ -5018,7 +5018,7 @@ static void port_event(struct usb_hub *hub, int port1) if (portchange & USB_PORT_STAT_C_OVERCURRENT) { u16 status = 0, unused; @@ -2559,10 +2620,10 @@ index aef81a16e2c8534701b8583392400faf77971d23..4197a5b5fb7abae67bd4aa32c29cb84c USB_PORT_FEAT_C_OVER_CURRENT); msleep(100); /* Cool down */ diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c -index 3a47077461578f2af47af8d551353c2c7cb12f0e..85b7ff6f24b8023e1b589aa1a3557885c48d7a13 100644 +index dea55914d6410c5b472c36562864baee3143bf86..17fbb7bfd2c92d84169281008915453f5b8f949b 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c -@@ -1908,6 +1908,85 @@ int usb_set_configuration(struct usb_device *dev, int configuration) +@@ -1911,6 +1911,85 @@ int usb_set_configuration(struct usb_device *dev, int configuration) if (cp->string == NULL && !(dev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS)) cp->string = usb_cache_string(dev, cp->desc.iConfiguration); @@ -6488,10 +6549,10 @@ index 0000000000000000000000000000000000000000..a896d73f7a9336f5a34015c44ea5a6b0 +} +module_exit(fsg_cleanup); diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig -index 0b80cee30da4740e8c28c6ea7a4cc700163a12ee..f17b939c149562527937f49d90e23c7ab8b72328 100644 +index 6361fc73930669750317b4fa4e995d74e8954e3c..99bc52546b8c912de72b4381ba8cf8e8ad61d7ee 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig -@@ -762,6 +762,19 @@ config USB_HWA_HCD +@@ -763,6 +763,19 @@ config USB_HWA_HCD To compile this driver a module, choose M here: the module will be called "hwa-hc". @@ -6512,10 +6573,10 @@ index 0b80cee30da4740e8c28c6ea7a4cc700163a12ee..f17b939c149562527937f49d90e23c7a tristate "i.MX21 HCD support" depends on ARM && ARCH_MXC diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile -index 6ef785b0ea8ff0b5f4ee3bc40ba22d17c855478f..c28acc1b2877b6ac43604d1968351ce42e9470a5 100644 +index 2644537b7bcfb5cc8452243838815d3aa5669409..d555089559bc2feef1a07f1f4147135f591bf087 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile -@@ -74,6 +74,8 @@ obj-$(CONFIG_USB_SL811_CS) += sl811_cs.o +@@ -75,6 +75,8 @@ obj-$(CONFIG_USB_SL811_CS) += sl811_cs.o obj-$(CONFIG_USB_U132_HCD) += u132-hcd.o obj-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o obj-$(CONFIG_USB_HWA_HCD) += hwa-hc.o @@ -62901,10 +62962,10 @@ index 0000000000000000000000000000000000000000..cdc9963176e5a4a0d5250613b61e26c5 +test_main(); +0; -From cc3948316ff869420c6ab75c4134ea2d59a6f96f Mon Sep 17 00:00:00 2001 +From f68c23214b22436e79194926e525fb6c0175576c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 -Subject: [PATCH 032/149] bcm2708 framebuffer driver +Subject: [PATCH 030/143] bcm2708 framebuffer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -66363,10 +66424,10 @@ index 3c14e43b82fefe1d32f591d1b2f61d2cd28d0fa8..7626beb6a5bb8df601ddf0f6e6909d1f +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 -From b34dc7f1c6796076b3def1d640ec670a53c2dccd Mon Sep 17 00:00:00 2001 +From bdf4d5ad586e9074aacf2e7942335268f43162e3 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 033/149] dmaengine: Add support for BCM2708 +Subject: [PATCH 031/143] dmaengine: Add support for BCM2708 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -66525,7 +66586,7 @@ bcm2708-dmaengine - Fix arm64 portability/build issues create mode 100644 include/linux/platform_data/dma-bcm2708.h diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig -index 9c931d36c6a499a02f4f215f8cd77d3f2254a3b9..9ccee1058e4c5c208a196d6d89e700d09754f977 100644 +index 4415a37a1d84c696efa96bf0b17840d6c0dd3b12..6f3aba9c1f8d35d9abb25ecc4a51825a922a4c03 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -108,7 +108,7 @@ config COH901318 @@ -66537,7 +66598,7 @@ index 9c931d36c6a499a02f4f215f8cd77d3f2254a3b9..9ccee1058e4c5c208a196d6d89e700d0 select DMA_ENGINE select DMA_VIRTUAL_CHANNELS -@@ -499,6 +499,10 @@ config TIMB_DMA +@@ -513,6 +513,10 @@ config TIMB_DMA help Enable support for the Timberdale FPGA DMA engine. @@ -66549,7 +66610,7 @@ index 9c931d36c6a499a02f4f215f8cd77d3f2254a3b9..9ccee1058e4c5c208a196d6d89e700d0 tristate "AM33xx CPPI41 DMA support" depends on ARCH_OMAP diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile -index e4dc9cac7ee8427184f821896364c232634a444f..58cc24730ed6ab4fd35a9cb182c4862f8f2d546f 100644 +index a4fa3360e609d1ef81bf89dc7086b76e6ae52048..853a30a5f4500b54e33cb61d3b99137d4198925c 100644 --- a/drivers/dma/Makefile +++ b/drivers/dma/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_AT_HDMAC) += at_hdmac.o @@ -66997,10 +67058,10 @@ index 0000000000000000000000000000000000000000..c5bfff2765be4606077e6c8af73040ec + +#endif /* _PLAT_BCM2708_DMA_H */ -From c71cf4968d934952db245c735a1dc9aa10769ed3 Mon Sep 17 00:00:00 2001 +From 14cfe758a49f17af11460525c1d0d76012e10b46 Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 034/149] MMC: added alternative MMC driver +Subject: [PATCH 032/143] MMC: added alternative MMC driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67118,7 +67179,7 @@ index ca9cade317c7eccee354bb1a075b091f59a62de1..5e9e3518e0eb6be78f6e2847846a90dd } EXPORT_SYMBOL(mmc_fixup_device); diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index 5274f503a39ad9c034e23b634ff0ec6634cbbd78..405d62909dd6ac5351684c002414cc02135d98ba 100644 +index 2eb97014dc3f2073c3b471688ba31598d023bc9e..ffa08df2adb9072de7f6e7662cd07239b97c2aea 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -4,6 +4,35 @@ @@ -67158,7 +67219,7 @@ index 5274f503a39ad9c034e23b634ff0ec6634cbbd78..405d62909dd6ac5351684c002414cc02 tristate "ARM AMBA Multimedia Card Interface support" depends on ARM_AMBA diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile -index e2bdaaf431841535b936600af56b8e38f52f9845..5133b680970c93fbb9695f83296f0f70b4977240 100644 +index ccc9c4cba154c6ba1849151353526e555d63c8a6..821366b1bb4d206523794382bf9b14ce37a9cb17 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_MMC_SDHCI_S3C) += sdhci-s3c.o @@ -68750,10 +68811,10 @@ index 0000000000000000000000000000000000000000..4fe8d1fe44578fbefcd48f8c327ba3d0 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Gellert Weisz"); -From 01825a395ee187b1064e93c1c6f555f9d87ddfe6 Mon Sep 17 00:00:00 2001 +From c2d33aadf0cf3d1c68c2dde3e48d6b335679816a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 -Subject: [PATCH 035/149] Adding bcm2835-sdhost driver, and an overlay to +Subject: [PATCH 033/143] Adding bcm2835-sdhost driver, and an overlay to enable it BCM2835 has two SD card interfaces. This driver uses the other one. @@ -68921,7 +68982,7 @@ Signed-off-by: Phil Elwell create mode 100644 drivers/mmc/host/bcm2835-sdhost.c diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index 405d62909dd6ac5351684c002414cc02135d98ba..87d251e93913b216359383812cae196e91bf6cfb 100644 +index ffa08df2adb9072de7f6e7662cd07239b97c2aea..0015d8ad85b565ed789d7dd9dc056a8014614e4c 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -6,7 +6,7 @@ comment "MMC/SD/SDIO Host Controller Drivers" @@ -68951,7 +69012,7 @@ index 405d62909dd6ac5351684c002414cc02135d98ba..87d251e93913b216359383812cae196e tristate "ARM AMBA Multimedia Card Interface support" depends on ARM_AMBA diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile -index 5133b680970c93fbb9695f83296f0f70b4977240..adbc4586fec94aa8bd70f5ca3e2c90d123849a34 100644 +index 821366b1bb4d206523794382bf9b14ce37a9cb17..62ef8f9b100876d876590b12fe94b8d45fbb5c8c 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_MMC_SDHCI_S3C) += sdhci-s3c.o @@ -71158,10 +71219,10 @@ index 0000000000000000000000000000000000000000..a9bc79bfdbb71807819dfe2d8f165144 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); -From 58b53529d0ded627f578daa56cd19b110e262944 Mon Sep 17 00:00:00 2001 +From 00496b5cfe106d6817de8a73031f1e935e54f4bb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 11 May 2016 12:50:33 +0100 -Subject: [PATCH 036/149] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards +Subject: [PATCH 034/143] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards Some SD cards have been found that corrupt data when small blocks are erased. Add a quirk to indicate that ERASE should not be used, @@ -71184,16 +71245,16 @@ card-specific. Signed-off-by: Phil Elwell --- - drivers/mmc/card/block.c | 39 ++++++++++++++++++++++++++++++++++++--- + drivers/mmc/core/block.c | 39 ++++++++++++++++++++++++++++++++++++--- drivers/mmc/core/core.c | 3 ++- include/linux/mmc/card.h | 3 +++ 3 files changed, 41 insertions(+), 4 deletions(-) -diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c -index 709a872ed484a9da1ce620238c3222190c612f86..894c105be9ce7f83147a62c433c787b90a5e7c17 100644 ---- a/drivers/mmc/card/block.c -+++ b/drivers/mmc/card/block.c -@@ -135,6 +135,13 @@ enum { +diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c +index cb1698f268f19023429df520713f20a3de6f6d25..dbf7099242bb109b9fa989f029e75e408b2e26d4 100644 +--- a/drivers/mmc/core/block.c ++++ b/drivers/mmc/core/block.c +@@ -125,6 +125,13 @@ static DEFINE_MUTEX(open_lock); module_param(perdev_minors, int, 0444); MODULE_PARM_DESC(perdev_minors, "Minors numbers to allocate per device"); @@ -71207,7 +71268,7 @@ index 709a872ed484a9da1ce620238c3222190c612f86..894c105be9ce7f83147a62c433c787b9 static inline int mmc_blk_part_switch(struct mmc_card *card, struct mmc_blk_data *md); static int get_card_status(struct mmc_card *card, u32 *status, int retries); -@@ -2573,6 +2580,17 @@ static const struct mmc_fixup blk_fixups[] = +@@ -2164,6 +2171,17 @@ static const struct mmc_fixup blk_fixups[] = MMC_FIXUP("V10016", CID_MANFID_KINGSTON, CID_OEMID_ANY, add_quirk_mmc, MMC_QUIRK_TRIM_BROKEN), @@ -71225,7 +71286,7 @@ index 709a872ed484a9da1ce620238c3222190c612f86..894c105be9ce7f83147a62c433c787b9 END_FIXUP }; -@@ -2580,6 +2598,7 @@ static int mmc_blk_probe(struct mmc_card *card) +@@ -2171,6 +2189,7 @@ static int mmc_blk_probe(struct mmc_card *card) { struct mmc_blk_data *md, *part_md; char cap_str[10]; @@ -71233,7 +71294,7 @@ index 709a872ed484a9da1ce620238c3222190c612f86..894c105be9ce7f83147a62c433c787b9 /* * Check that the card supports the command class(es) we need. -@@ -2587,7 +2606,16 @@ static int mmc_blk_probe(struct mmc_card *card) +@@ -2178,7 +2197,16 @@ static int mmc_blk_probe(struct mmc_card *card) if (!(card->csd.cmdclass & CCC_BLOCK_READ)) return -ENODEV; @@ -71251,7 +71312,7 @@ index 709a872ed484a9da1ce620238c3222190c612f86..894c105be9ce7f83147a62c433c787b9 md = mmc_blk_alloc(card); if (IS_ERR(md)) -@@ -2595,9 +2623,14 @@ static int mmc_blk_probe(struct mmc_card *card) +@@ -2186,9 +2214,14 @@ static int mmc_blk_probe(struct mmc_card *card) string_get_size((u64)get_capacity(md->disk), 512, STRING_UNITS_2, cap_str, sizeof(cap_str)); @@ -71269,10 +71330,10 @@ index 709a872ed484a9da1ce620238c3222190c612f86..894c105be9ce7f83147a62c433c787b9 if (mmc_blk_alloc_parts(card, md)) goto out; diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c -index 2553d903a82b9eaa8577c1269bc9f63e18b00085..59a4044ea4c2e1283b1cad8afc7e67efaf8653fb 100644 +index 1076b9d89df38e26bfb088fae3586a6c577fd70e..06907db55a930e4a03dfa13cf1c93c867c7e4aba 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c -@@ -2409,7 +2409,8 @@ EXPORT_SYMBOL(mmc_erase); +@@ -2386,7 +2386,8 @@ EXPORT_SYMBOL(mmc_erase); int mmc_can_erase(struct mmc_card *card) { if ((card->host->caps & MMC_CAP_ERASE) && @@ -71283,10 +71344,10 @@ index 2553d903a82b9eaa8577c1269bc9f63e18b00085..59a4044ea4c2e1283b1cad8afc7e67ef return 0; } diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h -index 73fad83acbcb6a157587180516f9ffe7c61eb7d7..e7c9d3098ac06e3c6554fa3373a311f937cd6f96 100644 +index 95d69d4982965aa30fb65d9ffecfad13f4e7be8f..a97b881a04f4b3294cf3ede393cde7178a3e9aff 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h -@@ -283,6 +283,9 @@ struct mmc_card { +@@ -273,6 +273,9 @@ struct mmc_card { #define MMC_QUIRK_BROKEN_HPI (1<<13) /* Disable broken HPI support */ @@ -71297,10 +71358,10 @@ index 73fad83acbcb6a157587180516f9ffe7c61eb7d7..e7c9d3098ac06e3c6554fa3373a311f9 unsigned int erase_shift; /* if erase unit is power 2 */ unsigned int pref_erase; /* in sectors */ -From d7b56b23de00b5e8ab954580c8af00a2e3db02d7 Mon Sep 17 00:00:00 2001 +From ca13f6a5ce9cb58b3587bf0cfd8bfc622ec3da63 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:31:47 +0100 -Subject: [PATCH 037/149] cma: Add vc_cma driver to enable use of CMA +Subject: [PATCH 035/143] cma: Add vc_cma driver to enable use of CMA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -71332,7 +71393,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 include/linux/broadcom/vc_cma.h diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig -index dcc09739a54ef860343ac2fca5acf59724ca60e2..6d518c7635ae128f4554945dd3ffd351f9d325bf 100644 +index fde005ef9d36a96d02be8680cb1845fc042296fa..17eae720bfb0c3d1d5499dc684d072cd33c1b153 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -4,6 +4,8 @@ @@ -71355,7 +71416,7 @@ index 6e6c244a66a02c4efd57229b0f31d331377bbc55..67c40b8f2ff25f423cb74b64de9afa6f +obj-$(CONFIG_BRCM_CHAR_DRIVERS) += broadcom/ diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig new file mode 100644 -index 0000000000000000000000000000000000000000..2d8bd6e5016aab7340636c1f5dc4dd0cbacae6c0 +index 0000000000000000000000000000000000000000..89d6fac780410e370ca2316b357e599c7eb5a9b3 --- /dev/null +++ b/drivers/char/broadcom/Kconfig @@ -0,0 +1,15 @@ @@ -71370,7 +71431,7 @@ index 0000000000000000000000000000000000000000..2d8bd6e5016aab7340636c1f5dc4dd0c + +config BCM_VC_CMA + bool "Videocore CMA" -+ depends on CMA && BRCM_CHAR_DRIVERS && BCM2708_VCHIQ ++ depends on CMA && BRCM_CHAR_DRIVERS && BCM2835_VCHIQ + default n + help + Helper for videocore CMA access. @@ -72636,10 +72697,10 @@ index 0000000000000000000000000000000000000000..be2819d5d41f9d5ed65daf8eedb94c9e + +#endif /* VC_CMA_H */ -From 86ffcfc090316b809298478f750f7a3d8b1ebc3a Mon Sep 17 00:00:00 2001 +From 6174e627557707aa9ec6b80ea852a4abce9f85a2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 26 Mar 2012 22:15:50 +0100 -Subject: [PATCH 038/149] bcm2708: alsa sound driver +Subject: [PATCH 036/143] bcm2708: alsa sound driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -72711,7 +72772,7 @@ snd-bcm2835: Use bcm2835_hw params in preallocate create mode 100644 sound/arm/vc_vchi_audioserv_defs.h diff --git a/sound/arm/Kconfig b/sound/arm/Kconfig -index 65171f6657a2984ccc14ce907a4c7c87d77d196b..02b6d263035ca18c9ce53229369dfb00915c260b 100644 +index 65171f6657a2984ccc14ce907a4c7c87d77d196b..42581e2f65dfedba6207b6a377a1e1b5df4f2e4b 100644 --- a/sound/arm/Kconfig +++ b/sound/arm/Kconfig @@ -32,6 +32,13 @@ config SND_PXA2XX_AC97 @@ -72720,7 +72781,7 @@ index 65171f6657a2984ccc14ce907a4c7c87d77d196b..02b6d263035ca18c9ce53229369dfb00 +config SND_BCM2835 + tristate "BCM2835 ALSA driver" -+ depends on ARCH_BCM2835 && BCM2708_VCHIQ && SND ++ depends on ARCH_BCM2835 && BCM2835_VCHIQ && SND + select SND_PCM + help + Say Y or M if you want to support BCM2835 Alsa pcm card driver @@ -75374,10 +75435,10 @@ index 0000000000000000000000000000000000000000..af3e6eb690113fc32ce9e06bd2f0f294 + +#endif // _VC_AUDIO_DEFS_H_ -From 608dd1a3bd211457238098ec54d8274a6895797d Mon Sep 17 00:00:00 2001 +From a32d0d6bbe4bb394ac6724af37583d8c01973a67 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 28 Oct 2016 15:36:43 +0100 -Subject: [PATCH 039/149] vc_mem: Add vc_mem driver for querying firmware +Subject: [PATCH 037/143] vc_mem: Add vc_mem driver for querying firmware memory addresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -75400,7 +75461,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 include/linux/broadcom/vc_mem.h diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index 2d8bd6e5016aab7340636c1f5dc4dd0cbacae6c0..70379287f6261fd833202ac47de1bcca8b84959a 100644 +index 89d6fac780410e370ca2316b357e599c7eb5a9b3..e4fbd82b9384fa3fa23802697293e706a58efed9 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -7,9 +7,19 @@ menuconfig BRCM_CHAR_DRIVERS @@ -75411,8 +75472,8 @@ index 2d8bd6e5016aab7340636c1f5dc4dd0cbacae6c0..70379287f6261fd833202ac47de1bcca + config BCM_VC_CMA bool "Videocore CMA" -- depends on CMA && BRCM_CHAR_DRIVERS && BCM2708_VCHIQ -+ depends on CMA && BCM2708_VCHIQ +- depends on CMA && BRCM_CHAR_DRIVERS && BCM2835_VCHIQ ++ depends on CMA && BCM2835_VCHIQ default n help Helper for videocore CMA access. @@ -75901,10 +75962,10 @@ index 0000000000000000000000000000000000000000..20a475377eb3078ea1ecaef2b24efc35 + +#endif /* _VC_MEM_H */ -From e7f3e8d0a01840f74d16c52093c69004fd657de5 Mon Sep 17 00:00:00 2001 +From c00e9788d5f56d3e876fe2127e9d80da8a456584 Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 040/149] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 038/143] vcsm: VideoCore shared memory service for BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -75964,7 +76025,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 include/linux/broadcom/vmcs_sm_ioctl.h diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index 70379287f6261fd833202ac47de1bcca8b84959a..75fa1cba764084160f7cb77e56058f25b5e9f0ce 100644 +index e4fbd82b9384fa3fa23802697293e706a58efed9..3bf1358bf1dd89d7a41e4ed3fd8fb2990d77ebbe 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -23,3 +23,12 @@ config BCM2708_VCMEM @@ -75974,7 +76035,7 @@ index 70379287f6261fd833202ac47de1bcca8b84959a..75fa1cba764084160f7cb77e56058f25 + +config BCM_VC_SM + bool "VMCS Shared Memory" -+ depends on BCM2708_VCHIQ ++ depends on BCM2835_VCHIQ + select BCM2708_VCMEM + default n + help @@ -76839,7 +76900,7 @@ index 0000000000000000000000000000000000000000..5e279f5a95fac7227cea15941bf0570d +#endif /* __VC_VCHI_SM_H__INCLUDED__ */ diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c new file mode 100644 -index 0000000000000000000000000000000000000000..1db6716c2c0c8b2013203391501f92d09db258af +index 0000000000000000000000000000000000000000..8b6f2476769e956fb30d4c8a24789565e78444c1 --- /dev/null +++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c @@ -0,0 +1,3213 @@ @@ -78014,14 +78075,14 @@ index 0000000000000000000000000000000000000000..1db6716c2c0c8b2013203391501f92d0 + } + + /* We don't use vmf->pgoff since that has the fake offset */ -+ page_offset = ((unsigned long)vmf->virtual_address - vma->vm_start); ++ page_offset = ((unsigned long)vmf->address - vma->vm_start); + pfn = (uint32_t)resource->res_base_mem & 0x3FFFFFFF; + pfn += mm_vc_mem_phys_addr; + pfn += page_offset; + pfn >>= PAGE_SHIFT; + + /* Finally, remap it */ -+ ret = vm_insert_pfn(vma, (unsigned long)vmf->virtual_address, pfn); ++ ret = vm_insert_pfn(vma, (unsigned long)vmf->address, pfn); + + switch (ret) { + case 0: @@ -80311,10 +80372,10 @@ index 0000000000000000000000000000000000000000..334f36d0d697b047df2922b5f2db67f3 + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ -From e1112cb5d042a03fc305178b5e498c48475112b0 Mon Sep 17 00:00:00 2001 +From 32efcf2207a132a8e8d40424646b0e726e19e377 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 -Subject: [PATCH 041/149] Add /dev/gpiomem device for rootless user GPIO access +Subject: [PATCH 039/143] Add /dev/gpiomem device for rootless user GPIO access Signed-off-by: Luke Wren @@ -80331,7 +80392,7 @@ See: https://github.com/raspberrypi/linux/issues/1154 create mode 100644 drivers/char/broadcom/bcm2835-gpiomem.c diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index 75fa1cba764084160f7cb77e56058f25b5e9f0ce..b75c9b2639fb0e63dd2623ddc1dcaac5759c132b 100644 +index 3bf1358bf1dd89d7a41e4ed3fd8fb2990d77ebbe..ffb12f4023b2db4cf75f1a13562d483608eead2e 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -32,3 +32,12 @@ config BCM_VC_SM @@ -80625,10 +80686,10 @@ index 0000000000000000000000000000000000000000..911f5b7393ed48ceed8751f06967ae64 +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); -From a163d2f8c2cf63c24929d384ed69e810863b50b8 Mon Sep 17 00:00:00 2001 +From 227fa137a8d33de43c3a44e26d342a0192d6177b Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 -Subject: [PATCH 042/149] Add SMI driver +Subject: [PATCH 040/143] Add SMI driver Signed-off-by: Luke Wren --- @@ -80726,7 +80787,7 @@ index 0000000000000000000000000000000000000000..b76dc694f1ac0b8044000ae54d312c80 +}; + diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index b75c9b2639fb0e63dd2623ddc1dcaac5759c132b..f7885466f5bf9c0cf45f2057d07a0d24151f10c3 100644 +index ffb12f4023b2db4cf75f1a13562d483608eead2e..026ebde319c49c91f11b21edd78da62270883eac 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -41,3 +41,11 @@ config BCM2835_DEVGPIOMEM @@ -82579,10 +82640,10 @@ index 0000000000000000000000000000000000000000..ee3a75edfc033eeb0d90a687ffb68b10 + +#endif /* BCM2835_SMI_H */ -From 4581206982ea9228b3d626fe9121d83989d655fb Mon Sep 17 00:00:00 2001 +From c21d7f46c064ef8d4be52013e5c9760c4f85202b Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Tue, 26 Apr 2016 14:59:21 +0000 -Subject: [PATCH 043/149] MISC: bcm2835: smi: use clock manager and fix reload +Subject: [PATCH 041/143] MISC: bcm2835: smi: use clock manager and fix reload issues Use clock manager instead of self-made clockmanager. @@ -82752,10 +82813,10 @@ index 63a4ea08b9930a3a31a985f0a1d969b488ed49ec..1261540703127d1d63b9f3c87042c6e5 return 0; } -From 8c4659a46bb12c1a8744cb97d49e4bc81e3716e5 Mon Sep 17 00:00:00 2001 +From 5d7a61f480af9494f6986a02ae3328854b6ead05 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 -Subject: [PATCH 044/149] Add SMI NAND driver +Subject: [PATCH 042/143] Add SMI NAND driver Signed-off-by: Luke Wren --- @@ -82817,7 +82878,7 @@ index 0000000000000000000000000000000000000000..159544d6579070d376d146bd24a86653 +}; \ No newline at end of file diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig -index b254090b8a1ba6dfb7a86f8065663207d5393935..f21097c8d5378b2d72b3d18e39e28ad4f53942f0 100644 +index 9ce5dcb4abd0f5026384ed4e0466d1ddfa44c617..a8008746d960fecaf106c71869372f9c8a79c571 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -41,6 +41,13 @@ config MTD_SM_COMMON @@ -82835,7 +82896,7 @@ index b254090b8a1ba6dfb7a86f8065663207d5393935..f21097c8d5378b2d72b3d18e39e28ad4 tristate diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile -index cafde6f3d95761263d4c5af1395b11bfc000ca9b..d399ab9c92350596ac0970fb1a2a70fa3ac0094b 100644 +index 19a66e404d5ba949a16a7ba358df25f033e7a51c..3e2cecac083a6bdb340127233c10f40ce567814f 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -14,6 +14,7 @@ obj-$(CONFIG_MTD_NAND_DENALI) += denali.o @@ -82845,7 +82906,7 @@ index cafde6f3d95761263d4c5af1395b11bfc000ca9b..d399ab9c92350596ac0970fb1a2a70fa +obj-$(CONFIG_MTD_NAND_BCM2835_SMI) += bcm2835_smi_nand.o obj-$(CONFIG_MTD_NAND_BF5XX) += bf5xx_nand.o obj-$(CONFIG_MTD_NAND_S3C2410) += s3c2410.o - obj-$(CONFIG_MTD_NAND_DAVINCI) += davinci_nand.o + obj-$(CONFIG_MTD_NAND_TANGO) += tango_nand.o diff --git a/drivers/mtd/nand/bcm2835_smi_nand.c b/drivers/mtd/nand/bcm2835_smi_nand.c new file mode 100644 index 0000000000000000000000000000000000000000..02adda6da18bd0ba9ab19a104975b79de58bfdce @@ -83120,10 +83181,10 @@ index 0000000000000000000000000000000000000000..02adda6da18bd0ba9ab19a104975b79d + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); -From 12cb12bf2df48973ea84bd188ccadc191486f353 Mon Sep 17 00:00:00 2001 +From 1995e1c034599ce8a4bad906a7935160058f79a9 Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 045/149] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 043/143] lirc: added support for RaspberryPi GPIO lirc_rpi: Use read_current_timer to determine transmitter delay. Thanks to jjmz and others See: https://github.com/raspberrypi/linux/issues/525 @@ -83188,7 +83249,7 @@ spurious interrupts. create mode 100644 include/linux/platform_data/bcm2708.h diff --git a/drivers/staging/media/lirc/Kconfig b/drivers/staging/media/lirc/Kconfig -index 6879c4651b46c8b48460626cb346b8ee23fa6587..77c69f2d4158be625a5956095b988cd3774dbfae 100644 +index 25b7e7ccf55479ec7a3d83a6e4b8b6aaba207a26..066f4bed3687391055dd3b15f278ed206c1bee6b 100644 --- a/drivers/staging/media/lirc/Kconfig +++ b/drivers/staging/media/lirc/Kconfig @@ -32,6 +32,12 @@ config LIRC_PARALLEL @@ -83205,7 +83266,7 @@ index 6879c4651b46c8b48460626cb346b8ee23fa6587..77c69f2d4158be625a5956095b988cd3 tristate "Sasem USB IR Remote" depends on LIRC && USB diff --git a/drivers/staging/media/lirc/Makefile b/drivers/staging/media/lirc/Makefile -index 5430adf0475ded5abe2ef4b4cf4e7f2c08297894..9e53cd0caf58ba28a939b780c876d4017a23ac2b 100644 +index 7f919eab1989e33f49917f51e9857bc439f51d1f..99726bfaa700d5b54063f155b4821aa5be30df09 100644 --- a/drivers/staging/media/lirc/Makefile +++ b/drivers/staging/media/lirc/Makefile @@ -6,6 +6,7 @@ @@ -83214,8 +83275,8 @@ index 5430adf0475ded5abe2ef4b4cf4e7f2c08297894..9e53cd0caf58ba28a939b780c876d401 obj-$(CONFIG_LIRC_PARALLEL) += lirc_parallel.o +obj-$(CONFIG_LIRC_RPI) += lirc_rpi.o obj-$(CONFIG_LIRC_SASEM) += lirc_sasem.o - obj-$(CONFIG_LIRC_SERIAL) += lirc_serial.o obj-$(CONFIG_LIRC_SIR) += lirc_sir.o + obj-$(CONFIG_LIRC_ZILOG) += lirc_zilog.o diff --git a/drivers/staging/media/lirc/lirc_rpi.c b/drivers/staging/media/lirc/lirc_rpi.c new file mode 100644 index 0000000000000000000000000000000000000000..61328968d21540b04814cbd5155eaa30b715c8f4 @@ -83986,10 +84047,10 @@ index 0000000000000000000000000000000000000000..fb69624ccef00ddbdccf8256d6baf1b1 + +#endif -From c50cae06b8860e97ef558823bb9d9685f400b252 Mon Sep 17 00:00:00 2001 +From 3c4052e9e9b9835346794628a416afdb8286f65b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 046/149] Add cpufreq driver +Subject: [PATCH 044/143] Add cpufreq driver Signed-off-by: popcornmix --- @@ -84000,10 +84061,10 @@ Signed-off-by: popcornmix create mode 100644 drivers/cpufreq/bcm2835-cpufreq.c diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm -index d89b8afe23b6956b6c48e19c87cecc081e7725a1..465c727bb3ba70249409728d8f643a0002c6779c 100644 +index 920c469f3953e890bd747413750be8ad6a4352e2..e15f8324174ced05bcf9289dc474751fc6d3cba7 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm -@@ -220,6 +220,15 @@ config ARM_STI_CPUFREQ +@@ -233,6 +233,15 @@ config ARM_STI_CPUFREQ this config option if you wish to add CPUFreq support for STi based SoCs. @@ -84020,7 +84081,7 @@ index d89b8afe23b6956b6c48e19c87cecc081e7725a1..465c727bb3ba70249409728d8f643a00 bool "Tegra20 CPUFreq support" depends on ARCH_TEGRA diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile -index 0a9b6a093646bd1dd60ee092e362b24527f0ef1e..92a628a670c12c39c2be73fc91f65da5fdafd397 100644 +index 1e46c3918e7a630647d744549a46c184e5e8fd80..6fd3f67a8fbffc304d105683e4f8443d7346ffe8 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile @@ -75,6 +75,7 @@ obj-$(CONFIG_ARM_SA1110_CPUFREQ) += sa1110-cpufreq.o @@ -84256,10 +84317,10 @@ index 0000000000000000000000000000000000000000..414fbdc10dfbfc6e4bb47870a7af3fd5 +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From 4c804a94ab80fa1c15f4e87055f7c4fefbb5f067 Mon Sep 17 00:00:00 2001 +From 99f3536cecd3ec117d1b8f673471936f0935a839 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 047/149] Added hwmon/thermal driver for reporting core +Subject: [PATCH 045/143] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -84280,10 +84341,10 @@ Signed-off-by: Noralf Trønnes create mode 100644 drivers/thermal/bcm2835-thermal.c diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig -index a13541bdc726899807dd8723c92c21312fbc6439..de45ea51555e5f47498c18a969751ea6dc52d6b9 100644 +index c2c056cc7ea52e1a7170b35de2832c1b1dcf40b4..b43058bee69ca62d9480fa7782e456aac1dbeedb 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig -@@ -302,6 +302,13 @@ config INTEL_POWERCLAMP +@@ -304,6 +304,13 @@ config INTEL_POWERCLAMP enforce idle time which results in more package C-state residency. The user interface is exposed via generic thermal framework. @@ -84298,10 +84359,10 @@ index a13541bdc726899807dd8723c92c21312fbc6439..de45ea51555e5f47498c18a969751ea6 tristate "X86 package temperature thermal driver" depends on X86_THERMAL_VECTOR diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile -index c92eb22a41ff89f3f1c61c61977de7eb9ba516ae..bcf9e7503c940821ca260774ba9e1cebf185cd3e 100644 +index 6a3d7b57303655f58b7fec456cc43519fa29dc91..f3d8fe6cc10146b0b27e72f4b6e75664b3bf91cd 100644 --- a/drivers/thermal/Makefile +++ b/drivers/thermal/Makefile -@@ -41,6 +41,7 @@ obj-$(CONFIG_MAX77620_THERMAL) += max77620_thermal.o +@@ -42,6 +42,7 @@ obj-$(CONFIG_MAX77620_THERMAL) += max77620_thermal.o obj-$(CONFIG_QORIQ_THERMAL) += qoriq_thermal.o obj-$(CONFIG_DB8500_CPUFREQ_COOLING) += db8500_cpufreq_cooling.o obj-$(CONFIG_INTEL_POWERCLAMP) += intel_powerclamp.o @@ -84425,10 +84486,10 @@ index 0000000000000000000000000000000000000000..c63fb9f9d143e19612a18fe530c7b2b3 +MODULE_DESCRIPTION("Thermal driver for bcm2835 chip"); +MODULE_LICENSE("GPL"); -From 90343ee1e9f9800520f270b1faef548421203f60 Mon Sep 17 00:00:00 2001 +From 0d51691b29ddf5a1c856738868f7067d0fef9a1b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 -Subject: [PATCH 048/149] Add Chris Boot's i2c driver +Subject: [PATCH 046/143] Add Chris Boot's i2c driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -84532,7 +84593,7 @@ both bcm2708_bsc_fifo_fill and ~drain are changed as well. create mode 100644 drivers/i2c/busses/i2c-bcm2708.c diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig -index d252276feadf6b0b05cbe370330ed7cef5a16857..b81d8133639a34dcec85df50f064d8e9a9ba22fa 100644 +index 0cdc8443deab611d6574ba07b77ddec95ee5cebd..09e4774d2688a8bb8ec1174bf746593dd354f068 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -8,6 +8,25 @@ menu "I2C Hardware Bus support" @@ -84562,7 +84623,7 @@ index d252276feadf6b0b05cbe370330ed7cef5a16857..b81d8133639a34dcec85df50f064d8e9 tristate "ALI 1535" depends on PCI diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile -index 29764cc20a440752841272ddfed3993048ecd105..26ae016a15e72cbb2e742aa89238636e3b846b8e 100644 +index 1c1bac87a9db8cb9a4ee35792a52571262051bc8..3bc2ecfa6839946ee6f61c7ecb45ac16fe3b9a68 100644 --- a/drivers/i2c/busses/Makefile +++ b/drivers/i2c/busses/Makefile @@ -2,6 +2,8 @@ @@ -85093,10 +85154,10 @@ index 0000000000000000000000000000000000000000..962f2e5c7455d91bf32925d785f5f16b +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From be042cabd560bbfb629499ea855e0b0b167b17f3 Mon Sep 17 00:00:00 2001 +From cb15069165df2b45009331fcea832183557c94fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:27:06 +0200 -Subject: [PATCH 049/149] char: broadcom: Add vcio module +Subject: [PATCH 047/143] char: broadcom: Add vcio module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -85113,7 +85174,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 drivers/char/broadcom/vcio.c diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index f7885466f5bf9c0cf45f2057d07a0d24151f10c3..032164919350db25c586c36f0e05d3e4891fb835 100644 +index 026ebde319c49c91f11b21edd78da62270883eac..f83cf0c279d9d2ddb1257504d578dc34a53325ca 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -22,6 +22,12 @@ config BCM2708_VCMEM @@ -85322,10 +85383,10 @@ index 0000000000000000000000000000000000000000..c19bc2075c77879563ef5e59038b5a14 +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); -From 59d09b798dd2b47df127447ded51b431467441d5 Mon Sep 17 00:00:00 2001 +From 08b1da5536118ce3e95f38366b1868fa27dcc489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:25:01 +0200 -Subject: [PATCH 050/149] firmware: bcm2835: Support ARCH_BCM270x +Subject: [PATCH 048/143] firmware: bcm2835: Support ARCH_BCM270x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -85408,10 +85469,10 @@ index dd506cd3a5b874f9e1acd07efb8cd151bb6145d1..3f070bd38a91511c986e3fb114b15bd4 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); -From 48c8f6793b6e0be5ef020825114123391c85ef77 Mon Sep 17 00:00:00 2001 +From bd6e61c1d0de223b77a89b11767c93d14c186222 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 30 Jan 2013 12:45:18 +0000 -Subject: [PATCH 051/149] bcm2835: add v4l2 camera device +Subject: [PATCH 049/143] bcm2835: add v4l2 camera device - Supports raw YUV capture, preview, JPEG and H264. - Uses videobuf2 for data transfer, using dma_buf. @@ -85902,7 +85963,7 @@ index 0000000000000000000000000000000000000000..c585a8fadf91c5a04453e442fc29ed89 + +$ v4l2-ctl --list-formats diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig -index 5ff803efdc03da24a177ee06f3659e785ebe6b35..dc76b9e1594974d6c474ad8a470923ac0ec5b6f0 100644 +index d944421e392d7b0af9e1c93b6bd63ea902bc5e60..10baabea617f114068cd88240571a811eb8ea50f 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -11,6 +11,8 @@ menuconfig V4L_PLATFORM_DRIVERS @@ -85915,7 +85976,7 @@ index 5ff803efdc03da24a177ee06f3659e785ebe6b35..dc76b9e1594974d6c474ad8a470923ac config VIDEO_VIA_CAMERA diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile -index 40b18d12726ec52d0acfd15894337366eb420e89..b9f01f61c500a9b502d976b4c595be5013610aec 100644 +index 5b3cb271d2b8ccf3a2d47a00dcfe90bdb5a95e3c..38273667e6c241fc5487d5600d8fc1e2355feba6 100644 --- a/drivers/media/platform/Makefile +++ b/drivers/media/platform/Makefile @@ -2,6 +2,8 @@ @@ -85929,7 +85990,7 @@ index 40b18d12726ec52d0acfd15894337366eb420e89..b9f01f61c500a9b502d976b4c595be50 obj-$(CONFIG_VIDEO_VIA_CAMERA) += via-camera.o diff --git a/drivers/media/platform/bcm2835/Kconfig b/drivers/media/platform/bcm2835/Kconfig new file mode 100644 -index 0000000000000000000000000000000000000000..58d5f9600d726cb20e6d04c54c58c53ac3a586d2 +index 0000000000000000000000000000000000000000..e2f992c7710e9e6df9ea57387e1c3dd64400abdd --- /dev/null +++ b/drivers/media/platform/bcm2835/Kconfig @@ -0,0 +1,25 @@ @@ -85948,7 +86009,7 @@ index 0000000000000000000000000000000000000000..58d5f9600d726cb20e6d04c54c58c53a + +config VIDEO_BCM2835_MMAL + tristate "Broadcom BM2835 MMAL camera interface driver" -+ depends on BCM2708_VCHIQ ++ depends on BCM2835_VCHIQ + select VIDEOBUF2_VMALLOC + ---help--- + This is a V4L2 driver for the Broadcom BCM2835 MMAL camera host interface @@ -93153,10 +93214,10 @@ index 0000000000000000000000000000000000000000..9d1d11e4a53e510c04a416d92d195a7d + +#endif /* MMAL_VCHIQ_H */ -From 9864db27abbb7b7646a5f7a2d61e633653a30140 Mon Sep 17 00:00:00 2001 +From ffa6bcf63061b49a18bf0932a012e92ce64f1e90 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 -Subject: [PATCH 052/149] scripts: Add mkknlimg and knlinfo scripts from tools +Subject: [PATCH 050/143] scripts: Add mkknlimg and knlinfo scripts from tools repo The Raspberry Pi firmware looks for a trailer on the kernel image to @@ -93676,10 +93737,10 @@ index 0000000000000000000000000000000000000000..60206de7fa9a49bd027c635306674a29 + return $trailer; +} -From 8a0e794974ec0901d409c3cdcb6272d676854710 Mon Sep 17 00:00:00 2001 +From 537c9deee795f656a41baf00cda7168211581b90 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 10 Aug 2015 09:49:15 +0100 -Subject: [PATCH 053/149] scripts/dtc: Update to upstream version 1.4.1 +Subject: [PATCH 051/143] scripts/dtc: Update to upstream version 1.4.1 Includes the new localfixups format. @@ -96530,10 +96591,10 @@ index ad9b05ae698b0495ecbda42ffcf4743555313a27..2595dfda020fd9e03f0beff5006f229d -#define DTC_VERSION "DTC 1.4.1-g53bf130b" +#define DTC_VERSION "DTC 1.4.1-g25efc119" -From 76895f1704632118094519da50adb6b58b4218e4 Mon Sep 17 00:00:00 2001 +From 1fee8b71fef8abbfcef2cf6913627f2f6f7846a5 Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 054/149] BCM2708: Add core Device Tree support +Subject: [PATCH 052/143] BCM2708: Add core Device Tree support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -96943,10 +97004,10 @@ Signed-off-by: Khem Raj create mode 100644 arch/arm/boot/dts/overlays/wittypi-overlay.dts diff --git a/arch/arm/Makefile b/arch/arm/Makefile -index 6be9ee148b78b964004392045199ec8d1540134e..b1c49e2a0c5f5ef2939102625171b26cd5372016 100644 +index ab30cc634d024fdb17b379adac2f2d9fe049f1ff..d92ade49c858e0a50ea7dd7391fccdbfa9479aab 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile -@@ -334,6 +334,8 @@ $(INSTALL_TARGETS): +@@ -338,6 +338,8 @@ $(INSTALL_TARGETS): %.dtb: | scripts $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@ @@ -96966,7 +97027,7 @@ index 3c79f85975aaa26c7c2e353fefc54d71d89bc5bf..eaaeb17e5986e5f7178b2851169444ac -*.dtb +*.dtb* diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index 7037201c5e3a7dd232b087fd7d7daa36bf3878ad..c697c4843a4e0f8b511c024924741082bb11edd7 100644 +index 01d178a2009f598f133e890a46c3e3e99efcc63c..0263d6172d3af40668c02535a4f8dce022f3a93d 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1,5 +1,13 @@ @@ -96983,7 +97044,7 @@ index 7037201c5e3a7dd232b087fd7d7daa36bf3878ad..c697c4843a4e0f8b511c024924741082 dtb-$(CONFIG_ARCH_ALPINE) += \ alpine-db.dtb dtb-$(CONFIG_MACH_ARTPEC6) += \ -@@ -955,10 +963,21 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ +@@ -984,10 +992,21 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb dtb-$(CONFIG_ARCH_ASPEED) += aspeed-bmc-opp-palmetto.dtb \ aspeed-ast2500-evb.dtb @@ -97488,7 +97549,7 @@ index 0000000000000000000000000000000000000000..d33d462b4090e4a4f967a37212918b9c +}; diff --git a/arch/arm/boot/dts/bcm2708-rpi.dtsi b/arch/arm/boot/dts/bcm2708-rpi.dtsi new file mode 100644 -index 0000000000000000000000000000000000000000..46cf8602c3b96e477b05b57dbfe5e349930c9d9a +index 0000000000000000000000000000000000000000..055090ace687b94e4d25de65d1b8fbf7f730be9e --- /dev/null +++ b/arch/arm/boot/dts/bcm2708-rpi.dtsi @@ -0,0 +1,109 @@ @@ -97566,9 +97627,9 @@ index 0000000000000000000000000000000000000000..46cf8602c3b96e477b05b57dbfe5e349 + firmware = <&firmware>; + }; + -+ thermal: thermal { -+ compatible = "brcm,bcm2835-thermal"; ++ thermal: thermal@7e212000 { + firmware = <&firmware>; ++ status = "okay"; + }; + + /* Onboard audio */ @@ -106661,10 +106722,10 @@ index 0a07f9014944ed92a8e2e42983ae43be60b3e471..1967878a843461c3ff1f473b9a030eb0 # Bzip2 -From 4ad8a91b7bb6a0cbad992941e0f93eca80334e06 Mon Sep 17 00:00:00 2001 +From d02d6f6fbcf7be876dd09ecc70ce35ce7238a264 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 -Subject: [PATCH 055/149] BCM270x_DT: Add pwr_led, and the required "input" +Subject: [PATCH 053/143] BCM270x_DT: Add pwr_led, and the required "input" trigger The "input" trigger makes the associated GPIO an input. This is to support @@ -106826,24 +106887,24 @@ index 0000000000000000000000000000000000000000..27f8ebea43d86fc51c98db5c953da05b +MODULE_DESCRIPTION("Set LED GPIO to Input \"trigger\""); +MODULE_LICENSE("GPL"); diff --git a/include/linux/leds.h b/include/linux/leds.h -index ddfcb2df3656cf0ab6aebd1fa3d624a6ec2e94e9..271563eb835f9018712e2076a88f341d2d6db7db 100644 +index 569cb531094c20a9aa2db478aaa6f348d2afd7f4..aca292f4b0932f61b5bd864251fd05b945497ed4 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h -@@ -52,6 +52,9 @@ struct led_classdev { - #define LED_DEV_CAP_FLASH (1 << 24) - #define LED_HW_PLUGGABLE (1 << 25) - #define LED_PANIC_INDICATOR (1 << 26) +@@ -46,6 +46,9 @@ struct led_classdev { + #define LED_DEV_CAP_FLASH (1 << 18) + #define LED_HW_PLUGGABLE (1 << 19) + #define LED_PANIC_INDICATOR (1 << 20) + /* Additions for Raspberry Pi PWR LED */ +#define SET_GPIO_INPUT (1 << 30) +#define SET_GPIO_OUTPUT (1 << 31) - /* Set LED brightness level - * Must not sleep. Use brightness_set_blocking for drivers + /* set_brightness_work / blink_timer flags, atomic, private. */ + unsigned long work_flags; -From d939148e2bae1181b7b3204848b0675bcbca7dce Mon Sep 17 00:00:00 2001 +From 187dd8daac23828689505c4a1ecb48e2c3605019 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 056/149] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 054/143] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -107095,10 +107156,10 @@ index fb795c3b3c178ad3cd7c9e9e4547ffd492bac181..703fa8a70574323abe2fb32599254582 __u32 dx; /* screen-relative */ __u32 dy; -From a6e5f4ea764a98c2215871d52bc2ef12d5f029e6 Mon Sep 17 00:00:00 2001 +From 721fc1e3126da2df74166f87bab6a56c3e0da334 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 057/149] Speed up console framebuffer imageblit function +Subject: [PATCH 055/143] Speed up console framebuffer imageblit function Especially on platforms with a slower CPU but a relatively high framebuffer fill bandwidth, like current ARM devices, the existing @@ -107307,10 +107368,10 @@ index a2bb276a8b2463eee98eb237c4647bc00cd93601..436494fba15abecb400ef28688466faf start_index, pitch_index); } else -From 4397c3e8d04fffb11eefa8cd1a2c63449e0b54ff Mon Sep 17 00:00:00 2001 +From 6f03a5d68b9c89ef0f13a166e66c45d515378036 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 058/149] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 056/143] enabling the realtime clock 1-wire chip DS1307 and 1-wire on GPIO4 (as a module) 1-wire: Add support for configuring pin for w1-gpio kernel module @@ -107560,10 +107621,10 @@ index d58594a3232492e33f1dd4babd3798b03e0f0203..feae94256256316fd9d850c3d83325af unsigned int ext_pullup_enable_pin; unsigned int pullup_duration; -From 0ca39dafbb47c59afba84aed83effee291f4a84a Mon Sep 17 00:00:00 2001 +From 7cc945130866491056dd227a0e01141f1dbf7c4c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Dec 2013 22:16:19 +0000 -Subject: [PATCH 059/149] config: Enable CONFIG_MEMCG, but leave it disabled +Subject: [PATCH 057/143] config: Enable CONFIG_MEMCG, but leave it disabled (due to memory cost). Enable with cgroup_enable=memory. --- @@ -107571,10 +107632,10 @@ Subject: [PATCH 059/149] config: Enable CONFIG_MEMCG, but leave it disabled 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c -index 4e2f3de0e40bff4caef5ee9c587ea19140d07f85..4b687fba53c58e744e04608a9510f9b811f26343 100644 +index 53bbca7c48598e44fa5e45f88626027749ca8932..62d610c934f80265a889d968c4880a711560e8e3 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c -@@ -5626,7 +5626,7 @@ int __init cgroup_init_early(void) +@@ -5631,7 +5631,7 @@ int __init cgroup_init_early(void) return 0; } @@ -107583,7 +107644,7 @@ index 4e2f3de0e40bff4caef5ee9c587ea19140d07f85..4b687fba53c58e744e04608a9510f9b8 /** * cgroup_init - cgroup initialization -@@ -6163,6 +6163,28 @@ static int __init cgroup_no_v1(char *str) +@@ -6168,6 +6168,28 @@ static int __init cgroup_no_v1(char *str) } __setup("cgroup_no_v1=", cgroup_no_v1); @@ -107613,10 +107674,10 @@ index 4e2f3de0e40bff4caef5ee9c587ea19140d07f85..4b687fba53c58e744e04608a9510f9b8 * css_tryget_online_from_dir - get corresponding css from a cgroup dentry * @dentry: directory dentry of interest -From 8764811662e3c2784bd5d3d97d71ebebabf0ab56 Mon Sep 17 00:00:00 2001 +From bc2335717f7d28dbb33dac229b8fd7701810102a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 060/149] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 058/143] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -107624,7 +107685,7 @@ Reduces overhead when using X 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c -index ae83af649a607f67239f1a64bf45dd4b5770cc7d..4a7af9d0b910f59d17421ce14138400dfd5834f3 100644 +index 333108ef18cf2f3f94ee3816b2ba6522017295b6..da0ee3beeeed3a223ea6859f52a81e99e3e2efbd 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -49,7 +49,7 @@ @@ -107652,10 +107713,10 @@ index ae83af649a607f67239f1a64bf45dd4b5770cc7d..4a7af9d0b910f59d17421ce14138400d ret = -ENOMEM; if (usb_endpoint_dir_in(endpoint)) { -From 56d24e64172592fd77fcc223422fde47513028aa Mon Sep 17 00:00:00 2001 +From 83febbc99afc598508f10d47ebdd71e188f07644 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 -Subject: [PATCH 061/149] rpi-ft5406: Add touchscreen driver for pi LCD display +Subject: [PATCH 059/143] rpi-ft5406: Add touchscreen driver for pi LCD display Fix driver detection failure Check that the buffer response is non-zero meaning the touchscreen was detected @@ -108001,7 +108062,7 @@ index 0000000000000000000000000000000000000000..9d7d05482355d168c5c0c42508cd9789 +MODULE_DESCRIPTION("Touchscreen driver for memory based FT5406"); +MODULE_LICENSE("GPL"); diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index 227a107214a02deadcca3db202da265eba1fdd21..b0f6e33bd30c35664ceee057f4c3ad32b914291d 100644 +index 30fb37fe175df604a738258a2a632bca3bfff33f..4a3d79d3b48eb483a4e4bf498f617515e3ad158f 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -115,6 +115,7 @@ enum rpi_firmware_property_tag { @@ -108013,10 +108074,10 @@ index 227a107214a02deadcca3db202da265eba1fdd21..b0f6e33bd30c35664ceee057f4c3ad32 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From 318733cdfe56012de763835764537af342ebff08 Mon Sep 17 00:00:00 2001 +From bf9d8140feb1c5bb942a776a48741d69398dabde Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Nov 2016 16:50:04 +0000 -Subject: [PATCH 062/149] Improve __copy_to_user and __copy_from_user +Subject: [PATCH 060/143] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use @@ -108074,7 +108135,7 @@ index cf4f3aad0fc1c2154c6cf3839ff21bb1c46d6499..d69b70a6007dfc647ad164d1ee90d253 #define memset(p,v,n) \ diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h -index 1f59ea051bab814132074b09f55d3a57c800a471..028d151b80a3dfb4253e94b87cc391bdb0b16c49 100644 +index b7e0125c0bbf2014a447800a383426b62d5147b8..d135f5af80c255865106561a85998bd9511ba346 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h @@ -477,6 +477,9 @@ do { \ @@ -108085,7 +108146,7 @@ index 1f59ea051bab814132074b09f55d3a57c800a471..028d151b80a3dfb4253e94b87cc391bd +__copy_from_user_std(void *to, const void __user *from, unsigned long n); + static inline unsigned long __must_check - __copy_from_user(void *to, const void __user *from, unsigned long n) + __arch_copy_from_user(void *to, const void __user *from, unsigned long n) { diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 27f4d96258a2e66193d6a3701bb4cf9a44399aad..96b390c9301f816d5c83c6ddb76ac74ba7a3b99d 100644 @@ -109591,10 +109652,10 @@ index 333dc3c2e5ffbb2c5ab8fcfb6115b6162643cf20..46b787a6474ffa857da9b663948863ec bool "Broadcom BCM63xx DSL SoC" depends on ARCH_MULTI_V7 -From fddbb89c0d9a7d562f8cf60cb16572e6af74f15e Mon Sep 17 00:00:00 2001 +From 49813e9c1a6fdf7a82c7262fb9e1f3d62c3a9e64 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 -Subject: [PATCH 063/149] gpio-poweroff: Allow it to work on Raspberry Pi +Subject: [PATCH 061/143] gpio-poweroff: Allow it to work on Raspberry Pi The Raspberry Pi firmware manages the power-down and reboot process. To do this it installs a pm_power_off handler, causing @@ -109629,10 +109690,10 @@ index be3d81ff51cc3f510d85e4eed7a52960e51e7bc1..a030ae9fb1fca325061c093696e82186 "%s: pm_power_off function already registered", __func__); -From bff3d51c32bfd8caf85c73bfc78043215d6b7ee2 Mon Sep 17 00:00:00 2001 +From 4cf353cbfb5abcbe319726ab73d65c5c9725b06e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 -Subject: [PATCH 064/149] mfd: Add Raspberry Pi Sense HAT core driver +Subject: [PATCH 062/143] mfd: Add Raspberry Pi Sense HAT core driver --- drivers/input/joystick/Kconfig | 8 + @@ -109842,7 +109903,7 @@ index 0000000000000000000000000000000000000000..6a416769065d2198344792eb02d8e38d +MODULE_AUTHOR("Serge Schneider "); +MODULE_LICENSE("GPL"); diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig -index c6df6442ba2b1b378386db03cb530fa6b6e3e723..b220064bd5feba3f9bb5ec198bcf8e5c4b930533 100644 +index 4ce3b6f118304048c0fb4d0db7c1d4da7463e8e7..ea2865fec057ffa3b8d1208a6824315a9fd486c6 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -10,6 +10,14 @@ config MFD_CORE @@ -109861,13 +109922,13 @@ index c6df6442ba2b1b378386db03cb530fa6b6e3e723..b220064bd5feba3f9bb5ec198bcf8e5c tristate "AMD CS5535 and CS5536 southbridge core functions" select MFD_CORE diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile -index 9834e669d98573ce8c0b0a15b3f167dbf3485d87..1d8d58fe173c27bdf00daa646f4970e3aeb3ac08 100644 +index dda4d4f73ad743b7cdde1f085dd494c0a1701656..e092a40ceda5b599bf13383147adea6b75a83aa9 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile -@@ -211,3 +211,4 @@ obj-$(CONFIG_INTEL_SOC_PMIC) += intel-soc-pmic.o - obj-$(CONFIG_MFD_MT6397) += mt6397-core.o +@@ -212,3 +212,4 @@ obj-$(CONFIG_MFD_MT6397) += mt6397-core.o obj-$(CONFIG_MFD_ALTERA_A10SR) += altera-a10sr.o + obj-$(CONFIG_MFD_SUN4I_GPADC) += sun4i-gpadc.o +obj-$(CONFIG_MFD_RPISENSE_CORE) += rpisense-core.o diff --git a/drivers/mfd/rpisense-core.c b/drivers/mfd/rpisense-core.c new file mode 100644 @@ -110497,10 +110558,10 @@ index 0000000000000000000000000000000000000000..56196dc2af10e464a1e3f98b028dca1c + +#endif -From f6f7b4d8818b01922745e5191edd0d5ee2e55557 Mon Sep 17 00:00:00 2001 +From 298f0da2a99e2cc999e8db96151ff92c6826bbe1 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 065/149] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 063/143] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -110515,10 +110576,10 @@ Signed-off-by: Florian Meier create mode 100644 sound/soc/bcm/hifiberry_dac.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index d528aaceaad95bc6bae2147ebe66249629d2512e..ad4817f44072bbc0a92d8a5ebd1b6b365fb4ed82 100644 +index edf367100ebd2f1701f4a32b2bfcc14b6cf978d3..b4bba08106a128b11f4abcd84f3cd41207e9c083 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -15,4 +15,11 @@ config SND_SOC_CYGNUS +@@ -16,4 +16,11 @@ config SND_SOC_CYGNUS Say Y if you want to add support for ASoC audio on Broadcom Cygnus chips (bcm958300, bcm958305, bcm911360) @@ -110675,10 +110736,10 @@ index 0000000000000000000000000000000000000000..45f2b770ad9e67728ca599a7445d6ae9 +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From 26fc23e924f71e2d3e26d9634a0149f191d2f6f9 Mon Sep 17 00:00:00 2001 +From 4e5ef7798e0f16bd34b79dcf43ca2488c7ed1c1a Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 25 Jan 2016 15:48:59 +0000 -Subject: [PATCH 066/149] ASoC: Add support for Rpi-DAC +Subject: [PATCH 064/143] ASoC: Add support for Rpi-DAC --- sound/soc/bcm/Kconfig | 7 +++ @@ -110692,10 +110753,10 @@ Subject: [PATCH 066/149] ASoC: Add support for Rpi-DAC create mode 100644 sound/soc/codecs/pcm1794a.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index ad4817f44072bbc0a92d8a5ebd1b6b365fb4ed82..8209fffdc0be3136a99cbab4e5152759aa95594b 100644 +index b4bba08106a128b11f4abcd84f3cd41207e9c083..3bd62878ed17681fcbe8fff1004b82b00f1f402b 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -23,3 +23,10 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC +@@ -24,3 +24,10 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC select SND_SOC_PCM5102A help Say Y or M if you want to add support for HifiBerry DAC. @@ -110844,10 +110905,10 @@ index 0000000000000000000000000000000000000000..59dc89ecabc082c0a1ed8adacdc4f0f1 +MODULE_DESCRIPTION("ASoC Driver for RPi-DAC"); +MODULE_LICENSE("GPL v2"); diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig -index c67667bb970f1729db65b027dd8e963b9ee95b7b..74a93e52bdc8116df3db08aaf98fffa1e6f6cc1b 100644 +index 9e1718a8cb1ce20a0fd68e2cbe797653b39aadeb..35fdfb508505699618dc9d35c941707dcd2a2b20 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig -@@ -98,6 +98,7 @@ config SND_SOC_ALL_CODECS +@@ -101,6 +101,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_PCM1681 if I2C select SND_SOC_PCM179X_I2C if I2C select SND_SOC_PCM179X_SPI if SPI_MASTER @@ -110855,7 +110916,7 @@ index c67667bb970f1729db65b027dd8e963b9ee95b7b..74a93e52bdc8116df3db08aaf98fffa1 select SND_SOC_PCM3008 select SND_SOC_PCM3168A_I2C if I2C select SND_SOC_PCM3168A_SPI if SPI_MASTER -@@ -689,6 +690,10 @@ config SND_SOC_RT5616 +@@ -709,6 +710,10 @@ config SND_SOC_RT5616 tristate "Realtek RT5616 CODEC" depends on I2C @@ -110867,10 +110928,10 @@ index c67667bb970f1729db65b027dd8e963b9ee95b7b..74a93e52bdc8116df3db08aaf98fffa1 tristate "Realtek ALC5631/RT5631 CODEC" depends on I2C diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile -index 958cd4912fbc9820f965c0d2f38692857f410d3a..77786e7f44a7fa22d9b5beed3eb687e2b7a28526 100644 +index 7e1dad79610b39a6d5b83865c7022f09d53d3705..3aea6cd7e2d08e72961640860b375059f41c789e 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile -@@ -93,6 +93,7 @@ snd-soc-pcm1681-objs := pcm1681.o +@@ -97,6 +97,7 @@ snd-soc-pcm1681-objs := pcm1681.o snd-soc-pcm179x-codec-objs := pcm179x.o snd-soc-pcm179x-i2c-objs := pcm179x-i2c.o snd-soc-pcm179x-spi-objs := pcm179x-spi.o @@ -110878,7 +110939,7 @@ index 958cd4912fbc9820f965c0d2f38692857f410d3a..77786e7f44a7fa22d9b5beed3eb687e2 snd-soc-pcm3008-objs := pcm3008.o snd-soc-pcm3168a-objs := pcm3168a.o snd-soc-pcm3168a-i2c-objs := pcm3168a-i2c.o -@@ -325,6 +326,7 @@ obj-$(CONFIG_SND_SOC_PCM5102A) += snd-soc-pcm5102a.o +@@ -333,6 +334,7 @@ obj-$(CONFIG_SND_SOC_PCM5102A) += snd-soc-pcm5102a.o obj-$(CONFIG_SND_SOC_PCM512x) += snd-soc-pcm512x.o obj-$(CONFIG_SND_SOC_PCM512x_I2C) += snd-soc-pcm512x-i2c.o obj-$(CONFIG_SND_SOC_PCM512x_SPI) += snd-soc-pcm512x-spi.o @@ -110962,10 +111023,10 @@ index 0000000000000000000000000000000000000000..afe1b419582aa40c4b2729d242bb13cd +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From be8276083245dcfb53ef3fef3ca1719a2adf32c3 Mon Sep 17 00:00:00 2001 +From 2bf400ba45d9bfb1ac5b26723d69bd7100e6f2a6 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 067/149] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 065/143] ASoC: wm8804: Implement MCLK configuration options, add 32bit support WM8804 can run with PLL frequencies of 256xfs and 128xfs for most sample rates. At 192kHz only 128xfs is supported. The existing driver selects 128xfs automatically for some lower samples rates. By using an @@ -111014,10 +111075,10 @@ index af95d648265b3e92e345101542b332aee35191d4..513f56ba132929662802d15cdc653af3 .component_driver = { .dapm_widgets = wm8804_dapm_widgets, -From 2db51d5c0125efaf5ac929da60719e8778caf355 Mon Sep 17 00:00:00 2001 +From 34f11bff0a9142a2c6f3a3848dbffcc2135f571a Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 068/149] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 066/143] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -111047,10 +111108,10 @@ Signed-off-by: Daniel Matuschek create mode 100644 sound/soc/bcm/hifiberry_digi.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 8209fffdc0be3136a99cbab4e5152759aa95594b..3cd4288a1e1c535210b01cd9561128fd4ea3e87f 100644 +index 3bd62878ed17681fcbe8fff1004b82b00f1f402b..2169a619b60951d490bdbe7f6929499974efc721 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -24,6 +24,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC +@@ -25,6 +25,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC help Say Y or M if you want to add support for HifiBerry DAC. @@ -111361,10 +111422,10 @@ index 0000000000000000000000000000000000000000..19dc953b7227ba86123fc7a2ba654499 +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From 4862b5a41356a7c903a27614f34b7f573c4559a0 Mon Sep 17 00:00:00 2001 +From 9ee4bd0e00a551e81a809a1126b1e3e8696cb7c9 Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 069/149] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 067/143] Add IQaudIO Sound Card support for Raspberry Pi Set a limit of 0dB on Digital Volume Control @@ -111425,10 +111486,10 @@ Signed-off-by: DigitalDreamtime create mode 100644 sound/soc/bcm/iqaudio-dac.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 3cd4288a1e1c535210b01cd9561128fd4ea3e87f..8272ba5302b1ddbd9c21ee50891d3cb0f0303c58 100644 +index 2169a619b60951d490bdbe7f6929499974efc721..f58d7059dd2a05aa7948272d4378898be85ea92d 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -37,3 +37,10 @@ config SND_BCM2708_SOC_RPI_DAC +@@ -38,3 +38,10 @@ config SND_BCM2708_SOC_RPI_DAC select SND_SOC_PCM1794A help Say Y or M if you want to add support for RPi-DAC. @@ -111694,10 +111755,10 @@ index 0000000000000000000000000000000000000000..4e8e6dec14bcf4a1ff286c43742d4097 +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From ea4c39afbe8d275440ddd521925d7cc552f35d54 Mon Sep 17 00:00:00 2001 +From bf5fea3022d1d56c3dd82fa726cbbc0364fae64c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jul 2016 17:06:50 +0100 -Subject: [PATCH 070/149] iqaudio-dac: Compile fix - untested +Subject: [PATCH 068/143] iqaudio-dac: Compile fix - untested --- sound/soc/bcm/iqaudio-dac.c | 6 +++++- @@ -111721,10 +111782,10 @@ index 4e8e6dec14bcf4a1ff286c43742d4097249d6777..aa15bc4b49ca95edec905fddd8fd0a6d if (dapm->dev != codec_dai->dev) return 0; -From 302c609e0963078ab95c3b3bfeaedf723c26361f Mon Sep 17 00:00:00 2001 +From 67ba839a62a9d52ef318c1fb5a8b7e79817b890b Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 071/149] Added support for HiFiBerry DAC+ +Subject: [PATCH 069/143] Added support for HiFiBerry DAC+ The driver is based on the HiFiBerry DAC driver. However HiFiBerry DAC+ uses a different codec chip (PCM5122), therefore a new driver is necessary. @@ -111939,10 +112000,10 @@ index 0000000000000000000000000000000000000000..99cee2b1706c43170b4fc35c0023349b +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:clk-hifiberry-dacpro"); diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 8272ba5302b1ddbd9c21ee50891d3cb0f0303c58..4473cc728097bda0ce9fe68d4a9da348ec41f8b3 100644 +index f58d7059dd2a05aa7948272d4378898be85ea92d..3580a12f865975e920ff86697849b137b41bae62 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -24,6 +24,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC +@@ -25,6 +25,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC help Say Y or M if you want to add support for HifiBerry DAC. @@ -112354,10 +112415,10 @@ index 72b19e62f6267698aea45d2410d616d91c1825cb..c6839ef6e16754ed9de2698507b8986a dev_err(dev, "No LRCLK?\n"); return -EINVAL; -From ec8d31e9058d4b3bc431a782f497167f94c896ab Mon Sep 17 00:00:00 2001 +From e5b4dd0f27f8927b566004e89c0d630ba189e654 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 072/149] Added driver for HiFiBerry Amp amplifier add-on board +Subject: [PATCH 070/143] Added driver for HiFiBerry Amp amplifier add-on board The driver contains a low-level hardware driver for the TAS5713 and the drivers for the Raspberry Pi I2S subsystem. @@ -112378,18 +112439,18 @@ Some code to load the driver based on device-tree-overlays was missing. This is sound/soc/bcm/hifiberry_amp.c | 129 +++++++++++++++ sound/soc/codecs/Kconfig | 4 + sound/soc/codecs/Makefile | 2 + - sound/soc/codecs/tas5713.c | 369 ++++++++++++++++++++++++++++++++++++++++++ + sound/soc/codecs/tas5713.c | 371 ++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/tas5713.h | 210 ++++++++++++++++++++++++ - 7 files changed, 723 insertions(+) + 7 files changed, 725 insertions(+) create mode 100644 sound/soc/bcm/hifiberry_amp.c create mode 100644 sound/soc/codecs/tas5713.c create mode 100644 sound/soc/codecs/tas5713.h diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 4473cc728097bda0ce9fe68d4a9da348ec41f8b3..b1d877407dd69c9bd6b2787b0a559f4113bc21f2 100644 +index 3580a12f865975e920ff86697849b137b41bae62..f650f1522d6ef1e02d87345fea01bb1458693423 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -38,6 +38,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DIGI +@@ -39,6 +39,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DIGI help Say Y or M if you want to add support for HifiBerry Digi S/PDIF output board. @@ -112557,10 +112618,10 @@ index 0000000000000000000000000000000000000000..d17c29780507dc31c50f1d567ff5cea7 +MODULE_DESCRIPTION("ASoC driver for HiFiBerry-AMP"); +MODULE_LICENSE("GPL v2"); diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig -index 74a93e52bdc8116df3db08aaf98fffa1e6f6cc1b..9824cdd04b0c11c45b8cedd0187a0eba8f1dc2d4 100644 +index 35fdfb508505699618dc9d35c941707dcd2a2b20..cd02edde708f860ba90ef7892339ef311c898746 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig -@@ -139,6 +139,7 @@ config SND_SOC_ALL_CODECS +@@ -143,6 +143,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_TFA9879 if I2C select SND_SOC_TLV320AIC23_I2C if I2C select SND_SOC_TLV320AIC23_SPI if SPI_MASTER @@ -112568,7 +112629,7 @@ index 74a93e52bdc8116df3db08aaf98fffa1e6f6cc1b..9824cdd04b0c11c45b8cedd0187a0eba select SND_SOC_TLV320AIC26 if SPI_MASTER select SND_SOC_TLV320AIC31XX if I2C select SND_SOC_TLV320AIC32X4_I2C if I2C -@@ -821,6 +822,9 @@ config SND_SOC_TFA9879 +@@ -844,6 +845,9 @@ config SND_SOC_TFA9879 tristate "NXP Semiconductors TFA9879 amplifier" depends on I2C @@ -112579,10 +112640,10 @@ index 74a93e52bdc8116df3db08aaf98fffa1e6f6cc1b..9824cdd04b0c11c45b8cedd0187a0eba tristate diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile -index 77786e7f44a7fa22d9b5beed3eb687e2b7a28526..5a2db0d2fe2f49920eeccfecef62c969ae2e99a1 100644 +index 3aea6cd7e2d08e72961640860b375059f41c789e..1f5a6b7f6c52c9464637c028773653cdadae43ab 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile -@@ -144,6 +144,7 @@ snd-soc-tas5086-objs := tas5086.o +@@ -149,6 +149,7 @@ snd-soc-tas5086-objs := tas5086.o snd-soc-tas571x-objs := tas571x.o snd-soc-tas5720-objs := tas5720.o snd-soc-tfa9879-objs := tfa9879.o @@ -112590,7 +112651,7 @@ index 77786e7f44a7fa22d9b5beed3eb687e2b7a28526..5a2db0d2fe2f49920eeccfecef62c969 snd-soc-tlv320aic23-objs := tlv320aic23.o snd-soc-tlv320aic23-i2c-objs := tlv320aic23-i2c.o snd-soc-tlv320aic23-spi-objs := tlv320aic23-spi.o -@@ -366,6 +367,7 @@ obj-$(CONFIG_SND_SOC_TAS5086) += snd-soc-tas5086.o +@@ -375,6 +376,7 @@ obj-$(CONFIG_SND_SOC_TAS5086) += snd-soc-tas5086.o obj-$(CONFIG_SND_SOC_TAS571X) += snd-soc-tas571x.o obj-$(CONFIG_SND_SOC_TAS5720) += snd-soc-tas5720.o obj-$(CONFIG_SND_SOC_TFA9879) += snd-soc-tfa9879.o @@ -112600,10 +112661,10 @@ index 77786e7f44a7fa22d9b5beed3eb687e2b7a28526..5a2db0d2fe2f49920eeccfecef62c969 obj-$(CONFIG_SND_SOC_TLV320AIC23_SPI) += snd-soc-tlv320aic23-spi.o diff --git a/sound/soc/codecs/tas5713.c b/sound/soc/codecs/tas5713.c new file mode 100644 -index 0000000000000000000000000000000000000000..9b2713861dcbed751842ca29c88eb1eae5867411 +index 0000000000000000000000000000000000000000..560234d58a6b0a6e7fd3a63e8de73339ee002b1c --- /dev/null +++ b/sound/soc/codecs/tas5713.c -@@ -0,0 +1,369 @@ +@@ -0,0 +1,371 @@ +/* + * ASoC Driver for TAS5713 + * @@ -112838,8 +112899,10 @@ index 0000000000000000000000000000000000000000..9b2713861dcbed751842ca29c88eb1ea +static struct snd_soc_codec_driver soc_codec_dev_tas5713 = { + .probe = tas5713_probe, + .remove = tas5713_remove, -+ .controls = tas5713_snd_controls, -+ .num_controls = ARRAY_SIZE(tas5713_snd_controls), ++ .component_driver = { ++ .controls = tas5713_snd_controls, ++ .num_controls = ARRAY_SIZE(tas5713_snd_controls), ++ }, +}; + + @@ -113190,835 +113253,10 @@ index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8 + +#endif /* _TAS5713_H */ -From 84ca64acfa31b7efdee66fa9b93a3e33740cd246 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Mon, 12 Dec 2016 16:26:54 +0000 -Subject: [PATCH 073/149] Revert "Added driver for HiFiBerry Amp amplifier - add-on board" - -This reverts commit 3e6b00833d92a50cbcc9922deb6e1bc8fcdbb587. ---- - sound/soc/bcm/Kconfig | 7 - - sound/soc/bcm/Makefile | 2 - - sound/soc/bcm/hifiberry_amp.c | 129 --------------- - sound/soc/codecs/Kconfig | 4 - - sound/soc/codecs/Makefile | 2 - - sound/soc/codecs/tas5713.c | 369 ------------------------------------------ - sound/soc/codecs/tas5713.h | 210 ------------------------ - 7 files changed, 723 deletions(-) - delete mode 100644 sound/soc/bcm/hifiberry_amp.c - delete mode 100644 sound/soc/codecs/tas5713.c - delete mode 100644 sound/soc/codecs/tas5713.h - -diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index b1d877407dd69c9bd6b2787b0a559f4113bc21f2..4473cc728097bda0ce9fe68d4a9da348ec41f8b3 100644 ---- a/sound/soc/bcm/Kconfig -+++ b/sound/soc/bcm/Kconfig -@@ -38,13 +38,6 @@ config SND_BCM2708_SOC_HIFIBERRY_DIGI - help - Say Y or M if you want to add support for HifiBerry Digi S/PDIF output board. - --config SND_BCM2708_SOC_HIFIBERRY_AMP -- tristate "Support for the HifiBerry Amp" -- depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S -- select SND_SOC_TAS5713 -- help -- Say Y or M if you want to add support for the HifiBerry Amp amplifier board. -- - config SND_BCM2708_SOC_RPI_DAC - tristate "Support for RPi-DAC" - depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S -diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index a4838e2cf8e93c9285836f95f4151daea33e1bd1..203afc03167acbcad15e836209956bc5ab151157 100644 ---- a/sound/soc/bcm/Makefile -+++ b/sound/soc/bcm/Makefile -@@ -12,13 +12,11 @@ obj-$(CONFIG_SND_SOC_CYGNUS) += snd-soc-cygnus.o - snd-soc-hifiberry-dac-objs := hifiberry_dac.o - snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o - snd-soc-hifiberry-digi-objs := hifiberry_digi.o --snd-soc-hifiberry-amp-objs := hifiberry_amp.o - snd-soc-rpi-dac-objs := rpi-dac.o - snd-soc-iqaudio-dac-objs := iqaudio-dac.o - - obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o - obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o - obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o --obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o - obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o - obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o -diff --git a/sound/soc/bcm/hifiberry_amp.c b/sound/soc/bcm/hifiberry_amp.c -deleted file mode 100644 -index d17c29780507dc31c50f1d567ff5cea7c8241ff5..0000000000000000000000000000000000000000 ---- a/sound/soc/bcm/hifiberry_amp.c -+++ /dev/null -@@ -1,129 +0,0 @@ --/* -- * ASoC Driver for HifiBerry AMP -- * -- * Author: Sebastian Eickhoff -- * Copyright 2014 -- * -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License -- * version 2 as published by the Free Software Foundation. -- * -- * This program is distributed in the hope that it will be useful, but -- * WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * General Public License for more details. -- */ -- --#include --#include -- --#include --#include --#include --#include --#include -- --static int snd_rpi_hifiberry_amp_init(struct snd_soc_pcm_runtime *rtd) --{ -- // ToDo: init of the dsp-registers. -- return 0; --} -- --static int snd_rpi_hifiberry_amp_hw_params( struct snd_pcm_substream *substream, -- struct snd_pcm_hw_params *params ) --{ -- struct snd_soc_pcm_runtime *rtd = substream->private_data; -- struct snd_soc_dai *cpu_dai = rtd->cpu_dai; -- -- return snd_soc_dai_set_bclk_ratio(cpu_dai, 64); --} -- --static struct snd_soc_ops snd_rpi_hifiberry_amp_ops = { -- .hw_params = snd_rpi_hifiberry_amp_hw_params, --}; -- --static struct snd_soc_dai_link snd_rpi_hifiberry_amp_dai[] = { -- { -- .name = "HifiBerry AMP", -- .stream_name = "HifiBerry AMP HiFi", -- .cpu_dai_name = "bcm2708-i2s.0", -- .codec_dai_name = "tas5713-hifi", -- .platform_name = "bcm2708-i2s.0", -- .codec_name = "tas5713.1-001b", -- .dai_fmt = SND_SOC_DAIFMT_I2S | -- SND_SOC_DAIFMT_NB_NF | -- SND_SOC_DAIFMT_CBS_CFS, -- .ops = &snd_rpi_hifiberry_amp_ops, -- .init = snd_rpi_hifiberry_amp_init, -- }, --}; -- -- --static struct snd_soc_card snd_rpi_hifiberry_amp = { -- .name = "snd_rpi_hifiberry_amp", -- .driver_name = "HifiberryAmp", -- .owner = THIS_MODULE, -- .dai_link = snd_rpi_hifiberry_amp_dai, -- .num_links = ARRAY_SIZE(snd_rpi_hifiberry_amp_dai), --}; -- --static const struct of_device_id snd_rpi_hifiberry_amp_of_match[] = { -- { .compatible = "hifiberry,hifiberry-amp", }, -- {}, --}; --MODULE_DEVICE_TABLE(of, snd_rpi_hifiberry_amp_of_match); -- -- --static int snd_rpi_hifiberry_amp_probe(struct platform_device *pdev) --{ -- int ret = 0; -- -- snd_rpi_hifiberry_amp.dev = &pdev->dev; -- -- if (pdev->dev.of_node) { -- struct device_node *i2s_node; -- struct snd_soc_dai_link *dai = &snd_rpi_hifiberry_amp_dai[0]; -- i2s_node = of_parse_phandle(pdev->dev.of_node, -- "i2s-controller", 0); -- -- if (i2s_node) { -- dai->cpu_dai_name = NULL; -- dai->cpu_of_node = i2s_node; -- dai->platform_name = NULL; -- dai->platform_of_node = i2s_node; -- } -- } -- -- ret = snd_soc_register_card(&snd_rpi_hifiberry_amp); -- -- if (ret != 0) { -- dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret); -- } -- -- return ret; --} -- -- --static int snd_rpi_hifiberry_amp_remove(struct platform_device *pdev) --{ -- return snd_soc_unregister_card(&snd_rpi_hifiberry_amp); --} -- -- --static struct platform_driver snd_rpi_hifiberry_amp_driver = { -- .driver = { -- .name = "snd-hifiberry-amp", -- .owner = THIS_MODULE, -- .of_match_table = snd_rpi_hifiberry_amp_of_match, -- }, -- .probe = snd_rpi_hifiberry_amp_probe, -- .remove = snd_rpi_hifiberry_amp_remove, --}; -- -- --module_platform_driver(snd_rpi_hifiberry_amp_driver); -- -- --MODULE_AUTHOR("Sebastian Eickhoff "); --MODULE_DESCRIPTION("ASoC driver for HiFiBerry-AMP"); --MODULE_LICENSE("GPL v2"); -diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig -index 9824cdd04b0c11c45b8cedd0187a0eba8f1dc2d4..74a93e52bdc8116df3db08aaf98fffa1e6f6cc1b 100644 ---- a/sound/soc/codecs/Kconfig -+++ b/sound/soc/codecs/Kconfig -@@ -139,7 +139,6 @@ config SND_SOC_ALL_CODECS - select SND_SOC_TFA9879 if I2C - select SND_SOC_TLV320AIC23_I2C if I2C - select SND_SOC_TLV320AIC23_SPI if SPI_MASTER -- select SND_SOC_TAS5713 if I2C - select SND_SOC_TLV320AIC26 if SPI_MASTER - select SND_SOC_TLV320AIC31XX if I2C - select SND_SOC_TLV320AIC32X4_I2C if I2C -@@ -822,9 +821,6 @@ config SND_SOC_TFA9879 - tristate "NXP Semiconductors TFA9879 amplifier" - depends on I2C - --config SND_SOC_TAS5713 -- tristate -- - config SND_SOC_TLV320AIC23 - tristate - -diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile -index 5a2db0d2fe2f49920eeccfecef62c969ae2e99a1..77786e7f44a7fa22d9b5beed3eb687e2b7a28526 100644 ---- a/sound/soc/codecs/Makefile -+++ b/sound/soc/codecs/Makefile -@@ -144,7 +144,6 @@ snd-soc-tas5086-objs := tas5086.o - snd-soc-tas571x-objs := tas571x.o - snd-soc-tas5720-objs := tas5720.o - snd-soc-tfa9879-objs := tfa9879.o --snd-soc-tas5713-objs := tas5713.o - snd-soc-tlv320aic23-objs := tlv320aic23.o - snd-soc-tlv320aic23-i2c-objs := tlv320aic23-i2c.o - snd-soc-tlv320aic23-spi-objs := tlv320aic23-spi.o -@@ -367,7 +366,6 @@ obj-$(CONFIG_SND_SOC_TAS5086) += snd-soc-tas5086.o - obj-$(CONFIG_SND_SOC_TAS571X) += snd-soc-tas571x.o - obj-$(CONFIG_SND_SOC_TAS5720) += snd-soc-tas5720.o - obj-$(CONFIG_SND_SOC_TFA9879) += snd-soc-tfa9879.o --obj-$(CONFIG_SND_SOC_TAS5713) += snd-soc-tas5713.o - obj-$(CONFIG_SND_SOC_TLV320AIC23) += snd-soc-tlv320aic23.o - obj-$(CONFIG_SND_SOC_TLV320AIC23_I2C) += snd-soc-tlv320aic23-i2c.o - obj-$(CONFIG_SND_SOC_TLV320AIC23_SPI) += snd-soc-tlv320aic23-spi.o -diff --git a/sound/soc/codecs/tas5713.c b/sound/soc/codecs/tas5713.c -deleted file mode 100644 -index 9b2713861dcbed751842ca29c88eb1eae5867411..0000000000000000000000000000000000000000 ---- a/sound/soc/codecs/tas5713.c -+++ /dev/null -@@ -1,369 +0,0 @@ --/* -- * ASoC Driver for TAS5713 -- * -- * Author: Sebastian Eickhoff -- * Copyright 2014 -- * -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License -- * version 2 as published by the Free Software Foundation. -- * -- * This program is distributed in the hope that it will be useful, but -- * WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * General Public License for more details. -- */ -- --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include -- --#include --#include --#include --#include -- --#include "tas5713.h" -- -- --static struct i2c_client *i2c; -- --struct tas5713_priv { -- struct regmap *regmap; -- int mclk_div; -- struct snd_soc_codec *codec; --}; -- --static struct tas5713_priv *priv_data; -- -- -- -- --/* -- * _ _ ___ _ ___ _ _ -- * /_\ | | / __| /_\ / __|___ _ _| |_ _ _ ___| |___ -- * / _ \| |__\__ \/ _ \ | (__/ _ \ ' \ _| '_/ _ \ (_-< -- * /_/ \_\____|___/_/ \_\ \___\___/_||_\__|_| \___/_/__/ -- * -- */ -- --static const DECLARE_TLV_DB_SCALE(tas5713_vol_tlv, -10000, 50, 1); -- -- --static const struct snd_kcontrol_new tas5713_snd_controls[] = { -- SOC_SINGLE_TLV ("Master" , TAS5713_VOL_MASTER, 0, 248, 1, tas5713_vol_tlv), -- SOC_DOUBLE_R_TLV("Channels" , TAS5713_VOL_CH1, TAS5713_VOL_CH2, 0, 248, 1, tas5713_vol_tlv) --}; -- -- -- -- --/* -- * __ __ _ _ ___ _ -- * | \/ |__ _ __| |_ (_)_ _ ___ | \ _ _(_)_ _____ _ _ -- * | |\/| / _` / _| ' \| | ' \/ -_) | |) | '_| \ V / -_) '_| -- * |_| |_\__,_\__|_||_|_|_||_\___| |___/|_| |_|\_/\___|_| -- * -- */ -- --static int tas5713_hw_params(struct snd_pcm_substream *substream, -- struct snd_pcm_hw_params *params, -- struct snd_soc_dai *dai) --{ -- u16 blen = 0x00; -- -- struct snd_soc_codec *codec; -- codec = dai->codec; -- priv_data->codec = dai->codec; -- -- switch (params_format(params)) { -- case SNDRV_PCM_FORMAT_S16_LE: -- blen = 0x03; -- break; -- case SNDRV_PCM_FORMAT_S20_3LE: -- blen = 0x1; -- break; -- case SNDRV_PCM_FORMAT_S24_LE: -- blen = 0x04; -- break; -- case SNDRV_PCM_FORMAT_S32_LE: -- blen = 0x05; -- break; -- default: -- dev_err(dai->dev, "Unsupported word length: %u\n", -- params_format(params)); -- return -EINVAL; -- } -- -- // set word length -- snd_soc_update_bits(codec, TAS5713_SERIAL_DATA_INTERFACE, 0x7, blen); -- -- return 0; --} -- -- --static int tas5713_mute_stream(struct snd_soc_dai *dai, int mute, int stream) --{ -- unsigned int val = 0; -- -- struct tas5713_priv *tas5713; -- struct snd_soc_codec *codec = dai->codec; -- tas5713 = snd_soc_codec_get_drvdata(codec); -- -- if (mute) { -- val = TAS5713_SOFT_MUTE_ALL; -- } -- -- return regmap_write(tas5713->regmap, TAS5713_SOFT_MUTE, val); --} -- -- --static const struct snd_soc_dai_ops tas5713_dai_ops = { -- .hw_params = tas5713_hw_params, -- .mute_stream = tas5713_mute_stream, --}; -- -- --static struct snd_soc_dai_driver tas5713_dai = { -- .name = "tas5713-hifi", -- .playback = { -- .stream_name = "Playback", -- .channels_min = 2, -- .channels_max = 2, -- .rates = SNDRV_PCM_RATE_8000_48000, -- .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE ), -- }, -- .ops = &tas5713_dai_ops, --}; -- -- -- -- --/* -- * ___ _ ___ _ -- * / __|___ __| |___ __ | \ _ _(_)_ _____ _ _ -- * | (__/ _ \/ _` / -_) _| | |) | '_| \ V / -_) '_| -- * \___\___/\__,_\___\__| |___/|_| |_|\_/\___|_| -- * -- */ -- --static int tas5713_remove(struct snd_soc_codec *codec) --{ -- struct tas5713_priv *tas5713; -- -- tas5713 = snd_soc_codec_get_drvdata(codec); -- -- return 0; --} -- -- --static int tas5713_probe(struct snd_soc_codec *codec) --{ -- struct tas5713_priv *tas5713; -- int i, ret; -- -- i2c = container_of(codec->dev, struct i2c_client, dev); -- -- tas5713 = snd_soc_codec_get_drvdata(codec); -- -- // Reset error -- ret = snd_soc_write(codec, TAS5713_ERROR_STATUS, 0x00); -- if (ret < 0) return ret; -- -- // Trim oscillator -- ret = snd_soc_write(codec, TAS5713_OSC_TRIM, 0x00); -- if (ret < 0) return ret; -- msleep(1000); -- -- // Reset error -- ret = snd_soc_write(codec, TAS5713_ERROR_STATUS, 0x00); -- if (ret < 0) return ret; -- -- // Clock mode: 44/48kHz, MCLK=64xfs -- ret = snd_soc_write(codec, TAS5713_CLOCK_CTRL, 0x60); -- if (ret < 0) return ret; -- -- // I2S 24bit -- ret = snd_soc_write(codec, TAS5713_SERIAL_DATA_INTERFACE, 0x05); -- if (ret < 0) return ret; -- -- // Unmute -- ret = snd_soc_write(codec, TAS5713_SYSTEM_CTRL2, 0x00); -- if (ret < 0) return ret; -- ret = snd_soc_write(codec, TAS5713_SOFT_MUTE, 0x00); -- if (ret < 0) return ret; -- -- // Set volume to 0db -- ret = snd_soc_write(codec, TAS5713_VOL_MASTER, 0x00); -- if (ret < 0) return ret; -- -- // Now start programming the default initialization sequence -- for (i = 0; i < ARRAY_SIZE(tas5713_init_sequence); ++i) { -- ret = i2c_master_send(i2c, -- tas5713_init_sequence[i].data, -- tas5713_init_sequence[i].size); -- if (ret < 0) { -- printk(KERN_INFO "TAS5713 CODEC PROBE: InitSeq returns: %d\n", ret); -- } -- } -- -- // Unmute -- ret = snd_soc_write(codec, TAS5713_SYSTEM_CTRL2, 0x00); -- if (ret < 0) return ret; -- -- return 0; --} -- -- --static struct snd_soc_codec_driver soc_codec_dev_tas5713 = { -- .probe = tas5713_probe, -- .remove = tas5713_remove, -- .controls = tas5713_snd_controls, -- .num_controls = ARRAY_SIZE(tas5713_snd_controls), --}; -- -- -- -- --/* -- * ___ ___ ___ ___ _ -- * |_ _|_ ) __| | \ _ _(_)_ _____ _ _ -- * | | / / (__ | |) | '_| \ V / -_) '_| -- * |___/___\___| |___/|_| |_|\_/\___|_| -- * -- */ -- --static const struct reg_default tas5713_reg_defaults[] = { -- { 0x07 ,0x80 }, // R7 - VOL_MASTER - -40dB -- { 0x08 , 30 }, // R8 - VOL_CH1 - 0dB -- { 0x09 , 30 }, // R9 - VOL_CH2 - 0dB -- { 0x0A ,0x80 }, // R10 - VOL_HEADPHONE - -40dB --}; -- -- --static bool tas5713_reg_volatile(struct device *dev, unsigned int reg) --{ -- switch (reg) { -- case TAS5713_DEVICE_ID: -- case TAS5713_ERROR_STATUS: -- return true; -- default: -- return false; -- } --} -- -- --static const struct of_device_id tas5713_of_match[] = { -- { .compatible = "ti,tas5713", }, -- { } --}; --MODULE_DEVICE_TABLE(of, tas5713_of_match); -- -- --static struct regmap_config tas5713_regmap_config = { -- .reg_bits = 8, -- .val_bits = 8, -- -- .max_register = TAS5713_MAX_REGISTER, -- .volatile_reg = tas5713_reg_volatile, -- -- .cache_type = REGCACHE_RBTREE, -- .reg_defaults = tas5713_reg_defaults, -- .num_reg_defaults = ARRAY_SIZE(tas5713_reg_defaults), --}; -- -- --static int tas5713_i2c_probe(struct i2c_client *i2c, -- const struct i2c_device_id *id) --{ -- int ret; -- -- priv_data = devm_kzalloc(&i2c->dev, sizeof *priv_data, GFP_KERNEL); -- if (!priv_data) -- return -ENOMEM; -- -- priv_data->regmap = devm_regmap_init_i2c(i2c, &tas5713_regmap_config); -- if (IS_ERR(priv_data->regmap)) { -- ret = PTR_ERR(priv_data->regmap); -- return ret; -- } -- -- i2c_set_clientdata(i2c, priv_data); -- -- ret = snd_soc_register_codec(&i2c->dev, -- &soc_codec_dev_tas5713, &tas5713_dai, 1); -- -- return ret; --} -- -- --static int tas5713_i2c_remove(struct i2c_client *i2c) --{ -- snd_soc_unregister_codec(&i2c->dev); -- i2c_set_clientdata(i2c, NULL); -- -- kfree(priv_data); -- -- return 0; --} -- -- --static const struct i2c_device_id tas5713_i2c_id[] = { -- { "tas5713", 0 }, -- { } --}; -- --MODULE_DEVICE_TABLE(i2c, tas5713_i2c_id); -- -- --static struct i2c_driver tas5713_i2c_driver = { -- .driver = { -- .name = "tas5713", -- .owner = THIS_MODULE, -- .of_match_table = tas5713_of_match, -- }, -- .probe = tas5713_i2c_probe, -- .remove = tas5713_i2c_remove, -- .id_table = tas5713_i2c_id --}; -- -- --static int __init tas5713_modinit(void) --{ -- int ret = 0; -- -- ret = i2c_add_driver(&tas5713_i2c_driver); -- if (ret) { -- printk(KERN_ERR "Failed to register tas5713 I2C driver: %d\n", -- ret); -- } -- -- return ret; --} --module_init(tas5713_modinit); -- -- --static void __exit tas5713_exit(void) --{ -- i2c_del_driver(&tas5713_i2c_driver); --} --module_exit(tas5713_exit); -- -- --MODULE_AUTHOR("Sebastian Eickhoff "); --MODULE_DESCRIPTION("ASoC driver for TAS5713"); --MODULE_LICENSE("GPL v2"); -diff --git a/sound/soc/codecs/tas5713.h b/sound/soc/codecs/tas5713.h -deleted file mode 100644 -index 8f019e04898754d2f87e9630137be9e8f612a342..0000000000000000000000000000000000000000 ---- a/sound/soc/codecs/tas5713.h -+++ /dev/null -@@ -1,210 +0,0 @@ --/* -- * ASoC Driver for TAS5713 -- * -- * Author: Sebastian Eickhoff -- * Copyright 2014 -- * -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License -- * version 2 as published by the Free Software Foundation. -- * -- * This program is distributed in the hope that it will be useful, but -- * WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * General Public License for more details. -- */ -- --#ifndef _TAS5713_H --#define _TAS5713_H -- -- --// TAS5713 I2C-bus register addresses -- --#define TAS5713_CLOCK_CTRL 0x00 --#define TAS5713_DEVICE_ID 0x01 --#define TAS5713_ERROR_STATUS 0x02 --#define TAS5713_SYSTEM_CTRL1 0x03 --#define TAS5713_SERIAL_DATA_INTERFACE 0x04 --#define TAS5713_SYSTEM_CTRL2 0x05 --#define TAS5713_SOFT_MUTE 0x06 --#define TAS5713_VOL_MASTER 0x07 --#define TAS5713_VOL_CH1 0x08 --#define TAS5713_VOL_CH2 0x09 --#define TAS5713_VOL_HEADPHONE 0x0A --#define TAS5713_VOL_CONFIG 0x0E --#define TAS5713_MODULATION_LIMIT 0x10 --#define TAS5713_IC_DLY_CH1 0x11 --#define TAS5713_IC_DLY_CH2 0x12 --#define TAS5713_IC_DLY_CH3 0x13 --#define TAS5713_IC_DLY_CH4 0x14 -- --#define TAS5713_START_STOP_PERIOD 0x1A --#define TAS5713_OSC_TRIM 0x1B --#define TAS5713_BKND_ERR 0x1C -- --#define TAS5713_INPUT_MUX 0x20 --#define TAS5713_SRC_SELECT_CH4 0x21 --#define TAS5713_PWM_MUX 0x25 -- --#define TAS5713_CH1_BQ0 0x29 --#define TAS5713_CH1_BQ1 0x2A --#define TAS5713_CH1_BQ2 0x2B --#define TAS5713_CH1_BQ3 0x2C --#define TAS5713_CH1_BQ4 0x2D --#define TAS5713_CH1_BQ5 0x2E --#define TAS5713_CH1_BQ6 0x2F --#define TAS5713_CH1_BQ7 0x58 --#define TAS5713_CH1_BQ8 0x59 -- --#define TAS5713_CH2_BQ0 0x30 --#define TAS5713_CH2_BQ1 0x31 --#define TAS5713_CH2_BQ2 0x32 --#define TAS5713_CH2_BQ3 0x33 --#define TAS5713_CH2_BQ4 0x34 --#define TAS5713_CH2_BQ5 0x35 --#define TAS5713_CH2_BQ6 0x36 --#define TAS5713_CH2_BQ7 0x5C --#define TAS5713_CH2_BQ8 0x5D -- --#define TAS5713_CH4_BQ0 0x5A --#define TAS5713_CH4_BQ1 0x5B --#define TAS5713_CH3_BQ0 0x5E --#define TAS5713_CH3_BQ1 0x5F -- --#define TAS5713_DRC1_SOFTENING_FILTER_ALPHA_OMEGA 0x3B --#define TAS5713_DRC1_ATTACK_RELEASE_RATE 0x3C --#define TAS5713_DRC2_SOFTENING_FILTER_ALPHA_OMEGA 0x3E --#define TAS5713_DRC2_ATTACK_RELEASE_RATE 0x3F --#define TAS5713_DRC1_ATTACK_RELEASE_THRES 0x40 --#define TAS5713_DRC2_ATTACK_RELEASE_THRES 0x43 --#define TAS5713_DRC_CTRL 0x46 -- --#define TAS5713_BANK_SW_CTRL 0x50 --#define TAS5713_CH1_OUTPUT_MIXER 0x51 --#define TAS5713_CH2_OUTPUT_MIXER 0x52 --#define TAS5713_CH1_INPUT_MIXER 0x53 --#define TAS5713_CH2_INPUT_MIXER 0x54 --#define TAS5713_OUTPUT_POST_SCALE 0x56 --#define TAS5713_OUTPUT_PRESCALE 0x57 -- --#define TAS5713_IDF_POST_SCALE 0x62 -- --#define TAS5713_CH1_INLINE_MIXER 0x70 --#define TAS5713_CH1_INLINE_DRC_EN_MIXER 0x71 --#define TAS5713_CH1_R_CHANNEL_MIXER 0x72 --#define TAS5713_CH1_L_CHANNEL_MIXER 0x73 --#define TAS5713_CH2_INLINE_MIXER 0x74 --#define TAS5713_CH2_INLINE_DRC_EN_MIXER 0x75 --#define TAS5713_CH2_L_CHANNEL_MIXER 0x76 --#define TAS5713_CH2_R_CHANNEL_MIXER 0x77 -- --#define TAS5713_UPDATE_DEV_ADDR_KEY 0xF8 --#define TAS5713_UPDATE_DEV_ADDR_REG 0xF9 -- --#define TAS5713_REGISTER_COUNT 0x46 --#define TAS5713_MAX_REGISTER 0xF9 -- -- --// Bitmasks for registers --#define TAS5713_SOFT_MUTE_ALL 0x07 -- -- -- --struct tas5713_init_command { -- const int size; -- const char *const data; --}; -- --static const struct tas5713_init_command tas5713_init_sequence[] = { -- -- // Trim oscillator -- { .size = 2, .data = "\x1B\x00" }, -- // System control register 1 (0x03): block DC -- { .size = 2, .data = "\x03\x80" }, -- // Mute everything -- { .size = 2, .data = "\x05\x40" }, -- // Modulation limit register (0x10): 97.7% -- { .size = 2, .data = "\x10\x02" }, -- // Interchannel delay registers -- // (0x11, 0x12, 0x13, and 0x14): BD mode -- { .size = 2, .data = "\x11\xB8" }, -- { .size = 2, .data = "\x12\x60" }, -- { .size = 2, .data = "\x13\xA0" }, -- { .size = 2, .data = "\x14\x48" }, -- // PWM shutdown group register (0x19): no shutdown -- { .size = 2, .data = "\x19\x00" }, -- // Input multiplexer register (0x20): BD mode -- { .size = 2, .data = "\x20\x00\x89\x77\x72" }, -- // PWM output mux register (0x25) -- // Channel 1 --> OUTA, channel 1 neg --> OUTB -- // Channel 2 --> OUTC, channel 2 neg --> OUTD -- { .size = 5, .data = "\x25\x01\x02\x13\x45" }, -- // DRC control (0x46): DRC off -- { .size = 5, .data = "\x46\x00\x00\x00\x00" }, -- // BKND_ERR register (0x1C): 299ms reset period -- { .size = 2, .data = "\x1C\x07" }, -- // Mute channel 3 -- { .size = 2, .data = "\x0A\xFF" }, -- // Volume configuration register (0x0E): volume slew 512 steps -- { .size = 2, .data = "\x0E\x90" }, -- // Clock control register (0x00): 44/48kHz, MCLK=64xfs -- { .size = 2, .data = "\x00\x60" }, -- // Bank switch and eq control (0x50): no bank switching -- { .size = 5, .data = "\x50\x00\x00\x00\x00" }, -- // Volume registers (0x07, 0x08, 0x09, 0x0A) -- { .size = 2, .data = "\x07\x20" }, -- { .size = 2, .data = "\x08\x30" }, -- { .size = 2, .data = "\x09\x30" }, -- { .size = 2, .data = "\x0A\xFF" }, -- // 0x72, 0x73, 0x76, 0x77 input mixer: -- // no intermix between channels -- { .size = 5, .data = "\x72\x00\x00\x00\x00" }, -- { .size = 5, .data = "\x73\x00\x80\x00\x00" }, -- { .size = 5, .data = "\x76\x00\x00\x00\x00" }, -- { .size = 5, .data = "\x77\x00\x80\x00\x00" }, -- // 0x70, 0x71, 0x74, 0x75 inline DRC mixer: -- // no inline DRC inmix -- { .size = 5, .data = "\x70\x00\x80\x00\x00" }, -- { .size = 5, .data = "\x71\x00\x00\x00\x00" }, -- { .size = 5, .data = "\x74\x00\x80\x00\x00" }, -- { .size = 5, .data = "\x75\x00\x00\x00\x00" }, -- // 0x56, 0x57 Output scale -- { .size = 5, .data = "\x56\x00\x80\x00\x00" }, -- { .size = 5, .data = "\x57\x00\x02\x00\x00" }, -- // 0x3B, 0x3c -- { .size = 9, .data = "\x3B\x00\x08\x00\x00\x00\x78\x00\x00" }, -- { .size = 9, .data = "\x3C\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, -- { .size = 9, .data = "\x3E\x00\x08\x00\x00\x00\x78\x00\x00" }, -- { .size = 9, .data = "\x3F\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, -- { .size = 9, .data = "\x40\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, -- { .size = 9, .data = "\x43\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, -- // 0x51, 0x52: output mixer -- { .size = 9, .data = "\x51\x00\x80\x00\x00\x00\x00\x00\x00" }, -- { .size = 9, .data = "\x52\x00\x80\x00\x00\x00\x00\x00\x00" }, -- // PEQ defaults -- { .size = 21, .data = "\x29\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x2A\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x2B\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x2C\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x2D\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x2E\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x2F\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x30\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x31\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x32\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x33\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x34\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x35\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x36\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x58\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x59\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x5C\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x5D\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x5E\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x5F\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x5A\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x5B\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, --}; -- -- --#endif /* _TAS5713_H */ - -From 3ad92216031fb0abb38c3eb9b42efc20c323ca0a Mon Sep 17 00:00:00 2001 +From 85a279eaea5b66242702171e5d140e417d678ee9 Mon Sep 17 00:00:00 2001 From: Ryan Coe Date: Sat, 31 Jan 2015 18:25:49 -0700 -Subject: [PATCH 074/149] Update ds1307 driver for device-tree support +Subject: [PATCH 071/143] Update ds1307 driver for device-tree support Signed-off-by: Ryan Coe --- @@ -114026,10 +113264,10 @@ Signed-off-by: Ryan Coe 1 file changed, 8 insertions(+) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c -index 4e31036ee2596dec93accd26f627c5b95591ae9f..b92044cf03e750afa521a93519500e9d128486f4 100644 +index 4ad97be480430babc3321075f2739114eaad8f04..2ac1c265dc9cea56a5949eb537949a1f8853edc5 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c -@@ -1675,6 +1675,14 @@ static int ds1307_remove(struct i2c_client *client) +@@ -1708,6 +1708,14 @@ static int ds1307_remove(struct i2c_client *client) return 0; } @@ -114045,10 +113283,10 @@ index 4e31036ee2596dec93accd26f627c5b95591ae9f..b92044cf03e750afa521a93519500e9d .driver = { .name = "rtc-ds1307", -From 3e53b65b6fb18596e332c01e58edecd91f955727 Mon Sep 17 00:00:00 2001 +From 053bc362322ac4e8bf60530e93aee667167e7f8a Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 -Subject: [PATCH 075/149] Add driver for rpi-proto +Subject: [PATCH 072/143] Add driver for rpi-proto Forward port of 3.10.x driver from https://github.com/koalo We are using a custom board and would like to use rpi 3.18.x @@ -114068,10 +113306,10 @@ Signed-off-by: Waldemar Brodkorb create mode 100644 sound/soc/bcm/rpi-proto.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 4473cc728097bda0ce9fe68d4a9da348ec41f8b3..ac0dbaf29b821c4b21855f22104a986f6e0849ec 100644 +index f650f1522d6ef1e02d87345fea01bb1458693423..3cb799da4687e10cd1cfe9258e109b9fcf701c4c 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -45,6 +45,13 @@ config SND_BCM2708_SOC_RPI_DAC +@@ -53,6 +53,13 @@ config SND_BCM2708_SOC_RPI_DAC help Say Y or M if you want to add support for RPi-DAC. @@ -114086,19 +113324,20 @@ index 4473cc728097bda0ce9fe68d4a9da348ec41f8b3..ac0dbaf29b821c4b21855f22104a986f tristate "Support for IQaudIO-DAC" depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 203afc03167acbcad15e836209956bc5ab151157..3badc43cbe1fcb6972829a6d5eb3143cfa812da9 100644 +index a4838e2cf8e93c9285836f95f4151daea33e1bd1..680d1b6d5e16819094fbfaa6c42b458267b54819 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -13,10 +13,12 @@ snd-soc-hifiberry-dac-objs := hifiberry_dac.o - snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o +@@ -14,6 +14,7 @@ snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o snd-soc-hifiberry-digi-objs := hifiberry_digi.o + snd-soc-hifiberry-amp-objs := hifiberry_amp.o snd-soc-rpi-dac-objs := rpi-dac.o +snd-soc-rpi-proto-objs := rpi-proto.o snd-soc-iqaudio-dac-objs := iqaudio-dac.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o - obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o +@@ -21,4 +22,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o +obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o @@ -114263,10 +113502,10 @@ index 0000000000000000000000000000000000000000..9db678e885efd63d84d60a098a84ed67 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); -From 758f1e9ce01267e15f56154dd9fa9042898d6094 Mon Sep 17 00:00:00 2001 +From 88224370fc80b8de92c73c3b0ae02c04bb8e496c Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 -Subject: [PATCH 076/149] RaspiDAC3 support +Subject: [PATCH 073/143] RaspiDAC3 support Signed-off-by: Jan Grulich @@ -114284,10 +113523,10 @@ Signed-off-by: Matthias Reichl create mode 100644 sound/soc/bcm/raspidac3.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index ac0dbaf29b821c4b21855f22104a986f6e0849ec..c59c835757a51aa8ad72933d35a83b73a889477c 100644 +index 3cb799da4687e10cd1cfe9258e109b9fcf701c4c..a1b6a78182c9c3698df90e6c8ddaf1003bf01f91 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -58,3 +58,11 @@ config SND_BCM2708_SOC_IQAUDIO_DAC +@@ -66,3 +66,11 @@ config SND_BCM2708_SOC_IQAUDIO_DAC select SND_SOC_PCM512x_I2C help Say Y or M if you want to add support for IQaudIO-DAC. @@ -114300,10 +113539,10 @@ index ac0dbaf29b821c4b21855f22104a986f6e0849ec..c59c835757a51aa8ad72933d35a83b73 + help + Say Y or M if you want to add support for RaspiDAC Rev.3x. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 3badc43cbe1fcb6972829a6d5eb3143cfa812da9..07d2b52376b1d16e427cf6f51cbf4779d6219ce0 100644 +index 680d1b6d5e16819094fbfaa6c42b458267b54819..18253b39addf831780fefe85578e72007c0d51d9 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -15,6 +15,7 @@ snd-soc-hifiberry-digi-objs := hifiberry_digi.o +@@ -16,6 +16,7 @@ snd-soc-hifiberry-amp-objs := hifiberry_amp.o snd-soc-rpi-dac-objs := rpi-dac.o snd-soc-rpi-proto-objs := rpi-proto.o snd-soc-iqaudio-dac-objs := iqaudio-dac.o @@ -114311,7 +113550,7 @@ index 3badc43cbe1fcb6972829a6d5eb3143cfa812da9..07d2b52376b1d16e427cf6f51cbf4779 obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o -@@ -22,3 +23,4 @@ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o +@@ -24,3 +25,4 @@ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o @@ -114509,10 +113748,10 @@ index 0000000000000000000000000000000000000000..dd9eeea2af0382307f437e6db09d1546 +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); -From ab387673881e745cc94dabab62476b5cf953ef70 Mon Sep 17 00:00:00 2001 +From 1385ec25eb578307ba8862c9ae77e0f06d14293c Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 7 Apr 2016 21:26:21 +0100 -Subject: [PATCH 077/149] Add Support for JustBoom Audio boards +Subject: [PATCH 074/143] Add Support for JustBoom Audio boards justboom-dac: Adjust for ALSA API change @@ -114530,10 +113769,10 @@ Signed-off-by: Phil Elwell create mode 100644 sound/soc/bcm/justboom-digi.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index c59c835757a51aa8ad72933d35a83b73a889477c..b2f6339c318cdfe3516d73952a5be1fd32bc1156 100644 +index a1b6a78182c9c3698df90e6c8ddaf1003bf01f91..c9c2f702a1ea5548eff093cc84dcc1de2f8724ad 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -52,6 +52,20 @@ config SND_BCM2708_SOC_RPI_PROTO +@@ -60,6 +60,20 @@ config SND_BCM2708_SOC_RPI_PROTO help Say Y or M if you want to add support for Audio Codec Board PROTO (WM8731). @@ -114555,7 +113794,7 @@ index c59c835757a51aa8ad72933d35a83b73a889477c..b2f6339c318cdfe3516d73952a5be1fd tristate "Support for IQaudIO-DAC" depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 07d2b52376b1d16e427cf6f51cbf4779d6219ce0..cb8ab1901b172bdee0bd9cddd2f2e7ab2f36c16a 100644 +index 18253b39addf831780fefe85578e72007c0d51d9..dbc45d892277bd0b4c0f82e57f0b782e770cddfd 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -12,6 +12,8 @@ obj-$(CONFIG_SND_SOC_CYGNUS) += snd-soc-cygnus.o @@ -114564,18 +113803,18 @@ index 07d2b52376b1d16e427cf6f51cbf4779d6219ce0..cb8ab1901b172bdee0bd9cddd2f2e7ab snd-soc-hifiberry-digi-objs := hifiberry_digi.o +snd-soc-justboom-dac-objs := justboom-dac.o +snd-soc-justboom-digi-objs := justboom-digi.o + snd-soc-hifiberry-amp-objs := hifiberry_amp.o snd-soc-rpi-dac-objs := rpi-dac.o snd-soc-rpi-proto-objs := rpi-proto.o - snd-soc-iqaudio-dac-objs := iqaudio-dac.o -@@ -20,6 +22,8 @@ snd-soc-raspidac3-objs := raspidac3.o +@@ -21,6 +23,8 @@ snd-soc-raspidac3-objs := raspidac3.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o +obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC) += snd-soc-justboom-dac.o +obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI) += snd-soc-justboom-digi.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o - obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o diff --git a/sound/soc/bcm/justboom-dac.c b/sound/soc/bcm/justboom-dac.c new file mode 100644 index 0000000000000000000000000000000000000000..8fd50dbe681508a2cfe8fdde1c9fedbe9a507fa7 @@ -114966,10 +114205,10 @@ index 0000000000000000000000000000000000000000..91acb666380faa3c0deb2230f8a0f8bb +MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card"); +MODULE_LICENSE("GPL v2"); -From ce34a03852642a387b52fd1e8f153fa1c278de29 Mon Sep 17 00:00:00 2001 +From fd8c46fea411354bb97265a5fb57bec83820ad4c Mon Sep 17 00:00:00 2001 From: Andrey Grodzovsky Date: Tue, 3 May 2016 22:10:59 -0400 -Subject: [PATCH 078/149] ARM: adau1977-adc: Add basic machine driver for +Subject: [PATCH 075/143] ARM: adau1977-adc: Add basic machine driver for adau1977 codec driver. This commit adds basic support for the codec usage including: Device tree overlay, @@ -114985,10 +114224,10 @@ Signed-off-by: Andrey Grodzovsky create mode 100644 sound/soc/bcm/adau1977-adc.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index b2f6339c318cdfe3516d73952a5be1fd32bc1156..190a79dffa53a34c2df9b2c9b5160065c759de65 100644 +index c9c2f702a1ea5548eff093cc84dcc1de2f8724ad..72b86dad16b3dd440e5919308a5312fbb72e8703 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -80,3 +80,10 @@ config SND_BCM2708_SOC_RASPIDAC3 +@@ -88,3 +88,10 @@ config SND_BCM2708_SOC_RASPIDAC3 select SND_SOC_TPA6130A2 help Say Y or M if you want to add support for RaspiDAC Rev.3x. @@ -115000,7 +114239,7 @@ index b2f6339c318cdfe3516d73952a5be1fd32bc1156..190a79dffa53a34c2df9b2c9b5160065 + help + Say Y or M if you want to add support for ADAU1977 ADC. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index cb8ab1901b172bdee0bd9cddd2f2e7ab2f36c16a..9dd0785532aae24f3366cc2910d4dbc558cb0e5d 100644 +index dbc45d892277bd0b4c0f82e57f0b782e770cddfd..2b3d1987ea449713b18f60cae3f6edcbd2bcff08 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -9,6 +9,7 @@ snd-soc-cygnus-objs := cygnus-pcm.o cygnus-ssp.o @@ -115011,7 +114250,7 @@ index cb8ab1901b172bdee0bd9cddd2f2e7ab2f36c16a..9dd0785532aae24f3366cc2910d4dbc5 snd-soc-hifiberry-dac-objs := hifiberry_dac.o snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o snd-soc-hifiberry-digi-objs := hifiberry_digi.o -@@ -19,6 +20,7 @@ snd-soc-rpi-proto-objs := rpi-proto.o +@@ -20,6 +21,7 @@ snd-soc-rpi-proto-objs := rpi-proto.o snd-soc-iqaudio-dac-objs := iqaudio-dac.o snd-soc-raspidac3-objs := raspidac3.o @@ -115151,10 +114390,10 @@ index 0000000000000000000000000000000000000000..6e2ee027926ee63c89222f75ceb89e3d +MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC"); +MODULE_LICENSE("GPL v2"); -From 0cf9d82ede2bf39b41fd3b76d0b2b79306b1a2fd Mon Sep 17 00:00:00 2001 +From d42f4ed4d2c918abc3db37daee953eec5c50ad80 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Mon, 16 May 2016 21:36:31 +1000 -Subject: [PATCH 079/149] New AudioInjector.net Pi soundcard with low jitter +Subject: [PATCH 076/143] New AudioInjector.net Pi soundcard with low jitter audio in and out. Contains the sound/soc/bcm ALSA machine driver and necessary alterations to the Kconfig and Makefile. @@ -115173,10 +114412,10 @@ This patch adds headphone and microphone capability to the Audio Injector sound create mode 100644 sound/soc/bcm/audioinjector-pi-soundcard.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 190a79dffa53a34c2df9b2c9b5160065c759de65..eb16c3a7fb316eb5938a54dfa864f66f9b167eb0 100644 +index 72b86dad16b3dd440e5919308a5312fbb72e8703..7ebfa8261a69d31a5add15ae03399dc6d8872581 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -87,3 +87,10 @@ config SND_BCM2708_SOC_ADAU1977_ADC +@@ -95,3 +95,10 @@ config SND_BCM2708_SOC_ADAU1977_ADC select SND_SOC_ADAU1977_I2C help Say Y or M if you want to add support for ADAU1977 ADC. @@ -115188,10 +114427,10 @@ index 190a79dffa53a34c2df9b2c9b5160065c759de65..eb16c3a7fb316eb5938a54dfa864f66f + help + Say Y or M if you want to add support for audioinjector.net Pi Hat diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 9dd0785532aae24f3366cc2910d4dbc558cb0e5d..a68469644535a38305bb5b0f3780e03e0ca4f519 100644 +index 2b3d1987ea449713b18f60cae3f6edcbd2bcff08..e61b0f6c7ccee06dfa763d2abbb667707184febc 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -19,6 +19,7 @@ snd-soc-rpi-dac-objs := rpi-dac.o +@@ -20,6 +20,7 @@ snd-soc-rpi-dac-objs := rpi-dac.o snd-soc-rpi-proto-objs := rpi-proto.o snd-soc-iqaudio-dac-objs := iqaudio-dac.o snd-soc-raspidac3-objs := raspidac3.o @@ -115199,7 +114438,7 @@ index 9dd0785532aae24f3366cc2910d4dbc558cb0e5d..a68469644535a38305bb5b0f3780e03e obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o -@@ -30,3 +31,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o +@@ -32,3 +33,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o @@ -115405,10 +114644,10 @@ index 0000000000000000000000000000000000000000..ef54e0f07ea03f59e9957b5d98f3e7fd +MODULE_ALIAS("platform:audioinjector-pi-soundcard"); + -From fa81fa8a4f1a95e6bc71206764aed742e9af58c5 Mon Sep 17 00:00:00 2001 +From 6689d861c13e3230c53f5f1b54b7987ef92aeba9 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Thu, 30 Jun 2016 18:38:42 +0100 -Subject: [PATCH 080/149] Add IQAudIO Digi WM8804 board support +Subject: [PATCH 077/143] Add IQAudIO Digi WM8804 board support Support IQAudIO Digi board with iqaudio_digi machine driver and iqaudio-digi-wm8804-audio overlay. @@ -115425,10 +114664,10 @@ Signed-off-by: DigitalDreamtime create mode 100644 sound/soc/bcm/iqaudio_digi.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index eb16c3a7fb316eb5938a54dfa864f66f9b167eb0..9cba69ab877ef73beb2dff2f4f82d1d243f7c604 100644 +index 7ebfa8261a69d31a5add15ae03399dc6d8872581..ebc2b3d7b0bd4a1126adbc1315120fe5c6aca413 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -73,6 +73,13 @@ config SND_BCM2708_SOC_IQAUDIO_DAC +@@ -81,6 +81,13 @@ config SND_BCM2708_SOC_IQAUDIO_DAC help Say Y or M if you want to add support for IQaudIO-DAC. @@ -115443,10 +114682,10 @@ index eb16c3a7fb316eb5938a54dfa864f66f9b167eb0..9cba69ab877ef73beb2dff2f4f82d1d2 tristate "Support for RaspiDAC Rev.3x" depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index a68469644535a38305bb5b0f3780e03e0ca4f519..fa2739206b79a9f9d2e1173b2099e1156e4e08c8 100644 +index e61b0f6c7ccee06dfa763d2abbb667707184febc..c4f2579b173c1232096c177f2e557a5337e2e97e 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -18,6 +18,7 @@ snd-soc-justboom-digi-objs := justboom-digi.o +@@ -19,6 +19,7 @@ snd-soc-hifiberry-amp-objs := hifiberry_amp.o snd-soc-rpi-dac-objs := rpi-dac.o snd-soc-rpi-proto-objs := rpi-proto.o snd-soc-iqaudio-dac-objs := iqaudio-dac.o @@ -115454,7 +114693,7 @@ index a68469644535a38305bb5b0f3780e03e0ca4f519..fa2739206b79a9f9d2e1173b2099e115 snd-soc-raspidac3-objs := raspidac3.o snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o -@@ -30,6 +31,7 @@ obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI) += snd-soc-justboom-digi.o +@@ -32,6 +33,7 @@ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o @@ -115708,10 +114947,10 @@ index 0000000000000000000000000000000000000000..9b6e829bcb5b1762a853775e78163196 +MODULE_DESCRIPTION("ASoC Driver for IQAudIO WM8804 Digi"); +MODULE_LICENSE("GPL v2"); -From ba5d3d9bdd11222a06508cffec229c236ada236f Mon Sep 17 00:00:00 2001 +From 821ba52756aaabe8947659b9be1744cad032d376 Mon Sep 17 00:00:00 2001 From: escalator2015 Date: Tue, 24 May 2016 16:20:09 +0100 -Subject: [PATCH 081/149] New driver for RRA DigiDAC1 soundcard using WM8741 + +Subject: [PATCH 078/143] New driver for RRA DigiDAC1 soundcard using WM8741 + WM8804 --- @@ -115722,10 +114961,10 @@ Subject: [PATCH 081/149] New driver for RRA DigiDAC1 soundcard using WM8741 + create mode 100644 sound/soc/bcm/digidac1-soundcard.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 9cba69ab877ef73beb2dff2f4f82d1d243f7c604..2be5b64fb0d5dcad0d5747626015a6886c3c273b 100644 +index ebc2b3d7b0bd4a1126adbc1315120fe5c6aca413..c09de7aac7b448ad3af1b50f25ec56f682f872b7 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -101,3 +101,11 @@ config SND_AUDIOINJECTOR_PI_SOUNDCARD +@@ -109,3 +109,11 @@ config SND_AUDIOINJECTOR_PI_SOUNDCARD select SND_SOC_WM8731 help Say Y or M if you want to add support for audioinjector.net Pi Hat @@ -115738,10 +114977,10 @@ index 9cba69ab877ef73beb2dff2f4f82d1d243f7c604..2be5b64fb0d5dcad0d5747626015a688 + help + Say Y or M if you want to add support for Red Rocks Audio DigiDAC1 board. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index fa2739206b79a9f9d2e1173b2099e1156e4e08c8..a5c30c0bdacafb2bd09b6ac2f8a3bdc6a85a8404 100644 +index c4f2579b173c1232096c177f2e557a5337e2e97e..290cfff1f982faba7b0089f04536ca82b319b919 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -21,6 +21,7 @@ snd-soc-iqaudio-dac-objs := iqaudio-dac.o +@@ -22,6 +22,7 @@ snd-soc-iqaudio-dac-objs := iqaudio-dac.o snd-soc-iqaudio-digi-objs := iqaudio_digi.o snd-soc-raspidac3-objs := raspidac3.o snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o @@ -115749,7 +114988,7 @@ index fa2739206b79a9f9d2e1173b2099e1156e4e08c8..a5c30c0bdacafb2bd09b6ac2f8a3bdc6 obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o -@@ -34,4 +35,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o +@@ -36,4 +37,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI) += snd-soc-iqaudio-digi.o obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o @@ -116184,10 +115423,10 @@ index 0000000000000000000000000000000000000000..446796e7e4c14a7d95b2f2a01211d9a0 +MODULE_DESCRIPTION("ASoC Driver for RRA DigiDAC1"); +MODULE_LICENSE("GPL v2"); -From 4f60dcef7c604f3294598e7477dee922bc0b94d4 Mon Sep 17 00:00:00 2001 +From 18217ab6c25f21d54af5891f725eacd148929a10 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Sat, 2 Jul 2016 16:26:19 +0100 -Subject: [PATCH 082/149] Add support for Dion Audio LOCO DAC-AMP HAT +Subject: [PATCH 079/143] Add support for Dion Audio LOCO DAC-AMP HAT Using dedicated machine driver and pcm5102a codec driver. @@ -116200,10 +115439,10 @@ Signed-off-by: DigitalDreamtime create mode 100644 sound/soc/bcm/dionaudio_loco.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 2be5b64fb0d5dcad0d5747626015a6886c3c273b..b8cb5eb7af9b3e6d8d100926e04bfef629641d1d 100644 +index c09de7aac7b448ad3af1b50f25ec56f682f872b7..aac9120b0865ce63b6c851dbe3917f5548b9a539 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -109,3 +109,10 @@ config SND_DIGIDAC1_SOUNDCARD +@@ -117,3 +117,10 @@ config SND_DIGIDAC1_SOUNDCARD select SND_SOC_WM8741 help Say Y or M if you want to add support for Red Rocks Audio DigiDAC1 board. @@ -116215,10 +115454,10 @@ index 2be5b64fb0d5dcad0d5747626015a6886c3c273b..b8cb5eb7af9b3e6d8d100926e04bfef6 + help + Say Y or M if you want to add support for Dion Audio LOCO. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index a5c30c0bdacafb2bd09b6ac2f8a3bdc6a85a8404..28cdf019dbc7aafda194c83817d260ad1a477666 100644 +index 290cfff1f982faba7b0089f04536ca82b319b919..3d09653b2e9eafc1d82f4b8349646fa174c86877 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -22,6 +22,7 @@ snd-soc-iqaudio-digi-objs := iqaudio_digi.o +@@ -23,6 +23,7 @@ snd-soc-iqaudio-digi-objs := iqaudio_digi.o snd-soc-raspidac3-objs := raspidac3.o snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o snd-soc-digidac1-soundcard-objs := digidac1-soundcard.o @@ -116226,7 +115465,7 @@ index a5c30c0bdacafb2bd09b6ac2f8a3bdc6a85a8404..28cdf019dbc7aafda194c83817d260ad obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o -@@ -36,4 +37,4 @@ obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI) += snd-soc-iqaudio-digi.o +@@ -38,4 +39,4 @@ obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI) += snd-soc-iqaudio-digi.o obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o obj-$(CONFIG_SND_DIGIDAC1_SOUNDCARD) += snd-soc-digidac1-soundcard.o @@ -116360,10 +115599,10 @@ index 0000000000000000000000000000000000000000..89e65317512bc774453ac8d0d5b0ff98 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO"); +MODULE_LICENSE("GPL v2"); -From 00627d7ba4d283e83fb73e22c018b56aba26cecd Mon Sep 17 00:00:00 2001 +From b8e26d7c19304135ac8bb435da3c95df604b9403 Mon Sep 17 00:00:00 2001 From: Clive Messer Date: Mon, 19 Sep 2016 14:01:04 +0100 -Subject: [PATCH 083/149] Allo Piano DAC boards: Initial 2 channel (stereo) +Subject: [PATCH 080/143] Allo Piano DAC boards: Initial 2 channel (stereo) support (#1645) Add initial 2 channel (stereo) support for Allo Piano DAC (2.0/2.1) boards, @@ -116388,10 +115627,10 @@ Tested-by: Clive Messer create mode 100644 sound/soc/bcm/allo-piano-dac.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index b8cb5eb7af9b3e6d8d100926e04bfef629641d1d..4f0330a6c06115f077938cba3dc744d4ae10f056 100644 +index aac9120b0865ce63b6c851dbe3917f5548b9a539..b600cfb98ac9baa21b3c6f09eff05149f14fda0a 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -116,3 +116,10 @@ config SND_BCM2708_SOC_DIONAUDIO_LOCO +@@ -124,3 +124,10 @@ config SND_BCM2708_SOC_DIONAUDIO_LOCO select SND_SOC_PCM5102a help Say Y or M if you want to add support for Dion Audio LOCO. @@ -116403,10 +115642,10 @@ index b8cb5eb7af9b3e6d8d100926e04bfef629641d1d..4f0330a6c06115f077938cba3dc744d4 + help + Say Y or M if you want to add support for Allo Piano DAC. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 28cdf019dbc7aafda194c83817d260ad1a477666..4b94a42efecaee41df37f3c59fddefa5fe78521c 100644 +index 3d09653b2e9eafc1d82f4b8349646fa174c86877..7d70655c226c1ecd59ee60aae4508699ee9d10ae 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -23,6 +23,7 @@ snd-soc-raspidac3-objs := raspidac3.o +@@ -24,6 +24,7 @@ snd-soc-raspidac3-objs := raspidac3.o snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o snd-soc-digidac1-soundcard-objs := digidac1-soundcard.o snd-soc-dionaudio-loco-objs := dionaudio_loco.o @@ -116414,7 +115653,7 @@ index 28cdf019dbc7aafda194c83817d260ad1a477666..4b94a42efecaee41df37f3c59fddefa5 obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o -@@ -38,3 +39,4 @@ obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o +@@ -40,3 +41,4 @@ obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o obj-$(CONFIG_SND_DIGIDAC1_SOUNDCARD) += snd-soc-digidac1-soundcard.o obj-$(CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO) += snd-soc-dionaudio-loco.o @@ -116570,10 +115809,10 @@ index 0000000000000000000000000000000000000000..8e8e62e5a36a279b425ed4655cfbac99 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC"); +MODULE_LICENSE("GPL v2"); -From 8c5f1ee54fa2de94daed5ebb5c778a2363894b13 Mon Sep 17 00:00:00 2001 +From 91e732e181547ba0f62c18fbe71687688d2c1878 Mon Sep 17 00:00:00 2001 From: gtrainavicius Date: Sun, 23 Oct 2016 12:06:53 +0300 -Subject: [PATCH 084/149] Support for Blokas Labs pisound board +Subject: [PATCH 081/143] Support for Blokas Labs pisound board Pisound dynamic overlay (#1760) @@ -116590,12 +115829,12 @@ Print a logline when the kernel module is removed. create mode 100644 sound/soc/bcm/pisound.c diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt -index f0a48ea78659c933839554ca879babb1b621b264..779c19033acad30ed8fd71f015ee76caef1a0568 100644 +index 16d3b5e7f5d1f52d1bf3c5f98220ba4f09b99b8f..596ea7815668327e3171fb8f53af428a953554dc 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt -@@ -40,6 +40,7 @@ auvidea Auvidea GmbH - avago Avago Technologies +@@ -43,6 +43,7 @@ avago Avago Technologies avic Shanghai AVIC Optoelectronics Co., Ltd. + axentia Axentia Technologies AB axis Axis Communications AB +blokaslabs Vilniaus Blokas UAB boe BOE Technology Group Co., Ltd. @@ -116724,10 +115963,10 @@ index 7cdfc29ba4fbffd3216376677922e7ae26019055..5197e656a3d741d14bd9dd6c812b4b93 - }; }; diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 4f0330a6c06115f077938cba3dc744d4ae10f056..a0ef6a028136beb27ed13a4136712a70a60f2966 100644 +index b600cfb98ac9baa21b3c6f09eff05149f14fda0a..ff4284a0000fd8dc58deb9e50be1422fd7ad6e65 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -123,3 +123,9 @@ config SND_BCM2708_SOC_ALLO_PIANO_DAC +@@ -131,3 +131,9 @@ config SND_BCM2708_SOC_ALLO_PIANO_DAC select SND_SOC_PCM512x_I2C help Say Y or M if you want to add support for Allo Piano DAC. @@ -116738,10 +115977,10 @@ index 4f0330a6c06115f077938cba3dc744d4ae10f056..a0ef6a028136beb27ed13a4136712a70 + help + Say Y or M if you want to add support for Blokas Labs pisound. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 4b94a42efecaee41df37f3c59fddefa5fe78521c..f720a3d3b5832844ee6d0558317c728f00c40b65 100644 +index 7d70655c226c1ecd59ee60aae4508699ee9d10ae..222a7583891f632cc2297f49aa1a58ee46507875 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -24,6 +24,7 @@ snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o +@@ -25,6 +25,7 @@ snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o snd-soc-digidac1-soundcard-objs := digidac1-soundcard.o snd-soc-dionaudio-loco-objs := dionaudio_loco.o snd-soc-allo-piano-dac-objs := allo-piano-dac.o @@ -116749,7 +115988,7 @@ index 4b94a42efecaee41df37f3c59fddefa5fe78521c..f720a3d3b5832844ee6d0558317c728f obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o -@@ -40,3 +41,4 @@ obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundca +@@ -42,3 +43,4 @@ obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundca obj-$(CONFIG_SND_DIGIDAC1_SOUNDCARD) += snd-soc-digidac1-soundcard.o obj-$(CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO) += snd-soc-dionaudio-loco.o obj-$(CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC) += snd-soc-allo-piano-dac.o @@ -117750,10 +116989,10 @@ index 0000000000000000000000000000000000000000..4b8545487d06e4ea70073a5d063fb231 +MODULE_DESCRIPTION("ASoC Driver for pisound, http://blokas.io/pisound"); +MODULE_LICENSE("GPL v2"); -From 584a44b06094e9c0c44fee0d1d32b56bc14fa208 Mon Sep 17 00:00:00 2001 +From a78893616a488abf9b4c9dbf0cace4e130ea0907 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 -Subject: [PATCH 085/149] rpi_display: add backlight driver and overlay +Subject: [PATCH 082/143] rpi_display: add backlight driver and overlay Add a mailbox-driven backlight controller for the Raspberry Pi DSI touchscreen display. Requires updated GPU firmware to recognise the @@ -117922,10 +117161,10 @@ index 0000000000000000000000000000000000000000..14a0d9b037395497c1fdae2961feccd5 +MODULE_DESCRIPTION("Raspberry Pi mailbox based Backlight Driver"); +MODULE_LICENSE("GPL"); -From bc5419b31a5d1b28d302ca4c7183ae320ed77051 Mon Sep 17 00:00:00 2001 +From e3bcfd7cedcea1f6ce90667a860eba5d19e50ec6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 -Subject: [PATCH 086/149] bcm2835-virtgpio: Virtual GPIO driver +Subject: [PATCH 083/143] bcm2835-virtgpio: Virtual GPIO driver Add a virtual GPIO driver that uses the firmware mailbox interface to request that the VPU toggles LEDs. @@ -117938,7 +117177,7 @@ request that the VPU toggles LEDs. create mode 100644 drivers/gpio/gpio-bcm-virt.c diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig -index ed37e5908b910cd51cb378ffc171fe2a9104c082..edcb49f9051b703ce35fd1687a6cef8a31bf3627 100644 +index d5d36549ecc1ecea2c53cddea2a209e54ab94b56..ade9f7dd8f973fd44031a0a6d42c28f01b424d1b 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -134,6 +134,12 @@ config GPIO_BCM_KONA @@ -117955,10 +117194,10 @@ index ed37e5908b910cd51cb378ffc171fe2a9104c082..edcb49f9051b703ce35fd1687a6cef8a tristate "BRCMSTB GPIO support" default y if (ARCH_BRCMSTB || BMIPS_GENERIC) diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile -index d074c2299393dc9cef3456b0068ff2d229677c27..cfb8d4bad6b0b20bed56643b0870fcff311c12c5 100644 +index a7676b82de6f4accd75d57817fb2f0c4f5407bd1..dec0669a5f030023288047f2abe68b0f2e0946d7 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile -@@ -31,6 +31,7 @@ obj-$(CONFIG_GPIO_ATH79) += gpio-ath79.o +@@ -33,6 +33,7 @@ obj-$(CONFIG_GPIO_ATH79) += gpio-ath79.o obj-$(CONFIG_GPIO_ASPEED) += gpio-aspeed.o obj-$(CONFIG_GPIO_AXP209) += gpio-axp209.o obj-$(CONFIG_GPIO_BCM_KONA) += gpio-bcm-kona.o @@ -118187,7 +117426,7 @@ index 0000000000000000000000000000000000000000..c3725546def9d4a6264fbb1f6b9814d0 +MODULE_DESCRIPTION("brcmvirt GPIO driver"); +MODULE_ALIAS("platform:brcmvirt-gpio"); diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index b0f6e33bd30c35664ceee057f4c3ad32b914291d..e92278968b2b979db2a1f855f70e7aafb224fa98 100644 +index 4a3d79d3b48eb483a4e4bf498f617515e3ad158f..5f34e1257117fb48013c9926a8a223d64a598ab7 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -116,6 +116,7 @@ enum rpi_firmware_property_tag { @@ -118199,10 +117438,10 @@ index b0f6e33bd30c35664ceee057f4c3ad32b914291d..e92278968b2b979db2a1f855f70e7aaf RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From 832c72386a99ff317f811315e8dbb07f6394a747 Mon Sep 17 00:00:00 2001 +From afb0883dd8b8f571e565b59a5813f939a6cce163 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 -Subject: [PATCH 087/149] amba_pl011: Don't use DT aliases for numbering +Subject: [PATCH 084/143] amba_pl011: Don't use DT aliases for numbering The pl011 driver looks for DT aliases of the form "serial", and if found uses as the device ID. This can cause @@ -118214,10 +117453,10 @@ use the same logic. 1 file changed, 5 insertions(+) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index e2c33b9528d82ed7a2c27d083d7b1d222da68178..5a11ff833e1fd112ba04df3a427cd94bf6793ec5 100644 +index d4171d71a258f2696ab2ab2109376ee5a516bfba..6beb6233a0b6132b933cf8d85d8501dc1ce2fe4c 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -2441,7 +2441,12 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap, +@@ -2497,7 +2497,12 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap, if (IS_ERR(base)) return PTR_ERR(base); @@ -118231,10 +117470,10 @@ index e2c33b9528d82ed7a2c27d083d7b1d222da68178..5a11ff833e1fd112ba04df3a427cd94b uap->old_cr = 0; uap->port.dev = dev; -From 5e8bc5a5aa766db3328818aa104ec69c7465d015 Mon Sep 17 00:00:00 2001 +From fdfb4986a0abca080478d8449f4f257c835a9211 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 3 Dec 2014 13:23:28 +0200 -Subject: [PATCH 088/149] OF: DT-Overlay configfs interface +Subject: [PATCH 085/143] OF: DT-Overlay configfs interface This is a port of Pantelis Antoniou's v3 port that makes use of the new upstreamed configfs support for binary attributes. @@ -118666,10 +117905,10 @@ index 0000000000000000000000000000000000000000..0037e6868a6cda8706c88194c6a4454b +} +late_initcall(of_cfs_init); -From 10045e8386fd0416bb3b4909d021647122f9140f Mon Sep 17 00:00:00 2001 +From 3d29854cf0ba3548719f9977cdae2910bf4484db Mon Sep 17 00:00:00 2001 From: Cheong2K Date: Fri, 26 Feb 2016 18:20:10 +0800 -Subject: [PATCH 089/149] brcm: adds support for BCM43341 wifi +Subject: [PATCH 086/143] brcm: adds support for BCM43341 wifi brcmfmac: Disable power management @@ -118711,15 +117950,14 @@ Signed-off-by: Phil Elwell --- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 31 ++++++++++++++++------ .../wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +- - .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 ++ - .../broadcom/brcm80211/include/brcm_hw_ids.h | 1 + - 4 files changed, 27 insertions(+), 9 deletions(-) + .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 3 ++- + 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -index 78d9966a3957b2b934fe6b21de5cade494ec2839..3fcb1887b2d312e050c02e9fe66ea20f48f0abcb 100644 +index 7ffc4aba5bab0683fe993d1d5eef9e8e3d8389d0..5dfcf16428f9c8687237c3218183d8afa66ec331 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -2756,6 +2756,8 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev, +@@ -2749,6 +2749,8 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev, * preference in cfg struct to apply this to * FW later while initializing the dongle */ @@ -118728,7 +117966,7 @@ index 78d9966a3957b2b934fe6b21de5cade494ec2839..3fcb1887b2d312e050c02e9fe66ea20f cfg->pwr_save = enabled; if (!check_vif_up(ifp->vif)) { -@@ -4750,12 +4752,15 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev) +@@ -4659,12 +4661,15 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev) err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1); if (err < 0) brcmf_err("BRCMF_C_DOWN error %d\n", err); @@ -118747,7 +117985,7 @@ index 78d9966a3957b2b934fe6b21de5cade494ec2839..3fcb1887b2d312e050c02e9fe66ea20f if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS)) brcmf_fil_iovar_int_set(ifp, "mbss", 0); brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY, -@@ -6737,12 +6742,18 @@ static s32 brcmf_translate_country_code(struct brcmf_pub *drvr, char alpha2[2], +@@ -6650,12 +6655,18 @@ static s32 brcmf_translate_country_code(struct brcmf_pub *drvr, char alpha2[2], struct brcmfmac_pd_cc *country_codes; struct brcmfmac_pd_cc_entry *cc; s32 found_index; @@ -118768,7 +118006,7 @@ index 78d9966a3957b2b934fe6b21de5cade494ec2839..3fcb1887b2d312e050c02e9fe66ea20f } if ((alpha2[0] == ccreq->country_abbrev[0]) && -@@ -6766,10 +6777,14 @@ static s32 brcmf_translate_country_code(struct brcmf_pub *drvr, char alpha2[2], +@@ -6679,10 +6690,14 @@ static s32 brcmf_translate_country_code(struct brcmf_pub *drvr, char alpha2[2], brcmf_dbg(TRACE, "No country code match found\n"); return -EINVAL; } @@ -118800,7 +118038,7 @@ index 3e15d64c64813513bc22202dd9e468588699abb0..4051780f64f44a5ce522babe6c371a1b MODULE_PARM_DESC(roamoff, "Do not use internal roaming engine"); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -index b892dac70f4b02f76e01a7ccb580c6d8aed4bfe4..db5f8b70b407879f1c006ca4b7ab78d12974609d 100644 +index dfb0658713d9b31714566b5003564a9a53eb5e97..db5f8b70b407879f1c006ca4b7ab78d12974609d 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -604,6 +604,7 @@ BRCMF_FW_NVRAM_DEF(4329, "brcmfmac4329-sdio.bin", "brcmfmac4329-sdio.txt"); @@ -118811,31 +118049,20 @@ index b892dac70f4b02f76e01a7ccb580c6d8aed4bfe4..db5f8b70b407879f1c006ca4b7ab78d1 BRCMF_FW_NVRAM_DEF(4335, "brcmfmac4335-sdio.bin", "brcmfmac4335-sdio.txt"); BRCMF_FW_NVRAM_DEF(43362, "brcmfmac43362-sdio.bin", "brcmfmac43362-sdio.txt"); BRCMF_FW_NVRAM_DEF(4339, "brcmfmac4339-sdio.bin", "brcmfmac4339-sdio.txt"); -@@ -621,6 +622,7 @@ static struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = { +@@ -621,7 +622,7 @@ static struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = { BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4330_CHIP_ID, 0xFFFFFFFF, 4330), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4334_CHIP_ID, 0xFFFFFFFF, 4334), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43340_CHIP_ID, 0xFFFFFFFF, 43340), +- BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43341_CHIP_ID, 0xFFFFFFFF, 43340), + BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43341_CHIP_ID, 0xFFFFFFFF, 43341), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4335_CHIP_ID, 0xFFFFFFFF, 4335), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, 43362), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, 4339), -diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h -index d0407d9ad7827cd756b6311410ffe2d9a7cacc78..f1fb8a3c7a3211e8429585861f2f42e014878654 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h -+++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h -@@ -36,6 +36,7 @@ - #define BRCM_CC_4330_CHIP_ID 0x4330 - #define BRCM_CC_4334_CHIP_ID 0x4334 - #define BRCM_CC_43340_CHIP_ID 43340 -+#define BRCM_CC_43341_CHIP_ID 43341 - #define BRCM_CC_43362_CHIP_ID 43362 - #define BRCM_CC_4335_CHIP_ID 0x4335 - #define BRCM_CC_4339_CHIP_ID 0x4339 -From b53fc29b9388190fe4a09d219c235585316c03ac Mon Sep 17 00:00:00 2001 +From a4b76e3a62a42b8e2b92de017f4a0fe6cdbe7abf Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 -Subject: [PATCH 090/149] hci_h5: Don't send conf_req when ACTIVE +Subject: [PATCH 087/143] hci_h5: Don't send conf_req when ACTIVE Without this patch, a modem and kernel can continuously bombard each other with conf_req and conf_rsp messages, in a demented game of tag. @@ -118844,10 +118071,10 @@ other with conf_req and conf_rsp messages, in a demented game of tag. 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c -index 0879d64b1caf58afb6e5d494c07d9ab7e7cdf983..5161ab30fd533d50f516bb93d5b9f402422e2974 100644 +index 90d0456b67446bcc624fab4b1542c4eaf21531b1..f9adeac3bbba6418dcca298c55706356b3004e34 100644 --- a/drivers/bluetooth/hci_h5.c +++ b/drivers/bluetooth/hci_h5.c -@@ -310,7 +310,8 @@ static void h5_handle_internal_rx(struct hci_uart *hu) +@@ -308,7 +308,8 @@ static void h5_handle_internal_rx(struct hci_uart *hu) h5_link_control(hu, conf_req, 3); } else if (memcmp(data, conf_req, 2) == 0) { h5_link_control(hu, conf_rsp, 2); @@ -118858,10 +118085,10 @@ index 0879d64b1caf58afb6e5d494c07d9ab7e7cdf983..5161ab30fd533d50f516bb93d5b9f402 if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 0x07); -From 1fec0af76b9706f88fe66b54b3aa9fd959169626 Mon Sep 17 00:00:00 2001 +From c3980d1190ae7a74abc71a39d774fbe92691b4ca Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 -Subject: [PATCH 091/149] config: Add default configs +Subject: [PATCH 088/143] config: Add default configs --- arch/arm/configs/bcm2709_defconfig | 1297 +++++++++++++++++++++++++++++++++++ @@ -121488,10 +120715,10 @@ index 0000000000000000000000000000000000000000..8acee9f31202ec14f2933d92dd70831c +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From c41a0687c5363e4ff1d8338bf80b7c4cb76a6501 Mon Sep 17 00:00:00 2001 +From c59ca307b42b2c8bab4bf1d3537ca164c96cb85b Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Wed, 24 Aug 2016 03:35:56 -0700 -Subject: [PATCH 092/149] Add arm64 configuration and device tree differences. +Subject: [PATCH 089/143] Add arm64 configuration and device tree differences. Disable MMC_BCM2835_SDHOST and MMC_BCM2835 since these drivers are crashing at the moment. @@ -121513,7 +120740,7 @@ Tested with raspbian-jessie 2016-09-23. create mode 100644 arch/arm64/configs/bcmrpi3_defconfig diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms -index 101794f5ce1008b7ff007fbfc7fa23d9e63bae67..7d213c2c904271c7a4622b83cd55a750d237bc2e 100644 +index 715ef1256838ed4b14d21c9ee8885d10c64fb0fc..5289515a5b3bdfc85b7b6f1153e55b8ee760e96c 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -1,5 +1,27 @@ @@ -121567,7 +120794,7 @@ index 0000000000000000000000000000000000000000..deb33441da95220db0ed672e41639626 +#include "../../../../arm/boot/dts/bcm2710-rpi-3-b.dts" diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig new file mode 100644 -index 0000000000000000000000000000000000000000..d7406f5a4620151044b8f716b4d10bb818648e06 +index 0000000000000000000000000000000000000000..e6b09fafa27eed2b762e3d53b55041f793683d27 --- /dev/null +++ b/arch/arm64/configs/bcmrpi3_defconfig @@ -0,0 +1,1334 @@ @@ -122904,90 +122131,765 @@ index 0000000000000000000000000000000000000000..d7406f5a4620151044b8f716b4d10bb8 +CONFIG_ARM64_CRYPTO=y +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -+CONFIG_BCM2708_VCHIQ=n ++CONFIG_BCM2835_VCHIQ=n -From 0ffcfdc6e8926afb60dfbcf9bc414c543028f62b Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Mon, 7 Mar 2016 15:05:11 +0000 -Subject: [PATCH 093/149] vchiq_arm: Tweak the logging output +From 8d3dcfb51bd8bee21c9e6e0296c8502ca09d1f70 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 27 Dec 2016 22:13:42 +0000 +Subject: [PATCH 090/143] Revert "staging: vc04_services: remove + vchiq_copy_from_user" -Signed-off-by: Phil Elwell +This reverts commit 49bec49fd7f273ec114e2e533c1bb8f21a654aaf. --- - .../vc04_services/interface/vchiq_arm/vchiq_core.c | 31 +++++++++------------- - 1 file changed, 13 insertions(+), 18 deletions(-) + .../staging/vc04_services/interface/vchi/vchi.h | 25 +- + .../interface/vchiq_arm/vchiq_2835_arm.c | 11 + + .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 103 +------- + .../vc04_services/interface/vchiq_arm/vchiq_core.c | 269 +++++++++------------ + .../vc04_services/interface/vchiq_arm/vchiq_core.h | 3 + + .../vc04_services/interface/vchiq_arm/vchiq_if.h | 9 +- + .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 64 ++++- + 7 files changed, 197 insertions(+), 287 deletions(-) +diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h +index d6937288210cef102e115f4265471ad9e9da7007..1b17e98f737979eef19906609bc19ecd19455618 100644 +--- a/drivers/staging/vc04_services/interface/vchi/vchi.h ++++ b/drivers/staging/vc04_services/interface/vchi/vchi.h +@@ -226,12 +226,25 @@ extern int32_t vchi_service_set_option( const VCHI_SERVICE_HANDLE_T handle, + int value); + + // Routine to send a message across a service +-extern int32_t +- vchi_msg_queue(VCHI_SERVICE_HANDLE_T handle, +- ssize_t (*copy_callback)(void *context, void *dest, +- size_t offset, size_t maxsize), +- void *context, +- uint32_t data_size); ++extern int32_t vchi_msg_queue( VCHI_SERVICE_HANDLE_T handle, ++ const void *data, ++ uint32_t data_size, ++ VCHI_FLAGS_T flags, ++ void *msg_handle ); ++ ++// scatter-gather (vector) and send message ++int32_t vchi_msg_queuev_ex( VCHI_SERVICE_HANDLE_T handle, ++ VCHI_MSG_VECTOR_EX_T *vector, ++ uint32_t count, ++ VCHI_FLAGS_T flags, ++ void *msg_handle ); ++ ++// legacy scatter-gather (vector) and send message, only handles pointers ++int32_t vchi_msg_queuev( VCHI_SERVICE_HANDLE_T handle, ++ VCHI_MSG_VECTOR_T *vector, ++ uint32_t count, ++ VCHI_FLAGS_T flags, ++ void *msg_handle ); + + // Routine to receive a msg from a service + // Dequeue is equivalent to hold, copy into client buffer, release +diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +index 2b500d85cebc768373a2dd48c779063262b52570..706e7f936c1a97352f7ef3d3fbd3b4a92943165d 100644 +--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c ++++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +@@ -232,6 +232,17 @@ remote_event_signal(REMOTE_EVENT_T *event) + writel(0, g_regs + BELL2); /* trigger vc interrupt */ + } + ++int ++vchiq_copy_from_user(void *dst, const void *src, int size) ++{ ++ if ((uint32_t)src < TASK_SIZE) { ++ return copy_from_user(dst, src, size); ++ } else { ++ memcpy(dst, src, size); ++ return 0; ++ } ++} ++ + VCHIQ_STATUS_T + vchiq_prepare_bulk_data(VCHIQ_BULK_T *bulk, VCHI_MEM_HANDLE_T memhandle, + void *offset, int size, int dir) +diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +index 0d987898b4f86abbd7d3f73046ef4ae5ffff5452..42998155eb4d7de8e49cc1ca82d84a430562a8da 100644 +--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c ++++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +@@ -402,107 +402,6 @@ static void close_delivered(USER_SERVICE_T *user_service) + } + } + +-struct vchiq_io_copy_callback_context { +- VCHIQ_ELEMENT_T *current_element; +- size_t current_element_offset; +- unsigned long elements_to_go; +- size_t current_offset; +-}; +- +-static ssize_t +-vchiq_ioc_copy_element_data( +- void *context, +- void *dest, +- size_t offset, +- size_t maxsize) +-{ +- long res; +- size_t bytes_this_round; +- struct vchiq_io_copy_callback_context *copy_context = +- (struct vchiq_io_copy_callback_context *)context; +- +- if (offset != copy_context->current_offset) +- return 0; +- +- if (!copy_context->elements_to_go) +- return 0; +- +- /* +- * Complex logic here to handle the case of 0 size elements +- * in the middle of the array of elements. +- * +- * Need to skip over these 0 size elements. +- */ +- while (1) { +- bytes_this_round = min(copy_context->current_element->size - +- copy_context->current_element_offset, +- maxsize); +- +- if (bytes_this_round) +- break; +- +- copy_context->elements_to_go--; +- copy_context->current_element++; +- copy_context->current_element_offset = 0; +- +- if (!copy_context->elements_to_go) +- return 0; +- } +- +- res = copy_from_user(dest, +- copy_context->current_element->data + +- copy_context->current_element_offset, +- bytes_this_round); +- +- if (res != 0) +- return -EFAULT; +- +- copy_context->current_element_offset += bytes_this_round; +- copy_context->current_offset += bytes_this_round; +- +- /* +- * Check if done with current element, and if so advance to the next. +- */ +- if (copy_context->current_element_offset == +- copy_context->current_element->size) { +- copy_context->elements_to_go--; +- copy_context->current_element++; +- copy_context->current_element_offset = 0; +- } +- +- return bytes_this_round; +-} +- +-/************************************************************************** +- * +- * vchiq_ioc_queue_message +- * +- **************************************************************************/ +-static VCHIQ_STATUS_T +-vchiq_ioc_queue_message(VCHIQ_SERVICE_HANDLE_T handle, +- VCHIQ_ELEMENT_T *elements, +- unsigned long count) +-{ +- struct vchiq_io_copy_callback_context context; +- unsigned long i; +- size_t total_size = 0; +- +- context.current_element = elements; +- context.current_element_offset = 0; +- context.elements_to_go = count; +- context.current_offset = 0; +- +- for (i = 0; i < count; i++) { +- if (!elements[i].data && elements[i].size != 0) +- return -EFAULT; +- +- total_size += elements[i].size; +- } +- +- return vchiq_queue_message(handle, vchiq_ioc_copy_element_data, +- &context, total_size); +-} +- + /**************************************************************************** + * + * vchiq_ioctl +@@ -752,7 +651,7 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + VCHIQ_ELEMENT_T elements[MAX_ELEMENTS]; + if (copy_from_user(elements, args.elements, + args.count * sizeof(VCHIQ_ELEMENT_T)) == 0) +- status = vchiq_ioc_queue_message ++ status = vchiq_queue_message + (args.handle, + elements, args.count); + else diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c -index 2c98da4307dff994a00dc246574ef0aaee05d5da..160db24aeea33a8296923501009c1f02bc41e599 100644 +index 028e90bc1cdcc3f305ce5b97b88dd5c6c4613a50..c5b06cc4ca53135ec9491116ca79beaa98f57bcc 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c -@@ -891,16 +891,14 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, - error_count); - return VCHIQ_ERROR; - } -- if (i == 0) { -- if (SRVTRACE_ENABLED(service, -- VCHIQ_LOG_INFO)) -- vchiq_log_dump_mem("Sent", 0, -- header->data + pos, -- min(64u, -- elements[0].size)); -- } - } +@@ -464,8 +464,8 @@ remote_event_pollall(VCHIQ_STATE_T *state) + ** enough for a header. This relies on header size being a power of two, which + ** has been verified earlier by a static assertion. */ + +-static inline size_t +-calc_stride(size_t size) ++static inline unsigned int ++calc_stride(unsigned int size) + { + /* Allow room for the header */ + size += sizeof(VCHIQ_HEADER_T); +@@ -544,7 +544,7 @@ request_poll(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, int poll_type) + /* Called from queue_message, by the slot handler and application threads, + ** with slot_mutex held */ + static VCHIQ_HEADER_T * +-reserve_space(VCHIQ_STATE_T *state, size_t space, int is_blocking) ++reserve_space(VCHIQ_STATE_T *state, int space, int is_blocking) + { + VCHIQ_SHARED_STATE_T *local = state->local; + int tx_pos = state->local_tx_pos; +@@ -726,66 +726,18 @@ process_free_queue(VCHIQ_STATE_T *state) + } + } + +-static ssize_t +-memcpy_copy_callback( +- void *context, void *dest, +- size_t offset, size_t maxsize) +-{ +- void *src = context; +- +- memcpy(dest + offset, src + offset, maxsize); +- return maxsize; +-} +- +-static ssize_t +-copy_message_data( +- ssize_t (*copy_callback)(void *context, void *dest, +- size_t offset, size_t maxsize), +- void *context, +- void *dest, +- size_t size) +-{ +- size_t pos = 0; +- +- while (pos < size) { +- ssize_t callback_result; +- size_t max_bytes = size - pos; +- +- callback_result = +- copy_callback(context, dest + pos, +- pos, max_bytes); +- +- if (callback_result < 0) +- return callback_result; +- +- if (!callback_result) +- return -EIO; +- +- if (callback_result > max_bytes) +- return -EIO; +- +- pos += callback_result; +- } +- +- return size; +-} +- + /* Called by the slot handler and application threads */ + static VCHIQ_STATUS_T + queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, +- int msgid, +- ssize_t (*copy_callback)(void *context, void *dest, +- size_t offset, size_t maxsize), +- void *context, +- size_t size, +- int flags) ++ int msgid, const VCHIQ_ELEMENT_T *elements, ++ int count, int size, int flags) + { + VCHIQ_SHARED_STATE_T *local; + VCHIQ_SERVICE_QUOTA_T *service_quota = NULL; + VCHIQ_HEADER_T *header; + int type = VCHIQ_MSG_TYPE(msgid); + +- size_t stride; ++ unsigned int stride; + + local = state->local; + +@@ -891,7 +843,7 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, + } + + if (type == VCHIQ_MSG_DATA) { +- ssize_t callback_result; ++ int i, pos; + int tx_end_index; + int slot_use_count; + +@@ -905,23 +857,27 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, + BUG_ON((flags & (QMFLAGS_NO_MUTEX_LOCK | + QMFLAGS_NO_MUTEX_UNLOCK)) != 0); + +- callback_result = +- copy_message_data(copy_callback, context, +- header->data, size); +- +- if (callback_result < 0) { +- mutex_unlock(&state->slot_mutex); +- VCHIQ_SERVICE_STATS_INC(service, ++ for (i = 0, pos = 0; i < (unsigned int)count; ++ pos += elements[i++].size) ++ if (elements[i].size) { ++ if (vchiq_copy_from_user ++ (header->data + pos, elements[i].data, ++ (size_t) elements[i].size) != ++ VCHIQ_SUCCESS) { ++ mutex_unlock(&state->slot_mutex); ++ VCHIQ_SERVICE_STATS_INC(service, + error_count); +- return VCHIQ_ERROR; +- } +- +- if (SRVTRACE_ENABLED(service, +- VCHIQ_LOG_INFO)) +- vchiq_log_dump_mem("Sent", 0, +- header->data, +- min((size_t)64, +- (size_t)callback_result)); ++ return VCHIQ_ERROR; ++ } ++ if (i == 0) { ++ if (SRVTRACE_ENABLED(service, ++ VCHIQ_LOG_INFO)) ++ vchiq_log_dump_mem("Sent", 0, ++ header->data + pos, ++ min(64u, ++ elements[0].size)); ++ } ++ } -+ if (SRVTRACE_ENABLED(service, -+ VCHIQ_LOG_INFO)) -+ vchiq_log_dump_mem("Sent", 0, -+ header->data, -+ min(16, pos)); -+ spin_lock("a_spinlock); service_quota->message_use_count++; +@@ -963,17 +919,9 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, + header, size, VCHIQ_MSG_SRCPORT(msgid), + VCHIQ_MSG_DSTPORT(msgid)); + if (size != 0) { +- /* It is assumed for now that this code path +- * only happens from calls inside this file. +- * +- * External callers are through the vchiq_queue_message +- * path which always sets the type to be VCHIQ_MSG_DATA +- * +- * At first glance this appears to be correct but +- * more review is needed. +- */ +- copy_message_data(copy_callback, context, +- header->data, size); ++ WARN_ON(!((count == 1) && (size == elements[0].size))); ++ memcpy(header->data, elements[0].data, ++ elements[0].size); + } + VCHIQ_STATS_INC(state, ctrl_tx_count); + } +@@ -1019,16 +967,11 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, + /* Called by the slot handler and application threads */ + static VCHIQ_STATUS_T + queue_message_sync(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, +- int msgid, +- ssize_t (*copy_callback)(void *context, void *dest, +- size_t offset, size_t maxsize), +- void *context, +- int size, +- int is_blocking) ++ int msgid, const VCHIQ_ELEMENT_T *elements, ++ int count, int size, int is_blocking) + { + VCHIQ_SHARED_STATE_T *local; + VCHIQ_HEADER_T *header; +- ssize_t callback_result; -@@ -1039,16 +1037,13 @@ queue_message_sync(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, - error_count); - return VCHIQ_ERROR; - } -- if (i == 0) { -- if (vchiq_sync_log_level >= -- VCHIQ_LOG_TRACE) -- vchiq_log_dump_mem("Sent Sync", -- 0, header->data + pos, -- min(64u, -- elements[0].size)); -- } - } + local = state->local; + +@@ -1051,34 +994,50 @@ queue_message_sync(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, + state->id, oldmsgid); + } + +- vchiq_log_info(vchiq_sync_log_level, +- "%d: qms %s@%pK,%x (%d->%d)", state->id, +- msg_type_str(VCHIQ_MSG_TYPE(msgid)), +- header, size, VCHIQ_MSG_SRCPORT(msgid), +- VCHIQ_MSG_DSTPORT(msgid)); +- +- callback_result = +- copy_message_data(copy_callback, context, +- header->data, size); ++ if (service) { ++ int i, pos; + +- if (callback_result < 0) { +- mutex_unlock(&state->slot_mutex); +- VCHIQ_SERVICE_STATS_INC(service, +- error_count); +- return VCHIQ_ERROR; +- } ++ vchiq_log_info(vchiq_sync_log_level, ++ "%d: qms %s@%pK,%x (%d->%d)", state->id, ++ msg_type_str(VCHIQ_MSG_TYPE(msgid)), ++ header, size, VCHIQ_MSG_SRCPORT(msgid), ++ VCHIQ_MSG_DSTPORT(msgid)); + +- if (service) { +- if (SRVTRACE_ENABLED(service, +- VCHIQ_LOG_INFO)) +- vchiq_log_dump_mem("Sent", 0, +- header->data, +- min((size_t)64, +- (size_t)callback_result)); ++ for (i = 0, pos = 0; i < (unsigned int)count; ++ pos += elements[i++].size) ++ if (elements[i].size) { ++ if (vchiq_copy_from_user ++ (header->data + pos, elements[i].data, ++ (size_t) elements[i].size) != ++ VCHIQ_SUCCESS) { ++ mutex_unlock(&state->sync_mutex); ++ VCHIQ_SERVICE_STATS_INC(service, ++ error_count); ++ return VCHIQ_ERROR; ++ } ++ if (i == 0) { ++ if (vchiq_sync_log_level >= ++ VCHIQ_LOG_TRACE) ++ vchiq_log_dump_mem("Sent Sync", ++ 0, header->data + pos, ++ min(64u, ++ elements[0].size)); ++ } ++ } -+ if (vchiq_sync_log_level >= VCHIQ_LOG_TRACE) -+ vchiq_log_dump_mem("Sent Sync", -+ 0, header->data, -+ min(16, pos)); -+ VCHIQ_SERVICE_STATS_INC(service, ctrl_tx_count); VCHIQ_SERVICE_STATS_ADD(service, ctrl_tx_bytes, size); } else { -@@ -1720,7 +1715,7 @@ parse_rx_slots(VCHIQ_STATE_T *state) - remoteport, localport, size); - if (size > 0) - vchiq_log_dump_mem("Rcvd", 0, header->data, -- min(64, size)); -+ min(16, size)); - } ++ vchiq_log_info(vchiq_sync_log_level, ++ "%d: qms %s@%pK,%x (%d->%d)", state->id, ++ msg_type_str(VCHIQ_MSG_TYPE(msgid)), ++ header, size, VCHIQ_MSG_SRCPORT(msgid), ++ VCHIQ_MSG_DSTPORT(msgid)); ++ if (size != 0) { ++ WARN_ON(!((count == 1) && (size == elements[0].size))); ++ memcpy(header->data, elements[0].data, ++ elements[0].size); ++ } + VCHIQ_STATS_INC(state, ctrl_tx_count); + } - if (((unsigned int)header & VCHIQ_SLOT_MASK) + calc_stride(size) -@@ -2187,7 +2182,7 @@ sync_func(void *v) - remoteport, localport, size); - if (size > 0) - vchiq_log_dump_mem("Rcvd", 0, header->data, -- min(64, size)); -+ min(16, size)); - } +@@ -1191,16 +1150,11 @@ notify_bulks(VCHIQ_SERVICE_T *service, VCHIQ_BULK_QUEUE_T *queue, + VCHIQ_MSG_BULK_RX_DONE : VCHIQ_MSG_BULK_TX_DONE; + int msgid = VCHIQ_MAKE_MSG(msgtype, service->localport, + service->remoteport); ++ VCHIQ_ELEMENT_T element = { &bulk->actual, 4 }; + /* Only reply to non-dummy bulk requests */ + if (bulk->remote_data) { +- status = queue_message( +- service->state, +- NULL, +- msgid, +- memcpy_copy_callback, +- &bulk->actual, +- 4, +- 0); ++ status = queue_message(service->state, NULL, ++ msgid, &element, 1, 4, 0); + if (status != VCHIQ_SUCCESS) + break; + } +@@ -1560,6 +1514,10 @@ parse_open(VCHIQ_STATE_T *state, VCHIQ_HEADER_T *header) + struct vchiq_openack_payload ack_payload = { + service->version + }; ++ VCHIQ_ELEMENT_T body = { ++ &ack_payload, ++ sizeof(ack_payload) ++ }; - switch (type) { + if (state->version_common < + VCHIQ_VERSION_SYNCHRONOUS_MODE) +@@ -1569,28 +1527,21 @@ parse_open(VCHIQ_STATE_T *state, VCHIQ_HEADER_T *header) + if (service->sync && + (state->version_common >= + VCHIQ_VERSION_SYNCHRONOUS_MODE)) { +- if (queue_message_sync( +- state, +- NULL, ++ if (queue_message_sync(state, NULL, + VCHIQ_MAKE_MSG( + VCHIQ_MSG_OPENACK, + service->localport, + remoteport), +- memcpy_copy_callback, +- &ack_payload, +- sizeof(ack_payload), ++ &body, 1, sizeof(ack_payload), + 0) == VCHIQ_RETRY) + goto bail_not_ready; + } else { +- if (queue_message(state, +- NULL, +- VCHIQ_MAKE_MSG( ++ if (queue_message(state, NULL, ++ VCHIQ_MAKE_MSG( + VCHIQ_MSG_OPENACK, + service->localport, + remoteport), +- memcpy_copy_callback, +- &ack_payload, +- sizeof(ack_payload), ++ &body, 1, sizeof(ack_payload), + 0) == VCHIQ_RETRY) + goto bail_not_ready; + } +@@ -2680,19 +2631,14 @@ vchiq_open_service_internal(VCHIQ_SERVICE_T *service, int client_id) + service->version, + service->version_min + }; ++ VCHIQ_ELEMENT_T body = { &payload, sizeof(payload) }; + VCHIQ_STATUS_T status = VCHIQ_SUCCESS; + + service->client_id = client_id; + vchiq_use_service_internal(service); +- status = queue_message(service->state, +- NULL, +- VCHIQ_MAKE_MSG(VCHIQ_MSG_OPEN, +- service->localport, +- 0), +- memcpy_copy_callback, +- &payload, +- sizeof(payload), +- QMFLAGS_IS_BLOCKING); ++ status = queue_message(service->state, NULL, ++ VCHIQ_MAKE_MSG(VCHIQ_MSG_OPEN, service->localport, 0), ++ &body, 1, sizeof(payload), QMFLAGS_IS_BLOCKING); + if (status == VCHIQ_SUCCESS) { + /* Wait for the ACK/NAK */ + if (down_interruptible(&service->remove_event) != 0) { +@@ -3360,18 +3306,15 @@ vchiq_bulk_transfer(VCHIQ_SERVICE_HANDLE_T handle, + VCHIQ_POLL_TXNOTIFY : VCHIQ_POLL_RXNOTIFY); + } else { + int payload[2] = { (int)(long)bulk->data, bulk->size }; ++ VCHIQ_ELEMENT_T element = { payload, sizeof(payload) }; + +- status = queue_message(state, +- NULL, +- VCHIQ_MAKE_MSG(dir_msgtype, +- service->localport, +- service->remoteport), +- memcpy_copy_callback, +- &payload, +- sizeof(payload), +- QMFLAGS_IS_BLOCKING | +- QMFLAGS_NO_MUTEX_LOCK | +- QMFLAGS_NO_MUTEX_UNLOCK); ++ status = queue_message(state, NULL, ++ VCHIQ_MAKE_MSG(dir_msgtype, ++ service->localport, service->remoteport), ++ &element, 1, sizeof(payload), ++ QMFLAGS_IS_BLOCKING | ++ QMFLAGS_NO_MUTEX_LOCK | ++ QMFLAGS_NO_MUTEX_UNLOCK); + if (status != VCHIQ_SUCCESS) { + goto unlock_both_error_exit; + } +@@ -3417,22 +3360,26 @@ vchiq_bulk_transfer(VCHIQ_SERVICE_HANDLE_T handle, + + VCHIQ_STATUS_T + vchiq_queue_message(VCHIQ_SERVICE_HANDLE_T handle, +- ssize_t (*copy_callback)(void *context, void *dest, +- size_t offset, size_t maxsize), +- void *context, +- size_t size) ++ const VCHIQ_ELEMENT_T *elements, unsigned int count) + { + VCHIQ_SERVICE_T *service = find_service_by_handle(handle); + VCHIQ_STATUS_T status = VCHIQ_ERROR; + ++ unsigned int size = 0; ++ unsigned int i; ++ + if (!service || + (vchiq_check_service(service) != VCHIQ_SUCCESS)) + goto error_exit; + +- if (!size) { +- VCHIQ_SERVICE_STATS_INC(service, error_count); +- goto error_exit; +- ++ for (i = 0; i < (unsigned int)count; i++) { ++ if (elements[i].size) { ++ if (elements[i].data == NULL) { ++ VCHIQ_SERVICE_STATS_INC(service, error_count); ++ goto error_exit; ++ } ++ size += elements[i].size; ++ } + } + + if (size > VCHIQ_MAX_MSG_SIZE) { +@@ -3446,14 +3393,14 @@ vchiq_queue_message(VCHIQ_SERVICE_HANDLE_T handle, + VCHIQ_MAKE_MSG(VCHIQ_MSG_DATA, + service->localport, + service->remoteport), +- copy_callback, context, size, 1); ++ elements, count, size, 1); + break; + case VCHIQ_SRVSTATE_OPENSYNC: + status = queue_message_sync(service->state, service, + VCHIQ_MAKE_MSG(VCHIQ_MSG_DATA, + service->localport, + service->remoteport), +- copy_callback, context, size, 1); ++ elements, count, size, 1); + break; + default: + status = VCHIQ_ERROR; +diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +index 9e164652548a42bac2646166e16961b88bc80594..1c2b1b5b8cc998f6f0490dc6460d8408e85f624b 100644 +--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h ++++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +@@ -634,6 +634,9 @@ vchiq_transfer_bulk(VCHIQ_BULK_T *bulk); + extern void + vchiq_complete_bulk(VCHIQ_BULK_T *bulk); + ++extern VCHIQ_STATUS_T ++vchiq_copy_from_user(void *dst, const void *src, int size); ++ + extern void + remote_event_signal(REMOTE_EVENT_T *event); + +diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h +index 377e8e48bb540465b34f2d4697504cb188d83e3b..8067bbe7ce8d70c41b2e6e0466d20a4612e39d93 100644 +--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h ++++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h +@@ -141,12 +141,9 @@ extern VCHIQ_STATUS_T vchiq_use_service(VCHIQ_SERVICE_HANDLE_T service); + extern VCHIQ_STATUS_T vchiq_use_service_no_resume( + VCHIQ_SERVICE_HANDLE_T service); + extern VCHIQ_STATUS_T vchiq_release_service(VCHIQ_SERVICE_HANDLE_T service); +-extern VCHIQ_STATUS_T +-vchiq_queue_message(VCHIQ_SERVICE_HANDLE_T handle, +- ssize_t (*copy_callback)(void *context, void *dest, +- size_t offset, size_t maxsize), +- void *context, +- size_t size); ++ ++extern VCHIQ_STATUS_T vchiq_queue_message(VCHIQ_SERVICE_HANDLE_T service, ++ const VCHIQ_ELEMENT_T *elements, unsigned int count); + extern void vchiq_release_message(VCHIQ_SERVICE_HANDLE_T service, + VCHIQ_HEADER_T *header); + extern VCHIQ_STATUS_T vchiq_queue_bulk_transmit(VCHIQ_SERVICE_HANDLE_T service, +diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +index d9771394a041bbb55daacd7744ac57758ae198d1..7694627b925c743552b093ce51d15c2f2fe71a69 100644 +--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c ++++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +@@ -148,10 +148,10 @@ EXPORT_SYMBOL(vchi_msg_remove); + * Name: vchi_msg_queue + * + * Arguments: VCHI_SERVICE_HANDLE_T handle, +- * ssize_t (*copy_callback)(void *context, void *dest, +- * size_t offset, size_t maxsize), +- * void *context, +- * uint32_t data_size ++ * const void *data, ++ * uint32_t data_size, ++ * VCHI_FLAGS_T flags, ++ * void *msg_handle, + * + * Description: Thin wrapper to queue a message onto a connection + * +@@ -159,19 +159,21 @@ EXPORT_SYMBOL(vchi_msg_remove); + * + ***********************************************************/ + int32_t vchi_msg_queue(VCHI_SERVICE_HANDLE_T handle, +- ssize_t (*copy_callback)(void *context, void *dest, +- size_t offset, size_t maxsize), +- void *context, +- uint32_t data_size) ++ const void *data, ++ uint32_t data_size, ++ VCHI_FLAGS_T flags, ++ void *msg_handle) + { + SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle; ++ VCHIQ_ELEMENT_T element = {data, data_size}; + VCHIQ_STATUS_T status; + ++ (void)msg_handle; ++ ++ WARN_ON(flags != VCHI_FLAGS_BLOCK_UNTIL_QUEUED); ++ + while (1) { +- status = vchiq_queue_message(service->handle, +- copy_callback, +- context, +- data_size); ++ status = vchiq_queue_message(service->handle, &element, 1); + + /* + * vchiq_queue_message() may return VCHIQ_RETRY, so we need to +@@ -354,6 +356,44 @@ int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle, + EXPORT_SYMBOL(vchi_msg_dequeue); + + /*********************************************************** ++ * Name: vchi_msg_queuev ++ * ++ * Arguments: VCHI_SERVICE_HANDLE_T handle, ++ * VCHI_MSG_VECTOR_T *vector, ++ * uint32_t count, ++ * VCHI_FLAGS_T flags, ++ * void *msg_handle ++ * ++ * Description: Thin wrapper to queue a message onto a connection ++ * ++ * Returns: int32_t - success == 0 ++ * ++ ***********************************************************/ ++ ++vchiq_static_assert(sizeof(VCHI_MSG_VECTOR_T) == sizeof(VCHIQ_ELEMENT_T)); ++vchiq_static_assert(offsetof(VCHI_MSG_VECTOR_T, vec_base) == ++ offsetof(VCHIQ_ELEMENT_T, data)); ++vchiq_static_assert(offsetof(VCHI_MSG_VECTOR_T, vec_len) == ++ offsetof(VCHIQ_ELEMENT_T, size)); ++ ++int32_t vchi_msg_queuev(VCHI_SERVICE_HANDLE_T handle, ++ VCHI_MSG_VECTOR_T *vector, ++ uint32_t count, ++ VCHI_FLAGS_T flags, ++ void *msg_handle) ++{ ++ SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle; ++ ++ (void)msg_handle; ++ ++ WARN_ON(flags != VCHI_FLAGS_BLOCK_UNTIL_QUEUED); ++ ++ return vchiq_status_to_vchi(vchiq_queue_message(service->handle, ++ (const VCHIQ_ELEMENT_T *)vector, count)); ++} ++EXPORT_SYMBOL(vchi_msg_queuev); ++ ++/*********************************************************** + * Name: vchi_held_msg_release + * + * Arguments: VCHI_HELD_MSG_T *message -From 4b7dca18f033bfd528ad5b56f6644eb9f096ea16 Mon Sep 17 00:00:00 2001 +From 37b3ac436056e51053ef5d0348ef93dc71e3be98 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 23 Mar 2016 14:16:25 +0000 -Subject: [PATCH 094/149] vchiq_arm: Access the dequeue_pending flag locked +Subject: [PATCH 091/143] vchiq_arm: Access the dequeue_pending flag locked Reading through this code looking for another problem (now found in userland) the use of dequeue_pending outside a lock didn't seem safe. @@ -122998,7 +122900,7 @@ Signed-off-by: Phil Elwell 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -index 7b6cd4d80621e38ff6d47fcd87b45fbe9cd4259b..d8669fa7f39b077877eca1829ba9538bf2e21a82 100644 +index 42998155eb4d7de8e49cc1ca82d84a430562a8da..74f1569097c7dd120cc68fb8d09d8c3d63d56977 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -279,6 +279,7 @@ service_callback(VCHIQ_REASON_T reason, VCHIQ_HEADER_T *header, @@ -123045,10 +122947,10 @@ index 7b6cd4d80621e38ff6d47fcd87b45fbe9cd4259b..d8669fa7f39b077877eca1829ba9538b return add_completion(instance, reason, header, user_service, -From f3ecbd88451f827d805429e022a3a3335b937092 Mon Sep 17 00:00:00 2001 +From 23dc62ffb692ae7e3a5be4bba257e51a87ac56c4 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 23 Mar 2016 20:53:47 +0000 -Subject: [PATCH 095/149] vchiq_arm: Service callbacks must not fail +Subject: [PATCH 092/143] vchiq_arm: Service callbacks must not fail Service callbacks are not allowed to return an error. The internal callback that delivers events and messages to user tasks does not enqueue them if @@ -123061,7 +122963,7 @@ Signed-off-by: Phil Elwell 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -index d8669fa7f39b077877eca1829ba9538bf2e21a82..54552c6ce54f413c9781ba279b936f98be4f47b0 100644 +index 74f1569097c7dd120cc68fb8d09d8c3d63d56977..3ba6485f0c7b32de9f2aa75164e8b1b901aa74ea 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -224,7 +224,7 @@ add_completion(VCHIQ_INSTANCE_T instance, VCHIQ_REASON_T reason, @@ -123074,10 +122976,10 @@ index d8669fa7f39b077877eca1829ba9538bf2e21a82..54552c6ce54f413c9781ba279b936f98 DEBUG_TRACE(SERVICE_CALLBACK_LINE); } -From e912e19aaf80dd0cb7cfe08665c9615da06b8c83 Mon Sep 17 00:00:00 2001 +From ce301053ff5dc3f25a290a8378927b355793c888 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 21 Apr 2016 13:49:32 +0100 -Subject: [PATCH 096/149] vchiq_arm: Add completion records under the mutex +Subject: [PATCH 093/143] vchiq_arm: Add completion records under the mutex An issue was observed when flushing openmax components which generate a large number of messages returning @@ -123096,7 +122998,7 @@ Signed-off-by: Phil Elwell 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -index 54552c6ce54f413c9781ba279b936f98be4f47b0..bde8955b7d8505d73579b77b5b3921549cb9d2fb 100644 +index 3ba6485f0c7b32de9f2aa75164e8b1b901aa74ea..07d8eadd2aa2dc997db13c80dc303673792b96c9 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -210,6 +210,8 @@ add_completion(VCHIQ_INSTANCE_T instance, VCHIQ_REASON_T reason, @@ -123140,10 +123042,10 @@ index 54552c6ce54f413c9781ba279b936f98be4f47b0..bde8955b7d8505d73579b77b5b392154 return VCHIQ_SUCCESS; -From 6740c95795e57bc48776ce72c7cfbd0ed5d63adb Mon Sep 17 00:00:00 2001 +From c1fe6df4ea43f0b9545a6050b72b7d1fe5e84a99 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 20 Jun 2016 13:51:44 +0100 -Subject: [PATCH 097/149] vchiq_arm: Avoid use of mutex in add_completion +Subject: [PATCH 094/143] vchiq_arm: Avoid use of mutex in add_completion Claiming the completion_mutex within add_completion did prevent some messages appearing twice, but provokes a deadlock caused by vcsm using @@ -123159,7 +123061,7 @@ Signed-off-by: Phil Elwell 2 files changed, 37 insertions(+), 32 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -index bde8955b7d8505d73579b77b5b3921549cb9d2fb..e5cdda12c7e5c35c69eb96991cfdb8326def167f 100644 +index 07d8eadd2aa2dc997db13c80dc303673792b96c9..a593c9df8128292525f6f1b89a351e1ded02977f 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -64,10 +64,10 @@ @@ -123280,7 +123182,7 @@ index bde8955b7d8505d73579b77b5b3921549cb9d2fb..e5cdda12c7e5c35c69eb96991cfdb832 service = completion->service_userdata; user_service = service->base.userdata; -@@ -903,7 +900,11 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) +@@ -901,7 +898,11 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) break; } @@ -123294,10 +123196,10 @@ index bde8955b7d8505d73579b77b5b3921549cb9d2fb..e5cdda12c7e5c35c69eb96991cfdb832 if (msgbufcount != args.msgbufcount) { diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c -index 160db24aeea33a8296923501009c1f02bc41e599..71a3bedc55314f3b22dbff40c05dedf03b5e7169 100644 +index c5b06cc4ca53135ec9491116ca79beaa98f57bcc..d6757ee263fb61a689c0d38c0dbb65c57a8e39bb 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c -@@ -610,15 +610,15 @@ process_free_queue(VCHIQ_STATE_T *state) +@@ -607,15 +607,15 @@ process_free_queue(VCHIQ_STATE_T *state) BITSET_T service_found[BITSET_SIZE(VCHIQ_MAX_SERVICES)]; int slot_queue_available; @@ -123318,16 +123220,16 @@ index 160db24aeea33a8296923501009c1f02bc41e599..71a3bedc55314f3b22dbff40c05dedf0 while (slot_queue_available != local->slot_queue_recycle) { unsigned int pos; int slot_index = local->slot_queue[slot_queue_available++ & -@@ -626,6 +626,8 @@ process_free_queue(VCHIQ_STATE_T *state) +@@ -623,6 +623,8 @@ process_free_queue(VCHIQ_STATE_T *state) char *data = (char *)SLOT_DATA_FROM_INDEX(state, slot_index); int data_found = 0; + rmb(); + - vchiq_log_trace(vchiq_core_log_level, "%d: pfq %d=%x %x %x", - state->id, slot_index, (unsigned int)data, + vchiq_log_trace(vchiq_core_log_level, "%d: pfq %d=%pK %x %x", + state->id, slot_index, data, local->slot_queue_recycle, slot_queue_available); -@@ -741,6 +743,8 @@ process_free_queue(VCHIQ_STATE_T *state) +@@ -721,6 +723,8 @@ process_free_queue(VCHIQ_STATE_T *state) up(&state->data_quota_event); } @@ -123337,170 +123239,10 @@ index 160db24aeea33a8296923501009c1f02bc41e599..71a3bedc55314f3b22dbff40c05dedf0 up(&state->slot_available_event); } -From 0b341ea57b440cbb2c775febb033d373239ffc44 Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Mon, 3 Oct 2016 10:14:10 -0700 -Subject: [PATCH 098/149] staging/vchi: Convert to current get_user_pages() - arguments. - -Signed-off-by: Eric Anholt ---- - drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 +- - drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 +-- - 2 files changed, 2 insertions(+), 3 deletions(-) - -diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -index 1091b9f1dd070e3d27c269402b43b0a09d96bcdc..8c7f31f8d39537e7e1c8135271c5f8eea76ed7a0 100644 ---- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -@@ -420,7 +420,7 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, - *need_release = 0; /* do not try and release vmalloc pages */ - } else { - down_read(&task->mm->mmap_sem); -- actual_pages = get_user_pages(task, task->mm, -+ actual_pages = get_user_pages( - (unsigned long)buf & ~(PAGE_SIZE - 1), - num_pages, - (type == PAGELIST_READ) ? FOLL_WRITE : 0, -diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -index e5cdda12c7e5c35c69eb96991cfdb8326def167f..085d37588c59198b4e5f00b9249bb8421695854f 100644 ---- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -@@ -1492,8 +1492,7 @@ dump_phys_mem(void *virt_addr, uint32_t num_bytes) - } - - down_read(¤t->mm->mmap_sem); -- rc = get_user_pages(current, /* task */ -- current->mm, /* mm */ -+ rc = get_user_pages( - (unsigned long)virt_addr, /* start */ - num_pages, /* len */ - 0, /* gup_flags */ - -From 7c3d6c332808b465aa7f14c1939cca686d4807f5 Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Mon, 3 Oct 2016 10:16:03 -0700 -Subject: [PATCH 099/149] staging/vchi: Update for rename of - page_cache_release() to put_page(). - -Signed-off-by: Eric Anholt ---- - drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 4 ++-- - drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -index 8c7f31f8d39537e7e1c8135271c5f8eea76ed7a0..862fabf5682c7dededc8d7ca6773d5b227b72f3c 100644 ---- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -@@ -438,7 +438,7 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, - while (actual_pages > 0) - { - actual_pages--; -- page_cache_release(pages[actual_pages]); -+ put_page(pages[actual_pages]); - } - kfree(pagelist); - if (actual_pages == 0) -@@ -577,7 +577,7 @@ free_pagelist(PAGELIST_T *pagelist, int actual) - offset = 0; - set_page_dirty(pg); - } -- page_cache_release(pg); -+ put_page(pg); - } - } - -diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -index 085d37588c59198b4e5f00b9249bb8421695854f..5a2b8fb459ebe086ec229f37b6381bdbe6f808ca 100644 ---- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -@@ -1530,7 +1530,7 @@ dump_phys_mem(void *virt_addr, uint32_t num_bytes) - kunmap(page); - - for (page_idx = 0; page_idx < num_pages; page_idx++) -- page_cache_release(pages[page_idx]); -+ put_page(pages[page_idx]); - - kfree(pages); - } - -From 5705d6db4c0b4a3d1bf93ccaa2367d9879076558 Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Mon, 3 Oct 2016 10:21:17 -0700 -Subject: [PATCH 100/149] drivers/vchi: Remove dependency on CONFIG_BROKEN. - -The driver builds now. - -Signed-off-by: Eric Anholt ---- - drivers/staging/vc04_services/Kconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/staging/vc04_services/Kconfig b/drivers/staging/vc04_services/Kconfig -index 9676fb29075a457109e4d4235f086987aec74868..db8e1beb89f9f8c48ea5964016c8285ea82497d8 100644 ---- a/drivers/staging/vc04_services/Kconfig -+++ b/drivers/staging/vc04_services/Kconfig -@@ -1,6 +1,6 @@ - config BCM2708_VCHIQ - tristate "Videocore VCHIQ" -- depends on RASPBERRYPI_FIRMWARE && BROKEN -+ depends on RASPBERRYPI_FIRMWARE - default y - help - Kernel to VideoCore communication interface for the - -From 37f4b167c320fffb3c04e706978a398d7ccd1c90 Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Wed, 14 Sep 2016 09:16:19 +0100 -Subject: [PATCH 101/149] raspberrypi-firmware: Export the general transaction - function. - -The vc4-firmware-kms module is going to be doing the MBOX FB call. - -Signed-off-by: Eric Anholt ---- - drivers/firmware/raspberrypi.c | 3 ++- - include/soc/bcm2835/raspberrypi-firmware.h | 1 + - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c -index 3f070bd38a91511c986e3fb114b15bd4ac32634c..f261b64d1657c02290904d841e1f087c34e27ded 100644 ---- a/drivers/firmware/raspberrypi.c -+++ b/drivers/firmware/raspberrypi.c -@@ -42,7 +42,7 @@ static void response_callback(struct mbox_client *cl, void *msg) - * Sends a request to the firmware through the BCM2835 mailbox driver, - * and synchronously waits for the reply. - */ --static int -+int - rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data) - { - u32 message = MBOX_MSG(chan, data); -@@ -63,6 +63,7 @@ rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data) - - return ret; - } -+EXPORT_SYMBOL_GPL(rpi_firmware_transaction); - - /** - * rpi_firmware_property_list - Submit firmware property list -diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index e92278968b2b979db2a1f855f70e7aafb224fa98..09e3d871d110eb0762ebdb5ea329353738d58661 100644 ---- a/include/soc/bcm2835/raspberrypi-firmware.h -+++ b/include/soc/bcm2835/raspberrypi-firmware.h -@@ -131,5 +131,6 @@ int rpi_firmware_property(struct rpi_firmware *fw, - int rpi_firmware_property_list(struct rpi_firmware *fw, - void *data, size_t tag_size); - struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node); -+int rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data); - - #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ - -From 2443457bd6b2f30686d747b9179f7d9bc360bc53 Mon Sep 17 00:00:00 2001 +From 8c1a98f073a1510731dd6fec6e94ddeee3ed44fa Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:18:09 +0100 -Subject: [PATCH 102/149] raspberrypi-firmware: Define the MBOX channel in the +Subject: [PATCH 095/143] raspberrypi-firmware: Define the MBOX channel in the header. Signed-off-by: Eric Anholt @@ -123509,7 +123251,7 @@ Signed-off-by: Eric Anholt 1 file changed, 2 insertions(+) diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index 09e3d871d110eb0762ebdb5ea329353738d58661..2859db09e25bb945251e85edb39bc43430857168 100644 +index 5f34e1257117fb48013c9926a8a223d64a598ab7..7f0da0727422c690947e46e891a754de13dc1fea 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -12,6 +12,8 @@ @@ -123522,10 +123264,10 @@ index 09e3d871d110eb0762ebdb5ea329353738d58661..2859db09e25bb945251e85edb39bc434 enum rpi_firmware_property_status { -From f8e5187126bf6e49f89d53373a5b40726a16b46b Mon Sep 17 00:00:00 2001 +From 7d3bc19bbd84fefcdd27577dd37fc46fd8e94495 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 08:39:33 +0100 -Subject: [PATCH 103/149] drm/vc4: Add a mode for using the closed firmware for +Subject: [PATCH 096/143] drm/vc4: Add a mode for using the closed firmware for display. Signed-off-by: Eric Anholt @@ -123539,7 +123281,7 @@ Signed-off-by: Eric Anholt create mode 100644 drivers/gpu/drm/vc4/vc4_firmware_kms.c diff --git a/drivers/gpu/drm/vc4/Makefile b/drivers/gpu/drm/vc4/Makefile -index fb77db755e0a29d8589860da82186c7a1f394c72..c6dd06cca9830018c39b3b16afe4045e44d1ddf4 100644 +index 7757f69a8a77b355677314dbb1380c4803b5e104..3358ec8775cf6e8738ea8cdb2246dad57bd29139 100644 --- a/drivers/gpu/drm/vc4/Makefile +++ b/drivers/gpu/drm/vc4/Makefile @@ -8,6 +8,7 @@ vc4-y := \ @@ -123551,10 +123293,10 @@ index fb77db755e0a29d8589860da82186c7a1f394c72..c6dd06cca9830018c39b3b16afe4045e vc4_gem.o \ vc4_hdmi.o \ diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c -index d544ff9b0d4609aae945960bf82e8aeee6bc94a8..13212788eef0e4b77c1e92e6bf3a56c817c50322 100644 +index 7aadce1f7e7a0e56b302bded53ad8c0d5977cc22..bdf32c572fc2c46932daca934dfb002d05493883 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c -@@ -163,6 +163,9 @@ int vc4_crtc_get_scanoutpos(struct drm_device *dev, unsigned int crtc_id, +@@ -162,6 +162,9 @@ int vc4_crtc_get_scanoutpos(struct drm_device *dev, unsigned int crtc_id, int vblank_lines; int ret = 0; @@ -123564,7 +123306,7 @@ index d544ff9b0d4609aae945960bf82e8aeee6bc94a8..13212788eef0e4b77c1e92e6bf3a56c8 /* preempt_disable_rt() should go right here in PREEMPT_RT patchset. */ /* Get optional system timestamp before query. */ -@@ -656,6 +659,11 @@ int vc4_enable_vblank(struct drm_device *dev, unsigned int crtc_id) +@@ -655,6 +658,11 @@ int vc4_enable_vblank(struct drm_device *dev, unsigned int crtc_id) struct vc4_dev *vc4 = to_vc4_dev(dev); struct vc4_crtc *vc4_crtc = vc4->crtc[crtc_id]; @@ -123576,7 +123318,7 @@ index d544ff9b0d4609aae945960bf82e8aeee6bc94a8..13212788eef0e4b77c1e92e6bf3a56c8 CRTC_WRITE(PV_INTEN, PV_INT_VFP_START); return 0; -@@ -666,6 +674,11 @@ void vc4_disable_vblank(struct drm_device *dev, unsigned int crtc_id) +@@ -665,6 +673,11 @@ void vc4_disable_vblank(struct drm_device *dev, unsigned int crtc_id) struct vc4_dev *vc4 = to_vc4_dev(dev); struct vc4_crtc *vc4_crtc = vc4->crtc[crtc_id]; @@ -123589,10 +123331,10 @@ index d544ff9b0d4609aae945960bf82e8aeee6bc94a8..13212788eef0e4b77c1e92e6bf3a56c8 } diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index 8703f56b794774ac4130a7b487472e293ebe7cdf..6c4a4fbc86d0a30a6977b2081bca4372e693b817 100644 +index ac09ca7ff4308874c3772f2aad9c9c11190f3706..44cd22340d82dbd5d094806e777121951f25010a 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c -@@ -292,6 +292,7 @@ static struct platform_driver *const component_drivers[] = { +@@ -298,6 +298,7 @@ static struct platform_driver *const component_drivers[] = { &vc4_dpi_driver, &vc4_hvs_driver, &vc4_crtc_driver, @@ -123601,7 +123343,7 @@ index 8703f56b794774ac4130a7b487472e293ebe7cdf..6c4a4fbc86d0a30a6977b2081bca4372 }; diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index 7c1e4d97486fb57d9ce7002c30a23138519761ae..e1f6ab747f36dd412e00a1e7ea772f13c2fc32d5 100644 +index b5c4bb14d0d1b87a6bbb5b25fd93d156705e851d..61a9b3e81823a3c96f36f710329844cc032e2628 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -12,6 +12,9 @@ @@ -123614,7 +123356,7 @@ index 7c1e4d97486fb57d9ce7002c30a23138519761ae..e1f6ab747f36dd412e00a1e7ea772f13 struct vc4_hdmi *hdmi; struct vc4_hvs *hvs; struct vc4_crtc *crtc[3]; -@@ -460,6 +463,10 @@ void __iomem *vc4_ioremap_regs(struct platform_device *dev, int index); +@@ -465,6 +468,10 @@ void __iomem *vc4_ioremap_regs(struct platform_device *dev, int index); extern struct platform_driver vc4_dpi_driver; int vc4_dpi_debugfs_regs(struct seq_file *m, void *unused); @@ -124292,657 +124034,10 @@ index 0000000000000000000000000000000000000000..d18a1dae51a2275846c9826b5bf1ba57 + }, +}; -From 19d1bc897390eb34314a561e84cd12255a5e75bf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= -Date: Sat, 17 Sep 2016 15:07:10 +0200 -Subject: [PATCH 104/149] i2c: bcm2835: Fix hang for writing messages larger - than 16 bytes -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Writing messages larger than the FIFO size results in a hang, rendering -the machine unusable. This is because the RXD status flag is set on the -first interrupt which results in bcm2835_drain_rxfifo() stealing bytes -from the buffer. The controller continues to trigger interrupts waiting -for the missing bytes, but bcm2835_fill_txfifo() has none to give. -In this situation wait_for_completion_timeout() apparently is unable to -stop the madness. - -The BCM2835 ARM Peripherals datasheet has this to say about the flags: - TXD: is set when the FIFO has space for at least one byte of data. - RXD: is set when the FIFO contains at least one byte of data. - TXW: is set during a write transfer and the FIFO is less than full. - RXR: is set during a read transfer and the FIFO is or more full. - -Implementing the logic from the downstream i2c-bcm2708 driver solved -the hang problem. - -Signed-off-by: Noralf Trønnes -Reviewed-by: Eric Anholt -Reviewed-by: Martin Sperl ---- - drivers/i2c/busses/i2c-bcm2835.c | 22 ++++++++++++++-------- - 1 file changed, 14 insertions(+), 8 deletions(-) - -diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c -index d4f3239b56865919e1b781b20a7c5ebcd76b4eb9..f283b714aa79e2e4685ed95b04b6b289f7e9eee7 100644 ---- a/drivers/i2c/busses/i2c-bcm2835.c -+++ b/drivers/i2c/busses/i2c-bcm2835.c -@@ -64,6 +64,7 @@ struct bcm2835_i2c_dev { - int irq; - struct i2c_adapter adapter; - struct completion completion; -+ struct i2c_msg *curr_msg; - u32 msg_err; - u8 *msg_buf; - size_t msg_buf_remaining; -@@ -126,14 +127,13 @@ static irqreturn_t bcm2835_i2c_isr(int this_irq, void *data) - return IRQ_HANDLED; - } - -- if (val & BCM2835_I2C_S_RXD) { -- bcm2835_drain_rxfifo(i2c_dev); -- if (!(val & BCM2835_I2C_S_DONE)) -- return IRQ_HANDLED; -- } -- - if (val & BCM2835_I2C_S_DONE) { -- if (i2c_dev->msg_buf_remaining) -+ if (i2c_dev->curr_msg->flags & I2C_M_RD) { -+ bcm2835_drain_rxfifo(i2c_dev); -+ val = bcm2835_i2c_readl(i2c_dev, BCM2835_I2C_S); -+ } -+ -+ if ((val & BCM2835_I2C_S_RXD) || i2c_dev->msg_buf_remaining) - i2c_dev->msg_err = BCM2835_I2C_S_LEN; - else - i2c_dev->msg_err = 0; -@@ -141,11 +141,16 @@ static irqreturn_t bcm2835_i2c_isr(int this_irq, void *data) - return IRQ_HANDLED; - } - -- if (val & BCM2835_I2C_S_TXD) { -+ if (val & BCM2835_I2C_S_TXW) { - bcm2835_fill_txfifo(i2c_dev); - return IRQ_HANDLED; - } - -+ if (val & BCM2835_I2C_S_RXR) { -+ bcm2835_drain_rxfifo(i2c_dev); -+ return IRQ_HANDLED; -+ } -+ - return IRQ_NONE; - } - -@@ -155,6 +160,7 @@ static int bcm2835_i2c_xfer_msg(struct bcm2835_i2c_dev *i2c_dev, - u32 c; - unsigned long time_left; - -+ i2c_dev->curr_msg = msg; - i2c_dev->msg_buf = msg->buf; - i2c_dev->msg_buf_remaining = msg->len; - reinit_completion(&i2c_dev->completion); - -From 5095937527a0fc7f55aefcc02963fdc012cdcb59 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= -Date: Fri, 23 Sep 2016 18:24:38 +0200 -Subject: [PATCH 105/149] i2c: bcm2835: Protect against unexpected TXW/RXR - interrupts -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -If an unexpected TXW or RXR interrupt occurs (msg_buf_remaining == 0), -the driver has no way to fill/drain the FIFO to stop the interrupts. -In this case the controller has to be disabled and the transfer -completed to avoid hang. - -(CLKT | ERR) and DONE interrupts are completed in their own paths, and -the controller is disabled in the transfer function after completion. -Unite the code paths and do disabling inside the interrupt routine. - -Clear interrupt status bits in the united completion path instead of -trying to do it on every interrupt which isn't necessary. -Only CLKT, ERR and DONE can be cleared that way. - -Add the status value to the error value in case of TXW/RXR errors to -distinguish them from the other S_LEN error. - -Signed-off-by: Noralf Trønnes -Reviewed-by: Eric Anholt ---- - drivers/i2c/busses/i2c-bcm2835.c | 40 +++++++++++++++++++++++++++++++--------- - 1 file changed, 31 insertions(+), 9 deletions(-) - -diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c -index f283b714aa79e2e4685ed95b04b6b289f7e9eee7..d2ba1a4de36af512e8e3c97251bd3537ae61591a 100644 ---- a/drivers/i2c/busses/i2c-bcm2835.c -+++ b/drivers/i2c/busses/i2c-bcm2835.c -@@ -50,8 +50,6 @@ - #define BCM2835_I2C_S_CLKT BIT(9) - #define BCM2835_I2C_S_LEN BIT(10) /* Fake bit for SW error reporting */ - --#define BCM2835_I2C_BITMSK_S 0x03FF -- - #define BCM2835_I2C_CDIV_MIN 0x0002 - #define BCM2835_I2C_CDIV_MAX 0xFFFE - -@@ -111,20 +109,26 @@ static void bcm2835_drain_rxfifo(struct bcm2835_i2c_dev *i2c_dev) - } - } - -+/* -+ * Note about I2C_C_CLEAR on error: -+ * The I2C_C_CLEAR on errors will take some time to resolve -- if you were in -+ * non-idle state and I2C_C_READ, it sets an abort_rx flag and runs through -+ * the state machine to send a NACK and a STOP. Since we're setting CLEAR -+ * without I2CEN, that NACK will be hanging around queued up for next time -+ * we start the engine. -+ */ -+ - static irqreturn_t bcm2835_i2c_isr(int this_irq, void *data) - { - struct bcm2835_i2c_dev *i2c_dev = data; - u32 val, err; - - val = bcm2835_i2c_readl(i2c_dev, BCM2835_I2C_S); -- val &= BCM2835_I2C_BITMSK_S; -- bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_S, val); - - err = val & (BCM2835_I2C_S_CLKT | BCM2835_I2C_S_ERR); - if (err) { - i2c_dev->msg_err = err; -- complete(&i2c_dev->completion); -- return IRQ_HANDLED; -+ goto complete; - } - - if (val & BCM2835_I2C_S_DONE) { -@@ -137,21 +141,38 @@ static irqreturn_t bcm2835_i2c_isr(int this_irq, void *data) - i2c_dev->msg_err = BCM2835_I2C_S_LEN; - else - i2c_dev->msg_err = 0; -- complete(&i2c_dev->completion); -- return IRQ_HANDLED; -+ goto complete; - } - - if (val & BCM2835_I2C_S_TXW) { -+ if (!i2c_dev->msg_buf_remaining) { -+ i2c_dev->msg_err = val | BCM2835_I2C_S_LEN; -+ goto complete; -+ } -+ - bcm2835_fill_txfifo(i2c_dev); - return IRQ_HANDLED; - } - - if (val & BCM2835_I2C_S_RXR) { -+ if (!i2c_dev->msg_buf_remaining) { -+ i2c_dev->msg_err = val | BCM2835_I2C_S_LEN; -+ goto complete; -+ } -+ - bcm2835_drain_rxfifo(i2c_dev); - return IRQ_HANDLED; - } - - return IRQ_NONE; -+ -+complete: -+ bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, BCM2835_I2C_C_CLEAR); -+ bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_S, BCM2835_I2C_S_CLKT | -+ BCM2835_I2C_S_ERR | BCM2835_I2C_S_DONE); -+ complete(&i2c_dev->completion); -+ -+ return IRQ_HANDLED; - } - - static int bcm2835_i2c_xfer_msg(struct bcm2835_i2c_dev *i2c_dev, -@@ -181,8 +202,9 @@ static int bcm2835_i2c_xfer_msg(struct bcm2835_i2c_dev *i2c_dev, - - time_left = wait_for_completion_timeout(&i2c_dev->completion, - BCM2835_I2C_TIMEOUT); -- bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, BCM2835_I2C_C_CLEAR); - if (!time_left) { -+ bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, -+ BCM2835_I2C_C_CLEAR); - dev_err(i2c_dev->dev, "i2c transfer timed out\n"); - return -ETIMEDOUT; - } - -From 27ae7da16d901d83f96c0d282bf7af0f2b6e754a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= -Date: Mon, 19 Sep 2016 17:19:41 +0200 -Subject: [PATCH 106/149] i2c: bcm2835: Use dev_dbg logging on transfer errors -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Writing to an AT24C32 generates on average 2x i2c transfer errors per -32-byte page write. Which amounts to a lot for a 4k write. This is due -to the fact that the chip doesn't respond during it's internal write -cycle when the at24 driver tries and retries the next write. -Only a handful drivers use dev_err() on transfer error, so switch to -dev_dbg() instead. - -Signed-off-by: Noralf Trønnes -Reviewed-by: Eric Anholt ---- - drivers/i2c/busses/i2c-bcm2835.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c -index d2ba1a4de36af512e8e3c97251bd3537ae61591a..54d510abd46a117c9238fc6d7edec84019d1f60d 100644 ---- a/drivers/i2c/busses/i2c-bcm2835.c -+++ b/drivers/i2c/busses/i2c-bcm2835.c -@@ -216,7 +216,7 @@ static int bcm2835_i2c_xfer_msg(struct bcm2835_i2c_dev *i2c_dev, - (msg->flags & I2C_M_IGNORE_NAK)) - return 0; - -- dev_err(i2c_dev->dev, "i2c transfer failed: %x\n", i2c_dev->msg_err); -+ dev_dbg(i2c_dev->dev, "i2c transfer failed: %x\n", i2c_dev->msg_err); - - if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) - return -EREMOTEIO; - -From e3fb424b7f1194a69914d217f40577923c093189 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= -Date: Thu, 22 Sep 2016 22:05:50 +0200 -Subject: [PATCH 107/149] i2c: bcm2835: Can't support I2C_M_IGNORE_NAK -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The controller can't support this flag, so remove it. - -Documentation/i2c/i2c-protocol states that all of the message is sent: - -I2C_M_IGNORE_NAK: - Normally message is interrupted immediately if there is [NA] from the - client. Setting this flag treats any [NA] as [A], and all of - message is sent. - -From the BCM2835 ARM Peripherals datasheet: - - The ERR field is set when the slave fails to acknowledge either - its address or a data byte written to it. - -So when the controller doesn't receive an ack, it sets ERR and raises -an interrupt. In other words, the whole message is not sent. - -Signed-off-by: Noralf Trønnes -Reviewed-by: Eric Anholt ---- - drivers/i2c/busses/i2c-bcm2835.c | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c -index 54d510abd46a117c9238fc6d7edec84019d1f60d..565ef69ce61423544dc0558c85ef318b0ae9c324 100644 ---- a/drivers/i2c/busses/i2c-bcm2835.c -+++ b/drivers/i2c/busses/i2c-bcm2835.c -@@ -212,10 +212,6 @@ static int bcm2835_i2c_xfer_msg(struct bcm2835_i2c_dev *i2c_dev, - if (likely(!i2c_dev->msg_err)) - return 0; - -- if ((i2c_dev->msg_err & BCM2835_I2C_S_ERR) && -- (msg->flags & I2C_M_IGNORE_NAK)) -- return 0; -- - dev_dbg(i2c_dev->dev, "i2c transfer failed: %x\n", i2c_dev->msg_err); - - if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) - -From f2f7d14ebe1e56f8baefe99cedea68b3cee1da16 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= -Date: Fri, 23 Sep 2016 04:54:27 +0200 -Subject: [PATCH 108/149] i2c: bcm2835: Add support for Repeated Start - Condition -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Documentation/i2c/i2c-protocol states that Combined transactions should -separate messages with a Start bit and end the whole transaction with a -Stop bit. This patch adds support for issuing only a Start between -messages instead of a Stop followed by a Start. - -This implementation differs from downstream i2c-bcm2708 in 2 respects: -- it uses an interrupt to detect that the transfer is active instead - of using polling. There is no interrupt for Transfer Active, but by - not prefilling the FIFO it's possible to use the TXW interrupt. -- when resetting/disabling the controller between transfers it writes - CLEAR to the control register instead of just zero. - Using just zero gave many errors. This might be the reason why - downstream had to disable this feature and make it available with a - module parameter. - -I have run thousands of transfers to a DS1307 (rtc), MMA8451 (accel) -and AT24C32 (eeprom) in parallel without problems. - -Signed-off-by: Noralf Trønnes -Acked-by: Eric Anholt ---- - drivers/i2c/busses/i2c-bcm2835.c | 101 ++++++++++++++++++++++++--------------- - 1 file changed, 63 insertions(+), 38 deletions(-) - -diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c -index 565ef69ce61423544dc0558c85ef318b0ae9c324..241e08ae7c27cec23fad3c1bf3ebad3a4d2a8e6f 100644 ---- a/drivers/i2c/busses/i2c-bcm2835.c -+++ b/drivers/i2c/busses/i2c-bcm2835.c -@@ -63,6 +63,7 @@ struct bcm2835_i2c_dev { - struct i2c_adapter adapter; - struct completion completion; - struct i2c_msg *curr_msg; -+ int num_msgs; - u32 msg_err; - u8 *msg_buf; - size_t msg_buf_remaining; -@@ -110,6 +111,45 @@ static void bcm2835_drain_rxfifo(struct bcm2835_i2c_dev *i2c_dev) - } - - /* -+ * Repeated Start Condition (Sr) -+ * The BCM2835 ARM Peripherals datasheet mentions a way to trigger a Sr when it -+ * talks about reading from a slave with 10 bit address. This is achieved by -+ * issuing a write, poll the I2CS.TA flag and wait for it to be set, and then -+ * issue a read. -+ * A comment in https://github.com/raspberrypi/linux/issues/254 shows how the -+ * firmware actually does it using polling and says that it's a workaround for -+ * a problem in the state machine. -+ * It turns out that it is possible to use the TXW interrupt to know when the -+ * transfer is active, provided the FIFO has not been prefilled. -+ */ -+ -+static void bcm2835_i2c_start_transfer(struct bcm2835_i2c_dev *i2c_dev) -+{ -+ u32 c = BCM2835_I2C_C_ST | BCM2835_I2C_C_I2CEN; -+ struct i2c_msg *msg = i2c_dev->curr_msg; -+ bool last_msg = (i2c_dev->num_msgs == 1); -+ -+ if (!i2c_dev->num_msgs) -+ return; -+ -+ i2c_dev->num_msgs--; -+ i2c_dev->msg_buf = msg->buf; -+ i2c_dev->msg_buf_remaining = msg->len; -+ -+ if (msg->flags & I2C_M_RD) -+ c |= BCM2835_I2C_C_READ | BCM2835_I2C_C_INTR; -+ else -+ c |= BCM2835_I2C_C_INTT; -+ -+ if (last_msg) -+ c |= BCM2835_I2C_C_INTD; -+ -+ bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_A, msg->addr); -+ bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_DLEN, msg->len); -+ bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, c); -+} -+ -+/* - * Note about I2C_C_CLEAR on error: - * The I2C_C_CLEAR on errors will take some time to resolve -- if you were in - * non-idle state and I2C_C_READ, it sets an abort_rx flag and runs through -@@ -151,6 +191,12 @@ static irqreturn_t bcm2835_i2c_isr(int this_irq, void *data) - } - - bcm2835_fill_txfifo(i2c_dev); -+ -+ if (i2c_dev->num_msgs && !i2c_dev->msg_buf_remaining) { -+ i2c_dev->curr_msg++; -+ bcm2835_i2c_start_transfer(i2c_dev); -+ } -+ - return IRQ_HANDLED; - } - -@@ -175,30 +221,25 @@ static irqreturn_t bcm2835_i2c_isr(int this_irq, void *data) - return IRQ_HANDLED; - } - --static int bcm2835_i2c_xfer_msg(struct bcm2835_i2c_dev *i2c_dev, -- struct i2c_msg *msg) -+static int bcm2835_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], -+ int num) - { -- u32 c; -+ struct bcm2835_i2c_dev *i2c_dev = i2c_get_adapdata(adap); - unsigned long time_left; -+ int i; - -- i2c_dev->curr_msg = msg; -- i2c_dev->msg_buf = msg->buf; -- i2c_dev->msg_buf_remaining = msg->len; -- reinit_completion(&i2c_dev->completion); -- -- bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, BCM2835_I2C_C_CLEAR); -+ for (i = 0; i < (num - 1); i++) -+ if (msgs[i].flags & I2C_M_RD) { -+ dev_warn_once(i2c_dev->dev, -+ "only one read message supported, has to be last\n"); -+ return -EOPNOTSUPP; -+ } - -- if (msg->flags & I2C_M_RD) { -- c = BCM2835_I2C_C_READ | BCM2835_I2C_C_INTR; -- } else { -- c = BCM2835_I2C_C_INTT; -- bcm2835_fill_txfifo(i2c_dev); -- } -- c |= BCM2835_I2C_C_ST | BCM2835_I2C_C_INTD | BCM2835_I2C_C_I2CEN; -+ i2c_dev->curr_msg = msgs; -+ i2c_dev->num_msgs = num; -+ reinit_completion(&i2c_dev->completion); - -- bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_A, msg->addr); -- bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_DLEN, msg->len); -- bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, c); -+ bcm2835_i2c_start_transfer(i2c_dev); - - time_left = wait_for_completion_timeout(&i2c_dev->completion, - BCM2835_I2C_TIMEOUT); -@@ -209,31 +250,15 @@ static int bcm2835_i2c_xfer_msg(struct bcm2835_i2c_dev *i2c_dev, - return -ETIMEDOUT; - } - -- if (likely(!i2c_dev->msg_err)) -- return 0; -+ if (!i2c_dev->msg_err) -+ return num; - - dev_dbg(i2c_dev->dev, "i2c transfer failed: %x\n", i2c_dev->msg_err); - - if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) - return -EREMOTEIO; -- else -- return -EIO; --} -- --static int bcm2835_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], -- int num) --{ -- struct bcm2835_i2c_dev *i2c_dev = i2c_get_adapdata(adap); -- int i; -- int ret = 0; -- -- for (i = 0; i < num; i++) { -- ret = bcm2835_i2c_xfer_msg(i2c_dev, &msgs[i]); -- if (ret) -- break; -- } - -- return ret ?: i; -+ return -EIO; - } - - static u32 bcm2835_i2c_func(struct i2c_adapter *adap) - -From 57255125ee6f0f952e130c6e2d6705542757a9d1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= -Date: Fri, 23 Sep 2016 04:57:17 +0200 -Subject: [PATCH 109/149] i2c: bcm2835: Support i2c-dev ioctl I2C_TIMEOUT -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Use i2c_adapter->timeout for the completion timeout value. The core -default is 1 second. - -Signed-off-by: Noralf Trønnes -Reviewed-by: Eric Anholt ---- - drivers/i2c/busses/i2c-bcm2835.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c -index 241e08ae7c27cec23fad3c1bf3ebad3a4d2a8e6f..d2085dd3742eabebc537621968088261f8dc7ea8 100644 ---- a/drivers/i2c/busses/i2c-bcm2835.c -+++ b/drivers/i2c/busses/i2c-bcm2835.c -@@ -53,8 +53,6 @@ - #define BCM2835_I2C_CDIV_MIN 0x0002 - #define BCM2835_I2C_CDIV_MAX 0xFFFE - --#define BCM2835_I2C_TIMEOUT (msecs_to_jiffies(1000)) -- - struct bcm2835_i2c_dev { - struct device *dev; - void __iomem *regs; -@@ -242,7 +240,7 @@ static int bcm2835_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], - bcm2835_i2c_start_transfer(i2c_dev); - - time_left = wait_for_completion_timeout(&i2c_dev->completion, -- BCM2835_I2C_TIMEOUT); -+ adap->timeout); - if (!time_left) { - bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, - BCM2835_I2C_C_CLEAR); - -From c779af3ecc9f4e771fcd383ec8a0ee983195ddb3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= -Date: Tue, 27 Sep 2016 01:00:08 +0200 -Subject: [PATCH 110/149] i2c: bcm2835: Add support for dynamic clock -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Support a dynamic clock by reading the frequency and setting the -divisor in the transfer function instead of during probe. - -Signed-off-by: Noralf Trønnes -Reviewed-by: Martin Sperl ---- - drivers/i2c/busses/i2c-bcm2835.c | 51 +++++++++++++++++++++++++--------------- - 1 file changed, 32 insertions(+), 19 deletions(-) - -diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c -index d2085dd3742eabebc537621968088261f8dc7ea8..c3436f627028477f7e21b47e079fd5ab06ec188a 100644 ---- a/drivers/i2c/busses/i2c-bcm2835.c -+++ b/drivers/i2c/busses/i2c-bcm2835.c -@@ -58,6 +58,7 @@ struct bcm2835_i2c_dev { - void __iomem *regs; - struct clk *clk; - int irq; -+ u32 bus_clk_rate; - struct i2c_adapter adapter; - struct completion completion; - struct i2c_msg *curr_msg; -@@ -78,6 +79,30 @@ static inline u32 bcm2835_i2c_readl(struct bcm2835_i2c_dev *i2c_dev, u32 reg) - return readl(i2c_dev->regs + reg); - } - -+static int bcm2835_i2c_set_divider(struct bcm2835_i2c_dev *i2c_dev) -+{ -+ u32 divider; -+ -+ divider = DIV_ROUND_UP(clk_get_rate(i2c_dev->clk), -+ i2c_dev->bus_clk_rate); -+ /* -+ * Per the datasheet, the register is always interpreted as an even -+ * number, by rounding down. In other words, the LSB is ignored. So, -+ * if the LSB is set, increment the divider to avoid any issue. -+ */ -+ if (divider & 1) -+ divider++; -+ if ((divider < BCM2835_I2C_CDIV_MIN) || -+ (divider > BCM2835_I2C_CDIV_MAX)) { -+ dev_err_ratelimited(i2c_dev->dev, "Invalid clock-frequency\n"); -+ return -EINVAL; -+ } -+ -+ bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_DIV, divider); -+ -+ return 0; -+} -+ - static void bcm2835_fill_txfifo(struct bcm2835_i2c_dev *i2c_dev) - { - u32 val; -@@ -224,7 +249,7 @@ static int bcm2835_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], - { - struct bcm2835_i2c_dev *i2c_dev = i2c_get_adapdata(adap); - unsigned long time_left; -- int i; -+ int i, ret; - - for (i = 0; i < (num - 1); i++) - if (msgs[i].flags & I2C_M_RD) { -@@ -233,6 +258,10 @@ static int bcm2835_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], - return -EOPNOTSUPP; - } - -+ ret = bcm2835_i2c_set_divider(i2c_dev); -+ if (ret) -+ return ret; -+ - i2c_dev->curr_msg = msgs; - i2c_dev->num_msgs = num; - reinit_completion(&i2c_dev->completion); -@@ -282,7 +311,6 @@ static int bcm2835_i2c_probe(struct platform_device *pdev) - { - struct bcm2835_i2c_dev *i2c_dev; - struct resource *mem, *irq; -- u32 bus_clk_rate, divider; - int ret; - struct i2c_adapter *adap; - -@@ -306,27 +334,12 @@ static int bcm2835_i2c_probe(struct platform_device *pdev) - } - - ret = of_property_read_u32(pdev->dev.of_node, "clock-frequency", -- &bus_clk_rate); -+ &i2c_dev->bus_clk_rate); - if (ret < 0) { - dev_warn(&pdev->dev, - "Could not read clock-frequency property\n"); -- bus_clk_rate = 100000; -- } -- -- divider = DIV_ROUND_UP(clk_get_rate(i2c_dev->clk), bus_clk_rate); -- /* -- * Per the datasheet, the register is always interpreted as an even -- * number, by rounding down. In other words, the LSB is ignored. So, -- * if the LSB is set, increment the divider to avoid any issue. -- */ -- if (divider & 1) -- divider++; -- if ((divider < BCM2835_I2C_CDIV_MIN) || -- (divider > BCM2835_I2C_CDIV_MAX)) { -- dev_err(&pdev->dev, "Invalid clock-frequency\n"); -- return -ENODEV; -+ i2c_dev->bus_clk_rate = 100000; - } -- bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_DIV, divider); - - irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!irq) { - -From c3951b69ebc993fedc3f802e4b8c3e62b56ec87d Mon Sep 17 00:00:00 2001 +From b9d76cb88a9c87fe808ddb234e379d10a6c28e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Tue, 1 Nov 2016 15:15:41 +0100 -Subject: [PATCH 111/149] i2c: bcm2835: Add debug support +Subject: [PATCH 097/143] i2c: bcm2835: Add debug support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -125131,29 +124226,57 @@ index c3436f627028477f7e21b47e079fd5ab06ec188a..8642f580ce41803bd22c76a0fa80d083 if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) return -EREMOTEIO; -From 8db15206e43061e044bedbe5c1b8a9ba2caff6c1 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Sat, 31 Dec 2016 14:15:50 +0000 -Subject: [PATCH 112/149] arm64: Add CONFIG_ARCH_BCM2835 +From 0943957d423c895c065a0722eae050927a92e597 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 14 Sep 2016 09:16:19 +0100 +Subject: [PATCH 098/143] raspberrypi-firmware: Export the general transaction + function. +The vc4-firmware-kms module is going to be doing the MBOX FB call. + +Signed-off-by: Eric Anholt --- - arch/arm64/configs/bcmrpi3_defconfig | 1 + - 1 file changed, 1 insertion(+) + drivers/firmware/raspberrypi.c | 3 ++- + include/soc/bcm2835/raspberrypi-firmware.h | 1 + + 2 files changed, 3 insertions(+), 1 deletion(-) -diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig -index d7406f5a4620151044b8f716b4d10bb818648e06..53da5c7a33e5898a66e549fb0c39fe3da555ca87 100644 ---- a/arch/arm64/configs/bcmrpi3_defconfig -+++ b/arch/arm64/configs/bcmrpi3_defconfig -@@ -1332,3 +1332,4 @@ CONFIG_ARM64_CRYPTO=y - CONFIG_CRC_ITU_T=y - CONFIG_LIBCRC32C=y - CONFIG_BCM2708_VCHIQ=n -+CONFIG_ARCH_BCM2835=y +diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c +index 3f070bd38a91511c986e3fb114b15bd4ac32634c..f261b64d1657c02290904d841e1f087c34e27ded 100644 +--- a/drivers/firmware/raspberrypi.c ++++ b/drivers/firmware/raspberrypi.c +@@ -42,7 +42,7 @@ static void response_callback(struct mbox_client *cl, void *msg) + * Sends a request to the firmware through the BCM2835 mailbox driver, + * and synchronously waits for the reply. + */ +-static int ++int + rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data) + { + u32 message = MBOX_MSG(chan, data); +@@ -63,6 +63,7 @@ rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data) + + return ret; + } ++EXPORT_SYMBOL_GPL(rpi_firmware_transaction); + + /** + * rpi_firmware_property_list - Submit firmware property list +diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h +index 7f0da0727422c690947e46e891a754de13dc1fea..280791fb9656901392ce67e44cb742c96f090ed4 100644 +--- a/include/soc/bcm2835/raspberrypi-firmware.h ++++ b/include/soc/bcm2835/raspberrypi-firmware.h +@@ -152,5 +152,6 @@ static inline struct rpi_firmware *rpi_firmware_get(struct device_node *firmware + return NULL; + } + #endif ++int rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data); + + #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ -From 4648becd8c9c567a092e57d7036d2b40ac056452 Mon Sep 17 00:00:00 2001 +From d892ed3ef0153b2b3041f6f76a88410575270bd2 Mon Sep 17 00:00:00 2001 From: Alex Tucker Date: Tue, 13 Dec 2016 19:50:18 +0000 -Subject: [PATCH 113/149] Add support for Silicon Labs Si7013/20/21 +Subject: [PATCH 099/143] Add support for Silicon Labs Si7013/20/21 humidity/temperature sensor. --- @@ -125228,10 +124351,10 @@ index f6d134c095af2398fc55ae7d2b0e86456c30627c..31bda8da4cb6a56bfe493a81b9189009 }; }; -From bc3f78ae7e7e09c143167390bec1b02d04320b96 Mon Sep 17 00:00:00 2001 +From a7f4466713fc62e679070212dd09533d66db889c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 3 Jan 2017 21:27:46 +0000 -Subject: [PATCH 114/149] Document the si7020 option +Subject: [PATCH 100/143] Document the si7020 option --- arch/arm/boot/dts/overlays/README | 3 +++ @@ -125252,10 +124375,10 @@ index 81d991803be335e5a1bc3bb0a8c7a2c9f5c392bd..e8fa4ccb44c34a20485c4e6155467af9 Name: i2c0-bcm2708 Info: Enable the i2c_bcm2708 driver for the i2c0 bus. Not all pin combinations -From 784a27ffd9104a0c243d838c66aa52a2c355f828 Mon Sep 17 00:00:00 2001 +From 62211690633ae9f41cea842893da69f8ba168636 Mon Sep 17 00:00:00 2001 From: Giedrius Trainavicius Date: Thu, 5 Jan 2017 02:38:16 +0200 -Subject: [PATCH 115/149] pisound improvements: +Subject: [PATCH 101/143] pisound improvements: * Added a writable sysfs object to enable scripts / user space software to blink MIDI activity LEDs for variable duration. @@ -125549,958 +124672,10 @@ index 4b8545487d06e4ea70073a5d063fb2310b3b94d0..ba70734b89e61a11201657406223f0b3 }; -From 14dce25835053cc8812dedb47ea78e829fb11360 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Mon, 9 Jan 2017 09:23:06 +0000 -Subject: [PATCH 116/149] Revert "Revert "Added driver for HiFiBerry Amp - amplifier add-on board"" - -This reverts commit bf84babd8fffcb79c60f1342c2416f8e1e4b7af9. ---- - sound/soc/bcm/Kconfig | 7 + - sound/soc/bcm/Makefile | 2 + - sound/soc/bcm/hifiberry_amp.c | 129 +++++++++++++++ - sound/soc/codecs/Kconfig | 4 + - sound/soc/codecs/Makefile | 2 + - sound/soc/codecs/tas5713.c | 369 ++++++++++++++++++++++++++++++++++++++++++ - sound/soc/codecs/tas5713.h | 210 ++++++++++++++++++++++++ - 7 files changed, 723 insertions(+) - create mode 100644 sound/soc/bcm/hifiberry_amp.c - create mode 100644 sound/soc/codecs/tas5713.c - create mode 100644 sound/soc/codecs/tas5713.h - -diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index a0ef6a028136beb27ed13a4136712a70a60f2966..d024377e8450fb5402dcb5ea27161f774b04a8ec 100644 ---- a/sound/soc/bcm/Kconfig -+++ b/sound/soc/bcm/Kconfig -@@ -38,6 +38,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DIGI - help - Say Y or M if you want to add support for HifiBerry Digi S/PDIF output board. - -+config SND_BCM2708_SOC_HIFIBERRY_AMP -+ tristate "Support for the HifiBerry Amp" -+ depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S -+ select SND_SOC_TAS5713 -+ help -+ Say Y or M if you want to add support for the HifiBerry Amp amplifier board. -+ - config SND_BCM2708_SOC_RPI_DAC - tristate "Support for RPi-DAC" - depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S -diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index f720a3d3b5832844ee6d0558317c728f00c40b65..bb1df438540193652ec5464e8bc51f636a1b844e 100644 ---- a/sound/soc/bcm/Makefile -+++ b/sound/soc/bcm/Makefile -@@ -10,6 +10,7 @@ obj-$(CONFIG_SND_SOC_CYGNUS) += snd-soc-cygnus.o - - # BCM2708 Machine Support - snd-soc-adau1977-adc-objs := adau1977-adc.o -+snd-soc-hifiberry-amp-objs := hifiberry_amp.o - snd-soc-hifiberry-dac-objs := hifiberry_dac.o - snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o - snd-soc-hifiberry-digi-objs := hifiberry_digi.o -@@ -27,6 +28,7 @@ snd-soc-allo-piano-dac-objs := allo-piano-dac.o - snd-soc-pisound-objs := pisound.o - - obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o -+obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o - obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o - obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o - obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o -diff --git a/sound/soc/bcm/hifiberry_amp.c b/sound/soc/bcm/hifiberry_amp.c -new file mode 100644 -index 0000000000000000000000000000000000000000..d17c29780507dc31c50f1d567ff5cea7c8241ff5 ---- /dev/null -+++ b/sound/soc/bcm/hifiberry_amp.c -@@ -0,0 +1,129 @@ -+/* -+ * ASoC Driver for HifiBerry AMP -+ * -+ * Author: Sebastian Eickhoff -+ * Copyright 2014 -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * version 2 as published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ */ -+ -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+static int snd_rpi_hifiberry_amp_init(struct snd_soc_pcm_runtime *rtd) -+{ -+ // ToDo: init of the dsp-registers. -+ return 0; -+} -+ -+static int snd_rpi_hifiberry_amp_hw_params( struct snd_pcm_substream *substream, -+ struct snd_pcm_hw_params *params ) -+{ -+ struct snd_soc_pcm_runtime *rtd = substream->private_data; -+ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; -+ -+ return snd_soc_dai_set_bclk_ratio(cpu_dai, 64); -+} -+ -+static struct snd_soc_ops snd_rpi_hifiberry_amp_ops = { -+ .hw_params = snd_rpi_hifiberry_amp_hw_params, -+}; -+ -+static struct snd_soc_dai_link snd_rpi_hifiberry_amp_dai[] = { -+ { -+ .name = "HifiBerry AMP", -+ .stream_name = "HifiBerry AMP HiFi", -+ .cpu_dai_name = "bcm2708-i2s.0", -+ .codec_dai_name = "tas5713-hifi", -+ .platform_name = "bcm2708-i2s.0", -+ .codec_name = "tas5713.1-001b", -+ .dai_fmt = SND_SOC_DAIFMT_I2S | -+ SND_SOC_DAIFMT_NB_NF | -+ SND_SOC_DAIFMT_CBS_CFS, -+ .ops = &snd_rpi_hifiberry_amp_ops, -+ .init = snd_rpi_hifiberry_amp_init, -+ }, -+}; -+ -+ -+static struct snd_soc_card snd_rpi_hifiberry_amp = { -+ .name = "snd_rpi_hifiberry_amp", -+ .driver_name = "HifiberryAmp", -+ .owner = THIS_MODULE, -+ .dai_link = snd_rpi_hifiberry_amp_dai, -+ .num_links = ARRAY_SIZE(snd_rpi_hifiberry_amp_dai), -+}; -+ -+static const struct of_device_id snd_rpi_hifiberry_amp_of_match[] = { -+ { .compatible = "hifiberry,hifiberry-amp", }, -+ {}, -+}; -+MODULE_DEVICE_TABLE(of, snd_rpi_hifiberry_amp_of_match); -+ -+ -+static int snd_rpi_hifiberry_amp_probe(struct platform_device *pdev) -+{ -+ int ret = 0; -+ -+ snd_rpi_hifiberry_amp.dev = &pdev->dev; -+ -+ if (pdev->dev.of_node) { -+ struct device_node *i2s_node; -+ struct snd_soc_dai_link *dai = &snd_rpi_hifiberry_amp_dai[0]; -+ i2s_node = of_parse_phandle(pdev->dev.of_node, -+ "i2s-controller", 0); -+ -+ if (i2s_node) { -+ dai->cpu_dai_name = NULL; -+ dai->cpu_of_node = i2s_node; -+ dai->platform_name = NULL; -+ dai->platform_of_node = i2s_node; -+ } -+ } -+ -+ ret = snd_soc_register_card(&snd_rpi_hifiberry_amp); -+ -+ if (ret != 0) { -+ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret); -+ } -+ -+ return ret; -+} -+ -+ -+static int snd_rpi_hifiberry_amp_remove(struct platform_device *pdev) -+{ -+ return snd_soc_unregister_card(&snd_rpi_hifiberry_amp); -+} -+ -+ -+static struct platform_driver snd_rpi_hifiberry_amp_driver = { -+ .driver = { -+ .name = "snd-hifiberry-amp", -+ .owner = THIS_MODULE, -+ .of_match_table = snd_rpi_hifiberry_amp_of_match, -+ }, -+ .probe = snd_rpi_hifiberry_amp_probe, -+ .remove = snd_rpi_hifiberry_amp_remove, -+}; -+ -+ -+module_platform_driver(snd_rpi_hifiberry_amp_driver); -+ -+ -+MODULE_AUTHOR("Sebastian Eickhoff "); -+MODULE_DESCRIPTION("ASoC driver for HiFiBerry-AMP"); -+MODULE_LICENSE("GPL v2"); -diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig -index 74a93e52bdc8116df3db08aaf98fffa1e6f6cc1b..9824cdd04b0c11c45b8cedd0187a0eba8f1dc2d4 100644 ---- a/sound/soc/codecs/Kconfig -+++ b/sound/soc/codecs/Kconfig -@@ -139,6 +139,7 @@ config SND_SOC_ALL_CODECS - select SND_SOC_TFA9879 if I2C - select SND_SOC_TLV320AIC23_I2C if I2C - select SND_SOC_TLV320AIC23_SPI if SPI_MASTER -+ select SND_SOC_TAS5713 if I2C - select SND_SOC_TLV320AIC26 if SPI_MASTER - select SND_SOC_TLV320AIC31XX if I2C - select SND_SOC_TLV320AIC32X4_I2C if I2C -@@ -821,6 +822,9 @@ config SND_SOC_TFA9879 - tristate "NXP Semiconductors TFA9879 amplifier" - depends on I2C - -+config SND_SOC_TAS5713 -+ tristate -+ - config SND_SOC_TLV320AIC23 - tristate - -diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile -index 77786e7f44a7fa22d9b5beed3eb687e2b7a28526..5a2db0d2fe2f49920eeccfecef62c969ae2e99a1 100644 ---- a/sound/soc/codecs/Makefile -+++ b/sound/soc/codecs/Makefile -@@ -144,6 +144,7 @@ snd-soc-tas5086-objs := tas5086.o - snd-soc-tas571x-objs := tas571x.o - snd-soc-tas5720-objs := tas5720.o - snd-soc-tfa9879-objs := tfa9879.o -+snd-soc-tas5713-objs := tas5713.o - snd-soc-tlv320aic23-objs := tlv320aic23.o - snd-soc-tlv320aic23-i2c-objs := tlv320aic23-i2c.o - snd-soc-tlv320aic23-spi-objs := tlv320aic23-spi.o -@@ -366,6 +367,7 @@ obj-$(CONFIG_SND_SOC_TAS5086) += snd-soc-tas5086.o - obj-$(CONFIG_SND_SOC_TAS571X) += snd-soc-tas571x.o - obj-$(CONFIG_SND_SOC_TAS5720) += snd-soc-tas5720.o - obj-$(CONFIG_SND_SOC_TFA9879) += snd-soc-tfa9879.o -+obj-$(CONFIG_SND_SOC_TAS5713) += snd-soc-tas5713.o - obj-$(CONFIG_SND_SOC_TLV320AIC23) += snd-soc-tlv320aic23.o - obj-$(CONFIG_SND_SOC_TLV320AIC23_I2C) += snd-soc-tlv320aic23-i2c.o - obj-$(CONFIG_SND_SOC_TLV320AIC23_SPI) += snd-soc-tlv320aic23-spi.o -diff --git a/sound/soc/codecs/tas5713.c b/sound/soc/codecs/tas5713.c -new file mode 100644 -index 0000000000000000000000000000000000000000..9b2713861dcbed751842ca29c88eb1eae5867411 ---- /dev/null -+++ b/sound/soc/codecs/tas5713.c -@@ -0,0 +1,369 @@ -+/* -+ * ASoC Driver for TAS5713 -+ * -+ * Author: Sebastian Eickhoff -+ * Copyright 2014 -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * version 2 as published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include "tas5713.h" -+ -+ -+static struct i2c_client *i2c; -+ -+struct tas5713_priv { -+ struct regmap *regmap; -+ int mclk_div; -+ struct snd_soc_codec *codec; -+}; -+ -+static struct tas5713_priv *priv_data; -+ -+ -+ -+ -+/* -+ * _ _ ___ _ ___ _ _ -+ * /_\ | | / __| /_\ / __|___ _ _| |_ _ _ ___| |___ -+ * / _ \| |__\__ \/ _ \ | (__/ _ \ ' \ _| '_/ _ \ (_-< -+ * /_/ \_\____|___/_/ \_\ \___\___/_||_\__|_| \___/_/__/ -+ * -+ */ -+ -+static const DECLARE_TLV_DB_SCALE(tas5713_vol_tlv, -10000, 50, 1); -+ -+ -+static const struct snd_kcontrol_new tas5713_snd_controls[] = { -+ SOC_SINGLE_TLV ("Master" , TAS5713_VOL_MASTER, 0, 248, 1, tas5713_vol_tlv), -+ SOC_DOUBLE_R_TLV("Channels" , TAS5713_VOL_CH1, TAS5713_VOL_CH2, 0, 248, 1, tas5713_vol_tlv) -+}; -+ -+ -+ -+ -+/* -+ * __ __ _ _ ___ _ -+ * | \/ |__ _ __| |_ (_)_ _ ___ | \ _ _(_)_ _____ _ _ -+ * | |\/| / _` / _| ' \| | ' \/ -_) | |) | '_| \ V / -_) '_| -+ * |_| |_\__,_\__|_||_|_|_||_\___| |___/|_| |_|\_/\___|_| -+ * -+ */ -+ -+static int tas5713_hw_params(struct snd_pcm_substream *substream, -+ struct snd_pcm_hw_params *params, -+ struct snd_soc_dai *dai) -+{ -+ u16 blen = 0x00; -+ -+ struct snd_soc_codec *codec; -+ codec = dai->codec; -+ priv_data->codec = dai->codec; -+ -+ switch (params_format(params)) { -+ case SNDRV_PCM_FORMAT_S16_LE: -+ blen = 0x03; -+ break; -+ case SNDRV_PCM_FORMAT_S20_3LE: -+ blen = 0x1; -+ break; -+ case SNDRV_PCM_FORMAT_S24_LE: -+ blen = 0x04; -+ break; -+ case SNDRV_PCM_FORMAT_S32_LE: -+ blen = 0x05; -+ break; -+ default: -+ dev_err(dai->dev, "Unsupported word length: %u\n", -+ params_format(params)); -+ return -EINVAL; -+ } -+ -+ // set word length -+ snd_soc_update_bits(codec, TAS5713_SERIAL_DATA_INTERFACE, 0x7, blen); -+ -+ return 0; -+} -+ -+ -+static int tas5713_mute_stream(struct snd_soc_dai *dai, int mute, int stream) -+{ -+ unsigned int val = 0; -+ -+ struct tas5713_priv *tas5713; -+ struct snd_soc_codec *codec = dai->codec; -+ tas5713 = snd_soc_codec_get_drvdata(codec); -+ -+ if (mute) { -+ val = TAS5713_SOFT_MUTE_ALL; -+ } -+ -+ return regmap_write(tas5713->regmap, TAS5713_SOFT_MUTE, val); -+} -+ -+ -+static const struct snd_soc_dai_ops tas5713_dai_ops = { -+ .hw_params = tas5713_hw_params, -+ .mute_stream = tas5713_mute_stream, -+}; -+ -+ -+static struct snd_soc_dai_driver tas5713_dai = { -+ .name = "tas5713-hifi", -+ .playback = { -+ .stream_name = "Playback", -+ .channels_min = 2, -+ .channels_max = 2, -+ .rates = SNDRV_PCM_RATE_8000_48000, -+ .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE ), -+ }, -+ .ops = &tas5713_dai_ops, -+}; -+ -+ -+ -+ -+/* -+ * ___ _ ___ _ -+ * / __|___ __| |___ __ | \ _ _(_)_ _____ _ _ -+ * | (__/ _ \/ _` / -_) _| | |) | '_| \ V / -_) '_| -+ * \___\___/\__,_\___\__| |___/|_| |_|\_/\___|_| -+ * -+ */ -+ -+static int tas5713_remove(struct snd_soc_codec *codec) -+{ -+ struct tas5713_priv *tas5713; -+ -+ tas5713 = snd_soc_codec_get_drvdata(codec); -+ -+ return 0; -+} -+ -+ -+static int tas5713_probe(struct snd_soc_codec *codec) -+{ -+ struct tas5713_priv *tas5713; -+ int i, ret; -+ -+ i2c = container_of(codec->dev, struct i2c_client, dev); -+ -+ tas5713 = snd_soc_codec_get_drvdata(codec); -+ -+ // Reset error -+ ret = snd_soc_write(codec, TAS5713_ERROR_STATUS, 0x00); -+ if (ret < 0) return ret; -+ -+ // Trim oscillator -+ ret = snd_soc_write(codec, TAS5713_OSC_TRIM, 0x00); -+ if (ret < 0) return ret; -+ msleep(1000); -+ -+ // Reset error -+ ret = snd_soc_write(codec, TAS5713_ERROR_STATUS, 0x00); -+ if (ret < 0) return ret; -+ -+ // Clock mode: 44/48kHz, MCLK=64xfs -+ ret = snd_soc_write(codec, TAS5713_CLOCK_CTRL, 0x60); -+ if (ret < 0) return ret; -+ -+ // I2S 24bit -+ ret = snd_soc_write(codec, TAS5713_SERIAL_DATA_INTERFACE, 0x05); -+ if (ret < 0) return ret; -+ -+ // Unmute -+ ret = snd_soc_write(codec, TAS5713_SYSTEM_CTRL2, 0x00); -+ if (ret < 0) return ret; -+ ret = snd_soc_write(codec, TAS5713_SOFT_MUTE, 0x00); -+ if (ret < 0) return ret; -+ -+ // Set volume to 0db -+ ret = snd_soc_write(codec, TAS5713_VOL_MASTER, 0x00); -+ if (ret < 0) return ret; -+ -+ // Now start programming the default initialization sequence -+ for (i = 0; i < ARRAY_SIZE(tas5713_init_sequence); ++i) { -+ ret = i2c_master_send(i2c, -+ tas5713_init_sequence[i].data, -+ tas5713_init_sequence[i].size); -+ if (ret < 0) { -+ printk(KERN_INFO "TAS5713 CODEC PROBE: InitSeq returns: %d\n", ret); -+ } -+ } -+ -+ // Unmute -+ ret = snd_soc_write(codec, TAS5713_SYSTEM_CTRL2, 0x00); -+ if (ret < 0) return ret; -+ -+ return 0; -+} -+ -+ -+static struct snd_soc_codec_driver soc_codec_dev_tas5713 = { -+ .probe = tas5713_probe, -+ .remove = tas5713_remove, -+ .controls = tas5713_snd_controls, -+ .num_controls = ARRAY_SIZE(tas5713_snd_controls), -+}; -+ -+ -+ -+ -+/* -+ * ___ ___ ___ ___ _ -+ * |_ _|_ ) __| | \ _ _(_)_ _____ _ _ -+ * | | / / (__ | |) | '_| \ V / -_) '_| -+ * |___/___\___| |___/|_| |_|\_/\___|_| -+ * -+ */ -+ -+static const struct reg_default tas5713_reg_defaults[] = { -+ { 0x07 ,0x80 }, // R7 - VOL_MASTER - -40dB -+ { 0x08 , 30 }, // R8 - VOL_CH1 - 0dB -+ { 0x09 , 30 }, // R9 - VOL_CH2 - 0dB -+ { 0x0A ,0x80 }, // R10 - VOL_HEADPHONE - -40dB -+}; -+ -+ -+static bool tas5713_reg_volatile(struct device *dev, unsigned int reg) -+{ -+ switch (reg) { -+ case TAS5713_DEVICE_ID: -+ case TAS5713_ERROR_STATUS: -+ return true; -+ default: -+ return false; -+ } -+} -+ -+ -+static const struct of_device_id tas5713_of_match[] = { -+ { .compatible = "ti,tas5713", }, -+ { } -+}; -+MODULE_DEVICE_TABLE(of, tas5713_of_match); -+ -+ -+static struct regmap_config tas5713_regmap_config = { -+ .reg_bits = 8, -+ .val_bits = 8, -+ -+ .max_register = TAS5713_MAX_REGISTER, -+ .volatile_reg = tas5713_reg_volatile, -+ -+ .cache_type = REGCACHE_RBTREE, -+ .reg_defaults = tas5713_reg_defaults, -+ .num_reg_defaults = ARRAY_SIZE(tas5713_reg_defaults), -+}; -+ -+ -+static int tas5713_i2c_probe(struct i2c_client *i2c, -+ const struct i2c_device_id *id) -+{ -+ int ret; -+ -+ priv_data = devm_kzalloc(&i2c->dev, sizeof *priv_data, GFP_KERNEL); -+ if (!priv_data) -+ return -ENOMEM; -+ -+ priv_data->regmap = devm_regmap_init_i2c(i2c, &tas5713_regmap_config); -+ if (IS_ERR(priv_data->regmap)) { -+ ret = PTR_ERR(priv_data->regmap); -+ return ret; -+ } -+ -+ i2c_set_clientdata(i2c, priv_data); -+ -+ ret = snd_soc_register_codec(&i2c->dev, -+ &soc_codec_dev_tas5713, &tas5713_dai, 1); -+ -+ return ret; -+} -+ -+ -+static int tas5713_i2c_remove(struct i2c_client *i2c) -+{ -+ snd_soc_unregister_codec(&i2c->dev); -+ i2c_set_clientdata(i2c, NULL); -+ -+ kfree(priv_data); -+ -+ return 0; -+} -+ -+ -+static const struct i2c_device_id tas5713_i2c_id[] = { -+ { "tas5713", 0 }, -+ { } -+}; -+ -+MODULE_DEVICE_TABLE(i2c, tas5713_i2c_id); -+ -+ -+static struct i2c_driver tas5713_i2c_driver = { -+ .driver = { -+ .name = "tas5713", -+ .owner = THIS_MODULE, -+ .of_match_table = tas5713_of_match, -+ }, -+ .probe = tas5713_i2c_probe, -+ .remove = tas5713_i2c_remove, -+ .id_table = tas5713_i2c_id -+}; -+ -+ -+static int __init tas5713_modinit(void) -+{ -+ int ret = 0; -+ -+ ret = i2c_add_driver(&tas5713_i2c_driver); -+ if (ret) { -+ printk(KERN_ERR "Failed to register tas5713 I2C driver: %d\n", -+ ret); -+ } -+ -+ return ret; -+} -+module_init(tas5713_modinit); -+ -+ -+static void __exit tas5713_exit(void) -+{ -+ i2c_del_driver(&tas5713_i2c_driver); -+} -+module_exit(tas5713_exit); -+ -+ -+MODULE_AUTHOR("Sebastian Eickhoff "); -+MODULE_DESCRIPTION("ASoC driver for TAS5713"); -+MODULE_LICENSE("GPL v2"); -diff --git a/sound/soc/codecs/tas5713.h b/sound/soc/codecs/tas5713.h -new file mode 100644 -index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8f612a342 ---- /dev/null -+++ b/sound/soc/codecs/tas5713.h -@@ -0,0 +1,210 @@ -+/* -+ * ASoC Driver for TAS5713 -+ * -+ * Author: Sebastian Eickhoff -+ * Copyright 2014 -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * version 2 as published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ */ -+ -+#ifndef _TAS5713_H -+#define _TAS5713_H -+ -+ -+// TAS5713 I2C-bus register addresses -+ -+#define TAS5713_CLOCK_CTRL 0x00 -+#define TAS5713_DEVICE_ID 0x01 -+#define TAS5713_ERROR_STATUS 0x02 -+#define TAS5713_SYSTEM_CTRL1 0x03 -+#define TAS5713_SERIAL_DATA_INTERFACE 0x04 -+#define TAS5713_SYSTEM_CTRL2 0x05 -+#define TAS5713_SOFT_MUTE 0x06 -+#define TAS5713_VOL_MASTER 0x07 -+#define TAS5713_VOL_CH1 0x08 -+#define TAS5713_VOL_CH2 0x09 -+#define TAS5713_VOL_HEADPHONE 0x0A -+#define TAS5713_VOL_CONFIG 0x0E -+#define TAS5713_MODULATION_LIMIT 0x10 -+#define TAS5713_IC_DLY_CH1 0x11 -+#define TAS5713_IC_DLY_CH2 0x12 -+#define TAS5713_IC_DLY_CH3 0x13 -+#define TAS5713_IC_DLY_CH4 0x14 -+ -+#define TAS5713_START_STOP_PERIOD 0x1A -+#define TAS5713_OSC_TRIM 0x1B -+#define TAS5713_BKND_ERR 0x1C -+ -+#define TAS5713_INPUT_MUX 0x20 -+#define TAS5713_SRC_SELECT_CH4 0x21 -+#define TAS5713_PWM_MUX 0x25 -+ -+#define TAS5713_CH1_BQ0 0x29 -+#define TAS5713_CH1_BQ1 0x2A -+#define TAS5713_CH1_BQ2 0x2B -+#define TAS5713_CH1_BQ3 0x2C -+#define TAS5713_CH1_BQ4 0x2D -+#define TAS5713_CH1_BQ5 0x2E -+#define TAS5713_CH1_BQ6 0x2F -+#define TAS5713_CH1_BQ7 0x58 -+#define TAS5713_CH1_BQ8 0x59 -+ -+#define TAS5713_CH2_BQ0 0x30 -+#define TAS5713_CH2_BQ1 0x31 -+#define TAS5713_CH2_BQ2 0x32 -+#define TAS5713_CH2_BQ3 0x33 -+#define TAS5713_CH2_BQ4 0x34 -+#define TAS5713_CH2_BQ5 0x35 -+#define TAS5713_CH2_BQ6 0x36 -+#define TAS5713_CH2_BQ7 0x5C -+#define TAS5713_CH2_BQ8 0x5D -+ -+#define TAS5713_CH4_BQ0 0x5A -+#define TAS5713_CH4_BQ1 0x5B -+#define TAS5713_CH3_BQ0 0x5E -+#define TAS5713_CH3_BQ1 0x5F -+ -+#define TAS5713_DRC1_SOFTENING_FILTER_ALPHA_OMEGA 0x3B -+#define TAS5713_DRC1_ATTACK_RELEASE_RATE 0x3C -+#define TAS5713_DRC2_SOFTENING_FILTER_ALPHA_OMEGA 0x3E -+#define TAS5713_DRC2_ATTACK_RELEASE_RATE 0x3F -+#define TAS5713_DRC1_ATTACK_RELEASE_THRES 0x40 -+#define TAS5713_DRC2_ATTACK_RELEASE_THRES 0x43 -+#define TAS5713_DRC_CTRL 0x46 -+ -+#define TAS5713_BANK_SW_CTRL 0x50 -+#define TAS5713_CH1_OUTPUT_MIXER 0x51 -+#define TAS5713_CH2_OUTPUT_MIXER 0x52 -+#define TAS5713_CH1_INPUT_MIXER 0x53 -+#define TAS5713_CH2_INPUT_MIXER 0x54 -+#define TAS5713_OUTPUT_POST_SCALE 0x56 -+#define TAS5713_OUTPUT_PRESCALE 0x57 -+ -+#define TAS5713_IDF_POST_SCALE 0x62 -+ -+#define TAS5713_CH1_INLINE_MIXER 0x70 -+#define TAS5713_CH1_INLINE_DRC_EN_MIXER 0x71 -+#define TAS5713_CH1_R_CHANNEL_MIXER 0x72 -+#define TAS5713_CH1_L_CHANNEL_MIXER 0x73 -+#define TAS5713_CH2_INLINE_MIXER 0x74 -+#define TAS5713_CH2_INLINE_DRC_EN_MIXER 0x75 -+#define TAS5713_CH2_L_CHANNEL_MIXER 0x76 -+#define TAS5713_CH2_R_CHANNEL_MIXER 0x77 -+ -+#define TAS5713_UPDATE_DEV_ADDR_KEY 0xF8 -+#define TAS5713_UPDATE_DEV_ADDR_REG 0xF9 -+ -+#define TAS5713_REGISTER_COUNT 0x46 -+#define TAS5713_MAX_REGISTER 0xF9 -+ -+ -+// Bitmasks for registers -+#define TAS5713_SOFT_MUTE_ALL 0x07 -+ -+ -+ -+struct tas5713_init_command { -+ const int size; -+ const char *const data; -+}; -+ -+static const struct tas5713_init_command tas5713_init_sequence[] = { -+ -+ // Trim oscillator -+ { .size = 2, .data = "\x1B\x00" }, -+ // System control register 1 (0x03): block DC -+ { .size = 2, .data = "\x03\x80" }, -+ // Mute everything -+ { .size = 2, .data = "\x05\x40" }, -+ // Modulation limit register (0x10): 97.7% -+ { .size = 2, .data = "\x10\x02" }, -+ // Interchannel delay registers -+ // (0x11, 0x12, 0x13, and 0x14): BD mode -+ { .size = 2, .data = "\x11\xB8" }, -+ { .size = 2, .data = "\x12\x60" }, -+ { .size = 2, .data = "\x13\xA0" }, -+ { .size = 2, .data = "\x14\x48" }, -+ // PWM shutdown group register (0x19): no shutdown -+ { .size = 2, .data = "\x19\x00" }, -+ // Input multiplexer register (0x20): BD mode -+ { .size = 2, .data = "\x20\x00\x89\x77\x72" }, -+ // PWM output mux register (0x25) -+ // Channel 1 --> OUTA, channel 1 neg --> OUTB -+ // Channel 2 --> OUTC, channel 2 neg --> OUTD -+ { .size = 5, .data = "\x25\x01\x02\x13\x45" }, -+ // DRC control (0x46): DRC off -+ { .size = 5, .data = "\x46\x00\x00\x00\x00" }, -+ // BKND_ERR register (0x1C): 299ms reset period -+ { .size = 2, .data = "\x1C\x07" }, -+ // Mute channel 3 -+ { .size = 2, .data = "\x0A\xFF" }, -+ // Volume configuration register (0x0E): volume slew 512 steps -+ { .size = 2, .data = "\x0E\x90" }, -+ // Clock control register (0x00): 44/48kHz, MCLK=64xfs -+ { .size = 2, .data = "\x00\x60" }, -+ // Bank switch and eq control (0x50): no bank switching -+ { .size = 5, .data = "\x50\x00\x00\x00\x00" }, -+ // Volume registers (0x07, 0x08, 0x09, 0x0A) -+ { .size = 2, .data = "\x07\x20" }, -+ { .size = 2, .data = "\x08\x30" }, -+ { .size = 2, .data = "\x09\x30" }, -+ { .size = 2, .data = "\x0A\xFF" }, -+ // 0x72, 0x73, 0x76, 0x77 input mixer: -+ // no intermix between channels -+ { .size = 5, .data = "\x72\x00\x00\x00\x00" }, -+ { .size = 5, .data = "\x73\x00\x80\x00\x00" }, -+ { .size = 5, .data = "\x76\x00\x00\x00\x00" }, -+ { .size = 5, .data = "\x77\x00\x80\x00\x00" }, -+ // 0x70, 0x71, 0x74, 0x75 inline DRC mixer: -+ // no inline DRC inmix -+ { .size = 5, .data = "\x70\x00\x80\x00\x00" }, -+ { .size = 5, .data = "\x71\x00\x00\x00\x00" }, -+ { .size = 5, .data = "\x74\x00\x80\x00\x00" }, -+ { .size = 5, .data = "\x75\x00\x00\x00\x00" }, -+ // 0x56, 0x57 Output scale -+ { .size = 5, .data = "\x56\x00\x80\x00\x00" }, -+ { .size = 5, .data = "\x57\x00\x02\x00\x00" }, -+ // 0x3B, 0x3c -+ { .size = 9, .data = "\x3B\x00\x08\x00\x00\x00\x78\x00\x00" }, -+ { .size = 9, .data = "\x3C\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, -+ { .size = 9, .data = "\x3E\x00\x08\x00\x00\x00\x78\x00\x00" }, -+ { .size = 9, .data = "\x3F\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, -+ { .size = 9, .data = "\x40\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, -+ { .size = 9, .data = "\x43\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, -+ // 0x51, 0x52: output mixer -+ { .size = 9, .data = "\x51\x00\x80\x00\x00\x00\x00\x00\x00" }, -+ { .size = 9, .data = "\x52\x00\x80\x00\x00\x00\x00\x00\x00" }, -+ // PEQ defaults -+ { .size = 21, .data = "\x29\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x2A\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x2B\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x2C\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x2D\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x2E\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x2F\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x30\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x31\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x32\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x33\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x34\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x35\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x36\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x58\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x59\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x5C\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x5D\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x5E\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x5F\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x5A\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x5B\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+}; -+ -+ -+#endif /* _TAS5713_H */ - -From 221948e8d60efe31ba9027bd7916033617db3613 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Mon, 9 Jan 2017 09:42:09 +0000 -Subject: [PATCH 117/149] hifiberry-amp: Adjust for ALSA object refactoring - -See: https://github.com/raspberrypi/linux/issues/1775 ---- - sound/soc/codecs/tas5713.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/sound/soc/codecs/tas5713.c b/sound/soc/codecs/tas5713.c -index 9b2713861dcbed751842ca29c88eb1eae5867411..560234d58a6b0a6e7fd3a63e8de73339ee002b1c 100644 ---- a/sound/soc/codecs/tas5713.c -+++ b/sound/soc/codecs/tas5713.c -@@ -232,8 +232,10 @@ static int tas5713_probe(struct snd_soc_codec *codec) - static struct snd_soc_codec_driver soc_codec_dev_tas5713 = { - .probe = tas5713_probe, - .remove = tas5713_remove, -- .controls = tas5713_snd_controls, -- .num_controls = ARRAY_SIZE(tas5713_snd_controls), -+ .component_driver = { -+ .controls = tas5713_snd_controls, -+ .num_controls = ARRAY_SIZE(tas5713_snd_controls), -+ }, - }; - - - -From be3ed0c637843862f3a0d7dd9068e75c2ea66070 Mon Sep 17 00:00:00 2001 -From: Giedrius Trainavicius -Date: Sun, 8 Jan 2017 15:58:54 +0200 -Subject: [PATCH 118/149] bcm2835-i2s: Changes for allowing asymmetric sample - formats. - -This is achieved by making changes only to the requested -stream direction format, keeping the other stream direction -configuration intact. - -Signed-off-by: Giedrius Trainavicius ---- - sound/soc/bcm/bcm2835-i2s.c | 54 +++++++++++++++++++++++++++++++-------------- - 1 file changed, 38 insertions(+), 16 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 6ba20498202ed36906b52096893a88867a79269f..171c2401dfe192740fca3356268aff6432f284ea 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -237,7 +237,9 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - unsigned int sampling_rate = params_rate(params); - unsigned int data_length, data_delay, bclk_ratio; - unsigned int ch1pos, ch2pos, mode, format; -+ unsigned int previous_ftxp, previous_frxp; - uint32_t csreg; -+ bool packed; - - /* - * If a stream is already enabled, -@@ -320,26 +322,46 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - return -EINVAL; - } - -- /* -- * Set format for both streams. -- * We cannot set another frame length -- * (and therefore word length) anyway, -- * so the format will be the same. -- */ -- regmap_write(dev->i2s_regmap, BCM2835_I2S_RXC_A_REG, format); -- regmap_write(dev->i2s_regmap, BCM2835_I2S_TXC_A_REG, format); -+ /* Set the format for the matching stream direction. */ -+ switch (substream->stream) { -+ case SNDRV_PCM_STREAM_PLAYBACK: -+ regmap_write(dev->i2s_regmap, BCM2835_I2S_TXC_A_REG, format); -+ break; -+ case SNDRV_PCM_STREAM_CAPTURE: -+ regmap_write(dev->i2s_regmap, BCM2835_I2S_RXC_A_REG, format); -+ break; -+ default: -+ return -EINVAL; -+ } - - /* Setup the I2S mode */ -+ /* Keep existing FTXP and FRXP values. */ -+ regmap_read(dev->i2s_regmap, BCM2835_I2S_MODE_A_REG, &mode); -+ -+ previous_ftxp = mode & BCM2835_I2S_FTXP; -+ previous_frxp = mode & BCM2835_I2S_FRXP; -+ - mode = 0; - -- if (data_length <= 16) { -- /* -- * Use frame packed mode (2 channels per 32 bit word) -- * We cannot set another frame length in the second stream -- * (and therefore word length) anyway, -- * so the format will be the same. -- */ -- mode |= BCM2835_I2S_FTXP | BCM2835_I2S_FRXP; -+ /* -+ * Retain the frame packed mode (2 channels per 32 bit word) -+ * of the other direction stream intact. The formats of each -+ * direction can be different as long as the frame length is -+ * shared for both. -+ */ -+ packed = data_length <= 16; -+ -+ switch (substream->stream) { -+ case SNDRV_PCM_STREAM_PLAYBACK: -+ mode |= previous_frxp; -+ mode |= packed ? BCM2835_I2S_FTXP : 0; -+ break; -+ case SNDRV_PCM_STREAM_CAPTURE: -+ mode |= previous_ftxp; -+ mode |= packed ? BCM2835_I2S_FRXP : 0; -+ break; -+ default: -+ return -EINVAL; - } - - mode |= BCM2835_I2S_FLEN(bclk_ratio - 1); - -From b8bbe16e827ecc88d18d8fe2e8d960dae5b96f56 Mon Sep 17 00:00:00 2001 +From d72d3147ef62a6da9b073b2d103a529aa7481c67 Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Tue, 10 Jan 2017 16:05:41 +0000 -Subject: [PATCH 119/149] Add driver_name property +Subject: [PATCH 102/143] Add driver_name property Add driver name property for use with 5.1 passthrough audio in LibreElec and other Kodi based OSs --- @@ -126520,10 +124695,10 @@ index 8fd50dbe681508a2cfe8fdde1c9fedbe9a507fa7..05a224ec712d06b8b7587ab6b8bb562d .dai_link = snd_rpi_justboom_dac_dai, .num_links = ARRAY_SIZE(snd_rpi_justboom_dac_dai), -From a977159dd672ff78d5389c02f6ba978ebd63ba0c Mon Sep 17 00:00:00 2001 +From 38aedb6db6a04fc234a823f2da4274b0712f8c8d Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Tue, 10 Jan 2017 16:11:04 +0000 -Subject: [PATCH 120/149] Add driver_name paramater +Subject: [PATCH 103/143] Add driver_name paramater Add driver_name parameter for use with 5.1 passthrough audio in LibreElec and other Kodi OSs --- @@ -126543,10 +124718,10 @@ index 91acb666380faa3c0deb2230f8a0f8bbec59417b..abfdc5c4dd5811e6847bddda4921abe3 .dai_link = snd_rpi_justboom_digi_dai, .num_links = ARRAY_SIZE(snd_rpi_justboom_digi_dai), -From e66f8251c1708277794ac5c778af99a2be1eef62 Mon Sep 17 00:00:00 2001 +From 777083226e9e5b3d06c24bac85ced08f6f822cfd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 11 Jan 2017 13:01:21 +0000 -Subject: [PATCH 121/149] BCM270X_DT: Add pi3-disable-wifi overlay +Subject: [PATCH 104/143] BCM270X_DT: Add pi3-disable-wifi overlay pi3-disable-wifi is a minimal overlay to disable the onboard WiFi. @@ -126607,10 +124782,10 @@ index 0000000000000000000000000000000000000000..017199554bf2f4e381efcc7bb71e750c + }; +}; -From 85fc7151c062d272d89f68487413f43d3191f215 Mon Sep 17 00:00:00 2001 +From 8c98940e11190aa70ee56241e0b666e7adae7675 Mon Sep 17 00:00:00 2001 From: Electron752 Date: Thu, 12 Jan 2017 07:07:08 -0800 -Subject: [PATCH 122/149] ARM64: Make it work again on 4.9 (#1790) +Subject: [PATCH 105/143] ARM64: Make it work again on 4.9 (#1790) * Invoke the dtc compiler with the same options used in arm mode. * ARM64 now uses the bcm2835 platform just like ARM32. @@ -126621,12 +124796,12 @@ Signed-off-by: Michael Zoran arch/arm64/Kconfig.platforms | 22 ------ arch/arm64/boot/dts/broadcom/Makefile | 10 ++- arch/arm64/boot/dts/overlays | 1 + - arch/arm64/configs/bcmrpi3_defconfig | 126 ++++++++++------------------------ - 4 files changed, 48 insertions(+), 111 deletions(-) + arch/arm64/configs/bcmrpi3_defconfig | 125 +++++++++++----------------------- + 4 files changed, 48 insertions(+), 110 deletions(-) create mode 120000 arch/arm64/boot/dts/overlays diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms -index 7d213c2c904271c7a4622b83cd55a750d237bc2e..101794f5ce1008b7ff007fbfc7fa23d9e63bae67 100644 +index 5289515a5b3bdfc85b7b6f1153e55b8ee760e96c..715ef1256838ed4b14d21c9ee8885d10c64fb0fc 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -1,27 +1,5 @@ @@ -126687,7 +124862,7 @@ index 0000000000000000000000000000000000000000..ded08646b6f66cdf734f8bf9c1be3a2e +../../../arm/boot/dts/overlays \ No newline at end of file diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig -index 53da5c7a33e5898a66e549fb0c39fe3da555ca87..c7e891d72969a388d9b135a36dbfc9c9cb609bf8 100644 +index e6b09fafa27eed2b762e3d53b55041f793683d27..c7e891d72969a388d9b135a36dbfc9c9cb609bf8 100644 --- a/arch/arm64/configs/bcmrpi3_defconfig +++ b/arch/arm64/configs/bcmrpi3_defconfig @@ -1,52 +1,9 @@ @@ -127008,17 +125183,224 @@ index 53da5c7a33e5898a66e549fb0c39fe3da555ca87..c7e891d72969a388d9b135a36dbfc9c9 CONFIG_IRQSOFF_TRACER=y CONFIG_SCHED_TRACER=y CONFIG_STACK_TRACER=y -@@ -1331,5 +1283,3 @@ CONFIG_CRYPTO_USER_API_SKCIPHER=m +@@ -1331,4 +1283,3 @@ CONFIG_CRYPTO_USER_API_SKCIPHER=m CONFIG_ARM64_CRYPTO=y CONFIG_CRC_ITU_T=y CONFIG_LIBCRC32C=y --CONFIG_BCM2708_VCHIQ=n --CONFIG_ARCH_BCM2835=y +-CONFIG_BCM2835_VCHIQ=n -From a87c30ed2b1e1597f229201b847d32e3b748e265 Mon Sep 17 00:00:00 2001 +From 8f1f3cb604b6a02ae7aec733ac4930f9409a9470 Mon Sep 17 00:00:00 2001 +From: Michael Zoran +Date: Thu, 12 Jan 2017 18:56:54 -0800 +Subject: [PATCH 106/143] ARM64: Fix bad cast in vc04_services + +The function vchiq_copy_from_user contains a non-portable +cast to uint32_t. Convert this to a cast to unsigned long +which is portable. + +Signed-off-by: Michael Zoran +--- + drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +index 706e7f936c1a97352f7ef3d3fbd3b4a92943165d..c2108dec3096fffd68261f0eb29a37d3c5ef218c 100644 +--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c ++++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +@@ -235,7 +235,7 @@ remote_event_signal(REMOTE_EVENT_T *event) + int + vchiq_copy_from_user(void *dst, const void *src, int size) + { +- if ((uint32_t)src < TASK_SIZE) { ++ if ((unsigned long)src < TASK_SIZE) { + return copy_from_user(dst, src, size); + } else { + memcpy(dst, src, size); + +From 9676247b36fc83b7ed908c052b00a3fcc323e9b9 Mon Sep 17 00:00:00 2001 +From: Michael Zoran +Date: Thu, 12 Jan 2017 19:05:46 -0800 +Subject: [PATCH 107/143] ARM64/SND_BCM2835: Port it to arm64. + +In the messages sent to VCHIQ, SND_BCM2835 passes a callback +and a context into two 32 bit pointers. Since this +message is interpreted by the firmware, it can't be easily +changed. Luckily only one of these fields is actual used, +so on ARM64 only use one of the fields to store the upper +half of the 64 bit callback pointer. + +The Kconfig is also changed to allow ARM audio to work for ARM64 +as well. + +Signed-off-by: Michael Zoran +--- + sound/arm/Kconfig | 2 +- + sound/arm/bcm2835-vchiq.c | 11 +++++++++++ + sound/arm/vc_vchi_audioserv_defs.h | 10 ++++++++++ + 3 files changed, 22 insertions(+), 1 deletion(-) + +diff --git a/sound/arm/Kconfig b/sound/arm/Kconfig +index 42581e2f65dfedba6207b6a377a1e1b5df4f2e4b..b427dfe35ad0427db74776dfcb43b7573d9e6e7d 100644 +--- a/sound/arm/Kconfig ++++ b/sound/arm/Kconfig +@@ -2,7 +2,7 @@ + + menuconfig SND_ARM + bool "ARM sound devices" +- depends on ARM ++ depends on (ARM || ARM64) + default y + help + Support for sound devices specific to ARM architectures. +diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c +index 7ee436ca9fa2903d41d1bdd8f8f0774025d22ae0..246ae501b7d98498964b41f355ad65046a6ae893 100755 +--- a/sound/arm/bcm2835-vchiq.c ++++ b/sound/arm/bcm2835-vchiq.c +@@ -226,7 +226,13 @@ static void audio_vchi_callback(void *param, + complete(&instance->msg_avail_comp); + } else if (m.type == VC_AUDIO_MSG_TYPE_COMPLETE) { + bcm2835_alsa_stream_t *alsa_stream = instance->alsa_stream; ++#if defined(CONFIG_64BIT) ++ irq_handler_t callback = ++ (irq_handler_t) (((unsigned long)m.u.complete.callbackl) | ++ ((unsigned long)m.u.complete.callbackh << 32)); ++#else + irq_handler_t callback = (irq_handler_t) m.u.complete.callback; ++#endif + LOG_DBG + (" .. instance=%p, m.type=VC_AUDIO_MSG_TYPE_COMPLETE, complete=%d\n", + instance, m.u.complete.count); +@@ -803,8 +809,13 @@ int bcm2835_audio_write_worker(bcm2835_alsa_stream_t *alsa_stream, + m.u.write.count = count; + // old version uses bulk, new version uses control + m.u.write.max_packet = instance->peer_version < 2 || force_bulk ? 0:4000; ++#if defined(CONFIG_64BIT) ++ m.u.write.callbackl = (uint32_t)(((unsigned long)alsa_stream->fifo_irq_handler)&0xFFFFFFFF); ++ m.u.write.callbackh = (uint32_t)((((unsigned long)alsa_stream->fifo_irq_handler) >> 32)&0xFFFFFFFF); ++#else + m.u.write.callback = alsa_stream->fifo_irq_handler; + m.u.write.cookie = alsa_stream; ++#endif + m.u.write.silence = src == NULL; + + /* Send the message to the videocore */ +diff --git a/sound/arm/vc_vchi_audioserv_defs.h b/sound/arm/vc_vchi_audioserv_defs.h +index af3e6eb690113fc32ce9e06bd2f0f294da7a7f00..ede6154bc09d38469a82008174d0e35749fd9932 100644 +--- a/sound/arm/vc_vchi_audioserv_defs.h ++++ b/sound/arm/vc_vchi_audioserv_defs.h +@@ -78,8 +78,13 @@ typedef struct { + // configure the write audio samples + typedef struct { + uint32_t count; // in bytes ++#if defined(CONFIG_64BIT) ++ uint32_t callbackl; ++ uint32_t callbackh; ++#else + void *callback; + void *cookie; ++#endif + uint16_t silence; + uint16_t max_packet; + } VC_AUDIO_WRITE_T; +@@ -93,8 +98,13 @@ typedef struct { + // Generic result for a request (VC->HOST) + typedef struct { + int32_t count; // Success value ++#if defined(CONFIG_64BIT) ++ uint32_t callbackl; ++ uint32_t callbackh; ++#else + void *callback; + void *cookie; ++#endif + } VC_AUDIO_COMPLETE_T; + + // Message header for all messages in HOST->VC direction + +From 0e2f25b763a178a40c3d41db607f8274356cf9ee Mon Sep 17 00:00:00 2001 +From: Michael Zoran +Date: Thu, 12 Jan 2017 19:10:07 -0800 +Subject: [PATCH 108/143] ARM64: Enable HDMI audio and vc04_services in + bcmrpi3_defconfig + +Signed-off-by: Michael Zoran +--- + arch/arm64/configs/bcmrpi3_defconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig +index c7e891d72969a388d9b135a36dbfc9c9cb609bf8..4b90f9b64abe9f089ba56b13d5a00de33343bfb9 100644 +--- a/arch/arm64/configs/bcmrpi3_defconfig ++++ b/arch/arm64/configs/bcmrpi3_defconfig +@@ -841,6 +841,7 @@ CONFIG_SND_VIRMIDI=m + CONFIG_SND_MTPAV=m + CONFIG_SND_SERIAL_U16550=m + CONFIG_SND_MPU401=m ++CONFIG_SND_BCM2835=m + CONFIG_SND_USB_AUDIO=m + CONFIG_SND_USB_UA101=m + CONFIG_SND_USB_CAIAQ=m +@@ -1125,7 +1126,6 @@ CONFIG_FB_TFT_UPD161704=m + CONFIG_FB_TFT_WATTEROTT=m + CONFIG_FB_FLEX=m + CONFIG_FB_TFT_FBTFT_DEVICE=m +-# CONFIG_BCM2708_VCHIQ is not set + CONFIG_MAILBOX=y + CONFIG_BCM2835_MBOX=y + # CONFIG_IOMMU_SUPPORT is not set + +From 03d5ad561d3ffd312f88445ec5f6ec0ab9527fde Mon Sep 17 00:00:00 2001 +From: Michael Zoran +Date: Thu, 12 Jan 2017 19:14:03 -0800 +Subject: [PATCH 109/143] ARM64: Run bcmrpi3_defconfig through savedefconfig. + +Signed-off-by: Michael Zoran +--- + arch/arm64/configs/bcmrpi3_defconfig | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig +index 4b90f9b64abe9f089ba56b13d5a00de33343bfb9..dac962ca1634662ce7d966f1ffb53b5bfa27c506 100644 +--- a/arch/arm64/configs/bcmrpi3_defconfig ++++ b/arch/arm64/configs/bcmrpi3_defconfig +@@ -113,8 +113,6 @@ CONFIG_NF_CONNTRACK=m + CONFIG_NF_CONNTRACK_ZONES=y + CONFIG_NF_CONNTRACK_EVENTS=y + CONFIG_NF_CONNTRACK_TIMESTAMP=y +-CONFIG_NF_CT_PROTO_DCCP=m +-CONFIG_NF_CT_PROTO_UDPLITE=m + CONFIG_NF_CONNTRACK_AMANDA=m + CONFIG_NF_CONNTRACK_FTP=m + CONFIG_NF_CONNTRACK_H323=m +@@ -177,7 +175,6 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m + CONFIG_NETFILTER_XT_MATCH_RATEEST=m + CONFIG_NETFILTER_XT_MATCH_REALM=m + CONFIG_NETFILTER_XT_MATCH_RECENT=m +-CONFIG_NETFILTER_XT_MATCH_SOCKET=m + CONFIG_NETFILTER_XT_MATCH_STATE=m + CONFIG_NETFILTER_XT_MATCH_STATISTIC=m + CONFIG_NETFILTER_XT_MATCH_STRING=m +@@ -578,7 +575,6 @@ CONFIG_GAMEPORT_L4=m + # CONFIG_BCM2835_DEVGPIOMEM is not set + # CONFIG_BCM2835_SMI_DEV is not set + # CONFIG_LEGACY_PTYS is not set +-# CONFIG_DEVKMEM is not set + CONFIG_SERIAL_8250=y + # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set + CONFIG_SERIAL_8250_CONSOLE=y +@@ -1095,7 +1091,6 @@ CONFIG_LIRC_STAGING=y + CONFIG_LIRC_IMON=m + CONFIG_LIRC_RPI=m + CONFIG_LIRC_SASEM=m +-CONFIG_LIRC_SERIAL=m + CONFIG_FB_TFT=m + CONFIG_FB_TFT_AGM1264K_FL=m + CONFIG_FB_TFT_BD663474=m + +From bae403b696c8f60057e8a025886ae67b287fc4c0 Mon Sep 17 00:00:00 2001 From: Electron752 Date: Sat, 14 Jan 2017 02:54:26 -0800 -Subject: [PATCH 123/149] ARM64: Enable Kernel Address Space Randomization +Subject: [PATCH 110/143] ARM64: Enable Kernel Address Space Randomization (#1792) Randomization allows the mapping between virtual addresses and physical @@ -127038,7 +125420,7 @@ Signed-off-by: Michael Zoran 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig -index c7e891d72969a388d9b135a36dbfc9c9cb609bf8..974d8889c0cf695eb88b57bbef11bc5aa556b635 100644 +index dac962ca1634662ce7d966f1ffb53b5bfa27c506..aae33b4b3c3e736ea7cd3ca242158ad6ba558aff 100644 --- a/arch/arm64/configs/bcmrpi3_defconfig +++ b/arch/arm64/configs/bcmrpi3_defconfig @@ -53,6 +53,7 @@ CONFIG_ARMV8_DEPRECATED=y @@ -127050,10 +125432,10 @@ index c7e891d72969a388d9b135a36dbfc9c9cb609bf8..974d8889c0cf695eb88b57bbef11bc5a CONFIG_BINFMT_MISC=y CONFIG_COMPAT=y -From 5cfbc146224a3927a6df84d785d0232dffede66e Mon Sep 17 00:00:00 2001 +From 3942188f6df384656ecc00a8721bdbc1cdea8438 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sun, 15 Jan 2017 07:31:59 -0800 -Subject: [PATCH 124/149] ARM64: Enable RTL8187/RTL8192CU wifi in build config +Subject: [PATCH 111/143] ARM64: Enable RTL8187/RTL8192CU wifi in build config These drivers build now, so they can be enabled back in the build configuration just like they are for @@ -127065,10 +125447,10 @@ Signed-off-by: Michael Zoran 1 file changed, 2 insertions(+) diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig -index 974d8889c0cf695eb88b57bbef11bc5aa556b635..4670a490dfb1e582ec24a3b39a3cb9b2488b1864 100644 +index aae33b4b3c3e736ea7cd3ca242158ad6ba558aff..b7d762df19b85e369a32cd823dfd062145bdefa7 100644 --- a/arch/arm64/configs/bcmrpi3_defconfig +++ b/arch/arm64/configs/bcmrpi3_defconfig -@@ -531,6 +531,8 @@ CONFIG_RT2800USB_RT3573=y +@@ -528,6 +528,8 @@ CONFIG_RT2800USB_RT3573=y CONFIG_RT2800USB_RT53XX=y CONFIG_RT2800USB_RT55XX=y CONFIG_RT2800USB_UNKNOWN=y @@ -127078,10 +125460,10 @@ index 974d8889c0cf695eb88b57bbef11bc5aa556b635..4670a490dfb1e582ec24a3b39a3cb9b2 CONFIG_ZD1211RW=m CONFIG_MAC80211_HWSIM=m -From 5bcbaf6edf9d75012b7150d7341cb36df540f897 Mon Sep 17 00:00:00 2001 +From 9d0130fcb9311c2db10e4b49b4faab7e28f19d4b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 16 Jan 2017 14:53:12 +0000 -Subject: [PATCH 125/149] BCM270X_DT: Add spi0-cs overlay +Subject: [PATCH 112/143] BCM270X_DT: Add spi0-cs overlay The spi0-cs overlay allows the software chip selectts to be modified using the cs0_pin and cs1_pin parameters. @@ -127169,10 +125551,10 @@ index 0000000000000000000000000000000000000000..7f79029d043c04d7496c7c3480450c69 + }; +}; -From 86353d0f5bf515a823da66db6d50f71117005387 Mon Sep 17 00:00:00 2001 +From 06935466e531c3423bb46c5043b14d0577ce113d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 Jul 2016 22:09:24 +0100 -Subject: [PATCH 126/149] spi-bcm2835: Disable forced software CS +Subject: [PATCH 113/143] spi-bcm2835: Disable forced software CS Select software CS in bcm2708_common.dtsi, and disable the automatic conversion in the driver to allow hardware CS to be re-enabled with an @@ -127186,10 +125568,10 @@ Signed-off-by: Phil Elwell 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi -index 74dd21b7373c7564ede01d84a4f63b93a6d52fa7..51cdefbf5eb265f49bd05e0aa91dfbeee3fbfdcc 100644 +index 9a44da19089717f02462c657840ae9f24fd942ba..b710a4d67b8ec8c8c18ce8efb6f270e7cfb68e52 100644 --- a/arch/arm/boot/dts/bcm283x.dtsi +++ b/arch/arm/boot/dts/bcm283x.dtsi -@@ -163,6 +163,7 @@ +@@ -366,6 +366,7 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; @@ -127198,141 +125580,10 @@ index 74dd21b7373c7564ede01d84a4f63b93a6d52fa7..51cdefbf5eb265f49bd05e0aa91dfbee i2c0: i2c@7e205000 { -From f804c96b11f07849e37fe71e732cfc855b6d5b7f Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Mon, 16 Jan 2017 16:33:54 +0000 -Subject: [PATCH 127/149] config: Add CONFIG_TCP_CONG_BBR See: - https://github.com/raspberrypi/linux/issues/1784 - ---- - arch/arm/configs/bcm2709_defconfig | 2 ++ - arch/arm/configs/bcmrpi_defconfig | 2 ++ - 2 files changed, 4 insertions(+) - -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 12e8155c175deaecea6fcf1f81ec3f6c1ddf5f7c..22ade0fe5a1515b59b0ac6e58bd133b64e6252f3 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -99,6 +99,8 @@ CONFIG_INET_XFRM_MODE_TRANSPORT=m - CONFIG_INET_XFRM_MODE_TUNNEL=m - CONFIG_INET_XFRM_MODE_BEET=m - CONFIG_INET_DIAG=m -+CONFIG_TCP_CONG_ADVANCED=y -+CONFIG_TCP_CONG_BBR=m - CONFIG_IPV6=m - CONFIG_IPV6_ROUTER_PREF=y - CONFIG_INET6_AH=m -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 8acee9f31202ec14f2933d92dd70831cda8d7b51..219f67051a2542329449b0099165ae2885022bec 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -95,6 +95,8 @@ CONFIG_INET_XFRM_MODE_TRANSPORT=m - CONFIG_INET_XFRM_MODE_TUNNEL=m - CONFIG_INET_XFRM_MODE_BEET=m - CONFIG_INET_DIAG=m -+CONFIG_TCP_CONG_ADVANCED=y -+CONFIG_TCP_CONG_BBR=m - CONFIG_IPV6=m - CONFIG_IPV6_ROUTER_PREF=y - CONFIG_INET6_AH=m - -From 54682764ccd01af5122b7b2619575d2371646124 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Mon, 16 Jan 2017 21:02:26 +0000 -Subject: [PATCH 128/149] Revert "bcm2835-i2s: Changes for allowing asymmetric - sample formats." - -This reverts commit f5a6236a32e82068122301d246a94ca755d61704. - -See: https://github.com/raspberrypi/linux/issues/1799 - -Signed-off-by: Phil Elwell ---- - sound/soc/bcm/bcm2835-i2s.c | 54 ++++++++++++++------------------------------- - 1 file changed, 16 insertions(+), 38 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 171c2401dfe192740fca3356268aff6432f284ea..6ba20498202ed36906b52096893a88867a79269f 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -237,9 +237,7 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - unsigned int sampling_rate = params_rate(params); - unsigned int data_length, data_delay, bclk_ratio; - unsigned int ch1pos, ch2pos, mode, format; -- unsigned int previous_ftxp, previous_frxp; - uint32_t csreg; -- bool packed; - - /* - * If a stream is already enabled, -@@ -322,46 +320,26 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - return -EINVAL; - } - -- /* Set the format for the matching stream direction. */ -- switch (substream->stream) { -- case SNDRV_PCM_STREAM_PLAYBACK: -- regmap_write(dev->i2s_regmap, BCM2835_I2S_TXC_A_REG, format); -- break; -- case SNDRV_PCM_STREAM_CAPTURE: -- regmap_write(dev->i2s_regmap, BCM2835_I2S_RXC_A_REG, format); -- break; -- default: -- return -EINVAL; -- } -+ /* -+ * Set format for both streams. -+ * We cannot set another frame length -+ * (and therefore word length) anyway, -+ * so the format will be the same. -+ */ -+ regmap_write(dev->i2s_regmap, BCM2835_I2S_RXC_A_REG, format); -+ regmap_write(dev->i2s_regmap, BCM2835_I2S_TXC_A_REG, format); - - /* Setup the I2S mode */ -- /* Keep existing FTXP and FRXP values. */ -- regmap_read(dev->i2s_regmap, BCM2835_I2S_MODE_A_REG, &mode); -- -- previous_ftxp = mode & BCM2835_I2S_FTXP; -- previous_frxp = mode & BCM2835_I2S_FRXP; -- - mode = 0; - -- /* -- * Retain the frame packed mode (2 channels per 32 bit word) -- * of the other direction stream intact. The formats of each -- * direction can be different as long as the frame length is -- * shared for both. -- */ -- packed = data_length <= 16; -- -- switch (substream->stream) { -- case SNDRV_PCM_STREAM_PLAYBACK: -- mode |= previous_frxp; -- mode |= packed ? BCM2835_I2S_FTXP : 0; -- break; -- case SNDRV_PCM_STREAM_CAPTURE: -- mode |= previous_ftxp; -- mode |= packed ? BCM2835_I2S_FRXP : 0; -- break; -- default: -- return -EINVAL; -+ if (data_length <= 16) { -+ /* -+ * Use frame packed mode (2 channels per 32 bit word) -+ * We cannot set another frame length in the second stream -+ * (and therefore word length) anyway, -+ * so the format will be the same. -+ */ -+ mode |= BCM2835_I2S_FTXP | BCM2835_I2S_FRXP; - } - - mode |= BCM2835_I2S_FLEN(bclk_ratio - 1); - -From eedc59743c00dde5c9d8cc84e1d2201c1020e1a6 Mon Sep 17 00:00:00 2001 +From 344059857429edb2332ea788e2c256668f24a609 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 17 Jan 2017 11:34:58 +0000 -Subject: [PATCH 129/149] BCM270X_DT: Enable UART0 on CM3 +Subject: [PATCH 114/143] BCM270X_DT: Enable UART0 on CM3 Signed-off-by: Phil Elwell --- @@ -127355,24 +125606,41 @@ index 41874c25a84226c0e4af92ec4059e0a571fe6123..3ba6e621856c288ae4694f758604619f sdhost_pins: sdhost_pins { brcm,pins = <48 49 50 51 52 53>; -From aa0ddaf213aa2aaa6c2e0b1bfdd084dc5596a110 Mon Sep 17 00:00:00 2001 +From af4413600326fef6041165c26a66c1cee892233a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 17 Jan 2017 14:39:39 +0000 -Subject: [PATCH 130/149] config: Add CONFIG_MD_M25P80 and CONFIG_MD_SPI_NOR +Subject: [PATCH 115/143] config: Add CONFIG_MD_M25P80 and CONFIG_MD_SPI_NOR See: https://github.com/raspberrypi/linux/issues/1781 Signed-off-by: Phil Elwell --- - arch/arm/configs/bcm2709_defconfig | 2 ++ - arch/arm/configs/bcmrpi_defconfig | 2 ++ - 2 files changed, 4 insertions(+) + arch/arm/configs/bcm2709_defconfig | 7 ++----- + arch/arm/configs/bcmrpi_defconfig | 7 ++----- + 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 22ade0fe5a1515b59b0ac6e58bd133b64e6252f3..d5d699e175025e5d928fcac04d22d1508e0b5fde 100644 +index 12e8155c175deaecea6fcf1f81ec3f6c1ddf5f7c..c36f01d28097a513b32df092ce64a7d6b974e615 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig -@@ -406,7 +406,9 @@ CONFIG_DMA_CMA=y +@@ -115,8 +115,6 @@ CONFIG_NF_CONNTRACK=m + CONFIG_NF_CONNTRACK_ZONES=y + CONFIG_NF_CONNTRACK_EVENTS=y + CONFIG_NF_CONNTRACK_TIMESTAMP=y +-CONFIG_NF_CT_PROTO_DCCP=m +-CONFIG_NF_CT_PROTO_UDPLITE=m + CONFIG_NF_CONNTRACK_AMANDA=m + CONFIG_NF_CONNTRACK_FTP=m + CONFIG_NF_CONNTRACK_H323=m +@@ -179,7 +177,6 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m + CONFIG_NETFILTER_XT_MATCH_RATEEST=m + CONFIG_NETFILTER_XT_MATCH_REALM=m + CONFIG_NETFILTER_XT_MATCH_RECENT=m +-CONFIG_NETFILTER_XT_MATCH_SOCKET=m + CONFIG_NETFILTER_XT_MATCH_STATE=m + CONFIG_NETFILTER_XT_MATCH_STATISTIC=m + CONFIG_NETFILTER_XT_MATCH_STRING=m +@@ -404,7 +401,9 @@ CONFIG_DMA_CMA=y CONFIG_CMA_SIZE_MBYTES=5 CONFIG_MTD=m CONFIG_MTD_BLOCK=m @@ -127382,11 +125650,44 @@ index 22ade0fe5a1515b59b0ac6e58bd133b64e6252f3..d5d699e175025e5d928fcac04d22d150 CONFIG_MTD_UBI=m CONFIG_OF_CONFIGFS=y CONFIG_ZRAM=m +@@ -584,7 +583,6 @@ CONFIG_BCM_VC_CMA=y + CONFIG_BCM_VCIO=y + CONFIG_BCM_VC_SM=y + # CONFIG_LEGACY_PTYS is not set +-# CONFIG_DEVKMEM is not set + CONFIG_SERIAL_8250=y + # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set + CONFIG_SERIAL_8250_CONSOLE=y +@@ -1104,7 +1102,6 @@ CONFIG_LIRC_STAGING=y + CONFIG_LIRC_IMON=m + CONFIG_LIRC_RPI=m + CONFIG_LIRC_SASEM=m +-CONFIG_LIRC_SERIAL=m + CONFIG_FB_TFT=m + CONFIG_FB_TFT_AGM1264K_FL=m + CONFIG_FB_TFT_BD663474=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 219f67051a2542329449b0099165ae2885022bec..c4898d63d74718097ec3a1d1fe60b2307a6a3140 100644 +index 8acee9f31202ec14f2933d92dd70831cda8d7b51..aca8903da3156de11ba62afa64a0693900ee3611 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -402,7 +402,9 @@ CONFIG_DMA_CMA=y +@@ -111,8 +111,6 @@ CONFIG_NF_CONNTRACK=m + CONFIG_NF_CONNTRACK_ZONES=y + CONFIG_NF_CONNTRACK_EVENTS=y + CONFIG_NF_CONNTRACK_TIMESTAMP=y +-CONFIG_NF_CT_PROTO_DCCP=m +-CONFIG_NF_CT_PROTO_UDPLITE=m + CONFIG_NF_CONNTRACK_AMANDA=m + CONFIG_NF_CONNTRACK_FTP=m + CONFIG_NF_CONNTRACK_H323=m +@@ -175,7 +173,6 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m + CONFIG_NETFILTER_XT_MATCH_RATEEST=m + CONFIG_NETFILTER_XT_MATCH_REALM=m + CONFIG_NETFILTER_XT_MATCH_RECENT=m +-CONFIG_NETFILTER_XT_MATCH_SOCKET=m + CONFIG_NETFILTER_XT_MATCH_STATE=m + CONFIG_NETFILTER_XT_MATCH_STATISTIC=m + CONFIG_NETFILTER_XT_MATCH_STRING=m +@@ -400,7 +397,9 @@ CONFIG_DMA_CMA=y CONFIG_CMA_SIZE_MBYTES=5 CONFIG_MTD=m CONFIG_MTD_BLOCK=m @@ -127396,11 +125697,27 @@ index 219f67051a2542329449b0099165ae2885022bec..c4898d63d74718097ec3a1d1fe60b230 CONFIG_MTD_UBI=m CONFIG_OF_CONFIGFS=y CONFIG_ZRAM=m +@@ -579,7 +578,6 @@ CONFIG_BCM_VC_CMA=y + CONFIG_BCM_VCIO=y + CONFIG_BCM_VC_SM=y + # CONFIG_LEGACY_PTYS is not set +-# CONFIG_DEVKMEM is not set + CONFIG_SERIAL_8250=y + # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set + CONFIG_SERIAL_8250_CONSOLE=y +@@ -1113,7 +1111,6 @@ CONFIG_LIRC_STAGING=y + CONFIG_LIRC_IMON=m + CONFIG_LIRC_RPI=m + CONFIG_LIRC_SASEM=m +-CONFIG_LIRC_SERIAL=m + CONFIG_FB_TFT=m + CONFIG_FB_TFT_AGM1264K_FL=m + CONFIG_FB_TFT_BD663474=m -From 0ba04737b4084397e421438959854be82e9ed39a Mon Sep 17 00:00:00 2001 +From 2db22e08eb782d9b31df67d4a2d2b6d3e2229222 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:33:51 -0800 -Subject: [PATCH 131/149] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 +Subject: [PATCH 116/143] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 In ARM64, the FIQ mechanism used by this driver is not current implemented. As a workaround, reqular IRQ is used instead @@ -127743,10 +126060,10 @@ index 6b2c7d0c93f36a63863ff4b0ecc1f3eab77e058b..d7b700ff17821ad1944e36721fe6b2db /** The OS page size */ #define DWC_OS_PAGE_SIZE PAGE_SIZE -From f73fbbcf313db778386bc6c9876e82f9dfd8f539 Mon Sep 17 00:00:00 2001 +From 3fd685e26219daae1087d48f160f6121f6fffb87 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:43:57 -0800 -Subject: [PATCH 132/149] ARM64: Round-Robin dispatch IRQs between CPUs. +Subject: [PATCH 117/143] ARM64: Round-Robin dispatch IRQs between CPUs. IRQ-CPU mapping is round robined on ARM64 to increase concurrency and allow multiple interrupts to be serviced @@ -127788,7 +126105,7 @@ index 8ed457fd74bd23bee27b64a2c9e3828ce0e4fb87..a035e1ceacc0494fa293e6811ff8f7e3 static int armctrl_xlate(struct irq_domain *d, struct device_node *ctrlr, diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c -index 93e3f7660c4230c9f1dd3b195958cb498949b0ca..486bcbfb32305ee417f6b3be7e91a3ff069a586c 100644 +index a8db33b50ad9ff83d284fa54fe4d3b65f859df0f..67dcac46cca72db4ebe2300eab04f0a867e8e14b 100644 --- a/drivers/irqchip/irq-bcm2836.c +++ b/drivers/irqchip/irq-bcm2836.c @@ -145,6 +145,27 @@ static void bcm2836_arm_irqchip_unmask_gpu_irq(struct irq_data *d) @@ -127820,10 +126137,10 @@ index 93e3f7660c4230c9f1dd3b195958cb498949b0ca..486bcbfb32305ee417f6b3be7e91a3ff .name = "bcm2836-gpu", .irq_mask = bcm2836_arm_irqchip_mask_gpu_irq, -From 9fed57ad096fea66274b5a6abb8f2d0c40bed7da Mon Sep 17 00:00:00 2001 +From 5798b8a6ee69242586c8d244d79acb4a49b32ffe Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:45:03 -0800 -Subject: [PATCH 133/149] ARM64: Enable DWC_OTG Driver In ARM64 Build +Subject: [PATCH 118/143] ARM64: Enable DWC_OTG Driver In ARM64 Build Config(bcmrpi3_defconfig) Signed-off-by: Michael Zoran @@ -127832,10 +126149,10 @@ Signed-off-by: Michael Zoran 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig -index 4670a490dfb1e582ec24a3b39a3cb9b2488b1864..8c4392344eb4495689c220d5d176ee8c189079fd 100644 +index b7d762df19b85e369a32cd823dfd062145bdefa7..4d85c231c5ea0244e1b05fb4a5e3c8fd3e651ddf 100644 --- a/arch/arm64/configs/bcmrpi3_defconfig +++ b/arch/arm64/configs/bcmrpi3_defconfig -@@ -932,6 +932,7 @@ CONFIG_USB_HIDDEV=y +@@ -929,6 +929,7 @@ CONFIG_USB_HIDDEV=y CONFIG_USB=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y CONFIG_USB_MON=m @@ -127844,10 +126161,10 @@ index 4670a490dfb1e582ec24a3b39a3cb9b2488b1864..8c4392344eb4495689c220d5d176ee8c CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE_REALTEK=m -From f5c19a9417262d924ac229bfd9a40a8e03b69048 Mon Sep 17 00:00:00 2001 +From 72a5e963ed3e8137b91a721c8e5c151746a86b7d Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:46:04 -0800 -Subject: [PATCH 134/149] ARM64: Use dwc_otg driver by default for USB. +Subject: [PATCH 119/143] ARM64: Use dwc_otg driver by default for USB. If it breaks on anybody, they can use the standard device tree overlays to switch back to the dwc2 driver. @@ -127873,10 +126190,46 @@ index f6def5d7e5d622cf09e8f87332c7374fe28da08b..3e134a1208610b90e2d0fc22f03c6e9f -}; -#endif -From 9bcbde4275e9332cd79e42746a3bcc107023b30e Mon Sep 17 00:00:00 2001 +From de0e945d578f47f93f927ef11f16b92eb0fe1de8 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 19 Jan 2017 11:18:55 +0000 +Subject: [PATCH 120/143] config: Add CONFIG_USB_DWC2 and CONFIG_USB_GADGET + +The introduction of CM3 makes gadget mode on 2709 a useful option, +so enable the building of the required modules. Note that these +modules are not loaded by default and must be enabled with a DT +overlay. + +Signed-off-by: Phil Elwell +--- + arch/arm/configs/bcm2709_defconfig | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index c36f01d28097a513b32df092ce64a7d6b974e615..2e2b88fefdf367b2d9190ca227ea6eb393faa666 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -958,6 +958,7 @@ CONFIG_USB_MICROTEK=m + CONFIG_USBIP_CORE=m + CONFIG_USBIP_VHCI_HCD=m + CONFIG_USBIP_HOST=m ++CONFIG_USB_DWC2=m + CONFIG_USB_SERIAL=m + CONFIG_USB_SERIAL_GENERIC=y + CONFIG_USB_SERIAL_AIRCABLE=m +@@ -1030,6 +1031,7 @@ CONFIG_USB_SPEEDTOUCH=m + CONFIG_USB_CXACRU=m + CONFIG_USB_UEAGLEATM=m + CONFIG_USB_XUSBATM=m ++CONFIG_USB_GADGET=m + CONFIG_MMC=y + CONFIG_MMC_BLOCK_MINORS=32 + CONFIG_MMC_BCM2835=y + +From bf4fff3dc99c07e8aed32dcbe9e77bf88199a5ba Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 23 Jan 2017 17:36:50 +0000 -Subject: [PATCH 135/149] BCM270X_DT: Add reference to audio_pins to CM dtb +Subject: [PATCH 121/143] BCM270X_DT: Add reference to audio_pins to CM dtb The CM1 dtb contains an empty audio_pins node, but no reference to it. Adding the usual pinctrl reference from the audio node enables the @@ -127904,10 +126257,10 @@ index eb8662f0d222b4c0a9a2bcb8bccb13e86a0006b3..10be69972bd1440f574e35d515f3d6a0 hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; }; -From c89a31b53c17f273198270a18d0613e0c54be761 Mon Sep 17 00:00:00 2001 +From acd57d74b3c2b58a8e30fda9a7690ab3617e12d3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 25 Jan 2017 11:30:38 +0000 -Subject: [PATCH 136/149] config: Add additional network scheduling modules +Subject: [PATCH 122/143] config: Add additional network scheduling modules --- arch/arm/configs/bcm2709_defconfig | 4 ++++ @@ -127915,10 +126268,10 @@ Subject: [PATCH 136/149] config: Add additional network scheduling modules 2 files changed, 8 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index d5d699e175025e5d928fcac04d22d1508e0b5fde..a02d5ebf170be870acb715cc30611bc57e7fd39b 100644 +index 2e2b88fefdf367b2d9190ca227ea6eb393faa666..ce5b564ba5fd0e152a7679747b0d252b8bb2c77a 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig -@@ -296,6 +296,7 @@ CONFIG_NET_SCHED=y +@@ -291,6 +291,7 @@ CONFIG_NET_SCHED=y CONFIG_NET_SCH_CBQ=m CONFIG_NET_SCH_HTB=m CONFIG_NET_SCH_HFSC=m @@ -127926,7 +126279,7 @@ index d5d699e175025e5d928fcac04d22d1508e0b5fde..a02d5ebf170be870acb715cc30611bc5 CONFIG_NET_SCH_PRIO=m CONFIG_NET_SCH_MULTIQ=m CONFIG_NET_SCH_RED=m -@@ -312,6 +313,9 @@ CONFIG_NET_SCH_CHOKE=m +@@ -307,6 +308,9 @@ CONFIG_NET_SCH_CHOKE=m CONFIG_NET_SCH_QFQ=m CONFIG_NET_SCH_CODEL=m CONFIG_NET_SCH_FQ_CODEL=m @@ -127937,10 +126290,10 @@ index d5d699e175025e5d928fcac04d22d1508e0b5fde..a02d5ebf170be870acb715cc30611bc5 CONFIG_NET_SCH_PLUG=m CONFIG_NET_CLS_BASIC=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index c4898d63d74718097ec3a1d1fe60b2307a6a3140..b448eaa866c200f48351819072c7fefcd8ad8132 100644 +index aca8903da3156de11ba62afa64a0693900ee3611..c8c66751f263227e86cc21ad5b23861a88a636a6 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -292,6 +292,7 @@ CONFIG_NET_SCHED=y +@@ -287,6 +287,7 @@ CONFIG_NET_SCHED=y CONFIG_NET_SCH_CBQ=m CONFIG_NET_SCH_HTB=m CONFIG_NET_SCH_HFSC=m @@ -127948,7 +126301,7 @@ index c4898d63d74718097ec3a1d1fe60b2307a6a3140..b448eaa866c200f48351819072c7fefc CONFIG_NET_SCH_PRIO=m CONFIG_NET_SCH_MULTIQ=m CONFIG_NET_SCH_RED=m -@@ -308,6 +309,9 @@ CONFIG_NET_SCH_CHOKE=m +@@ -303,6 +304,9 @@ CONFIG_NET_SCH_CHOKE=m CONFIG_NET_SCH_QFQ=m CONFIG_NET_SCH_CODEL=m CONFIG_NET_SCH_FQ_CODEL=m @@ -127959,10 +126312,48 @@ index c4898d63d74718097ec3a1d1fe60b2307a6a3140..b448eaa866c200f48351819072c7fefc CONFIG_NET_SCH_PLUG=m CONFIG_NET_CLS_BASIC=m -From 464f3dd7fdb322ed62ec9c9163b26492e8f40b5e Mon Sep 17 00:00:00 2001 +From 7eb8cc55a5c43be9072c29138436df54131cc9da Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Mon, 16 Jan 2017 16:33:54 +0000 +Subject: [PATCH 123/143] config: Add CONFIG_TCP_CONG_BBR See: + https://github.com/raspberrypi/linux/issues/1784 + +--- + arch/arm/configs/bcm2709_defconfig | 2 ++ + arch/arm/configs/bcmrpi_defconfig | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index ce5b564ba5fd0e152a7679747b0d252b8bb2c77a..4c0d62d91c2ad6408fbff730b08cb76b62c5e068 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -99,6 +99,8 @@ CONFIG_INET_XFRM_MODE_TRANSPORT=m + CONFIG_INET_XFRM_MODE_TUNNEL=m + CONFIG_INET_XFRM_MODE_BEET=m + CONFIG_INET_DIAG=m ++CONFIG_TCP_CONG_ADVANCED=y ++CONFIG_TCP_CONG_BBR=m + CONFIG_IPV6=m + CONFIG_IPV6_ROUTER_PREF=y + CONFIG_INET6_AH=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index c8c66751f263227e86cc21ad5b23861a88a636a6..e483bdb7aa869b212ef69ed779c6055ef3b70e2a 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -95,6 +95,8 @@ CONFIG_INET_XFRM_MODE_TRANSPORT=m + CONFIG_INET_XFRM_MODE_TUNNEL=m + CONFIG_INET_XFRM_MODE_BEET=m + CONFIG_INET_DIAG=m ++CONFIG_TCP_CONG_ADVANCED=y ++CONFIG_TCP_CONG_BBR=m + CONFIG_IPV6=m + CONFIG_IPV6_ROUTER_PREF=y + CONFIG_INET6_AH=m + +From 736809cbe89cb56b087efaaccc55eb4a5627db33 Mon Sep 17 00:00:00 2001 From: chris johnson Date: Sun, 22 Jan 2017 03:27:31 +0000 -Subject: [PATCH 137/149] ASoC: A simple-card overlay for ADAU7002 +Subject: [PATCH 124/143] ASoC: A simple-card overlay for ADAU7002 Usage: `dtoverlay=adau7002-simple` --- @@ -128060,10 +126451,10 @@ index 0000000000000000000000000000000000000000..e67e6625d7967abc92cf00cb604d4c12 + }; +}; -From f936625f7b6bf04ee9bf4f235b3ef275e8e06d77 Mon Sep 17 00:00:00 2001 +From 8178b62fa432470071fb0fca59a200376094c8b8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Jan 2017 21:17:23 +0000 -Subject: [PATCH 138/149] config: Add SND_SOC_ADAU7002 codec module +Subject: [PATCH 125/143] config: Add SND_SOC_ADAU7002 codec module As there is now an overlay requiring it, build the codec module. @@ -128074,10 +126465,10 @@ Signed-off-by: Phil Elwell 2 files changed, 2 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index a02d5ebf170be870acb715cc30611bc57e7fd39b..31163b59b9c6f2cc4f4f94afe1b10bd1a195470f 100644 +index 4c0d62d91c2ad6408fbff730b08cb76b62c5e068..e017702a34d1e6c7df7aea26032b1fc70b330a40 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig -@@ -884,6 +884,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m +@@ -880,6 +880,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m CONFIG_SND_PISOUND=m CONFIG_SND_SOC_ADAU1701=m @@ -128086,10 +126477,10 @@ index a02d5ebf170be870acb715cc30611bc57e7fd39b..31163b59b9c6f2cc4f4f94afe1b10bd1 CONFIG_SND_SOC_WM8804_I2C=m CONFIG_SND_SIMPLE_CARD=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index b448eaa866c200f48351819072c7fefcd8ad8132..5105a592c9bcfee1cc6a8b50fd1c6c32f1381158 100644 +index e483bdb7aa869b212ef69ed779c6055ef3b70e2a..1927b1671b6eced73e4b4d76352bb4b1301d077c 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -878,6 +878,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m +@@ -874,6 +874,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m CONFIG_SND_PISOUND=m CONFIG_SND_SOC_ADAU1701=m @@ -128098,10 +126489,10 @@ index b448eaa866c200f48351819072c7fefcd8ad8132..5105a592c9bcfee1cc6a8b50fd1c6c32 CONFIG_SND_SOC_WM8804_I2C=m CONFIG_SND_SIMPLE_CARD=m -From bb664687dcd742f62272ab66c02ed61954d11869 Mon Sep 17 00:00:00 2001 +From a6d7fbc3f756abc3c51088ac8509f85c49b16fff Mon Sep 17 00:00:00 2001 From: Scott Ellis Date: Fri, 27 Jan 2017 06:42:42 -0500 -Subject: [PATCH 139/149] Add overlay for mcp3008 adc (#1818) +Subject: [PATCH 126/143] Add overlay for mcp3008 adc (#1818) Some example usage: @@ -128387,65 +126778,10 @@ index 0000000000000000000000000000000000000000..06bf4264959c380d8a9f90f74e780397 + }; +}; -From 98e7504d55858766ba2a9d7450ef18a383845873 Mon Sep 17 00:00:00 2001 -From: ED6E0F17 -Date: Fri, 3 Feb 2017 14:52:42 +0000 -Subject: [PATCH 140/149] usb: dwc2: Avoid suspending if we're in gadget mode - (#1825) - -I've found when booting HiKey with the usb gadget cable attached -if I then try to connect via adb, I get an infinite spew of: - -dwc2 f72c0000.usb: dwc2_hsotg_ep_sethalt(ep ffffffc0790ecb18 ep1out, 0) -dwc2 f72c0000.usb: dwc2_hsotg_ep_sethalt(ep ffffffc0790eca18 ep1in, 0) - -It seems that the usb autosuspend is suspending the bus shortly -after bootup when the gadget cable is attached. So when adbd -then tries to use the device, it doesn't work and it then tries -to restart it over and over via the ep_sethalt calls (via -FUNCTIONFS_CLEAR_HALT ioctl). - -Chen Yu suggested this patch to avoid suspending if we're -in device mode, and it avoids the problem. - -Cc: Wei Xu -Cc: Guodong Xu -Cc: Amit Pundir -Cc: Rob Herring -Cc: John Youn -Cc: Douglas Anderson -Cc: Chen Yu -Cc: Kishon Vijay Abraham I -Cc: Felipe Balbi -Cc: Greg Kroah-Hartman -Cc: linux-usb@vger.kernel.org -Suggested-by: Chen Yu -Signed-off-by: John Stultz -Signed-off-by: John Youn -Signed-off-by: Felipe Balbi ---- - drivers/usb/dwc2/hcd.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c -index df5a065780054f21841ca9f08b8ab118922c530b..619ccfe1eafc4643b16970f8a1129ff9cac38013 100644 ---- a/drivers/usb/dwc2/hcd.c -+++ b/drivers/usb/dwc2/hcd.c -@@ -4365,6 +4365,9 @@ static int _dwc2_hcd_suspend(struct usb_hcd *hcd) - if (!HCD_HW_ACCESSIBLE(hcd)) - goto unlock; - -+ if (hsotg->op_state == OTG_STATE_B_PERIPHERAL) -+ goto unlock; -+ - if (!hsotg->core_params->hibernation) - goto skip_power_saving; - - -From d561e58e9ee26109accc414327bfe142696d6d59 Mon Sep 17 00:00:00 2001 +From fd202b0efb38df7c056c3a0e97cfdebb6470c04d Mon Sep 17 00:00:00 2001 From: JamesH65 Date: Mon, 6 Feb 2017 15:24:47 +0000 -Subject: [PATCH 141/149] gpio_mem: Remove unnecessary dev_info output (#1830) +Subject: [PATCH 127/143] gpio_mem: Remove unnecessary dev_info output (#1830) The open function was spamming syslog every time called, so have removed call completely. @@ -128467,10 +126803,223 @@ index 911f5b7393ed48ceed8751f06967ae6463453f9c..f5e7f1ba8fb6f18dee77fad06a17480c dev_err(inst->dev, "Unknown minor device: %d", dev); ret = -ENXIO; -From 6cfe84eeb23c071019dc6ee8aa6c32950c572e19 Mon Sep 17 00:00:00 2001 +From 46c74000bbbec747bca0c5ab07a538e64392494c Mon Sep 17 00:00:00 2001 +From: Claggy3 +Date: Sat, 11 Feb 2017 14:00:30 +0000 +Subject: [PATCH 128/143] Update vfpmodule.c + +Christopher Alexander Tobias Schulze - May 2, 2015, 11:57 a.m. +This patch fixes a problem with VFP state save and restore related +to exception handling (panic with message "BUG: unsupported FP +instruction in kernel mode") present on VFP11 floating point units +(as used with ARM1176JZF-S CPUs, e.g. on first generation Raspberry +Pi boards). This patch was developed and discussed on + + https://github.com/raspberrypi/linux/issues/859 + +A precondition to see the crashes is that floating point exception +traps are enabled. In this case, the VFP11 might determine that a FPU +operation needs to trap at a point in time when it is not possible to +signal this to the ARM11 core any more. The VFP11 will then set the +FPEXC.EX bit and store the trapped opcode in FPINST. (In some cases, +a second opcode might have been accepted by the VFP11 before the +exception was detected and could be reported to the ARM11 - in this +case, the VFP11 also sets FPEXC.FP2V and stores the second opcode in +FPINST2.) + +If FPEXC.EX is set, the VFP11 will "bounce" the next FPU opcode issued +by the ARM11 CPU, which will be seen by the ARM11 as an undefined opcode +trap. The VFP support code examines the FPEXC.EX and FPEXC.FP2V bits +to decide what actions to take, i.e., whether to emulate the opcodes +found in FPINST and FPINST2, and whether to retry the bounced instruction. + +If a user space application has left the VFP11 in this "pending trap" +state, the next FPU opcode issued to the VFP11 might actually be the +VSTMIA operation vfp_save_state() uses to store the FPU registers +to memory (in our test cases, when building the signal stack frame). +In this case, the kernel crashes as described above. + +This patch fixes the problem by making sure that vfp_save_state() is +always entered with FPEXC.EX cleared. (The current value of FPEXC has +already been saved, so this does not corrupt the context. Clearing +FPEXC.EX has no effects on FPINST or FPINST2. Also note that many +callers already modify FPEXC by setting FPEXC.EN before invoking +vfp_save_state().) + +This patch also addresses a second problem related to FPEXC.EX: After +returning from signal handling, the kernel reloads the VFP context +from the user mode stack. However, the current code explicitly clears +both FPEXC.EX and FPEXC.FP2V during reload. As VFP11 requires these +bits to be preserved, this patch disables clearing them for VFP +implementations belonging to architecture 1. There should be no +negative side effects: the user can set both bits by executing FPU +opcodes anyway, and while user code may now place arbitrary values +into FPINST and FPINST2 (e.g., non-VFP ARM opcodes) the VFP support +code knows which instructions can be emulated, and rejects other +opcodes with "unhandled bounce" messages, so there should be no +security impact from allowing reloading FPEXC.EX and FPEXC.FP2V. + +Signed-off-by: Christopher Alexander Tobias Schulze +--- + arch/arm/vfp/vfpmodule.c | 25 +++++++++++++++++++------ + 1 file changed, 19 insertions(+), 6 deletions(-) + +diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c +index 569d5a650a4a2c6266ddf8fc6d38e0cd96b985f6..5822a3f60a96510201a6d88828ac5262582e0743 100644 +--- a/arch/arm/vfp/vfpmodule.c ++++ b/arch/arm/vfp/vfpmodule.c +@@ -179,8 +179,11 @@ static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) + * case the thread migrates to a different CPU. The + * restoring is done lazily. + */ +- if ((fpexc & FPEXC_EN) && vfp_current_hw_state[cpu]) ++ if ((fpexc & FPEXC_EN) && vfp_current_hw_state[cpu]) { ++ /* vfp_save_state oopses on VFP11 if EX bit set */ ++ fmxr(FPEXC, fpexc & ~FPEXC_EX); + vfp_save_state(vfp_current_hw_state[cpu], fpexc); ++ } + #endif + + /* +@@ -463,13 +466,16 @@ static int vfp_pm_suspend(void) + /* if vfp is on, then save state for resumption */ + if (fpexc & FPEXC_EN) { + pr_debug("%s: saving vfp state\n", __func__); ++ /* vfp_save_state oopses on VFP11 if EX bit set */ ++ fmxr(FPEXC, fpexc & ~FPEXC_EX); + vfp_save_state(&ti->vfpstate, fpexc); + + /* disable, just in case */ + fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN); + } else if (vfp_current_hw_state[ti->cpu]) { + #ifndef CONFIG_SMP +- fmxr(FPEXC, fpexc | FPEXC_EN); ++ /* vfp_save_state oopses on VFP11 if EX bit set */ ++ fmxr(FPEXC, (fpexc & ~FPEXC_EX) | FPEXC_EN); + vfp_save_state(vfp_current_hw_state[ti->cpu], fpexc); + fmxr(FPEXC, fpexc); + #endif +@@ -532,7 +538,8 @@ void vfp_sync_hwstate(struct thread_info *thread) + /* + * Save the last VFP state on this CPU. + */ +- fmxr(FPEXC, fpexc | FPEXC_EN); ++ /* vfp_save_state oopses on VFP11 if EX bit set */ ++ fmxr(FPEXC, (fpexc & ~FPEXC_EX) | FPEXC_EN); + vfp_save_state(&thread->vfpstate, fpexc | FPEXC_EN); + fmxr(FPEXC, fpexc); + } +@@ -604,6 +611,7 @@ int vfp_restore_user_hwstate(struct user_vfp __user *ufp, + struct vfp_hard_struct *hwstate = &thread->vfpstate.hard; + unsigned long fpexc; + int err = 0; ++ u32 fpsid = fmrx(FPSID); + + /* Disable VFP to avoid corrupting the new thread state. */ + vfp_flush_hwstate(thread); +@@ -627,8 +635,12 @@ int vfp_restore_user_hwstate(struct user_vfp __user *ufp, + /* Ensure the VFP is enabled. */ + fpexc |= FPEXC_EN; + +- /* Ensure FPINST2 is invalid and the exception flag is cleared. */ +- fpexc &= ~(FPEXC_EX | FPEXC_FP2V); ++ /* Mask FPXEC_EX and FPEXC_FP2V if not required by VFP arch */ ++ if ((fpsid & FPSID_ARCH_MASK) != (1 << FPSID_ARCH_BIT)) { ++ /* Ensure FPINST2 is invalid and the exception flag is cleared. */ ++ fpexc &= ~(FPEXC_EX | FPEXC_FP2V); ++ } ++ + hwstate->fpexc = fpexc; + + __get_user_error(hwstate->fpinst, &ufp_exc->fpinst, err); +@@ -698,7 +710,8 @@ void kernel_neon_begin(void) + cpu = get_cpu(); + + fpexc = fmrx(FPEXC) | FPEXC_EN; +- fmxr(FPEXC, fpexc); ++ /* vfp_save_state oopses on VFP11 if EX bit set */ ++ fmxr(FPEXC, fpexc & ~FPEXC_EX); + + /* + * Save the userland NEON/VFP state. Under UP, + +From 9e197d6809356852ca185489f156071cc5d47a7d Mon Sep 17 00:00:00 2001 +From: Michael Zoran +Date: Sat, 11 Feb 2017 01:18:31 -0800 +Subject: [PATCH 129/143] ARM64: Force hardware emulation of deprecated + instructions. + +--- + arch/arm64/kernel/armv8_deprecated.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c +index ecf9298a12d48f11d5833dca0584d8ab028cf422..14e9146709857124891f8a3927efec872fb7be39 100644 +--- a/arch/arm64/kernel/armv8_deprecated.c ++++ b/arch/arm64/kernel/armv8_deprecated.c +@@ -182,10 +182,15 @@ static void __init register_insn_emulation(struct insn_emulation_ops *ops) + + switch (ops->status) { + case INSN_DEPRECATED: ++#if 0 + insn->current_mode = INSN_EMULATE; + /* Disable the HW mode if it was turned on at early boot time */ + run_all_cpu_set_hw_mode(insn, false); ++#else ++ insn->current_mode = INSN_HW; ++ run_all_cpu_set_hw_mode(insn, true); + insn->max = INSN_HW; ++#endif + break; + case INSN_OBSOLETE: + insn->current_mode = INSN_UNDEF; + +From 919d9f14f43a8dd52c0008537f00dfccb96d5ef6 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Mon, 13 Feb 2017 15:33:47 +0000 +Subject: [PATCH 130/143] squash: fix order of sound/soc/bcm makefile + +--- + sound/soc/bcm/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index 222a7583891f632cc2297f49aa1a58ee46507875..bb1df438540193652ec5464e8bc51f636a1b844e 100644 +--- a/sound/soc/bcm/Makefile ++++ b/sound/soc/bcm/Makefile +@@ -10,12 +10,12 @@ obj-$(CONFIG_SND_SOC_CYGNUS) += snd-soc-cygnus.o + + # BCM2708 Machine Support + snd-soc-adau1977-adc-objs := adau1977-adc.o ++snd-soc-hifiberry-amp-objs := hifiberry_amp.o + snd-soc-hifiberry-dac-objs := hifiberry_dac.o + snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o + snd-soc-hifiberry-digi-objs := hifiberry_digi.o + snd-soc-justboom-dac-objs := justboom-dac.o + snd-soc-justboom-digi-objs := justboom-digi.o +-snd-soc-hifiberry-amp-objs := hifiberry_amp.o + snd-soc-rpi-dac-objs := rpi-dac.o + snd-soc-rpi-proto-objs := rpi-proto.o + snd-soc-iqaudio-dac-objs := iqaudio-dac.o +@@ -28,12 +28,12 @@ snd-soc-allo-piano-dac-objs := allo-piano-dac.o + snd-soc-pisound-objs := pisound.o + + obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o ++obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o + obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC) += snd-soc-justboom-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI) += snd-soc-justboom-digi.o +-obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o + obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o + obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o + +From 56bd4eb7b09c4d016c8f7908d496b11bbadbd9a0 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:36 +0100 -Subject: [PATCH 142/149] config: Enable regulator support +Subject: [PATCH 131/143] config: Enable regulator support Signed-off-by: Matthias Reichl --- @@ -128479,10 +127028,10 @@ Signed-off-by: Matthias Reichl 2 files changed, 4 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 31163b59b9c6f2cc4f4f94afe1b10bd1a195470f..611b63c3fdf18f1df6288bb229f827ecd1619958 100644 +index e017702a34d1e6c7df7aea26032b1fc70b330a40..3b2abe9c203e176e7088e504a7952e9b2c96aec8 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig -@@ -664,6 +664,8 @@ CONFIG_STMPE_SPI=y +@@ -660,6 +660,8 @@ CONFIG_STMPE_SPI=y CONFIG_MFD_ARIZONA_I2C=m CONFIG_MFD_ARIZONA_SPI=m CONFIG_MFD_WM5102=y @@ -128492,10 +127041,10 @@ index 31163b59b9c6f2cc4f4f94afe1b10bd1a195470f..611b63c3fdf18f1df6288bb229f827ec CONFIG_MEDIA_CAMERA_SUPPORT=y CONFIG_MEDIA_ANALOG_TV_SUPPORT=y diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 5105a592c9bcfee1cc6a8b50fd1c6c32f1381158..74bc0d81bcb4d7f6676368926cdcc10e581fbcae 100644 +index 1927b1671b6eced73e4b4d76352bb4b1301d077c..5351a59b7f670985f47fdbafa26117346cafe87d 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -658,6 +658,8 @@ CONFIG_STMPE_SPI=y +@@ -654,6 +654,8 @@ CONFIG_STMPE_SPI=y CONFIG_MFD_ARIZONA_I2C=m CONFIG_MFD_ARIZONA_SPI=m CONFIG_MFD_WM5102=y @@ -128505,10 +127054,10 @@ index 5105a592c9bcfee1cc6a8b50fd1c6c32f1381158..74bc0d81bcb4d7f6676368926cdcc10e CONFIG_MEDIA_CAMERA_SUPPORT=y CONFIG_MEDIA_ANALOG_TV_SUPPORT=y -From 2f68de29b74600a5ed75d12e32344ddc6b42ca8c Mon Sep 17 00:00:00 2001 +From f135ac30c31d61724299d0449887727ce9def765 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:36 +0100 -Subject: [PATCH 143/149] BCM270x DT: expose 3.3V and 5V system rails +Subject: [PATCH 132/143] BCM270x DT: expose 3.3V and 5V system rails Signed-off-by: Matthias Reichl --- @@ -128541,10 +127090,10 @@ index a46cb4a8b1419edd95e0e07c18b0f373222dc2bf..36d853715f2379e1952ce3d3be58dd67 + }; }; -From a637ecb60454d14e2a116b9fca25745cda6ee968 Mon Sep 17 00:00:00 2001 +From 437ca0a4918b034a16d8ac151b950cf838d484c5 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:36 +0100 -Subject: [PATCH 144/149] BCM270x DT: Consolidate audio card overlays +Subject: [PATCH 133/143] BCM270x DT: Consolidate audio card overlays Reference 3.3V / 5V system rails instead of instantiating local regulators. @@ -128839,10 +127388,10 @@ index 16b1247bfa618ff85936ddf78c3aea58075eaa67..f8d48233e28c7c18509b4a95692f6aff __overlay__ { compatible = "rra,digidac1-soundcard"; -From 5b7c4cf04f87b0366c5dab8ccbc767d840003218 Mon Sep 17 00:00:00 2001 +From 82906808c3fbe9c74524b2c055fad291c39c2fca Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:37 +0100 -Subject: [PATCH 145/149] ASoC: Add driver for Cirrus Logic Audio Card +Subject: [PATCH 134/143] ASoC: Add driver for Cirrus Logic Audio Card Note: due to problems with deferred probing of regulators the following softdep should be added to a modprobe.d file @@ -129043,10 +127592,10 @@ index 0000000000000000000000000000000000000000..cf85f0af224067cf58053a143664f071 + }; +}; diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index d024377e8450fb5402dcb5ea27161f774b04a8ec..10f6b201777946af8e8e78d2ffb0b0cff38093df 100644 +index ff4284a0000fd8dc58deb9e50be1422fd7ad6e65..c0489e591b9b8c8da004ca9e300e97f1a21e5ce1 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -45,6 +45,15 @@ config SND_BCM2708_SOC_HIFIBERRY_AMP +@@ -46,6 +46,15 @@ config SND_BCM2708_SOC_HIFIBERRY_AMP help Say Y or M if you want to add support for the HifiBerry Amp amplifier board. @@ -130092,10 +128641,10 @@ index 0000000000000000000000000000000000000000..ac8651ddff7bd3701dffe22c7fb88352 +MODULE_DESCRIPTION("ASoC driver for Cirrus Logic Audio Card"); +MODULE_LICENSE("GPL"); -From 7dff660e8da1fbf145f0bfc8a9c70948695e2400 Mon Sep 17 00:00:00 2001 +From 4dc3d4c1f881814cccba7de2c34e8a78345223fb Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:37 +0100 -Subject: [PATCH 146/149] config: enable Cirrus Logic Audio Card +Subject: [PATCH 135/143] config: enable Cirrus Logic Audio Card Signed-off-by: Matthias Reichl --- @@ -130104,10 +128653,10 @@ Signed-off-by: Matthias Reichl 2 files changed, 4 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 611b63c3fdf18f1df6288bb229f827ecd1619958..858143b9b68a9cf29714452394cb800e4f41198d 100644 +index 3b2abe9c203e176e7088e504a7952e9b2c96aec8..59f58450f4f7932dbfe051d7431c227737902b37 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig -@@ -666,6 +666,7 @@ CONFIG_MFD_ARIZONA_SPI=m +@@ -662,6 +662,7 @@ CONFIG_MFD_ARIZONA_SPI=m CONFIG_MFD_WM5102=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=m @@ -130115,7 +128664,7 @@ index 611b63c3fdf18f1df6288bb229f827ecd1619958..858143b9b68a9cf29714452394cb800e CONFIG_MEDIA_SUPPORT=m CONFIG_MEDIA_CAMERA_SUPPORT=y CONFIG_MEDIA_ANALOG_TV_SUPPORT=y -@@ -872,6 +873,7 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m +@@ -868,6 +869,7 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m @@ -130124,10 +128673,10 @@ index 611b63c3fdf18f1df6288bb229f827ecd1619958..858143b9b68a9cf29714452394cb800e CONFIG_SND_BCM2708_SOC_RPI_PROTO=m CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 74bc0d81bcb4d7f6676368926cdcc10e581fbcae..f0b87d15e959d88eb26e5a11244365dadb57a298 100644 +index 5351a59b7f670985f47fdbafa26117346cafe87d..062a89f0e5fc723559ddc5739e19eb20c030f0f1 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -660,6 +660,7 @@ CONFIG_MFD_ARIZONA_SPI=m +@@ -656,6 +656,7 @@ CONFIG_MFD_ARIZONA_SPI=m CONFIG_MFD_WM5102=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=m @@ -130135,7 +128684,7 @@ index 74bc0d81bcb4d7f6676368926cdcc10e581fbcae..f0b87d15e959d88eb26e5a11244365da CONFIG_MEDIA_SUPPORT=m CONFIG_MEDIA_CAMERA_SUPPORT=y CONFIG_MEDIA_ANALOG_TV_SUPPORT=y -@@ -866,6 +867,7 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m +@@ -862,6 +863,7 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m @@ -130144,10 +128693,72 @@ index 74bc0d81bcb4d7f6676368926cdcc10e581fbcae..f0b87d15e959d88eb26e5a11244365da CONFIG_SND_BCM2708_SOC_RPI_PROTO=m CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC=m -From a68682f7e9f51e79ecc4e190aadaf03b7e70f700 Mon Sep 17 00:00:00 2001 +From e3ef450ae4a4d20765f724e5b91e3378d2a8ba3c Mon Sep 17 00:00:00 2001 +From: Martin Cerveny +Date: Mon, 13 Feb 2017 17:23:47 +0100 +Subject: [PATCH 136/143] dwc_otg: fix summarize urb->actual_length for + isochronous transfers + +Kernel does not copy input data of ISO transfers to userspace +if actual_length is set only in ISO transfers and not summarized +in urb->actual_length. Fixes raspberrypi/linux#903 +--- + drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +index 162a656501988e56c9d780b7793d365fde09f801..992269d61ecf48126379a38e528f719009ee1d75 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +@@ -334,10 +334,12 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, + int i; + + urb->error_count = dwc_otg_hcd_urb_get_error_count(dwc_otg_urb); ++ urb->actual_length = 0; + for (i = 0; i < urb->number_of_packets; ++i) { + urb->iso_frame_desc[i].actual_length = + dwc_otg_hcd_urb_get_iso_desc_actual_length + (dwc_otg_urb, i); ++ urb->actual_length += urb->iso_frame_desc[i].actual_length; + urb->iso_frame_desc[i].status = + dwc_otg_hcd_urb_get_iso_desc_status(dwc_otg_urb, i); + } + +From a58a00d172f51f697284a485ae1f3a6161ede074 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 13 Feb 2017 17:20:08 +0000 +Subject: [PATCH 137/143] clk-bcm2835: Mark used PLLs and dividers CRITICAL + +The VPU configures and relies on several PLLs and dividers. Mark all +enabled dividers and their PLLs as CRITICAL to prevent the kernel from +switching them off. + +Signed-off-by: Phil Elwell +--- + drivers/clk/bcm/clk-bcm2835.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 093694e00caec6e133eb26712f890691cad999aa..33bfa2008479153402d188d71d382f0274c104ea 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1266,6 +1266,11 @@ bcm2835_register_pll_divider(struct bcm2835_cprman *cprman, + divider->div.hw.init = &init; + divider->div.table = NULL; + ++ if (!(cprman_read(cprman, data->cm_reg) & data->hold_mask)) { ++ init.flags |= CLK_IS_CRITICAL; ++ divider->div.flags |= CLK_IS_CRITICAL; ++ } ++ + divider->cprman = cprman; + divider->data = data; + + +From cef191d42985b1a1ba2c4a169b80e4628db23195 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:33:30 +0000 -Subject: [PATCH 147/149] irq-bcm2836: Avoid "Invalid trigger warning" +Subject: [PATCH 138/143] irq-bcm2836: Avoid "Invalid trigger warning" Initialise the level for each IRQ to avoid a warning from the arm arch timer code. @@ -130158,7 +128769,7 @@ Signed-off-by: Phil Elwell 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c -index 486bcbfb32305ee417f6b3be7e91a3ff069a586c..e10597c1a1e51e5e27aa574b6a26d87181f26221 100644 +index 67dcac46cca72db4ebe2300eab04f0a867e8e14b..9a7ee04ee0d9b7aa734cf3159ed59c19a338de0d 100644 --- a/drivers/irqchip/irq-bcm2836.c +++ b/drivers/irqchip/irq-bcm2836.c @@ -178,7 +178,7 @@ static void bcm2836_arm_irqchip_register_irq(int hwirq, struct irq_chip *chip) @@ -130171,10 +128782,10 @@ index 486bcbfb32305ee417f6b3be7e91a3ff069a586c..e10597c1a1e51e5e27aa574b6a26d871 static void -From 0778b29615c3c15b035378ef97fff43da5b1c313 Mon Sep 17 00:00:00 2001 +From 70cab3f1bb92d60cf794a5baf22ac1fbdbec7ba2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:36:44 +0000 -Subject: [PATCH 148/149] sound: Demote deferral errors to INFO level +Subject: [PATCH 139/143] sound: Demote deferral errors to INFO level At present there is no mechanism to specify driver load order, which can lead to deferrals and repeated retries until successful. @@ -130187,10 +128798,10 @@ Signed-off-by: Phil Elwell 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c -index c0bbcd9032613a78aef551ce697cabc792880bad..a2504d8c83d74d7227e65be142a26cc9d0a88158 100644 +index baa1afa41e3dd57fdc36655b7d3bbd147ade820f..0ddeffcc48d6c14f275ea6409d1a7de8f1f64183 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c -@@ -1013,7 +1013,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card, +@@ -1056,7 +1056,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card, cpu_dai_component.dai_name = dai_link->cpu_dai_name; rtd->cpu_dai = snd_soc_find_dai(&cpu_dai_component); if (!rtd->cpu_dai) { @@ -130199,7 +128810,7 @@ index c0bbcd9032613a78aef551ce697cabc792880bad..a2504d8c83d74d7227e65be142a26cc9 dai_link->cpu_dai_name); goto _err_defer; } -@@ -1025,7 +1025,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card, +@@ -1068,7 +1068,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card, for (i = 0; i < rtd->num_codecs; i++) { codec_dais[i] = snd_soc_find_dai(&codecs[i]); if (!codec_dais[i]) { @@ -130209,10 +128820,10 @@ index c0bbcd9032613a78aef551ce697cabc792880bad..a2504d8c83d74d7227e65be142a26cc9 goto _err_defer; } -From 58bf3f17f21d883435fee48ca034eb5920b56ea3 Mon Sep 17 00:00:00 2001 +From cb1e295e8b8cf1edbab91d7d42919c28ebe3069e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:40:33 +0000 -Subject: [PATCH 149/149] sound: Suppress error message about deferrals +Subject: [PATCH 140/143] sound: Suppress error message about deferrals Since driver load deferrals are expected and will already have resulted in a kernel message, suppress an essentially @@ -130458,3 +129069,250 @@ index 9db678e885efd63d84d60a098a84ed6772b19a2d..fadbfade100228aaafabb0d3bdf35c01 return ret; } + +From 13607ce48ba1e8c887aeee343ac3f37ab9bf143b Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 17 Feb 2017 09:47:11 +0000 +Subject: [PATCH 141/143] BCM270X_DT: Add SMSC ethernet controller to DT + +With an ethernet node in the DT, a suitable firmware can populate the +local-mac-address property, removing the need for a downstream patch +to the driver to read its MAC address from a module parameter. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 1 + + arch/arm/boot/dts/bcm2708-rpi-b.dts | 1 + + arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 1 + + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 1 + + 4 files changed, 4 insertions(+) + +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +index 360da5c928dc5599b0d2a9055728087604c6b189..0b66ac9f25a5f7ae51f3d0666cfcb908f85e1d24 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +@@ -1,6 +1,7 @@ + /dts-v1/; + + #include "bcm2708.dtsi" ++#include "bcm283x-rpi-smsc9514.dtsi" + + / { + model = "Raspberry Pi Model B+"; +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts +index 9c49659ab246bce0656f3514f3b924bc4826b421..e99e9d999e4142060c41eb47b93c8ac70a30f384 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-b.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts +@@ -1,6 +1,7 @@ + /dts-v1/; + + #include "bcm2708.dtsi" ++#include "bcm283x-rpi-smsc9512.dtsi" + + / { + model = "Raspberry Pi Model B"; +diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +index 19c83823420fc3cc20a01d07091100cb8720ff4d..20674f250af922e9f9a43e3e8b13aee42e3930be 100644 +--- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts ++++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +@@ -1,6 +1,7 @@ + /dts-v1/; + + #include "bcm2709.dtsi" ++#include "bcm283x-rpi-smsc9514.dtsi" + + / { + model = "Raspberry Pi 2 Model B"; +diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +index 12764a3495b2372ffaf47e32ea0d21326ca83686..2a5b512d3e1acb17c6a40bf9d370f22279c4d552 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +@@ -5,6 +5,7 @@ + #endif + + #include "bcm2710.dtsi" ++#include "bcm283x-rpi-smsc9514.dtsi" + + / { + model = "Raspberry Pi 3 Model B"; + +From e1d3ee3e5c9e549cec2088efeb1cbc9b1a682b31 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 17 Feb 2017 15:26:13 +0000 +Subject: [PATCH 142/143] brcmfmac: Mute expected startup 'errors' + +The brcmfmac WiFi driver always complains about the '00' country code +and the firmware version is reported as an error. Modify the driver to +ignore '00' silently and display firmware version at INFO level. + +Signed-off-by: Phil Elwell +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 ++ + drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +index 5dfcf16428f9c8687237c3218183d8afa66ec331..873ec96c300fa152ecf3b1c2d3b3a890de7df115 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +@@ -6717,6 +6717,8 @@ static void brcmf_cfg80211_reg_notifier(struct wiphy *wiphy, + /* ignore non-ISO3166 country codes */ + for (i = 0; i < sizeof(req->alpha2); i++) + if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') { ++ if (req->alpha2[0] == '0' && req->alpha2[1] == '0') ++ return; + brcmf_err("not a ISO3166 code (0x%02x 0x%02x)\n", + req->alpha2[0], req->alpha2[1]); + return; +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +index 4051780f64f44a5ce522babe6c371a1beb79a824..b081673abcb4aa72d70d8e0834b608f65fea16e8 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +@@ -161,7 +161,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp) + strsep(&ptr, "\n"); + + /* Print fw version info */ +- brcmf_err("Firmware version = %s\n", buf); ++ pr_info("Firmware version = %s\n", buf); + + /* locate firmware version number for ethtool */ + ptr = strrchr(buf, ' ') + 1; + +From cbeb4f8aeb1dd71e911d365a921c0da4fbbdfdbb Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 13 Feb 2017 17:20:08 +0000 +Subject: [PATCH 143/143] clk-bcm2835: Add claim-clocks property + +The claim-clocks property can be used to prevent PLLs and dividers +from being marked as critical. It contains a vector of clock IDs, +as defined by dt-bindings/clock/bcm2835.h. + +Use this mechanism to claim PLLD_DSI0, PLLD_DSI1, PLLH_AUX and +PLLH_PIX for the vc4_kms_v3d driver. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 15 ++++++++++ + drivers/clk/bcm/clk-bcm2835.c | 34 ++++++++++++++++++++-- + 2 files changed, 47 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +index 4f1cc20f90dc6780f74e08ebee00e5a1a6062c85..fb45c6456b181b047d6cff8784f7696eb75da3c7 100644 +--- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +@@ -5,6 +5,8 @@ + /dts-v1/; + /plugin/; + ++#include ++ + / { + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; + +@@ -126,6 +128,19 @@ + }; + }; + ++ ++ fragment@16 { ++ target = <&clocks>; ++ __overlay__ { ++ claim-clocks = < ++ BCM2835_PLLD_DSI0 ++ BCM2835_PLLD_DSI1 ++ BCM2835_PLLH_AUX ++ BCM2835_PLLH_PIX ++ >; ++ }; ++ }; ++ + __overrides__ { + cma-256 = <0>,"+0-1-2-3-4"; + cma-192 = <0>,"-0+1-2-3-4"; +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 33bfa2008479153402d188d71d382f0274c104ea..0b62d20f8b718cfd03c0346af784688e26e9dcb6 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1198,6 +1198,8 @@ static const struct clk_ops bcm2835_vpu_clock_clk_ops = { + .debug_init = bcm2835_clock_debug_init, + }; + ++static bool bcm2835_clk_is_claimed(const char *name); ++ + static struct clk_hw *bcm2835_register_pll(struct bcm2835_cprman *cprman, + const struct bcm2835_pll_data *data) + { +@@ -1214,6 +1216,9 @@ static struct clk_hw *bcm2835_register_pll(struct bcm2835_cprman *cprman, + init.ops = &bcm2835_pll_clk_ops; + init.flags = CLK_IGNORE_UNUSED; + ++ if (!bcm2835_clk_is_claimed(data->name)) ++ init.flags |= CLK_IS_CRITICAL; ++ + pll = kzalloc(sizeof(*pll), GFP_KERNEL); + if (!pll) + return NULL; +@@ -1267,8 +1272,10 @@ bcm2835_register_pll_divider(struct bcm2835_cprman *cprman, + divider->div.table = NULL; + + if (!(cprman_read(cprman, data->cm_reg) & data->hold_mask)) { +- init.flags |= CLK_IS_CRITICAL; +- divider->div.flags |= CLK_IS_CRITICAL; ++ if (!bcm2835_clk_is_claimed(data->source_pll)) ++ init.flags |= CLK_IS_CRITICAL; ++ if (!bcm2835_clk_is_claimed(data->name)) ++ divider->div.flags |= CLK_IS_CRITICAL; + } + + divider->cprman = cprman; +@@ -1901,6 +1908,8 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .ctl_reg = CM_PERIICTL), + }; + ++static bool bcm2835_clk_claimed[ARRAY_SIZE(clk_desc_array)]; ++ + /* + * Permanently take a reference on the parent of the SDRAM clock. + * +@@ -1920,6 +1929,19 @@ static int bcm2835_mark_sdc_parent_critical(struct clk *sdc) + return clk_prepare_enable(parent); + } + ++static bool bcm2835_clk_is_claimed(const char *name) ++{ ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(clk_desc_array); i++) { ++ const char *clk_name = *(const char **)(clk_desc_array[i].data); ++ if (!strcmp(name, clk_name)) ++ return bcm2835_clk_claimed[i]; ++ } ++ ++ return false; ++} ++ + static int bcm2835_clk_probe(struct platform_device *pdev) + { + struct device *dev = &pdev->dev; +@@ -1929,6 +1951,7 @@ static int bcm2835_clk_probe(struct platform_device *pdev) + const struct bcm2835_clk_desc *desc; + const size_t asize = ARRAY_SIZE(clk_desc_array); + size_t i; ++ u32 clk_id; + int ret; + + cprman = devm_kzalloc(dev, sizeof(*cprman) + +@@ -1944,6 +1967,13 @@ static int bcm2835_clk_probe(struct platform_device *pdev) + if (IS_ERR(cprman->regs)) + return PTR_ERR(cprman->regs); + ++ memset(bcm2835_clk_claimed, 0, sizeof(bcm2835_clk_claimed)); ++ for (i = 0; ++ !of_property_read_u32_index(pdev->dev.of_node, "claim-clocks", ++ i, &clk_id); ++ i++) ++ bcm2835_clk_claimed[clk_id]= true; ++ + cprman->osc_name = of_clk_get_parent_name(dev->of_node, 0); + if (!cprman->osc_name) + return -ENODEV; diff --git a/projects/RPi2/patches/linux/linux-01-RPi_support.patch b/projects/RPi2/patches/linux/linux-01-RPi_support.patch index 6274aff4d9..797c5d6065 100644 --- a/projects/RPi2/patches/linux/linux-01-RPi_support.patch +++ b/projects/RPi2/patches/linux/linux-01-RPi_support.patch @@ -1,7 +1,7 @@ -From 0e347ed3c42098c4a689cdfd4fa77ee2ae4d4827 Mon Sep 17 00:00:00 2001 +From 468cd1d3694d2c7fa2126c4dff4c92cfe1c71c70 Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 -Subject: [PATCH 001/149] smsx95xx: fix crimes against truesize +Subject: [PATCH 001/143] smsx95xx: fix crimes against truesize smsc95xx is adjusting truesize when it shouldn't, and following a recent patch from Eric this is now triggering warnings. @@ -48,10 +48,10 @@ index 831aa33d078ae7d2dd57fdded5de71d1eb915f99..b77935bded8c0ff7808b00f170ff10e5 usbnet_skb_return(dev, ax_skb); } -From a4da7e5e3bab197a11523bc13fb30c13b9e6fe13 Mon Sep 17 00:00:00 2001 +From bc9f373027da6cd14af74a5ceb6a250f9f26a704 Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Fri, 1 Apr 2016 17:27:21 +0100 -Subject: [PATCH 002/149] smsc95xx: Experimental: Enable turbo_mode and +Subject: [PATCH 002/143] smsc95xx: Experimental: Enable turbo_mode and packetsize=2560 by default See: http://forum.kodi.tv/showthread.php?tid=285288 @@ -94,10 +94,10 @@ index b77935bded8c0ff7808b00f170ff10e594300ad0..693f163684de921404738e33244881e0 netif_dbg(dev, ifup, dev->net, "rx_urb_size=%ld\n", -From 36e789c817dd0b0244956daa0d228cf8a0211fac Mon Sep 17 00:00:00 2001 +From d7e10b62fb345e91e63aa5e9033508150adc835c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 003/149] Allow mac address to be set in smsc95xx +Subject: [PATCH 003/143] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -193,10 +193,10 @@ index 693f163684de921404738e33244881e0aab92ec9..df60c989fc229bf0aab3c27e95ccd453 eth_hw_addr_random(dev->net); netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); -From d5ba600d5e4e64e6b76c595f22aeb0110e1a787c Mon Sep 17 00:00:00 2001 +From 1ce0d09afcddde03315a95fbdd9eb451e9d5beb5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 12:43:36 +0000 -Subject: [PATCH 004/149] Protect __release_resource against resources without +Subject: [PATCH 004/143] Protect __release_resource against resources without parents Without this patch, removing a device tree overlay can crash here. @@ -224,10 +224,10 @@ index 9b5f04404152c296af3a96132f27cfc80ffa9af9..f8a9af6e6b915812be2ba2c1c2b40106 for (;;) { tmp = *p; -From 83de4b4437aabfdb96ffc010e46b8f3cc4a0de75 Mon Sep 17 00:00:00 2001 +From f1efecc4cc9a7bc17bcd05b760c56abd3c35b1c7 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 -Subject: [PATCH 005/149] mm: Remove the PFN busy warning +Subject: [PATCH 005/143] mm: Remove the PFN busy warning See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is expected sometimes when using CMA. However, that commit still spams @@ -239,10 +239,10 @@ Signed-off-by: Eric Anholt 1 file changed, 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index f4a02e240fb68acbaa0d3a0c7ac5a498c051a272..0e1fba92702858ceaf2f92a1d5fa53d5b16b52fe 100644 +index f3e0c69a97b76997d9fa65cda0b7e1b1fb8fa29a..c0ef4472377fe5eea65b73d9764e464d72985b70 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -7323,8 +7323,6 @@ int alloc_contig_range(unsigned long start, unsigned long end, +@@ -7361,8 +7361,6 @@ int alloc_contig_range(unsigned long start, unsigned long end, /* Make sure the range is really isolated. */ if (test_pages_isolated(outer_start, end, false)) { @@ -252,10 +252,10 @@ index f4a02e240fb68acbaa0d3a0c7ac5a498c051a272..0e1fba92702858ceaf2f92a1d5fa53d5 goto done; } -From 5eb94a3232a3754f1a1c2dce8756d66f1d650504 Mon Sep 17 00:00:00 2001 +From a6ed755bf9e4e175e8316ce5ca49475c925b06b7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 -Subject: [PATCH 006/149] irq-bcm2836: Prevent spurious interrupts, and trap +Subject: [PATCH 006/143] irq-bcm2836: Prevent spurious interrupts, and trap them early The old arch-specific IRQ macros included a dsb to ensure the @@ -270,7 +270,7 @@ though, so trap them early. 1 file changed, 1 insertion(+) diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c -index d96b2c947e74e3edab3917551c64fbd1ced0f34c..93e3f7660c4230c9f1dd3b195958cb498949b0ca 100644 +index e7463e3c08143acae3e8cc5682f918c6a0b07ebd..a8db33b50ad9ff83d284fa54fe4d3b65f859df0f 100644 --- a/drivers/irqchip/irq-bcm2836.c +++ b/drivers/irqchip/irq-bcm2836.c @@ -175,6 +175,7 @@ __exception_irq_entry bcm2836_arm_irqchip_handle_irq(struct pt_regs *regs) @@ -282,10 +282,10 @@ index d96b2c947e74e3edab3917551c64fbd1ced0f34c..93e3f7660c4230c9f1dd3b195958cb49 #endif } else if (stat) { -From 6dd338f42784ff60e2f6fb8a3540da0d22b37be6 Mon Sep 17 00:00:00 2001 +From 1a63d13766b406f3c98a86c063e7d80e25f584bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 12 Jun 2015 19:01:05 +0200 -Subject: [PATCH 007/149] irqchip: bcm2835: Add FIQ support +Subject: [PATCH 007/143] irqchip: bcm2835: Add FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -414,10 +414,10 @@ index 44d7c38dde479d771f3552e914bf8c1c1f5019f7..42ff5e6a8e0d532f5b60a1e7af7cc4d9 } -From 32ed8089c2a560cbc6b61a572c8e487834a5486a Mon Sep 17 00:00:00 2001 +From 98c24bb5c2f7eab74c8307fde5c638cd44e1cc68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 23 Oct 2015 16:26:55 +0200 -Subject: [PATCH 008/149] irqchip: irq-bcm2835: Add 2836 FIQ support +Subject: [PATCH 008/143] irqchip: irq-bcm2835: Add 2836 FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -516,10 +516,10 @@ index 42ff5e6a8e0d532f5b60a1e7af7cc4d941bd5008..eccf6ed025299cb480884f5bcbe77abf for (b = 0; b < NR_BANKS; b++) { for (i = 0; i < bank_irqs[b]; i++) { -From afc7a2e2b8953f9cc380979e40f0faad0c79d94f Mon Sep 17 00:00:00 2001 +From 44c736dd9491af829bd0c5684f5bbe883e09c2d1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 -Subject: [PATCH 009/149] spidev: Add "spidev" compatible string to silence +Subject: [PATCH 009/143] spidev: Add "spidev" compatible string to silence warning See: https://github.com/raspberrypi/linux/issues/1054 @@ -528,29 +528,29 @@ See: https://github.com/raspberrypi/linux/issues/1054 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c -index 2e05046f866bd01bf87edcdeff0d5b76d4d0aea7..d780491b8013a4e97fa843958964454e4463fe5e 100644 +index 9e2e099baf8ca5cc6510912a36d4ca03daeb8273..e59640942826db2ea14d0bde0ff5ab22ec34c9dd 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c -@@ -696,6 +696,7 @@ static struct class *spidev_class; - static const struct of_device_id spidev_dt_ids[] = { +@@ -697,6 +697,7 @@ static const struct of_device_id spidev_dt_ids[] = { { .compatible = "rohm,dh2228fv" }, { .compatible = "lineartechnology,ltc2488" }, + { .compatible = "ge,achc" }, + { .compatible = "spidev" }, {}, }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); -From aff7309ce3e6d5eb8ccf3beef4f9950bcabc8bea Mon Sep 17 00:00:00 2001 +From 4679b462878b70c11be6f05d70aaf411af8f0c94 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 30 Jun 2015 14:12:42 +0100 -Subject: [PATCH 010/149] serial: 8250: Don't crash when nr_uarts is 0 +Subject: [PATCH 010/143] serial: 8250: Don't crash when nr_uarts is 0 --- drivers/tty/serial/8250/8250_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c -index e8819aa20415603c80547e382838a8fa3ce54792..cf9c7d2e3f95e1a19410247a89c2e49c1a2747a8 100644 +index 76e03a7de9cc3d790a230948f599ef2db4b93249..0a172c2e6fa288de1e080463e897ea85aa98399f 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -509,6 +509,8 @@ static void __init serial8250_isa_init_ports(void) @@ -563,10 +563,307 @@ index e8819aa20415603c80547e382838a8fa3ce54792..cf9c7d2e3f95e1a19410247a89c2e49c for (i = 0; i < nr_uarts; i++) { struct uart_8250_port *up = &serial8250_ports[i]; -From e55b069860e2ce8c3a367c98c5844a6ec46ce855 Mon Sep 17 00:00:00 2001 +From 7afdc575c0f1518aad2b980b7ff34571d9d5963f Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 3 Jan 2017 18:25:01 +0000 +Subject: [PATCH 011/143] Revert "pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP" + +This reverts commit 85ae9e512f437cd09bf61564bdba29ab88bab3e3. +--- + drivers/pinctrl/bcm/Kconfig | 1 - + drivers/pinctrl/bcm/pinctrl-bcm2835.c | 140 ++++++++++++++++++---------------- + 2 files changed, 76 insertions(+), 65 deletions(-) + +diff --git a/drivers/pinctrl/bcm/Kconfig b/drivers/pinctrl/bcm/Kconfig +index 8968dd7aebed2133b0103b39d7b752916dbfaab0..63246770bd74b9dcd3804cee66a960f2404b7092 100644 +--- a/drivers/pinctrl/bcm/Kconfig ++++ b/drivers/pinctrl/bcm/Kconfig +@@ -20,7 +20,6 @@ config PINCTRL_BCM2835 + bool + select PINMUX + select PINCONF +- select GPIOLIB_IRQCHIP + + config PINCTRL_IPROC_GPIO + bool "Broadcom iProc GPIO (with PINCONF) driver" +diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c +index 85d0091128644c446aed878e87769e82c77c3ebf..4f2621272bfd5cbc0d691d2fabe89e2ee428d6db 100644 +--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c ++++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c +@@ -24,9 +24,11 @@ + #include + #include + #include ++#include + #include + #include + #include ++#include + #include + #include + #include +@@ -79,6 +81,11 @@ enum bcm2835_pinconf_param { + #define BCM2835_PINCONF_UNPACK_PARAM(_conf_) ((_conf_) >> 16) + #define BCM2835_PINCONF_UNPACK_ARG(_conf_) ((_conf_) & 0xffff) + ++struct bcm2835_gpio_irqdata { ++ struct bcm2835_pinctrl *pc; ++ int irqgroup; ++}; ++ + struct bcm2835_pinctrl { + struct device *dev; + void __iomem *base; +@@ -89,13 +96,16 @@ struct bcm2835_pinctrl { + unsigned int irq_type[BCM2835_NUM_GPIOS]; + + struct pinctrl_dev *pctl_dev; ++ struct irq_domain *irq_domain; + struct gpio_chip gpio_chip; + struct pinctrl_gpio_range gpio_range; + +- int irq_group[BCM2835_NUM_IRQS]; ++ struct bcm2835_gpio_irqdata irq_data[BCM2835_NUM_IRQS]; + spinlock_t irq_lock[BCM2835_NUM_BANKS]; + }; + ++static struct lock_class_key gpio_lock_class; ++ + /* pins are just named GPIO0..GPIO53 */ + #define BCM2835_GPIO_PIN(a) PINCTRL_PIN(a, "gpio" #a) + static struct pinctrl_pin_desc bcm2835_gpio_pins[] = { +@@ -353,6 +363,13 @@ static int bcm2835_gpio_direction_output(struct gpio_chip *chip, + return pinctrl_gpio_direction_output(chip->base + offset); + } + ++static int bcm2835_gpio_to_irq(struct gpio_chip *chip, unsigned offset) ++{ ++ struct bcm2835_pinctrl *pc = gpiochip_get_data(chip); ++ ++ return irq_linear_revmap(pc->irq_domain, offset); ++} ++ + static struct gpio_chip bcm2835_gpio_chip = { + .label = MODULE_NAME, + .owner = THIS_MODULE, +@@ -363,13 +380,14 @@ static struct gpio_chip bcm2835_gpio_chip = { + .get_direction = bcm2835_gpio_get_direction, + .get = bcm2835_gpio_get, + .set = bcm2835_gpio_set, ++ .to_irq = bcm2835_gpio_to_irq, + .base = -1, + .ngpio = BCM2835_NUM_GPIOS, + .can_sleep = false, + }; + +-static void bcm2835_gpio_irq_handle_bank(struct bcm2835_pinctrl *pc, +- unsigned int bank, u32 mask) ++static int bcm2835_gpio_irq_handle_bank(struct bcm2835_pinctrl *pc, ++ unsigned int bank, u32 mask) + { + unsigned long events; + unsigned offset; +@@ -381,49 +399,34 @@ static void bcm2835_gpio_irq_handle_bank(struct bcm2835_pinctrl *pc, + events &= pc->enabled_irq_map[bank]; + for_each_set_bit(offset, &events, 32) { + gpio = (32 * bank) + offset; +- /* FIXME: no clue why the code looks up the type here */ + type = pc->irq_type[gpio]; + +- generic_handle_irq(irq_linear_revmap(pc->gpio_chip.irqdomain, +- gpio)); ++ generic_handle_irq(irq_linear_revmap(pc->irq_domain, gpio)); + } ++ ++ return (events != 0); + } + +-static void bcm2835_gpio_irq_handler(struct irq_desc *desc) ++static irqreturn_t bcm2835_gpio_irq_handler(int irq, void *dev_id) + { +- struct gpio_chip *chip = irq_desc_get_handler_data(desc); +- struct bcm2835_pinctrl *pc = gpiochip_get_data(chip); +- struct irq_chip *host_chip = irq_desc_get_chip(desc); +- int irq = irq_desc_get_irq(desc); +- int group; +- int i; +- +- for (i = 0; i < ARRAY_SIZE(pc->irq); i++) { +- if (pc->irq[i] == irq) { +- group = pc->irq_group[i]; +- break; +- } +- } +- /* This should not happen, every IRQ has a bank */ +- if (i == ARRAY_SIZE(pc->irq)) +- BUG(); ++ struct bcm2835_gpio_irqdata *irqdata = dev_id; ++ struct bcm2835_pinctrl *pc = irqdata->pc; ++ int handled = 0; + +- chained_irq_enter(host_chip, desc); +- +- switch (group) { ++ switch (irqdata->irqgroup) { + case 0: /* IRQ0 covers GPIOs 0-27 */ +- bcm2835_gpio_irq_handle_bank(pc, 0, 0x0fffffff); ++ handled = bcm2835_gpio_irq_handle_bank(pc, 0, 0x0fffffff); + break; + case 1: /* IRQ1 covers GPIOs 28-45 */ +- bcm2835_gpio_irq_handle_bank(pc, 0, 0xf0000000); +- bcm2835_gpio_irq_handle_bank(pc, 1, 0x00003fff); ++ handled = bcm2835_gpio_irq_handle_bank(pc, 0, 0xf0000000) | ++ bcm2835_gpio_irq_handle_bank(pc, 1, 0x00003fff); + break; + case 2: /* IRQ2 covers GPIOs 46-53 */ +- bcm2835_gpio_irq_handle_bank(pc, 1, 0x003fc000); ++ handled = bcm2835_gpio_irq_handle_bank(pc, 1, 0x003fc000); + break; + } + +- chained_irq_exit(host_chip, desc); ++ return handled ? IRQ_HANDLED : IRQ_NONE; + } + + static inline void __bcm2835_gpio_irq_config(struct bcm2835_pinctrl *pc, +@@ -469,8 +472,7 @@ static void bcm2835_gpio_irq_config(struct bcm2835_pinctrl *pc, + + static void bcm2835_gpio_irq_enable(struct irq_data *data) + { +- struct gpio_chip *chip = irq_data_get_irq_chip_data(data); +- struct bcm2835_pinctrl *pc = gpiochip_get_data(chip); ++ struct bcm2835_pinctrl *pc = irq_data_get_irq_chip_data(data); + unsigned gpio = irqd_to_hwirq(data); + unsigned offset = GPIO_REG_SHIFT(gpio); + unsigned bank = GPIO_REG_OFFSET(gpio); +@@ -484,8 +486,7 @@ static void bcm2835_gpio_irq_enable(struct irq_data *data) + + static void bcm2835_gpio_irq_disable(struct irq_data *data) + { +- struct gpio_chip *chip = irq_data_get_irq_chip_data(data); +- struct bcm2835_pinctrl *pc = gpiochip_get_data(chip); ++ struct bcm2835_pinctrl *pc = irq_data_get_irq_chip_data(data); + unsigned gpio = irqd_to_hwirq(data); + unsigned offset = GPIO_REG_SHIFT(gpio); + unsigned bank = GPIO_REG_OFFSET(gpio); +@@ -591,8 +592,7 @@ static int __bcm2835_gpio_irq_set_type_enabled(struct bcm2835_pinctrl *pc, + + static int bcm2835_gpio_irq_set_type(struct irq_data *data, unsigned int type) + { +- struct gpio_chip *chip = irq_data_get_irq_chip_data(data); +- struct bcm2835_pinctrl *pc = gpiochip_get_data(chip); ++ struct bcm2835_pinctrl *pc = irq_data_get_irq_chip_data(data); + unsigned gpio = irqd_to_hwirq(data); + unsigned offset = GPIO_REG_SHIFT(gpio); + unsigned bank = GPIO_REG_OFFSET(gpio); +@@ -618,8 +618,7 @@ static int bcm2835_gpio_irq_set_type(struct irq_data *data, unsigned int type) + + static void bcm2835_gpio_irq_ack(struct irq_data *data) + { +- struct gpio_chip *chip = irq_data_get_irq_chip_data(data); +- struct bcm2835_pinctrl *pc = gpiochip_get_data(chip); ++ struct bcm2835_pinctrl *pc = irq_data_get_irq_chip_data(data); + unsigned gpio = irqd_to_hwirq(data); + + bcm2835_gpio_set_bit(pc, GPEDS0, gpio); +@@ -662,11 +661,10 @@ static void bcm2835_pctl_pin_dbg_show(struct pinctrl_dev *pctldev, + unsigned offset) + { + struct bcm2835_pinctrl *pc = pinctrl_dev_get_drvdata(pctldev); +- struct gpio_chip *chip = &pc->gpio_chip; + enum bcm2835_fsel fsel = bcm2835_pinctrl_fsel_get(pc, offset); + const char *fname = bcm2835_functions[fsel]; + int value = bcm2835_gpio_get_bit(pc, GPLEV0, offset); +- int irq = irq_find_mapping(chip->irqdomain, offset); ++ int irq = irq_find_mapping(pc->irq_domain, offset); + + seq_printf(s, "function %s in %s; irq %d (%s)", + fname, value ? "hi" : "lo", +@@ -1012,6 +1010,21 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) + pc->gpio_chip.parent = dev; + pc->gpio_chip.of_node = np; + ++ pc->irq_domain = irq_domain_add_linear(np, BCM2835_NUM_GPIOS, ++ &irq_domain_simple_ops, NULL); ++ if (!pc->irq_domain) { ++ dev_err(dev, "could not create IRQ domain\n"); ++ return -ENOMEM; ++ } ++ ++ for (i = 0; i < BCM2835_NUM_GPIOS; i++) { ++ int irq = irq_create_mapping(pc->irq_domain, i); ++ irq_set_lockdep_class(irq, &gpio_lock_class); ++ irq_set_chip_and_handler(irq, &bcm2835_gpio_irq_chip, ++ handle_level_irq); ++ irq_set_chip_data(irq, pc); ++ } ++ + for (i = 0; i < BCM2835_NUM_BANKS; i++) { + unsigned long events; + unsigned offset; +@@ -1032,35 +1045,34 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) + spin_lock_init(&pc->irq_lock[i]); + } + +- err = gpiochip_add_data(&pc->gpio_chip, pc); +- if (err) { +- dev_err(dev, "could not add GPIO chip\n"); +- return err; ++ for (i = 0; i < BCM2835_NUM_IRQS; i++) { ++ int len; ++ char *name; ++ pc->irq[i] = irq_of_parse_and_map(np, i); ++ pc->irq_data[i].pc = pc; ++ pc->irq_data[i].irqgroup = i; ++ ++ len = strlen(dev_name(pc->dev)) + 16; ++ name = devm_kzalloc(pc->dev, len, GFP_KERNEL); ++ if (!name) ++ return -ENOMEM; ++ snprintf(name, len, "%s:bank%d", dev_name(pc->dev), i); ++ ++ err = devm_request_irq(dev, pc->irq[i], ++ bcm2835_gpio_irq_handler, IRQF_SHARED, ++ name, &pc->irq_data[i]); ++ if (err) { ++ dev_err(dev, "unable to request IRQ %d\n", pc->irq[i]); ++ return err; ++ } + } + +- err = gpiochip_irqchip_add(&pc->gpio_chip, &bcm2835_gpio_irq_chip, +- 0, handle_level_irq, IRQ_TYPE_NONE); ++ err = gpiochip_add_data(&pc->gpio_chip, pc); + if (err) { +- dev_info(dev, "could not add irqchip\n"); ++ dev_err(dev, "could not add GPIO chip\n"); + return err; + } + +- for (i = 0; i < BCM2835_NUM_IRQS; i++) { +- pc->irq[i] = irq_of_parse_and_map(np, i); +- pc->irq_group[i] = i; +- /* +- * Use the same handler for all groups: this is necessary +- * since we use one gpiochip to cover all lines - the +- * irq handler then needs to figure out which group and +- * bank that was firing the IRQ and look up the per-group +- * and bank data. +- */ +- gpiochip_set_chained_irqchip(&pc->gpio_chip, +- &bcm2835_gpio_irq_chip, +- pc->irq[i], +- bcm2835_gpio_irq_handler); +- } +- + pc->pctl_dev = devm_pinctrl_register(dev, &bcm2835_pinctrl_desc, pc); + if (IS_ERR(pc->pctl_dev)) { + gpiochip_remove(&pc->gpio_chip); + +From bf0a2edf0c0a2ebdd6e83fd18cb83e7723425ce4 Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 011/149] pinctrl-bcm2835: Set base to 0 give expected gpio +Subject: [PATCH 012/143] pinctrl-bcm2835: Set base to 0 give expected gpio numbering Signed-off-by: Noralf Tronnes @@ -575,10 +872,10 @@ Signed-off-by: Noralf Tronnes 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -index fa77165fab2c1348163979da507df17e7168c49b..d11e2e4ea189466e686d762cb6c6fef9111ecf8e 100644 +index 4f2621272bfd5cbc0d691d2fabe89e2ee428d6db..5b7cb4c415e19f98e25b221ab0ad36b6885dae4c 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -@@ -386,7 +386,7 @@ static struct gpio_chip bcm2835_gpio_chip = { +@@ -381,7 +381,7 @@ static struct gpio_chip bcm2835_gpio_chip = { .get = bcm2835_gpio_get, .set = bcm2835_gpio_set, .to_irq = bcm2835_gpio_to_irq, @@ -588,159 +885,10 @@ index fa77165fab2c1348163979da507df17e7168c49b..d11e2e4ea189466e686d762cb6c6fef9 .can_sleep = false, }; -From 972d0891026ffcb9d457c59efa9b452c9ee4f8eb Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 24 Feb 2015 13:40:50 +0000 -Subject: [PATCH 012/149] pinctrl-bcm2835: Fix interrupt handling for GPIOs - 28-31 and 46-53 - -Contrary to the documentation, the BCM2835 GPIO controller actually has -four interrupt lines - one each for the three IRQ groups and one common. Rather -confusingly, the GPIO interrupt groups don't correspond directly with the GPIO -control banks. Instead, GPIOs 0-27 generate IRQ GPIO0, 28-45 GPIO1 and -46-53 GPIO2. - -Awkwardly, the GPIOS for IRQ GPIO1 straddle two 32-entry GPIO banks, so it is -cleaner to split out a function to process the interrupts for a single GPIO -bank. - -This bug has only just been observed because GPIOs above 27 can only be -accessed on an old Raspberry Pi with the optional P5 header fitted, where -the pins are often used for I2S instead. ---- - drivers/pinctrl/bcm/pinctrl-bcm2835.c | 51 ++++++++++++++++++++++++++--------- - 1 file changed, 39 insertions(+), 12 deletions(-) - -diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -index d11e2e4ea189466e686d762cb6c6fef9111ecf8e..107ad7d58de8f8a7f55e09c9cdcf7d66fa7ab66b 100644 ---- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c -+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -@@ -47,6 +47,7 @@ - #define MODULE_NAME "pinctrl-bcm2835" - #define BCM2835_NUM_GPIOS 54 - #define BCM2835_NUM_BANKS 2 -+#define BCM2835_NUM_IRQS 3 - - #define BCM2835_PIN_BITMAP_SZ \ - DIV_ROUND_UP(BCM2835_NUM_GPIOS, sizeof(unsigned long) * 8) -@@ -88,13 +89,13 @@ enum bcm2835_pinconf_pull { - - struct bcm2835_gpio_irqdata { - struct bcm2835_pinctrl *pc; -- int bank; -+ int irqgroup; - }; - - struct bcm2835_pinctrl { - struct device *dev; - void __iomem *base; -- int irq[BCM2835_NUM_BANKS]; -+ int irq[BCM2835_NUM_IRQS]; - - /* note: locking assumes each bank will have its own unsigned long */ - unsigned long enabled_irq_map[BCM2835_NUM_BANKS]; -@@ -105,7 +106,7 @@ struct bcm2835_pinctrl { - struct gpio_chip gpio_chip; - struct pinctrl_gpio_range gpio_range; - -- struct bcm2835_gpio_irqdata irq_data[BCM2835_NUM_BANKS]; -+ struct bcm2835_gpio_irqdata irq_data[BCM2835_NUM_IRQS]; - spinlock_t irq_lock[BCM2835_NUM_BANKS]; - }; - -@@ -391,17 +392,16 @@ static struct gpio_chip bcm2835_gpio_chip = { - .can_sleep = false, - }; - --static irqreturn_t bcm2835_gpio_irq_handler(int irq, void *dev_id) -+static int bcm2835_gpio_irq_handle_bank(struct bcm2835_pinctrl *pc, -+ unsigned int bank, u32 mask) - { -- struct bcm2835_gpio_irqdata *irqdata = dev_id; -- struct bcm2835_pinctrl *pc = irqdata->pc; -- int bank = irqdata->bank; - unsigned long events; - unsigned offset; - unsigned gpio; - unsigned int type; - - events = bcm2835_gpio_rd(pc, GPEDS0 + bank * 4); -+ events &= mask; - events &= pc->enabled_irq_map[bank]; - for_each_set_bit(offset, &events, 32) { - gpio = (32 * bank) + offset; -@@ -409,7 +409,30 @@ static irqreturn_t bcm2835_gpio_irq_handler(int irq, void *dev_id) - - generic_handle_irq(irq_linear_revmap(pc->irq_domain, gpio)); - } -- return events ? IRQ_HANDLED : IRQ_NONE; -+ -+ return (events != 0); -+} -+ -+static irqreturn_t bcm2835_gpio_irq_handler(int irq, void *dev_id) -+{ -+ struct bcm2835_gpio_irqdata *irqdata = dev_id; -+ struct bcm2835_pinctrl *pc = irqdata->pc; -+ int handled = 0; -+ -+ switch (irqdata->irqgroup) { -+ case 0: /* IRQ0 covers GPIOs 0-27 */ -+ handled = bcm2835_gpio_irq_handle_bank(pc, 0, 0x0fffffff); -+ break; -+ case 1: /* IRQ1 covers GPIOs 28-45 */ -+ handled = bcm2835_gpio_irq_handle_bank(pc, 0, 0xf0000000) | -+ bcm2835_gpio_irq_handle_bank(pc, 1, 0x00003fff); -+ break; -+ case 2: /* IRQ2 covers GPIOs 46-53 */ -+ handled = bcm2835_gpio_irq_handle_bank(pc, 1, 0x003fc000); -+ break; -+ } -+ -+ return handled ? IRQ_HANDLED : IRQ_NONE; - } - - static inline void __bcm2835_gpio_irq_config(struct bcm2835_pinctrl *pc, -@@ -998,8 +1021,6 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) - for (i = 0; i < BCM2835_NUM_BANKS; i++) { - unsigned long events; - unsigned offset; -- int len; -- char *name; - - /* clear event detection flags */ - bcm2835_gpio_wr(pc, GPREN0 + i * 4, 0); -@@ -1014,10 +1035,15 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) - for_each_set_bit(offset, &events, 32) - bcm2835_gpio_wr(pc, GPEDS0 + i * 4, BIT(offset)); - -+ spin_lock_init(&pc->irq_lock[i]); -+ } -+ -+ for (i = 0; i < BCM2835_NUM_IRQS; i++) { -+ int len; -+ char *name; - pc->irq[i] = irq_of_parse_and_map(np, i); - pc->irq_data[i].pc = pc; -- pc->irq_data[i].bank = i; -- spin_lock_init(&pc->irq_lock[i]); -+ pc->irq_data[i].irqgroup = i; - - len = strlen(dev_name(pc->dev)) + 16; - name = devm_kzalloc(pc->dev, len, GFP_KERNEL); -@@ -1074,6 +1100,7 @@ static struct platform_driver bcm2835_pinctrl_driver = { - .remove = bcm2835_pinctrl_remove, - .driver = { - .name = MODULE_NAME, -+ .owner = THIS_MODULE, - .of_match_table = bcm2835_pinctrl_match, - }, - }; - -From e62249a05d430a8e79b4ff7f49c9f0f20f165c7c Mon Sep 17 00:00:00 2001 +From b769e2efdc8f7c809c5d83c0daa8a1a452e890db Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 26 Feb 2015 09:58:22 +0000 -Subject: [PATCH 013/149] pinctrl-bcm2835: Only request the interrupts listed +Subject: [PATCH 013/143] pinctrl-bcm2835: Only request the interrupts listed in the DTB Although the GPIO controller can generate three interrupts (four counting @@ -754,10 +902,10 @@ interface, is unlikely to be a problem. 1 file changed, 2 insertions(+) diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -index 107ad7d58de8f8a7f55e09c9cdcf7d66fa7ab66b..644bdecbcfcb79d3b84a33769265fca5d3d0c9e5 100644 +index 5b7cb4c415e19f98e25b221ab0ad36b6885dae4c..6351fe7f8e314ac5ebb102dd20847b383fd5b857 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -@@ -1042,6 +1042,8 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) +@@ -1049,6 +1049,8 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) int len; char *name; pc->irq[i] = irq_of_parse_and_map(np, i); @@ -767,54 +915,10 @@ index 107ad7d58de8f8a7f55e09c9cdcf7d66fa7ab66b..644bdecbcfcb79d3b84a33769265fca5 pc->irq_data[i].irqgroup = i; -From dc01289f705c8b672c3f03c431c9738df66d7c4d Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Fri, 6 May 2016 12:32:47 +0100 -Subject: [PATCH 014/149] pinctrl-bcm2835: Return pins to inputs when freed - -When dynamically unloading overlays, it is important that freed pins are -restored to being inputs to prevent functions from being enabled in -multiple places at once. - -Signed-off-by: Phil Elwell ---- - drivers/pinctrl/bcm/pinctrl-bcm2835.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -index 644bdecbcfcb79d3b84a33769265fca5d3d0c9e5..81a66cba2ab0f7e3ae179de7edd10122630e7abc 100644 ---- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c -+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c -@@ -844,6 +844,16 @@ static const struct pinctrl_ops bcm2835_pctl_ops = { - .dt_free_map = bcm2835_pctl_dt_free_map, - }; - -+static int bcm2835_pmx_free(struct pinctrl_dev *pctldev, -+ unsigned offset) -+{ -+ struct bcm2835_pinctrl *pc = pinctrl_dev_get_drvdata(pctldev); -+ -+ /* disable by setting to GPIO_IN */ -+ bcm2835_pinctrl_fsel_set(pc, offset, BCM2835_FSEL_GPIO_IN); -+ return 0; -+} -+ - static int bcm2835_pmx_get_functions_count(struct pinctrl_dev *pctldev) - { - return BCM2835_FSEL_COUNT; -@@ -903,6 +913,7 @@ static int bcm2835_pmx_gpio_set_direction(struct pinctrl_dev *pctldev, - } - - static const struct pinmux_ops bcm2835_pmx_ops = { -+ .free = bcm2835_pmx_free, - .get_functions_count = bcm2835_pmx_get_functions_count, - .get_function_name = bcm2835_pmx_get_function_name, - .get_function_groups = bcm2835_pmx_get_function_groups, - -From 28df47ea6cf569de329a52f19a511f730524625a Mon Sep 17 00:00:00 2001 +From c7575d85ded4666e609af7c4a65663379c5b7ffb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 -Subject: [PATCH 015/149] spi-bcm2835: Support pin groups other than 7-11 +Subject: [PATCH 014/143] spi-bcm2835: Support pin groups other than 7-11 The spi-bcm2835 driver automatically uses GPIO chip-selects due to some unreliability of the native ones. In doing so it chooses the @@ -895,10 +999,10 @@ index f35cc10772f6670397ea923ad30158270dd68578..5dfe20ffc2866fa6789825016c585175 /* and set up the "mode" and level */ dev_info(&spi->dev, "setting up native-CS%i as GPIO %i\n", -From 709c58337cc3d267916130868a9376c07a900130 Mon Sep 17 00:00:00 2001 +From 4059c76642b41887bff173ca7c36d738a1d12daf Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 Jul 2016 22:09:24 +0100 -Subject: [PATCH 016/149] spi-bcm2835: Disable forced software CS +Subject: [PATCH 015/143] spi-bcm2835: Disable forced software CS Select software CS in bcm2708_common.dtsi, and disable the automatic conversion in the driver to allow hardware CS to be re-enabled with an @@ -932,10 +1036,10 @@ index 5dfe20ffc2866fa6789825016c585175a29705b6..8493474d286f7a1ac6454a22c61c8c2c return 0; } -From 493e176fe020de1f3c9eb3117e9c7dbfb4e0b2d6 Mon Sep 17 00:00:00 2001 +From 3946ca2d555be10ee4025995a896a261546dbb16 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 8 Nov 2016 21:35:38 +0000 -Subject: [PATCH 017/149] spi-bcm2835: Remove unused code +Subject: [PATCH 016/143] spi-bcm2835: Remove unused code --- drivers/spi/spi-bcm2835.c | 61 ----------------------------------------------- @@ -1023,10 +1127,10 @@ index 8493474d286f7a1ac6454a22c61c8c2cef9121bf..33d75ad38a7f77d085321ace9101900a } -From 4083f9d43537bff9852ea18093c7e4a5acd49114 Mon Sep 17 00:00:00 2001 +From 3e2637b9690a7170181a28e173be2df710bc42b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Wed, 3 Jun 2015 12:26:13 +0200 -Subject: [PATCH 018/149] ARM: bcm2835: Set Serial number and Revision +Subject: [PATCH 017/143] ARM: bcm2835: Set Serial number and Revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1079,10 +1183,10 @@ index 0c1edfc98696da0e0bb7f4a18cdfbcdd27a9795d..8f152266ba9b470df2eaaed9ebcf158e static const char * const bcm2835_compat[] = { -From 388dc1a192ecb414adeb2e991fa7e494c8f3fee9 Mon Sep 17 00:00:00 2001 +From 5ae2a094dc3d45ed43fc10955946a455614deed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 3 Oct 2015 22:22:55 +0200 -Subject: [PATCH 019/149] dmaengine: bcm2835: Load driver early and support +Subject: [PATCH 018/143] dmaengine: bcm2835: Load driver early and support legacy API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -1100,7 +1204,7 @@ Signed-off-by: Noralf Trønnes 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig -index 141aefbe37ec93d1f4f38d1be5e2cf8d93266725..9c931d36c6a499a02f4f215f8cd77d3f2254a3b9 100644 +index 263495d0adbdfd0a5e079c3ba5c6f71247ee7fde..4415a37a1d84c696efa96bf0b17840d6c0dd3b12 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -108,7 +108,7 @@ config COH901318 @@ -1185,17 +1289,17 @@ index e18dc596cf2447fa9ef7e41b62d9396e29043426..80d35f760b4a4a51e60c355a84d538ba MODULE_ALIAS("platform:bcm2835-dma"); MODULE_DESCRIPTION("BCM2835 DMA engine driver"); -From 86ccc8437f0ac5c223f8fe798ed7cbb5b0b26bbc Mon Sep 17 00:00:00 2001 +From ec29a80aa532673f479214b409dca3bbda1ad682 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jan 2016 17:25:12 +0000 -Subject: [PATCH 020/149] firmware: Updated mailbox header +Subject: [PATCH 019/143] firmware: Updated mailbox header --- - include/soc/bcm2835/raspberrypi-firmware.h | 11 +++++++++++ - 1 file changed, 11 insertions(+) + include/soc/bcm2835/raspberrypi-firmware.h | 9 +++++++++ + 1 file changed, 9 insertions(+) diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index 3fb357193f09914fe21f8555a4b8613f74f22bc3..227a107214a02deadcca3db202da265eba1fdd21 100644 +index cb979ad90401e299344dd5fae38d09c489d8bd58..30fb37fe175df604a738258a2a632bca3bfff33f 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -63,6 +63,7 @@ enum rpi_firmware_property_tag { @@ -1239,63 +1343,20 @@ index 3fb357193f09914fe21f8555a4b8613f74f22bc3..227a107214a02deadcca3db202da265e RPI_FIRMWARE_FRAMEBUFFER_SET_PHYSICAL_WIDTH_HEIGHT = 0x00048003, RPI_FIRMWARE_FRAMEBUFFER_SET_VIRTUAL_WIDTH_HEIGHT = 0x00048004, RPI_FIRMWARE_FRAMEBUFFER_SET_DEPTH = 0x00048005, -@@ -108,6 +115,10 @@ enum rpi_firmware_property_tag { +@@ -108,6 +115,8 @@ enum rpi_firmware_property_tag { RPI_FIRMWARE_FRAMEBUFFER_SET_VIRTUAL_OFFSET = 0x00048009, RPI_FIRMWARE_FRAMEBUFFER_SET_OVERSCAN = 0x0004800a, RPI_FIRMWARE_FRAMEBUFFER_SET_PALETTE = 0x0004800b, + RPI_FIRMWARE_FRAMEBUFFER_SET_VSYNC = 0x0004800e, + RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -+ -+ RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, - RPI_FIRMWARE_GET_COMMAND_LINE = 0x00050001, - RPI_FIRMWARE_GET_DMA_CHANNELS = 0x00060001, - -From daf743cd1a82da917d117f50be11062970361cd3 Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Mon, 9 May 2016 17:28:18 -0700 -Subject: [PATCH 021/149] clk: bcm2835: Mark GPIO clocks enabled at boot as - critical. - -These divide off of PLLD_PER and are used for the ethernet and wifi -PHYs source PLLs. Neither of them is currently represented by a phy -device that would grab the clock for us. - -This keeps other drivers from killing the networking PHYs when they -disable their own clocks and trigger PLLD_PER's refcount going to 0. - -v2: Skip marking as critical if they aren't on at boot. - -Signed-off-by: Eric Anholt ---- - drivers/clk/bcm/clk-bcm2835.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index 3bbd2a58db470a89b870a793e59ddf9fc4f48e57..7040c6426e35c11608121893b662c601cd8d6543 100644 ---- a/drivers/clk/bcm/clk-bcm2835.c -+++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1262,6 +1262,15 @@ static struct clk_hw *bcm2835_register_clock(struct bcm2835_cprman *cprman, - init.name = data->name; - init.flags = data->flags | CLK_IGNORE_UNUSED; + RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, -+ /* -+ * Some GPIO clocks for ethernet/wifi PLLs are marked as -+ * critical (since some platforms use them), but if the -+ * firmware didn't have them turned on then they clearly -+ * aren't actually critical. -+ */ -+ if ((cprman_read(cprman, data->ctl_reg) & CM_ENABLE) == 0) -+ init.flags &= ~CLK_IS_CRITICAL; -+ - if (data->is_vpu_clock) { - init.ops = &bcm2835_vpu_clock_clk_ops; - } else { -From c72bcf90c5ef8b983c182d3eec5278fe3ad95326 Mon Sep 17 00:00:00 2001 +From 574fd69f5a7a477bbdb4b702fbd9ed4c771754ec Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 15 Jun 2016 16:48:41 +0100 -Subject: [PATCH 022/149] rtc: Add SPI alias for pcf2123 driver +Subject: [PATCH 020/143] rtc: Add SPI alias for pcf2123 driver Without this alias, Device Tree won't cause the driver to be loaded. @@ -1315,10 +1376,10 @@ index 8895f77726e8da5444afcd602dceff8f25a9b3fd..1833b8853ceb0e6147cceb93a00e558c MODULE_LICENSE("GPL"); +MODULE_ALIAS("spi:rtc-pcf2123"); -From 6244f2c8864ea2b82532fecf2fa43ef2b5b6ac73 Mon Sep 17 00:00:00 2001 +From 9caaab7c7d8bed852d27b583965a6058b98f57af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 7 Oct 2016 16:50:59 +0200 -Subject: [PATCH 023/149] watchdog: bcm2835: Support setting reboot partition +Subject: [PATCH 021/143] watchdog: bcm2835: Support setting reboot partition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1337,7 +1398,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c -index 4dddd8298a227d64862f2e92954a465f2e44b3f6..1f545e024422f59280932713e6a1b05150b39b22 100644 +index c32c45bd8b097889c8f322255fa63c8ed507d6ab..ef02dfa23aa774e1cdf75f935c5de98535718767 100644 --- a/drivers/watchdog/bcm2835_wdt.c +++ b/drivers/watchdog/bcm2835_wdt.c @@ -35,13 +35,7 @@ @@ -1355,7 +1416,7 @@ index 4dddd8298a227d64862f2e92954a465f2e44b3f6..1f545e024422f59280932713e6a1b051 #define SECS_TO_WDOG_TICKS(x) ((x) << 16) #define WDOG_TICKS_TO_SECS(x) ((x) >> 16) -@@ -111,15 +105,28 @@ static struct watchdog_device bcm2835_wdt_wdd = { +@@ -120,15 +114,28 @@ static struct watchdog_device bcm2835_wdt_wdd = { .timeout = WDOG_TICKS_TO_SECS(PM_WDOG_TIME_SET), }; @@ -1389,7 +1450,7 @@ index 4dddd8298a227d64862f2e92954a465f2e44b3f6..1f545e024422f59280932713e6a1b051 val = readl_relaxed(wdt->base + PM_RSTC); val &= PM_RSTC_WRCFG_CLR; val |= PM_PASSWORD | PM_RSTC_WRCFG_FULL_RESET; -@@ -127,6 +134,20 @@ bcm2835_restart(struct notifier_block *this, unsigned long mode, void *cmd) +@@ -136,6 +143,20 @@ bcm2835_restart(struct notifier_block *this, unsigned long mode, void *cmd) /* No sleeping, possibly atomic. */ mdelay(1); @@ -1410,7 +1471,7 @@ index 4dddd8298a227d64862f2e92954a465f2e44b3f6..1f545e024422f59280932713e6a1b051 return 0; } -@@ -142,19 +163,9 @@ static void bcm2835_power_off(void) +@@ -151,19 +172,9 @@ static void bcm2835_power_off(void) of_find_compatible_node(NULL, NULL, "brcm,bcm2835-pm-wdt"); struct platform_device *pdev = of_find_device_by_node(np); struct bcm2835_wdt *wdt = platform_get_drvdata(pdev); @@ -1432,7 +1493,7 @@ index 4dddd8298a227d64862f2e92954a465f2e44b3f6..1f545e024422f59280932713e6a1b051 } static int bcm2835_wdt_probe(struct platform_device *pdev) -@@ -188,7 +199,7 @@ static int bcm2835_wdt_probe(struct platform_device *pdev) +@@ -208,7 +219,7 @@ static int bcm2835_wdt_probe(struct platform_device *pdev) return err; } @@ -1442,10 +1503,10 @@ index 4dddd8298a227d64862f2e92954a465f2e44b3f6..1f545e024422f59280932713e6a1b051 register_restart_handler(&wdt->restart_handler); if (pm_power_off == NULL) -From dccb6995542d49841e8f2788760c018a71825519 Mon Sep 17 00:00:00 2001 +From 232d0798c565f9ebf55bf1e2d2311b3c5ccdd393 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Apr 2016 19:40:12 +0100 -Subject: [PATCH 024/149] reboot: Use power off rather than busy spinning when +Subject: [PATCH 022/143] reboot: Use power off rather than busy spinning when halt is requested --- @@ -1468,10 +1529,10 @@ index 3fa867a2aae672755c6ce6448f4148c989dbf964..80dca8dcd6709034b643c6a3f35729e0 /* -From 67818faac095861e49851760554ce737c91089a0 Mon Sep 17 00:00:00 2001 +From efde81aa7c10d0d6e9c24e7cc8503ce0996faca9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 9 Nov 2016 13:02:52 +0000 -Subject: [PATCH 025/149] bcm: Make RASPBERRYPI_POWER depend on PM +Subject: [PATCH 023/143] bcm: Make RASPBERRYPI_POWER depend on PM --- drivers/soc/bcm/Kconfig | 1 + @@ -1490,10 +1551,10 @@ index a39b0d58ddd0fdf0ac1cc7295f8aafb12546e226..e037a6dd79d1881a09e3ca9115782709 help This enables support for the RPi power domains which can be enabled -From 5ff58aca38d86f9ae61dd259b603173638e756b1 Mon Sep 17 00:00:00 2001 +From a0c1361b3b8584885facacada6d30f09470ce3bb Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Fri, 2 Sep 2016 16:45:27 +0100 -Subject: [PATCH 026/149] Register the clocks early during the boot process, so +Subject: [PATCH 024/143] Register the clocks early during the boot process, so that special/critical clocks can get enabled early on in the boot process avoiding the risk of disabling a clock, pll_divider or pll when a claiming driver fails to install propperly - maybe it needs to defer. @@ -1504,10 +1565,10 @@ Signed-off-by: Martin Sperl 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c -index 7040c6426e35c11608121893b662c601cd8d6543..21e2a538ff0d0ab4e63adff9b93705f3d45fa15d 100644 +index 0d14409097e777ce4546de30e9278fdebf74ec44..093694e00caec6e133eb26712f890691cad999aa 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1903,8 +1903,15 @@ static int bcm2835_clk_probe(struct platform_device *pdev) +@@ -1958,8 +1958,15 @@ static int bcm2835_clk_probe(struct platform_device *pdev) if (ret) return ret; @@ -1524,7 +1585,7 @@ index 7040c6426e35c11608121893b662c601cd8d6543..21e2a538ff0d0ab4e63adff9b93705f3 } static const struct of_device_id bcm2835_clk_of_match[] = { -@@ -1921,7 +1928,11 @@ static struct platform_driver bcm2835_clk_driver = { +@@ -1976,7 +1983,11 @@ static struct platform_driver bcm2835_clk_driver = { .probe = bcm2835_clk_probe, }; @@ -1538,10 +1599,10 @@ index 7040c6426e35c11608121893b662c601cd8d6543..21e2a538ff0d0ab4e63adff9b93705f3 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("BCM2835 clock driver"); -From 9f222e7751a552f0702001e8bb65f6542d099a01 Mon Sep 17 00:00:00 2001 +From c3b7ffe0ce627827234c4012de92f199831caefb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 6 Dec 2016 17:05:39 +0000 -Subject: [PATCH 027/149] bcm2835-rng: Avoid initialising if already enabled +Subject: [PATCH 025/143] bcm2835-rng: Avoid initialising if already enabled Avoids the 0x40000 cycles of warmup again if firmware has already used it --- @@ -1567,10 +1628,10 @@ index 574211a495491d9d6021dcaefe4274a63ed02055..e66c0fca8c6090e32f72796c0877a1cf err = hwrng_register(&bcm2835_rng_ops); if (err) { -From 172f29ac319b70f9cbdee8eb6bf1effcf4228339 Mon Sep 17 00:00:00 2001 +From 5bfe6e7bc831a0e96fa156a19886809aff0328ca Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Aug 2016 16:28:44 +0100 -Subject: [PATCH 028/149] kbuild: Ignore dtco targets when filtering symbols +Subject: [PATCH 026/143] kbuild: Ignore dtco targets when filtering symbols --- scripts/Kbuild.include | 2 +- @@ -1590,10 +1651,10 @@ index 179219845dfcdfbeb586d12c5ec1296095d9fbf4..e0743e44f84188667a0c322e8c3d36f1 esac | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' -From 6b5d699e1c3fac9703817ab771fb6b76f9c5b697 Mon Sep 17 00:00:00 2001 +From 591508cc26f195e95549de1146bc05d8f21c5dee Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 -Subject: [PATCH 029/149] BCM2835_DT: Fix I2S register map +Subject: [PATCH 027/143] BCM2835_DT: Fix I2S register map --- Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 ++-- @@ -1631,10 +1692,10 @@ index 65783de0aedf3da79adc36fd077b7a89954ddb6b..a89fe4220fdc3f26f75ee66daf187554 dmas = <&dma 2>, <&dma 3>; -From 0f754ef76f4a4273014129871e8c7db707f62171 Mon Sep 17 00:00:00 2001 +From 01804d5ae241e785859bd18934674c00fa692dc3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 030/149] Main bcm2708/bcm2709 linux port +Subject: [PATCH 028/143] Main bcm2708/bcm2709 linux port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1841,10 +1902,10 @@ index cfb4b4496dd9f61362dea012176c146120fada07..d9c6c217c4d6a2408abe2665bf7f2700 MODULE_AUTHOR("Lubomir Rintel "); MODULE_DESCRIPTION("BCM2835 mailbox IPC driver"); -From 831b20cc672acd4b3109d7e707967248424e784b Mon Sep 17 00:00:00 2001 +From 228c89bd9ddd3b365c7eaa3c03d575bc794f7de7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 031/149] Add dwc_otg driver +Subject: [PATCH 029/143] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2522,7 +2583,7 @@ index 8dd26e1a9bd69051a1548d99c157cad2e65ba81b..eef484756af2179be8acd76b9ddbd3e9 + mov pc, r8 +ENDPROC(__FIQ_Branch) diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile -index dca78565eb5500263051e9e1c889d84d6afd8fd9..5c467de6914e742b2ba25eb16e0c08b2e363532c 100644 +index 7791af6c102c7f4ea2c8ecdeda5cbc08fb03a55c..4f9e217700551a55b64b8ee8eaebbd8822741d4e 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile @@ -7,6 +7,7 @@ @@ -2534,10 +2595,10 @@ index dca78565eb5500263051e9e1c889d84d6afd8fd9..5c467de6914e742b2ba25eb16e0c08b2 obj-$(CONFIG_USB_DWC2) += dwc2/ obj-$(CONFIG_USB_ISP1760) += isp1760/ diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c -index 358ca8dd784fe43700ae070764fa783500a792fe..abaac7c7142d8887c1516957fc52162c0e1683f7 100644 +index bd3e0c5a6db25e7a162d922c6508de1ad0b68025..15c80079c97bb9eeec478932af88a293b5c51ca9 100644 --- a/drivers/usb/core/generic.c +++ b/drivers/usb/core/generic.c -@@ -152,6 +152,7 @@ int usb_choose_configuration(struct usb_device *udev) +@@ -154,6 +154,7 @@ int usb_choose_configuration(struct usb_device *udev) dev_warn(&udev->dev, "no configuration chosen from %d choice%s\n", num_configs, plural(num_configs)); @@ -2546,10 +2607,10 @@ index 358ca8dd784fe43700ae070764fa783500a792fe..abaac7c7142d8887c1516957fc52162c return i; } diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index aef81a16e2c8534701b8583392400faf77971d23..4197a5b5fb7abae67bd4aa32c29cb84c1f2fe22e 100644 +index a56c75e09786d5fa1e064a8e56e58e4095e4d716..466eeaeee74b271946384e6bfde8a5fd1c722f4f 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5009,7 +5009,7 @@ static void port_event(struct usb_hub *hub, int port1) +@@ -5018,7 +5018,7 @@ static void port_event(struct usb_hub *hub, int port1) if (portchange & USB_PORT_STAT_C_OVERCURRENT) { u16 status = 0, unused; @@ -2559,10 +2620,10 @@ index aef81a16e2c8534701b8583392400faf77971d23..4197a5b5fb7abae67bd4aa32c29cb84c USB_PORT_FEAT_C_OVER_CURRENT); msleep(100); /* Cool down */ diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c -index 3a47077461578f2af47af8d551353c2c7cb12f0e..85b7ff6f24b8023e1b589aa1a3557885c48d7a13 100644 +index dea55914d6410c5b472c36562864baee3143bf86..17fbb7bfd2c92d84169281008915453f5b8f949b 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c -@@ -1908,6 +1908,85 @@ int usb_set_configuration(struct usb_device *dev, int configuration) +@@ -1911,6 +1911,85 @@ int usb_set_configuration(struct usb_device *dev, int configuration) if (cp->string == NULL && !(dev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS)) cp->string = usb_cache_string(dev, cp->desc.iConfiguration); @@ -6488,10 +6549,10 @@ index 0000000000000000000000000000000000000000..a896d73f7a9336f5a34015c44ea5a6b0 +} +module_exit(fsg_cleanup); diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig -index 0b80cee30da4740e8c28c6ea7a4cc700163a12ee..f17b939c149562527937f49d90e23c7ab8b72328 100644 +index 6361fc73930669750317b4fa4e995d74e8954e3c..99bc52546b8c912de72b4381ba8cf8e8ad61d7ee 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig -@@ -762,6 +762,19 @@ config USB_HWA_HCD +@@ -763,6 +763,19 @@ config USB_HWA_HCD To compile this driver a module, choose M here: the module will be called "hwa-hc". @@ -6512,10 +6573,10 @@ index 0b80cee30da4740e8c28c6ea7a4cc700163a12ee..f17b939c149562527937f49d90e23c7a tristate "i.MX21 HCD support" depends on ARM && ARCH_MXC diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile -index 6ef785b0ea8ff0b5f4ee3bc40ba22d17c855478f..c28acc1b2877b6ac43604d1968351ce42e9470a5 100644 +index 2644537b7bcfb5cc8452243838815d3aa5669409..d555089559bc2feef1a07f1f4147135f591bf087 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile -@@ -74,6 +74,8 @@ obj-$(CONFIG_USB_SL811_CS) += sl811_cs.o +@@ -75,6 +75,8 @@ obj-$(CONFIG_USB_SL811_CS) += sl811_cs.o obj-$(CONFIG_USB_U132_HCD) += u132-hcd.o obj-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o obj-$(CONFIG_USB_HWA_HCD) += hwa-hc.o @@ -62901,10 +62962,10 @@ index 0000000000000000000000000000000000000000..cdc9963176e5a4a0d5250613b61e26c5 +test_main(); +0; -From cc3948316ff869420c6ab75c4134ea2d59a6f96f Mon Sep 17 00:00:00 2001 +From f68c23214b22436e79194926e525fb6c0175576c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 -Subject: [PATCH 032/149] bcm2708 framebuffer driver +Subject: [PATCH 030/143] bcm2708 framebuffer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -66363,10 +66424,10 @@ index 3c14e43b82fefe1d32f591d1b2f61d2cd28d0fa8..7626beb6a5bb8df601ddf0f6e6909d1f +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 -From b34dc7f1c6796076b3def1d640ec670a53c2dccd Mon Sep 17 00:00:00 2001 +From bdf4d5ad586e9074aacf2e7942335268f43162e3 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 033/149] dmaengine: Add support for BCM2708 +Subject: [PATCH 031/143] dmaengine: Add support for BCM2708 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -66525,7 +66586,7 @@ bcm2708-dmaengine - Fix arm64 portability/build issues create mode 100644 include/linux/platform_data/dma-bcm2708.h diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig -index 9c931d36c6a499a02f4f215f8cd77d3f2254a3b9..9ccee1058e4c5c208a196d6d89e700d09754f977 100644 +index 4415a37a1d84c696efa96bf0b17840d6c0dd3b12..6f3aba9c1f8d35d9abb25ecc4a51825a922a4c03 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -108,7 +108,7 @@ config COH901318 @@ -66537,7 +66598,7 @@ index 9c931d36c6a499a02f4f215f8cd77d3f2254a3b9..9ccee1058e4c5c208a196d6d89e700d0 select DMA_ENGINE select DMA_VIRTUAL_CHANNELS -@@ -499,6 +499,10 @@ config TIMB_DMA +@@ -513,6 +513,10 @@ config TIMB_DMA help Enable support for the Timberdale FPGA DMA engine. @@ -66549,7 +66610,7 @@ index 9c931d36c6a499a02f4f215f8cd77d3f2254a3b9..9ccee1058e4c5c208a196d6d89e700d0 tristate "AM33xx CPPI41 DMA support" depends on ARCH_OMAP diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile -index e4dc9cac7ee8427184f821896364c232634a444f..58cc24730ed6ab4fd35a9cb182c4862f8f2d546f 100644 +index a4fa3360e609d1ef81bf89dc7086b76e6ae52048..853a30a5f4500b54e33cb61d3b99137d4198925c 100644 --- a/drivers/dma/Makefile +++ b/drivers/dma/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_AT_HDMAC) += at_hdmac.o @@ -66997,10 +67058,10 @@ index 0000000000000000000000000000000000000000..c5bfff2765be4606077e6c8af73040ec + +#endif /* _PLAT_BCM2708_DMA_H */ -From c71cf4968d934952db245c735a1dc9aa10769ed3 Mon Sep 17 00:00:00 2001 +From 14cfe758a49f17af11460525c1d0d76012e10b46 Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 034/149] MMC: added alternative MMC driver +Subject: [PATCH 032/143] MMC: added alternative MMC driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67118,7 +67179,7 @@ index ca9cade317c7eccee354bb1a075b091f59a62de1..5e9e3518e0eb6be78f6e2847846a90dd } EXPORT_SYMBOL(mmc_fixup_device); diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index 5274f503a39ad9c034e23b634ff0ec6634cbbd78..405d62909dd6ac5351684c002414cc02135d98ba 100644 +index 2eb97014dc3f2073c3b471688ba31598d023bc9e..ffa08df2adb9072de7f6e7662cd07239b97c2aea 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -4,6 +4,35 @@ @@ -67158,7 +67219,7 @@ index 5274f503a39ad9c034e23b634ff0ec6634cbbd78..405d62909dd6ac5351684c002414cc02 tristate "ARM AMBA Multimedia Card Interface support" depends on ARM_AMBA diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile -index e2bdaaf431841535b936600af56b8e38f52f9845..5133b680970c93fbb9695f83296f0f70b4977240 100644 +index ccc9c4cba154c6ba1849151353526e555d63c8a6..821366b1bb4d206523794382bf9b14ce37a9cb17 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_MMC_SDHCI_S3C) += sdhci-s3c.o @@ -68750,10 +68811,10 @@ index 0000000000000000000000000000000000000000..4fe8d1fe44578fbefcd48f8c327ba3d0 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Gellert Weisz"); -From 01825a395ee187b1064e93c1c6f555f9d87ddfe6 Mon Sep 17 00:00:00 2001 +From c2d33aadf0cf3d1c68c2dde3e48d6b335679816a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 -Subject: [PATCH 035/149] Adding bcm2835-sdhost driver, and an overlay to +Subject: [PATCH 033/143] Adding bcm2835-sdhost driver, and an overlay to enable it BCM2835 has two SD card interfaces. This driver uses the other one. @@ -68921,7 +68982,7 @@ Signed-off-by: Phil Elwell create mode 100644 drivers/mmc/host/bcm2835-sdhost.c diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index 405d62909dd6ac5351684c002414cc02135d98ba..87d251e93913b216359383812cae196e91bf6cfb 100644 +index ffa08df2adb9072de7f6e7662cd07239b97c2aea..0015d8ad85b565ed789d7dd9dc056a8014614e4c 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -6,7 +6,7 @@ comment "MMC/SD/SDIO Host Controller Drivers" @@ -68951,7 +69012,7 @@ index 405d62909dd6ac5351684c002414cc02135d98ba..87d251e93913b216359383812cae196e tristate "ARM AMBA Multimedia Card Interface support" depends on ARM_AMBA diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile -index 5133b680970c93fbb9695f83296f0f70b4977240..adbc4586fec94aa8bd70f5ca3e2c90d123849a34 100644 +index 821366b1bb4d206523794382bf9b14ce37a9cb17..62ef8f9b100876d876590b12fe94b8d45fbb5c8c 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_MMC_SDHCI_S3C) += sdhci-s3c.o @@ -71158,10 +71219,10 @@ index 0000000000000000000000000000000000000000..a9bc79bfdbb71807819dfe2d8f165144 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); -From 58b53529d0ded627f578daa56cd19b110e262944 Mon Sep 17 00:00:00 2001 +From 00496b5cfe106d6817de8a73031f1e935e54f4bb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 11 May 2016 12:50:33 +0100 -Subject: [PATCH 036/149] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards +Subject: [PATCH 034/143] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards Some SD cards have been found that corrupt data when small blocks are erased. Add a quirk to indicate that ERASE should not be used, @@ -71184,16 +71245,16 @@ card-specific. Signed-off-by: Phil Elwell --- - drivers/mmc/card/block.c | 39 ++++++++++++++++++++++++++++++++++++--- + drivers/mmc/core/block.c | 39 ++++++++++++++++++++++++++++++++++++--- drivers/mmc/core/core.c | 3 ++- include/linux/mmc/card.h | 3 +++ 3 files changed, 41 insertions(+), 4 deletions(-) -diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c -index 709a872ed484a9da1ce620238c3222190c612f86..894c105be9ce7f83147a62c433c787b90a5e7c17 100644 ---- a/drivers/mmc/card/block.c -+++ b/drivers/mmc/card/block.c -@@ -135,6 +135,13 @@ enum { +diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c +index cb1698f268f19023429df520713f20a3de6f6d25..dbf7099242bb109b9fa989f029e75e408b2e26d4 100644 +--- a/drivers/mmc/core/block.c ++++ b/drivers/mmc/core/block.c +@@ -125,6 +125,13 @@ static DEFINE_MUTEX(open_lock); module_param(perdev_minors, int, 0444); MODULE_PARM_DESC(perdev_minors, "Minors numbers to allocate per device"); @@ -71207,7 +71268,7 @@ index 709a872ed484a9da1ce620238c3222190c612f86..894c105be9ce7f83147a62c433c787b9 static inline int mmc_blk_part_switch(struct mmc_card *card, struct mmc_blk_data *md); static int get_card_status(struct mmc_card *card, u32 *status, int retries); -@@ -2573,6 +2580,17 @@ static const struct mmc_fixup blk_fixups[] = +@@ -2164,6 +2171,17 @@ static const struct mmc_fixup blk_fixups[] = MMC_FIXUP("V10016", CID_MANFID_KINGSTON, CID_OEMID_ANY, add_quirk_mmc, MMC_QUIRK_TRIM_BROKEN), @@ -71225,7 +71286,7 @@ index 709a872ed484a9da1ce620238c3222190c612f86..894c105be9ce7f83147a62c433c787b9 END_FIXUP }; -@@ -2580,6 +2598,7 @@ static int mmc_blk_probe(struct mmc_card *card) +@@ -2171,6 +2189,7 @@ static int mmc_blk_probe(struct mmc_card *card) { struct mmc_blk_data *md, *part_md; char cap_str[10]; @@ -71233,7 +71294,7 @@ index 709a872ed484a9da1ce620238c3222190c612f86..894c105be9ce7f83147a62c433c787b9 /* * Check that the card supports the command class(es) we need. -@@ -2587,7 +2606,16 @@ static int mmc_blk_probe(struct mmc_card *card) +@@ -2178,7 +2197,16 @@ static int mmc_blk_probe(struct mmc_card *card) if (!(card->csd.cmdclass & CCC_BLOCK_READ)) return -ENODEV; @@ -71251,7 +71312,7 @@ index 709a872ed484a9da1ce620238c3222190c612f86..894c105be9ce7f83147a62c433c787b9 md = mmc_blk_alloc(card); if (IS_ERR(md)) -@@ -2595,9 +2623,14 @@ static int mmc_blk_probe(struct mmc_card *card) +@@ -2186,9 +2214,14 @@ static int mmc_blk_probe(struct mmc_card *card) string_get_size((u64)get_capacity(md->disk), 512, STRING_UNITS_2, cap_str, sizeof(cap_str)); @@ -71269,10 +71330,10 @@ index 709a872ed484a9da1ce620238c3222190c612f86..894c105be9ce7f83147a62c433c787b9 if (mmc_blk_alloc_parts(card, md)) goto out; diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c -index 2553d903a82b9eaa8577c1269bc9f63e18b00085..59a4044ea4c2e1283b1cad8afc7e67efaf8653fb 100644 +index 1076b9d89df38e26bfb088fae3586a6c577fd70e..06907db55a930e4a03dfa13cf1c93c867c7e4aba 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c -@@ -2409,7 +2409,8 @@ EXPORT_SYMBOL(mmc_erase); +@@ -2386,7 +2386,8 @@ EXPORT_SYMBOL(mmc_erase); int mmc_can_erase(struct mmc_card *card) { if ((card->host->caps & MMC_CAP_ERASE) && @@ -71283,10 +71344,10 @@ index 2553d903a82b9eaa8577c1269bc9f63e18b00085..59a4044ea4c2e1283b1cad8afc7e67ef return 0; } diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h -index 73fad83acbcb6a157587180516f9ffe7c61eb7d7..e7c9d3098ac06e3c6554fa3373a311f937cd6f96 100644 +index 95d69d4982965aa30fb65d9ffecfad13f4e7be8f..a97b881a04f4b3294cf3ede393cde7178a3e9aff 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h -@@ -283,6 +283,9 @@ struct mmc_card { +@@ -273,6 +273,9 @@ struct mmc_card { #define MMC_QUIRK_BROKEN_HPI (1<<13) /* Disable broken HPI support */ @@ -71297,10 +71358,10 @@ index 73fad83acbcb6a157587180516f9ffe7c61eb7d7..e7c9d3098ac06e3c6554fa3373a311f9 unsigned int erase_shift; /* if erase unit is power 2 */ unsigned int pref_erase; /* in sectors */ -From d7b56b23de00b5e8ab954580c8af00a2e3db02d7 Mon Sep 17 00:00:00 2001 +From ca13f6a5ce9cb58b3587bf0cfd8bfc622ec3da63 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:31:47 +0100 -Subject: [PATCH 037/149] cma: Add vc_cma driver to enable use of CMA +Subject: [PATCH 035/143] cma: Add vc_cma driver to enable use of CMA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -71332,7 +71393,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 include/linux/broadcom/vc_cma.h diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig -index dcc09739a54ef860343ac2fca5acf59724ca60e2..6d518c7635ae128f4554945dd3ffd351f9d325bf 100644 +index fde005ef9d36a96d02be8680cb1845fc042296fa..17eae720bfb0c3d1d5499dc684d072cd33c1b153 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -4,6 +4,8 @@ @@ -71355,7 +71416,7 @@ index 6e6c244a66a02c4efd57229b0f31d331377bbc55..67c40b8f2ff25f423cb74b64de9afa6f +obj-$(CONFIG_BRCM_CHAR_DRIVERS) += broadcom/ diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig new file mode 100644 -index 0000000000000000000000000000000000000000..2d8bd6e5016aab7340636c1f5dc4dd0cbacae6c0 +index 0000000000000000000000000000000000000000..89d6fac780410e370ca2316b357e599c7eb5a9b3 --- /dev/null +++ b/drivers/char/broadcom/Kconfig @@ -0,0 +1,15 @@ @@ -71370,7 +71431,7 @@ index 0000000000000000000000000000000000000000..2d8bd6e5016aab7340636c1f5dc4dd0c + +config BCM_VC_CMA + bool "Videocore CMA" -+ depends on CMA && BRCM_CHAR_DRIVERS && BCM2708_VCHIQ ++ depends on CMA && BRCM_CHAR_DRIVERS && BCM2835_VCHIQ + default n + help + Helper for videocore CMA access. @@ -72636,10 +72697,10 @@ index 0000000000000000000000000000000000000000..be2819d5d41f9d5ed65daf8eedb94c9e + +#endif /* VC_CMA_H */ -From 86ffcfc090316b809298478f750f7a3d8b1ebc3a Mon Sep 17 00:00:00 2001 +From 6174e627557707aa9ec6b80ea852a4abce9f85a2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 26 Mar 2012 22:15:50 +0100 -Subject: [PATCH 038/149] bcm2708: alsa sound driver +Subject: [PATCH 036/143] bcm2708: alsa sound driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -72711,7 +72772,7 @@ snd-bcm2835: Use bcm2835_hw params in preallocate create mode 100644 sound/arm/vc_vchi_audioserv_defs.h diff --git a/sound/arm/Kconfig b/sound/arm/Kconfig -index 65171f6657a2984ccc14ce907a4c7c87d77d196b..02b6d263035ca18c9ce53229369dfb00915c260b 100644 +index 65171f6657a2984ccc14ce907a4c7c87d77d196b..42581e2f65dfedba6207b6a377a1e1b5df4f2e4b 100644 --- a/sound/arm/Kconfig +++ b/sound/arm/Kconfig @@ -32,6 +32,13 @@ config SND_PXA2XX_AC97 @@ -72720,7 +72781,7 @@ index 65171f6657a2984ccc14ce907a4c7c87d77d196b..02b6d263035ca18c9ce53229369dfb00 +config SND_BCM2835 + tristate "BCM2835 ALSA driver" -+ depends on ARCH_BCM2835 && BCM2708_VCHIQ && SND ++ depends on ARCH_BCM2835 && BCM2835_VCHIQ && SND + select SND_PCM + help + Say Y or M if you want to support BCM2835 Alsa pcm card driver @@ -75374,10 +75435,10 @@ index 0000000000000000000000000000000000000000..af3e6eb690113fc32ce9e06bd2f0f294 + +#endif // _VC_AUDIO_DEFS_H_ -From 608dd1a3bd211457238098ec54d8274a6895797d Mon Sep 17 00:00:00 2001 +From a32d0d6bbe4bb394ac6724af37583d8c01973a67 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 28 Oct 2016 15:36:43 +0100 -Subject: [PATCH 039/149] vc_mem: Add vc_mem driver for querying firmware +Subject: [PATCH 037/143] vc_mem: Add vc_mem driver for querying firmware memory addresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -75400,7 +75461,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 include/linux/broadcom/vc_mem.h diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index 2d8bd6e5016aab7340636c1f5dc4dd0cbacae6c0..70379287f6261fd833202ac47de1bcca8b84959a 100644 +index 89d6fac780410e370ca2316b357e599c7eb5a9b3..e4fbd82b9384fa3fa23802697293e706a58efed9 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -7,9 +7,19 @@ menuconfig BRCM_CHAR_DRIVERS @@ -75411,8 +75472,8 @@ index 2d8bd6e5016aab7340636c1f5dc4dd0cbacae6c0..70379287f6261fd833202ac47de1bcca + config BCM_VC_CMA bool "Videocore CMA" -- depends on CMA && BRCM_CHAR_DRIVERS && BCM2708_VCHIQ -+ depends on CMA && BCM2708_VCHIQ +- depends on CMA && BRCM_CHAR_DRIVERS && BCM2835_VCHIQ ++ depends on CMA && BCM2835_VCHIQ default n help Helper for videocore CMA access. @@ -75901,10 +75962,10 @@ index 0000000000000000000000000000000000000000..20a475377eb3078ea1ecaef2b24efc35 + +#endif /* _VC_MEM_H */ -From e7f3e8d0a01840f74d16c52093c69004fd657de5 Mon Sep 17 00:00:00 2001 +From c00e9788d5f56d3e876fe2127e9d80da8a456584 Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 040/149] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 038/143] vcsm: VideoCore shared memory service for BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -75964,7 +76025,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 include/linux/broadcom/vmcs_sm_ioctl.h diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index 70379287f6261fd833202ac47de1bcca8b84959a..75fa1cba764084160f7cb77e56058f25b5e9f0ce 100644 +index e4fbd82b9384fa3fa23802697293e706a58efed9..3bf1358bf1dd89d7a41e4ed3fd8fb2990d77ebbe 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -23,3 +23,12 @@ config BCM2708_VCMEM @@ -75974,7 +76035,7 @@ index 70379287f6261fd833202ac47de1bcca8b84959a..75fa1cba764084160f7cb77e56058f25 + +config BCM_VC_SM + bool "VMCS Shared Memory" -+ depends on BCM2708_VCHIQ ++ depends on BCM2835_VCHIQ + select BCM2708_VCMEM + default n + help @@ -76839,7 +76900,7 @@ index 0000000000000000000000000000000000000000..5e279f5a95fac7227cea15941bf0570d +#endif /* __VC_VCHI_SM_H__INCLUDED__ */ diff --git a/drivers/char/broadcom/vc_sm/vmcs_sm.c b/drivers/char/broadcom/vc_sm/vmcs_sm.c new file mode 100644 -index 0000000000000000000000000000000000000000..1db6716c2c0c8b2013203391501f92d09db258af +index 0000000000000000000000000000000000000000..8b6f2476769e956fb30d4c8a24789565e78444c1 --- /dev/null +++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c @@ -0,0 +1,3213 @@ @@ -78014,14 +78075,14 @@ index 0000000000000000000000000000000000000000..1db6716c2c0c8b2013203391501f92d0 + } + + /* We don't use vmf->pgoff since that has the fake offset */ -+ page_offset = ((unsigned long)vmf->virtual_address - vma->vm_start); ++ page_offset = ((unsigned long)vmf->address - vma->vm_start); + pfn = (uint32_t)resource->res_base_mem & 0x3FFFFFFF; + pfn += mm_vc_mem_phys_addr; + pfn += page_offset; + pfn >>= PAGE_SHIFT; + + /* Finally, remap it */ -+ ret = vm_insert_pfn(vma, (unsigned long)vmf->virtual_address, pfn); ++ ret = vm_insert_pfn(vma, (unsigned long)vmf->address, pfn); + + switch (ret) { + case 0: @@ -80311,10 +80372,10 @@ index 0000000000000000000000000000000000000000..334f36d0d697b047df2922b5f2db67f3 + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ -From e1112cb5d042a03fc305178b5e498c48475112b0 Mon Sep 17 00:00:00 2001 +From 32efcf2207a132a8e8d40424646b0e726e19e377 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 -Subject: [PATCH 041/149] Add /dev/gpiomem device for rootless user GPIO access +Subject: [PATCH 039/143] Add /dev/gpiomem device for rootless user GPIO access Signed-off-by: Luke Wren @@ -80331,7 +80392,7 @@ See: https://github.com/raspberrypi/linux/issues/1154 create mode 100644 drivers/char/broadcom/bcm2835-gpiomem.c diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index 75fa1cba764084160f7cb77e56058f25b5e9f0ce..b75c9b2639fb0e63dd2623ddc1dcaac5759c132b 100644 +index 3bf1358bf1dd89d7a41e4ed3fd8fb2990d77ebbe..ffb12f4023b2db4cf75f1a13562d483608eead2e 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -32,3 +32,12 @@ config BCM_VC_SM @@ -80625,10 +80686,10 @@ index 0000000000000000000000000000000000000000..911f5b7393ed48ceed8751f06967ae64 +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); -From a163d2f8c2cf63c24929d384ed69e810863b50b8 Mon Sep 17 00:00:00 2001 +From 227fa137a8d33de43c3a44e26d342a0192d6177b Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 -Subject: [PATCH 042/149] Add SMI driver +Subject: [PATCH 040/143] Add SMI driver Signed-off-by: Luke Wren --- @@ -80726,7 +80787,7 @@ index 0000000000000000000000000000000000000000..b76dc694f1ac0b8044000ae54d312c80 +}; + diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index b75c9b2639fb0e63dd2623ddc1dcaac5759c132b..f7885466f5bf9c0cf45f2057d07a0d24151f10c3 100644 +index ffb12f4023b2db4cf75f1a13562d483608eead2e..026ebde319c49c91f11b21edd78da62270883eac 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -41,3 +41,11 @@ config BCM2835_DEVGPIOMEM @@ -82579,10 +82640,10 @@ index 0000000000000000000000000000000000000000..ee3a75edfc033eeb0d90a687ffb68b10 + +#endif /* BCM2835_SMI_H */ -From 4581206982ea9228b3d626fe9121d83989d655fb Mon Sep 17 00:00:00 2001 +From c21d7f46c064ef8d4be52013e5c9760c4f85202b Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Tue, 26 Apr 2016 14:59:21 +0000 -Subject: [PATCH 043/149] MISC: bcm2835: smi: use clock manager and fix reload +Subject: [PATCH 041/143] MISC: bcm2835: smi: use clock manager and fix reload issues Use clock manager instead of self-made clockmanager. @@ -82752,10 +82813,10 @@ index 63a4ea08b9930a3a31a985f0a1d969b488ed49ec..1261540703127d1d63b9f3c87042c6e5 return 0; } -From 8c4659a46bb12c1a8744cb97d49e4bc81e3716e5 Mon Sep 17 00:00:00 2001 +From 5d7a61f480af9494f6986a02ae3328854b6ead05 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 -Subject: [PATCH 044/149] Add SMI NAND driver +Subject: [PATCH 042/143] Add SMI NAND driver Signed-off-by: Luke Wren --- @@ -82817,7 +82878,7 @@ index 0000000000000000000000000000000000000000..159544d6579070d376d146bd24a86653 +}; \ No newline at end of file diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig -index b254090b8a1ba6dfb7a86f8065663207d5393935..f21097c8d5378b2d72b3d18e39e28ad4f53942f0 100644 +index 9ce5dcb4abd0f5026384ed4e0466d1ddfa44c617..a8008746d960fecaf106c71869372f9c8a79c571 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -41,6 +41,13 @@ config MTD_SM_COMMON @@ -82835,7 +82896,7 @@ index b254090b8a1ba6dfb7a86f8065663207d5393935..f21097c8d5378b2d72b3d18e39e28ad4 tristate diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile -index cafde6f3d95761263d4c5af1395b11bfc000ca9b..d399ab9c92350596ac0970fb1a2a70fa3ac0094b 100644 +index 19a66e404d5ba949a16a7ba358df25f033e7a51c..3e2cecac083a6bdb340127233c10f40ce567814f 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -14,6 +14,7 @@ obj-$(CONFIG_MTD_NAND_DENALI) += denali.o @@ -82845,7 +82906,7 @@ index cafde6f3d95761263d4c5af1395b11bfc000ca9b..d399ab9c92350596ac0970fb1a2a70fa +obj-$(CONFIG_MTD_NAND_BCM2835_SMI) += bcm2835_smi_nand.o obj-$(CONFIG_MTD_NAND_BF5XX) += bf5xx_nand.o obj-$(CONFIG_MTD_NAND_S3C2410) += s3c2410.o - obj-$(CONFIG_MTD_NAND_DAVINCI) += davinci_nand.o + obj-$(CONFIG_MTD_NAND_TANGO) += tango_nand.o diff --git a/drivers/mtd/nand/bcm2835_smi_nand.c b/drivers/mtd/nand/bcm2835_smi_nand.c new file mode 100644 index 0000000000000000000000000000000000000000..02adda6da18bd0ba9ab19a104975b79de58bfdce @@ -83120,10 +83181,10 @@ index 0000000000000000000000000000000000000000..02adda6da18bd0ba9ab19a104975b79d + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); -From 12cb12bf2df48973ea84bd188ccadc191486f353 Mon Sep 17 00:00:00 2001 +From 1995e1c034599ce8a4bad906a7935160058f79a9 Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 045/149] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 043/143] lirc: added support for RaspberryPi GPIO lirc_rpi: Use read_current_timer to determine transmitter delay. Thanks to jjmz and others See: https://github.com/raspberrypi/linux/issues/525 @@ -83188,7 +83249,7 @@ spurious interrupts. create mode 100644 include/linux/platform_data/bcm2708.h diff --git a/drivers/staging/media/lirc/Kconfig b/drivers/staging/media/lirc/Kconfig -index 6879c4651b46c8b48460626cb346b8ee23fa6587..77c69f2d4158be625a5956095b988cd3774dbfae 100644 +index 25b7e7ccf55479ec7a3d83a6e4b8b6aaba207a26..066f4bed3687391055dd3b15f278ed206c1bee6b 100644 --- a/drivers/staging/media/lirc/Kconfig +++ b/drivers/staging/media/lirc/Kconfig @@ -32,6 +32,12 @@ config LIRC_PARALLEL @@ -83205,7 +83266,7 @@ index 6879c4651b46c8b48460626cb346b8ee23fa6587..77c69f2d4158be625a5956095b988cd3 tristate "Sasem USB IR Remote" depends on LIRC && USB diff --git a/drivers/staging/media/lirc/Makefile b/drivers/staging/media/lirc/Makefile -index 5430adf0475ded5abe2ef4b4cf4e7f2c08297894..9e53cd0caf58ba28a939b780c876d4017a23ac2b 100644 +index 7f919eab1989e33f49917f51e9857bc439f51d1f..99726bfaa700d5b54063f155b4821aa5be30df09 100644 --- a/drivers/staging/media/lirc/Makefile +++ b/drivers/staging/media/lirc/Makefile @@ -6,6 +6,7 @@ @@ -83214,8 +83275,8 @@ index 5430adf0475ded5abe2ef4b4cf4e7f2c08297894..9e53cd0caf58ba28a939b780c876d401 obj-$(CONFIG_LIRC_PARALLEL) += lirc_parallel.o +obj-$(CONFIG_LIRC_RPI) += lirc_rpi.o obj-$(CONFIG_LIRC_SASEM) += lirc_sasem.o - obj-$(CONFIG_LIRC_SERIAL) += lirc_serial.o obj-$(CONFIG_LIRC_SIR) += lirc_sir.o + obj-$(CONFIG_LIRC_ZILOG) += lirc_zilog.o diff --git a/drivers/staging/media/lirc/lirc_rpi.c b/drivers/staging/media/lirc/lirc_rpi.c new file mode 100644 index 0000000000000000000000000000000000000000..61328968d21540b04814cbd5155eaa30b715c8f4 @@ -83986,10 +84047,10 @@ index 0000000000000000000000000000000000000000..fb69624ccef00ddbdccf8256d6baf1b1 + +#endif -From c50cae06b8860e97ef558823bb9d9685f400b252 Mon Sep 17 00:00:00 2001 +From 3c4052e9e9b9835346794628a416afdb8286f65b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 046/149] Add cpufreq driver +Subject: [PATCH 044/143] Add cpufreq driver Signed-off-by: popcornmix --- @@ -84000,10 +84061,10 @@ Signed-off-by: popcornmix create mode 100644 drivers/cpufreq/bcm2835-cpufreq.c diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm -index d89b8afe23b6956b6c48e19c87cecc081e7725a1..465c727bb3ba70249409728d8f643a0002c6779c 100644 +index 920c469f3953e890bd747413750be8ad6a4352e2..e15f8324174ced05bcf9289dc474751fc6d3cba7 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm -@@ -220,6 +220,15 @@ config ARM_STI_CPUFREQ +@@ -233,6 +233,15 @@ config ARM_STI_CPUFREQ this config option if you wish to add CPUFreq support for STi based SoCs. @@ -84020,7 +84081,7 @@ index d89b8afe23b6956b6c48e19c87cecc081e7725a1..465c727bb3ba70249409728d8f643a00 bool "Tegra20 CPUFreq support" depends on ARCH_TEGRA diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile -index 0a9b6a093646bd1dd60ee092e362b24527f0ef1e..92a628a670c12c39c2be73fc91f65da5fdafd397 100644 +index 1e46c3918e7a630647d744549a46c184e5e8fd80..6fd3f67a8fbffc304d105683e4f8443d7346ffe8 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile @@ -75,6 +75,7 @@ obj-$(CONFIG_ARM_SA1110_CPUFREQ) += sa1110-cpufreq.o @@ -84256,10 +84317,10 @@ index 0000000000000000000000000000000000000000..414fbdc10dfbfc6e4bb47870a7af3fd5 +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From 4c804a94ab80fa1c15f4e87055f7c4fefbb5f067 Mon Sep 17 00:00:00 2001 +From 99f3536cecd3ec117d1b8f673471936f0935a839 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 047/149] Added hwmon/thermal driver for reporting core +Subject: [PATCH 045/143] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -84280,10 +84341,10 @@ Signed-off-by: Noralf Trønnes create mode 100644 drivers/thermal/bcm2835-thermal.c diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig -index a13541bdc726899807dd8723c92c21312fbc6439..de45ea51555e5f47498c18a969751ea6dc52d6b9 100644 +index c2c056cc7ea52e1a7170b35de2832c1b1dcf40b4..b43058bee69ca62d9480fa7782e456aac1dbeedb 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig -@@ -302,6 +302,13 @@ config INTEL_POWERCLAMP +@@ -304,6 +304,13 @@ config INTEL_POWERCLAMP enforce idle time which results in more package C-state residency. The user interface is exposed via generic thermal framework. @@ -84298,10 +84359,10 @@ index a13541bdc726899807dd8723c92c21312fbc6439..de45ea51555e5f47498c18a969751ea6 tristate "X86 package temperature thermal driver" depends on X86_THERMAL_VECTOR diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile -index c92eb22a41ff89f3f1c61c61977de7eb9ba516ae..bcf9e7503c940821ca260774ba9e1cebf185cd3e 100644 +index 6a3d7b57303655f58b7fec456cc43519fa29dc91..f3d8fe6cc10146b0b27e72f4b6e75664b3bf91cd 100644 --- a/drivers/thermal/Makefile +++ b/drivers/thermal/Makefile -@@ -41,6 +41,7 @@ obj-$(CONFIG_MAX77620_THERMAL) += max77620_thermal.o +@@ -42,6 +42,7 @@ obj-$(CONFIG_MAX77620_THERMAL) += max77620_thermal.o obj-$(CONFIG_QORIQ_THERMAL) += qoriq_thermal.o obj-$(CONFIG_DB8500_CPUFREQ_COOLING) += db8500_cpufreq_cooling.o obj-$(CONFIG_INTEL_POWERCLAMP) += intel_powerclamp.o @@ -84425,10 +84486,10 @@ index 0000000000000000000000000000000000000000..c63fb9f9d143e19612a18fe530c7b2b3 +MODULE_DESCRIPTION("Thermal driver for bcm2835 chip"); +MODULE_LICENSE("GPL"); -From 90343ee1e9f9800520f270b1faef548421203f60 Mon Sep 17 00:00:00 2001 +From 0d51691b29ddf5a1c856738868f7067d0fef9a1b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 -Subject: [PATCH 048/149] Add Chris Boot's i2c driver +Subject: [PATCH 046/143] Add Chris Boot's i2c driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -84532,7 +84593,7 @@ both bcm2708_bsc_fifo_fill and ~drain are changed as well. create mode 100644 drivers/i2c/busses/i2c-bcm2708.c diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig -index d252276feadf6b0b05cbe370330ed7cef5a16857..b81d8133639a34dcec85df50f064d8e9a9ba22fa 100644 +index 0cdc8443deab611d6574ba07b77ddec95ee5cebd..09e4774d2688a8bb8ec1174bf746593dd354f068 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -8,6 +8,25 @@ menu "I2C Hardware Bus support" @@ -84562,7 +84623,7 @@ index d252276feadf6b0b05cbe370330ed7cef5a16857..b81d8133639a34dcec85df50f064d8e9 tristate "ALI 1535" depends on PCI diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile -index 29764cc20a440752841272ddfed3993048ecd105..26ae016a15e72cbb2e742aa89238636e3b846b8e 100644 +index 1c1bac87a9db8cb9a4ee35792a52571262051bc8..3bc2ecfa6839946ee6f61c7ecb45ac16fe3b9a68 100644 --- a/drivers/i2c/busses/Makefile +++ b/drivers/i2c/busses/Makefile @@ -2,6 +2,8 @@ @@ -85093,10 +85154,10 @@ index 0000000000000000000000000000000000000000..962f2e5c7455d91bf32925d785f5f16b +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From be042cabd560bbfb629499ea855e0b0b167b17f3 Mon Sep 17 00:00:00 2001 +From cb15069165df2b45009331fcea832183557c94fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:27:06 +0200 -Subject: [PATCH 049/149] char: broadcom: Add vcio module +Subject: [PATCH 047/143] char: broadcom: Add vcio module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -85113,7 +85174,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 drivers/char/broadcom/vcio.c diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index f7885466f5bf9c0cf45f2057d07a0d24151f10c3..032164919350db25c586c36f0e05d3e4891fb835 100644 +index 026ebde319c49c91f11b21edd78da62270883eac..f83cf0c279d9d2ddb1257504d578dc34a53325ca 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -22,6 +22,12 @@ config BCM2708_VCMEM @@ -85322,10 +85383,10 @@ index 0000000000000000000000000000000000000000..c19bc2075c77879563ef5e59038b5a14 +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); -From 59d09b798dd2b47df127447ded51b431467441d5 Mon Sep 17 00:00:00 2001 +From 08b1da5536118ce3e95f38366b1868fa27dcc489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:25:01 +0200 -Subject: [PATCH 050/149] firmware: bcm2835: Support ARCH_BCM270x +Subject: [PATCH 048/143] firmware: bcm2835: Support ARCH_BCM270x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -85408,10 +85469,10 @@ index dd506cd3a5b874f9e1acd07efb8cd151bb6145d1..3f070bd38a91511c986e3fb114b15bd4 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); -From 48c8f6793b6e0be5ef020825114123391c85ef77 Mon Sep 17 00:00:00 2001 +From bd6e61c1d0de223b77a89b11767c93d14c186222 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 30 Jan 2013 12:45:18 +0000 -Subject: [PATCH 051/149] bcm2835: add v4l2 camera device +Subject: [PATCH 049/143] bcm2835: add v4l2 camera device - Supports raw YUV capture, preview, JPEG and H264. - Uses videobuf2 for data transfer, using dma_buf. @@ -85902,7 +85963,7 @@ index 0000000000000000000000000000000000000000..c585a8fadf91c5a04453e442fc29ed89 + +$ v4l2-ctl --list-formats diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig -index 5ff803efdc03da24a177ee06f3659e785ebe6b35..dc76b9e1594974d6c474ad8a470923ac0ec5b6f0 100644 +index d944421e392d7b0af9e1c93b6bd63ea902bc5e60..10baabea617f114068cd88240571a811eb8ea50f 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -11,6 +11,8 @@ menuconfig V4L_PLATFORM_DRIVERS @@ -85915,7 +85976,7 @@ index 5ff803efdc03da24a177ee06f3659e785ebe6b35..dc76b9e1594974d6c474ad8a470923ac config VIDEO_VIA_CAMERA diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile -index 40b18d12726ec52d0acfd15894337366eb420e89..b9f01f61c500a9b502d976b4c595be5013610aec 100644 +index 5b3cb271d2b8ccf3a2d47a00dcfe90bdb5a95e3c..38273667e6c241fc5487d5600d8fc1e2355feba6 100644 --- a/drivers/media/platform/Makefile +++ b/drivers/media/platform/Makefile @@ -2,6 +2,8 @@ @@ -85929,7 +85990,7 @@ index 40b18d12726ec52d0acfd15894337366eb420e89..b9f01f61c500a9b502d976b4c595be50 obj-$(CONFIG_VIDEO_VIA_CAMERA) += via-camera.o diff --git a/drivers/media/platform/bcm2835/Kconfig b/drivers/media/platform/bcm2835/Kconfig new file mode 100644 -index 0000000000000000000000000000000000000000..58d5f9600d726cb20e6d04c54c58c53ac3a586d2 +index 0000000000000000000000000000000000000000..e2f992c7710e9e6df9ea57387e1c3dd64400abdd --- /dev/null +++ b/drivers/media/platform/bcm2835/Kconfig @@ -0,0 +1,25 @@ @@ -85948,7 +86009,7 @@ index 0000000000000000000000000000000000000000..58d5f9600d726cb20e6d04c54c58c53a + +config VIDEO_BCM2835_MMAL + tristate "Broadcom BM2835 MMAL camera interface driver" -+ depends on BCM2708_VCHIQ ++ depends on BCM2835_VCHIQ + select VIDEOBUF2_VMALLOC + ---help--- + This is a V4L2 driver for the Broadcom BCM2835 MMAL camera host interface @@ -93153,10 +93214,10 @@ index 0000000000000000000000000000000000000000..9d1d11e4a53e510c04a416d92d195a7d + +#endif /* MMAL_VCHIQ_H */ -From 9864db27abbb7b7646a5f7a2d61e633653a30140 Mon Sep 17 00:00:00 2001 +From ffa6bcf63061b49a18bf0932a012e92ce64f1e90 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 -Subject: [PATCH 052/149] scripts: Add mkknlimg and knlinfo scripts from tools +Subject: [PATCH 050/143] scripts: Add mkknlimg and knlinfo scripts from tools repo The Raspberry Pi firmware looks for a trailer on the kernel image to @@ -93676,10 +93737,10 @@ index 0000000000000000000000000000000000000000..60206de7fa9a49bd027c635306674a29 + return $trailer; +} -From 8a0e794974ec0901d409c3cdcb6272d676854710 Mon Sep 17 00:00:00 2001 +From 537c9deee795f656a41baf00cda7168211581b90 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 10 Aug 2015 09:49:15 +0100 -Subject: [PATCH 053/149] scripts/dtc: Update to upstream version 1.4.1 +Subject: [PATCH 051/143] scripts/dtc: Update to upstream version 1.4.1 Includes the new localfixups format. @@ -96530,10 +96591,10 @@ index ad9b05ae698b0495ecbda42ffcf4743555313a27..2595dfda020fd9e03f0beff5006f229d -#define DTC_VERSION "DTC 1.4.1-g53bf130b" +#define DTC_VERSION "DTC 1.4.1-g25efc119" -From 76895f1704632118094519da50adb6b58b4218e4 Mon Sep 17 00:00:00 2001 +From 1fee8b71fef8abbfcef2cf6913627f2f6f7846a5 Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 054/149] BCM2708: Add core Device Tree support +Subject: [PATCH 052/143] BCM2708: Add core Device Tree support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -96943,10 +97004,10 @@ Signed-off-by: Khem Raj create mode 100644 arch/arm/boot/dts/overlays/wittypi-overlay.dts diff --git a/arch/arm/Makefile b/arch/arm/Makefile -index 6be9ee148b78b964004392045199ec8d1540134e..b1c49e2a0c5f5ef2939102625171b26cd5372016 100644 +index ab30cc634d024fdb17b379adac2f2d9fe049f1ff..d92ade49c858e0a50ea7dd7391fccdbfa9479aab 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile -@@ -334,6 +334,8 @@ $(INSTALL_TARGETS): +@@ -338,6 +338,8 @@ $(INSTALL_TARGETS): %.dtb: | scripts $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@ @@ -96966,7 +97027,7 @@ index 3c79f85975aaa26c7c2e353fefc54d71d89bc5bf..eaaeb17e5986e5f7178b2851169444ac -*.dtb +*.dtb* diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index 7037201c5e3a7dd232b087fd7d7daa36bf3878ad..c697c4843a4e0f8b511c024924741082bb11edd7 100644 +index 01d178a2009f598f133e890a46c3e3e99efcc63c..0263d6172d3af40668c02535a4f8dce022f3a93d 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1,5 +1,13 @@ @@ -96983,7 +97044,7 @@ index 7037201c5e3a7dd232b087fd7d7daa36bf3878ad..c697c4843a4e0f8b511c024924741082 dtb-$(CONFIG_ARCH_ALPINE) += \ alpine-db.dtb dtb-$(CONFIG_MACH_ARTPEC6) += \ -@@ -955,10 +963,21 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ +@@ -984,10 +992,21 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb dtb-$(CONFIG_ARCH_ASPEED) += aspeed-bmc-opp-palmetto.dtb \ aspeed-ast2500-evb.dtb @@ -97488,7 +97549,7 @@ index 0000000000000000000000000000000000000000..d33d462b4090e4a4f967a37212918b9c +}; diff --git a/arch/arm/boot/dts/bcm2708-rpi.dtsi b/arch/arm/boot/dts/bcm2708-rpi.dtsi new file mode 100644 -index 0000000000000000000000000000000000000000..46cf8602c3b96e477b05b57dbfe5e349930c9d9a +index 0000000000000000000000000000000000000000..055090ace687b94e4d25de65d1b8fbf7f730be9e --- /dev/null +++ b/arch/arm/boot/dts/bcm2708-rpi.dtsi @@ -0,0 +1,109 @@ @@ -97566,9 +97627,9 @@ index 0000000000000000000000000000000000000000..46cf8602c3b96e477b05b57dbfe5e349 + firmware = <&firmware>; + }; + -+ thermal: thermal { -+ compatible = "brcm,bcm2835-thermal"; ++ thermal: thermal@7e212000 { + firmware = <&firmware>; ++ status = "okay"; + }; + + /* Onboard audio */ @@ -106661,10 +106722,10 @@ index 0a07f9014944ed92a8e2e42983ae43be60b3e471..1967878a843461c3ff1f473b9a030eb0 # Bzip2 -From 4ad8a91b7bb6a0cbad992941e0f93eca80334e06 Mon Sep 17 00:00:00 2001 +From d02d6f6fbcf7be876dd09ecc70ce35ce7238a264 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 -Subject: [PATCH 055/149] BCM270x_DT: Add pwr_led, and the required "input" +Subject: [PATCH 053/143] BCM270x_DT: Add pwr_led, and the required "input" trigger The "input" trigger makes the associated GPIO an input. This is to support @@ -106826,24 +106887,24 @@ index 0000000000000000000000000000000000000000..27f8ebea43d86fc51c98db5c953da05b +MODULE_DESCRIPTION("Set LED GPIO to Input \"trigger\""); +MODULE_LICENSE("GPL"); diff --git a/include/linux/leds.h b/include/linux/leds.h -index ddfcb2df3656cf0ab6aebd1fa3d624a6ec2e94e9..271563eb835f9018712e2076a88f341d2d6db7db 100644 +index 569cb531094c20a9aa2db478aaa6f348d2afd7f4..aca292f4b0932f61b5bd864251fd05b945497ed4 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h -@@ -52,6 +52,9 @@ struct led_classdev { - #define LED_DEV_CAP_FLASH (1 << 24) - #define LED_HW_PLUGGABLE (1 << 25) - #define LED_PANIC_INDICATOR (1 << 26) +@@ -46,6 +46,9 @@ struct led_classdev { + #define LED_DEV_CAP_FLASH (1 << 18) + #define LED_HW_PLUGGABLE (1 << 19) + #define LED_PANIC_INDICATOR (1 << 20) + /* Additions for Raspberry Pi PWR LED */ +#define SET_GPIO_INPUT (1 << 30) +#define SET_GPIO_OUTPUT (1 << 31) - /* Set LED brightness level - * Must not sleep. Use brightness_set_blocking for drivers + /* set_brightness_work / blink_timer flags, atomic, private. */ + unsigned long work_flags; -From d939148e2bae1181b7b3204848b0675bcbca7dce Mon Sep 17 00:00:00 2001 +From 187dd8daac23828689505c4a1ecb48e2c3605019 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 056/149] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 054/143] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -107095,10 +107156,10 @@ index fb795c3b3c178ad3cd7c9e9e4547ffd492bac181..703fa8a70574323abe2fb32599254582 __u32 dx; /* screen-relative */ __u32 dy; -From a6e5f4ea764a98c2215871d52bc2ef12d5f029e6 Mon Sep 17 00:00:00 2001 +From 721fc1e3126da2df74166f87bab6a56c3e0da334 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 057/149] Speed up console framebuffer imageblit function +Subject: [PATCH 055/143] Speed up console framebuffer imageblit function Especially on platforms with a slower CPU but a relatively high framebuffer fill bandwidth, like current ARM devices, the existing @@ -107307,10 +107368,10 @@ index a2bb276a8b2463eee98eb237c4647bc00cd93601..436494fba15abecb400ef28688466faf start_index, pitch_index); } else -From 4397c3e8d04fffb11eefa8cd1a2c63449e0b54ff Mon Sep 17 00:00:00 2001 +From 6f03a5d68b9c89ef0f13a166e66c45d515378036 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 058/149] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 056/143] enabling the realtime clock 1-wire chip DS1307 and 1-wire on GPIO4 (as a module) 1-wire: Add support for configuring pin for w1-gpio kernel module @@ -107560,10 +107621,10 @@ index d58594a3232492e33f1dd4babd3798b03e0f0203..feae94256256316fd9d850c3d83325af unsigned int ext_pullup_enable_pin; unsigned int pullup_duration; -From 0ca39dafbb47c59afba84aed83effee291f4a84a Mon Sep 17 00:00:00 2001 +From 7cc945130866491056dd227a0e01141f1dbf7c4c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Dec 2013 22:16:19 +0000 -Subject: [PATCH 059/149] config: Enable CONFIG_MEMCG, but leave it disabled +Subject: [PATCH 057/143] config: Enable CONFIG_MEMCG, but leave it disabled (due to memory cost). Enable with cgroup_enable=memory. --- @@ -107571,10 +107632,10 @@ Subject: [PATCH 059/149] config: Enable CONFIG_MEMCG, but leave it disabled 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c -index 4e2f3de0e40bff4caef5ee9c587ea19140d07f85..4b687fba53c58e744e04608a9510f9b811f26343 100644 +index 53bbca7c48598e44fa5e45f88626027749ca8932..62d610c934f80265a889d968c4880a711560e8e3 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c -@@ -5626,7 +5626,7 @@ int __init cgroup_init_early(void) +@@ -5631,7 +5631,7 @@ int __init cgroup_init_early(void) return 0; } @@ -107583,7 +107644,7 @@ index 4e2f3de0e40bff4caef5ee9c587ea19140d07f85..4b687fba53c58e744e04608a9510f9b8 /** * cgroup_init - cgroup initialization -@@ -6163,6 +6163,28 @@ static int __init cgroup_no_v1(char *str) +@@ -6168,6 +6168,28 @@ static int __init cgroup_no_v1(char *str) } __setup("cgroup_no_v1=", cgroup_no_v1); @@ -107613,10 +107674,10 @@ index 4e2f3de0e40bff4caef5ee9c587ea19140d07f85..4b687fba53c58e744e04608a9510f9b8 * css_tryget_online_from_dir - get corresponding css from a cgroup dentry * @dentry: directory dentry of interest -From 8764811662e3c2784bd5d3d97d71ebebabf0ab56 Mon Sep 17 00:00:00 2001 +From bc2335717f7d28dbb33dac229b8fd7701810102a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 060/149] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 058/143] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -107624,7 +107685,7 @@ Reduces overhead when using X 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c -index ae83af649a607f67239f1a64bf45dd4b5770cc7d..4a7af9d0b910f59d17421ce14138400dfd5834f3 100644 +index 333108ef18cf2f3f94ee3816b2ba6522017295b6..da0ee3beeeed3a223ea6859f52a81e99e3e2efbd 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -49,7 +49,7 @@ @@ -107652,10 +107713,10 @@ index ae83af649a607f67239f1a64bf45dd4b5770cc7d..4a7af9d0b910f59d17421ce14138400d ret = -ENOMEM; if (usb_endpoint_dir_in(endpoint)) { -From 56d24e64172592fd77fcc223422fde47513028aa Mon Sep 17 00:00:00 2001 +From 83febbc99afc598508f10d47ebdd71e188f07644 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 -Subject: [PATCH 061/149] rpi-ft5406: Add touchscreen driver for pi LCD display +Subject: [PATCH 059/143] rpi-ft5406: Add touchscreen driver for pi LCD display Fix driver detection failure Check that the buffer response is non-zero meaning the touchscreen was detected @@ -108001,7 +108062,7 @@ index 0000000000000000000000000000000000000000..9d7d05482355d168c5c0c42508cd9789 +MODULE_DESCRIPTION("Touchscreen driver for memory based FT5406"); +MODULE_LICENSE("GPL"); diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index 227a107214a02deadcca3db202da265eba1fdd21..b0f6e33bd30c35664ceee057f4c3ad32b914291d 100644 +index 30fb37fe175df604a738258a2a632bca3bfff33f..4a3d79d3b48eb483a4e4bf498f617515e3ad158f 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -115,6 +115,7 @@ enum rpi_firmware_property_tag { @@ -108013,10 +108074,10 @@ index 227a107214a02deadcca3db202da265eba1fdd21..b0f6e33bd30c35664ceee057f4c3ad32 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From 318733cdfe56012de763835764537af342ebff08 Mon Sep 17 00:00:00 2001 +From bf9d8140feb1c5bb942a776a48741d69398dabde Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Nov 2016 16:50:04 +0000 -Subject: [PATCH 062/149] Improve __copy_to_user and __copy_from_user +Subject: [PATCH 060/143] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use @@ -108074,7 +108135,7 @@ index cf4f3aad0fc1c2154c6cf3839ff21bb1c46d6499..d69b70a6007dfc647ad164d1ee90d253 #define memset(p,v,n) \ diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h -index 1f59ea051bab814132074b09f55d3a57c800a471..028d151b80a3dfb4253e94b87cc391bdb0b16c49 100644 +index b7e0125c0bbf2014a447800a383426b62d5147b8..d135f5af80c255865106561a85998bd9511ba346 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h @@ -477,6 +477,9 @@ do { \ @@ -108085,7 +108146,7 @@ index 1f59ea051bab814132074b09f55d3a57c800a471..028d151b80a3dfb4253e94b87cc391bd +__copy_from_user_std(void *to, const void __user *from, unsigned long n); + static inline unsigned long __must_check - __copy_from_user(void *to, const void __user *from, unsigned long n) + __arch_copy_from_user(void *to, const void __user *from, unsigned long n) { diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 27f4d96258a2e66193d6a3701bb4cf9a44399aad..96b390c9301f816d5c83c6ddb76ac74ba7a3b99d 100644 @@ -109591,10 +109652,10 @@ index 333dc3c2e5ffbb2c5ab8fcfb6115b6162643cf20..46b787a6474ffa857da9b663948863ec bool "Broadcom BCM63xx DSL SoC" depends on ARCH_MULTI_V7 -From fddbb89c0d9a7d562f8cf60cb16572e6af74f15e Mon Sep 17 00:00:00 2001 +From 49813e9c1a6fdf7a82c7262fb9e1f3d62c3a9e64 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 -Subject: [PATCH 063/149] gpio-poweroff: Allow it to work on Raspberry Pi +Subject: [PATCH 061/143] gpio-poweroff: Allow it to work on Raspberry Pi The Raspberry Pi firmware manages the power-down and reboot process. To do this it installs a pm_power_off handler, causing @@ -109629,10 +109690,10 @@ index be3d81ff51cc3f510d85e4eed7a52960e51e7bc1..a030ae9fb1fca325061c093696e82186 "%s: pm_power_off function already registered", __func__); -From bff3d51c32bfd8caf85c73bfc78043215d6b7ee2 Mon Sep 17 00:00:00 2001 +From 4cf353cbfb5abcbe319726ab73d65c5c9725b06e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 -Subject: [PATCH 064/149] mfd: Add Raspberry Pi Sense HAT core driver +Subject: [PATCH 062/143] mfd: Add Raspberry Pi Sense HAT core driver --- drivers/input/joystick/Kconfig | 8 + @@ -109842,7 +109903,7 @@ index 0000000000000000000000000000000000000000..6a416769065d2198344792eb02d8e38d +MODULE_AUTHOR("Serge Schneider "); +MODULE_LICENSE("GPL"); diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig -index c6df6442ba2b1b378386db03cb530fa6b6e3e723..b220064bd5feba3f9bb5ec198bcf8e5c4b930533 100644 +index 4ce3b6f118304048c0fb4d0db7c1d4da7463e8e7..ea2865fec057ffa3b8d1208a6824315a9fd486c6 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -10,6 +10,14 @@ config MFD_CORE @@ -109861,13 +109922,13 @@ index c6df6442ba2b1b378386db03cb530fa6b6e3e723..b220064bd5feba3f9bb5ec198bcf8e5c tristate "AMD CS5535 and CS5536 southbridge core functions" select MFD_CORE diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile -index 9834e669d98573ce8c0b0a15b3f167dbf3485d87..1d8d58fe173c27bdf00daa646f4970e3aeb3ac08 100644 +index dda4d4f73ad743b7cdde1f085dd494c0a1701656..e092a40ceda5b599bf13383147adea6b75a83aa9 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile -@@ -211,3 +211,4 @@ obj-$(CONFIG_INTEL_SOC_PMIC) += intel-soc-pmic.o - obj-$(CONFIG_MFD_MT6397) += mt6397-core.o +@@ -212,3 +212,4 @@ obj-$(CONFIG_MFD_MT6397) += mt6397-core.o obj-$(CONFIG_MFD_ALTERA_A10SR) += altera-a10sr.o + obj-$(CONFIG_MFD_SUN4I_GPADC) += sun4i-gpadc.o +obj-$(CONFIG_MFD_RPISENSE_CORE) += rpisense-core.o diff --git a/drivers/mfd/rpisense-core.c b/drivers/mfd/rpisense-core.c new file mode 100644 @@ -110497,10 +110558,10 @@ index 0000000000000000000000000000000000000000..56196dc2af10e464a1e3f98b028dca1c + +#endif -From f6f7b4d8818b01922745e5191edd0d5ee2e55557 Mon Sep 17 00:00:00 2001 +From 298f0da2a99e2cc999e8db96151ff92c6826bbe1 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 065/149] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 063/143] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -110515,10 +110576,10 @@ Signed-off-by: Florian Meier create mode 100644 sound/soc/bcm/hifiberry_dac.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index d528aaceaad95bc6bae2147ebe66249629d2512e..ad4817f44072bbc0a92d8a5ebd1b6b365fb4ed82 100644 +index edf367100ebd2f1701f4a32b2bfcc14b6cf978d3..b4bba08106a128b11f4abcd84f3cd41207e9c083 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -15,4 +15,11 @@ config SND_SOC_CYGNUS +@@ -16,4 +16,11 @@ config SND_SOC_CYGNUS Say Y if you want to add support for ASoC audio on Broadcom Cygnus chips (bcm958300, bcm958305, bcm911360) @@ -110675,10 +110736,10 @@ index 0000000000000000000000000000000000000000..45f2b770ad9e67728ca599a7445d6ae9 +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From 26fc23e924f71e2d3e26d9634a0149f191d2f6f9 Mon Sep 17 00:00:00 2001 +From 4e5ef7798e0f16bd34b79dcf43ca2488c7ed1c1a Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 25 Jan 2016 15:48:59 +0000 -Subject: [PATCH 066/149] ASoC: Add support for Rpi-DAC +Subject: [PATCH 064/143] ASoC: Add support for Rpi-DAC --- sound/soc/bcm/Kconfig | 7 +++ @@ -110692,10 +110753,10 @@ Subject: [PATCH 066/149] ASoC: Add support for Rpi-DAC create mode 100644 sound/soc/codecs/pcm1794a.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index ad4817f44072bbc0a92d8a5ebd1b6b365fb4ed82..8209fffdc0be3136a99cbab4e5152759aa95594b 100644 +index b4bba08106a128b11f4abcd84f3cd41207e9c083..3bd62878ed17681fcbe8fff1004b82b00f1f402b 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -23,3 +23,10 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC +@@ -24,3 +24,10 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC select SND_SOC_PCM5102A help Say Y or M if you want to add support for HifiBerry DAC. @@ -110844,10 +110905,10 @@ index 0000000000000000000000000000000000000000..59dc89ecabc082c0a1ed8adacdc4f0f1 +MODULE_DESCRIPTION("ASoC Driver for RPi-DAC"); +MODULE_LICENSE("GPL v2"); diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig -index c67667bb970f1729db65b027dd8e963b9ee95b7b..74a93e52bdc8116df3db08aaf98fffa1e6f6cc1b 100644 +index 9e1718a8cb1ce20a0fd68e2cbe797653b39aadeb..35fdfb508505699618dc9d35c941707dcd2a2b20 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig -@@ -98,6 +98,7 @@ config SND_SOC_ALL_CODECS +@@ -101,6 +101,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_PCM1681 if I2C select SND_SOC_PCM179X_I2C if I2C select SND_SOC_PCM179X_SPI if SPI_MASTER @@ -110855,7 +110916,7 @@ index c67667bb970f1729db65b027dd8e963b9ee95b7b..74a93e52bdc8116df3db08aaf98fffa1 select SND_SOC_PCM3008 select SND_SOC_PCM3168A_I2C if I2C select SND_SOC_PCM3168A_SPI if SPI_MASTER -@@ -689,6 +690,10 @@ config SND_SOC_RT5616 +@@ -709,6 +710,10 @@ config SND_SOC_RT5616 tristate "Realtek RT5616 CODEC" depends on I2C @@ -110867,10 +110928,10 @@ index c67667bb970f1729db65b027dd8e963b9ee95b7b..74a93e52bdc8116df3db08aaf98fffa1 tristate "Realtek ALC5631/RT5631 CODEC" depends on I2C diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile -index 958cd4912fbc9820f965c0d2f38692857f410d3a..77786e7f44a7fa22d9b5beed3eb687e2b7a28526 100644 +index 7e1dad79610b39a6d5b83865c7022f09d53d3705..3aea6cd7e2d08e72961640860b375059f41c789e 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile -@@ -93,6 +93,7 @@ snd-soc-pcm1681-objs := pcm1681.o +@@ -97,6 +97,7 @@ snd-soc-pcm1681-objs := pcm1681.o snd-soc-pcm179x-codec-objs := pcm179x.o snd-soc-pcm179x-i2c-objs := pcm179x-i2c.o snd-soc-pcm179x-spi-objs := pcm179x-spi.o @@ -110878,7 +110939,7 @@ index 958cd4912fbc9820f965c0d2f38692857f410d3a..77786e7f44a7fa22d9b5beed3eb687e2 snd-soc-pcm3008-objs := pcm3008.o snd-soc-pcm3168a-objs := pcm3168a.o snd-soc-pcm3168a-i2c-objs := pcm3168a-i2c.o -@@ -325,6 +326,7 @@ obj-$(CONFIG_SND_SOC_PCM5102A) += snd-soc-pcm5102a.o +@@ -333,6 +334,7 @@ obj-$(CONFIG_SND_SOC_PCM5102A) += snd-soc-pcm5102a.o obj-$(CONFIG_SND_SOC_PCM512x) += snd-soc-pcm512x.o obj-$(CONFIG_SND_SOC_PCM512x_I2C) += snd-soc-pcm512x-i2c.o obj-$(CONFIG_SND_SOC_PCM512x_SPI) += snd-soc-pcm512x-spi.o @@ -110962,10 +111023,10 @@ index 0000000000000000000000000000000000000000..afe1b419582aa40c4b2729d242bb13cd +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From be8276083245dcfb53ef3fef3ca1719a2adf32c3 Mon Sep 17 00:00:00 2001 +From 2bf400ba45d9bfb1ac5b26723d69bd7100e6f2a6 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 067/149] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 065/143] ASoC: wm8804: Implement MCLK configuration options, add 32bit support WM8804 can run with PLL frequencies of 256xfs and 128xfs for most sample rates. At 192kHz only 128xfs is supported. The existing driver selects 128xfs automatically for some lower samples rates. By using an @@ -111014,10 +111075,10 @@ index af95d648265b3e92e345101542b332aee35191d4..513f56ba132929662802d15cdc653af3 .component_driver = { .dapm_widgets = wm8804_dapm_widgets, -From 2db51d5c0125efaf5ac929da60719e8778caf355 Mon Sep 17 00:00:00 2001 +From 34f11bff0a9142a2c6f3a3848dbffcc2135f571a Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 068/149] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 066/143] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -111047,10 +111108,10 @@ Signed-off-by: Daniel Matuschek create mode 100644 sound/soc/bcm/hifiberry_digi.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 8209fffdc0be3136a99cbab4e5152759aa95594b..3cd4288a1e1c535210b01cd9561128fd4ea3e87f 100644 +index 3bd62878ed17681fcbe8fff1004b82b00f1f402b..2169a619b60951d490bdbe7f6929499974efc721 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -24,6 +24,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC +@@ -25,6 +25,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC help Say Y or M if you want to add support for HifiBerry DAC. @@ -111361,10 +111422,10 @@ index 0000000000000000000000000000000000000000..19dc953b7227ba86123fc7a2ba654499 +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From 4862b5a41356a7c903a27614f34b7f573c4559a0 Mon Sep 17 00:00:00 2001 +From 9ee4bd0e00a551e81a809a1126b1e3e8696cb7c9 Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 069/149] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 067/143] Add IQaudIO Sound Card support for Raspberry Pi Set a limit of 0dB on Digital Volume Control @@ -111425,10 +111486,10 @@ Signed-off-by: DigitalDreamtime create mode 100644 sound/soc/bcm/iqaudio-dac.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 3cd4288a1e1c535210b01cd9561128fd4ea3e87f..8272ba5302b1ddbd9c21ee50891d3cb0f0303c58 100644 +index 2169a619b60951d490bdbe7f6929499974efc721..f58d7059dd2a05aa7948272d4378898be85ea92d 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -37,3 +37,10 @@ config SND_BCM2708_SOC_RPI_DAC +@@ -38,3 +38,10 @@ config SND_BCM2708_SOC_RPI_DAC select SND_SOC_PCM1794A help Say Y or M if you want to add support for RPi-DAC. @@ -111694,10 +111755,10 @@ index 0000000000000000000000000000000000000000..4e8e6dec14bcf4a1ff286c43742d4097 +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From ea4c39afbe8d275440ddd521925d7cc552f35d54 Mon Sep 17 00:00:00 2001 +From bf5fea3022d1d56c3dd82fa726cbbc0364fae64c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jul 2016 17:06:50 +0100 -Subject: [PATCH 070/149] iqaudio-dac: Compile fix - untested +Subject: [PATCH 068/143] iqaudio-dac: Compile fix - untested --- sound/soc/bcm/iqaudio-dac.c | 6 +++++- @@ -111721,10 +111782,10 @@ index 4e8e6dec14bcf4a1ff286c43742d4097249d6777..aa15bc4b49ca95edec905fddd8fd0a6d if (dapm->dev != codec_dai->dev) return 0; -From 302c609e0963078ab95c3b3bfeaedf723c26361f Mon Sep 17 00:00:00 2001 +From 67ba839a62a9d52ef318c1fb5a8b7e79817b890b Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 071/149] Added support for HiFiBerry DAC+ +Subject: [PATCH 069/143] Added support for HiFiBerry DAC+ The driver is based on the HiFiBerry DAC driver. However HiFiBerry DAC+ uses a different codec chip (PCM5122), therefore a new driver is necessary. @@ -111939,10 +112000,10 @@ index 0000000000000000000000000000000000000000..99cee2b1706c43170b4fc35c0023349b +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:clk-hifiberry-dacpro"); diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 8272ba5302b1ddbd9c21ee50891d3cb0f0303c58..4473cc728097bda0ce9fe68d4a9da348ec41f8b3 100644 +index f58d7059dd2a05aa7948272d4378898be85ea92d..3580a12f865975e920ff86697849b137b41bae62 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -24,6 +24,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC +@@ -25,6 +25,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC help Say Y or M if you want to add support for HifiBerry DAC. @@ -112354,10 +112415,10 @@ index 72b19e62f6267698aea45d2410d616d91c1825cb..c6839ef6e16754ed9de2698507b8986a dev_err(dev, "No LRCLK?\n"); return -EINVAL; -From ec8d31e9058d4b3bc431a782f497167f94c896ab Mon Sep 17 00:00:00 2001 +From e5b4dd0f27f8927b566004e89c0d630ba189e654 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 072/149] Added driver for HiFiBerry Amp amplifier add-on board +Subject: [PATCH 070/143] Added driver for HiFiBerry Amp amplifier add-on board The driver contains a low-level hardware driver for the TAS5713 and the drivers for the Raspberry Pi I2S subsystem. @@ -112378,18 +112439,18 @@ Some code to load the driver based on device-tree-overlays was missing. This is sound/soc/bcm/hifiberry_amp.c | 129 +++++++++++++++ sound/soc/codecs/Kconfig | 4 + sound/soc/codecs/Makefile | 2 + - sound/soc/codecs/tas5713.c | 369 ++++++++++++++++++++++++++++++++++++++++++ + sound/soc/codecs/tas5713.c | 371 ++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/tas5713.h | 210 ++++++++++++++++++++++++ - 7 files changed, 723 insertions(+) + 7 files changed, 725 insertions(+) create mode 100644 sound/soc/bcm/hifiberry_amp.c create mode 100644 sound/soc/codecs/tas5713.c create mode 100644 sound/soc/codecs/tas5713.h diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 4473cc728097bda0ce9fe68d4a9da348ec41f8b3..b1d877407dd69c9bd6b2787b0a559f4113bc21f2 100644 +index 3580a12f865975e920ff86697849b137b41bae62..f650f1522d6ef1e02d87345fea01bb1458693423 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -38,6 +38,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DIGI +@@ -39,6 +39,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DIGI help Say Y or M if you want to add support for HifiBerry Digi S/PDIF output board. @@ -112557,10 +112618,10 @@ index 0000000000000000000000000000000000000000..d17c29780507dc31c50f1d567ff5cea7 +MODULE_DESCRIPTION("ASoC driver for HiFiBerry-AMP"); +MODULE_LICENSE("GPL v2"); diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig -index 74a93e52bdc8116df3db08aaf98fffa1e6f6cc1b..9824cdd04b0c11c45b8cedd0187a0eba8f1dc2d4 100644 +index 35fdfb508505699618dc9d35c941707dcd2a2b20..cd02edde708f860ba90ef7892339ef311c898746 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig -@@ -139,6 +139,7 @@ config SND_SOC_ALL_CODECS +@@ -143,6 +143,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_TFA9879 if I2C select SND_SOC_TLV320AIC23_I2C if I2C select SND_SOC_TLV320AIC23_SPI if SPI_MASTER @@ -112568,7 +112629,7 @@ index 74a93e52bdc8116df3db08aaf98fffa1e6f6cc1b..9824cdd04b0c11c45b8cedd0187a0eba select SND_SOC_TLV320AIC26 if SPI_MASTER select SND_SOC_TLV320AIC31XX if I2C select SND_SOC_TLV320AIC32X4_I2C if I2C -@@ -821,6 +822,9 @@ config SND_SOC_TFA9879 +@@ -844,6 +845,9 @@ config SND_SOC_TFA9879 tristate "NXP Semiconductors TFA9879 amplifier" depends on I2C @@ -112579,10 +112640,10 @@ index 74a93e52bdc8116df3db08aaf98fffa1e6f6cc1b..9824cdd04b0c11c45b8cedd0187a0eba tristate diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile -index 77786e7f44a7fa22d9b5beed3eb687e2b7a28526..5a2db0d2fe2f49920eeccfecef62c969ae2e99a1 100644 +index 3aea6cd7e2d08e72961640860b375059f41c789e..1f5a6b7f6c52c9464637c028773653cdadae43ab 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile -@@ -144,6 +144,7 @@ snd-soc-tas5086-objs := tas5086.o +@@ -149,6 +149,7 @@ snd-soc-tas5086-objs := tas5086.o snd-soc-tas571x-objs := tas571x.o snd-soc-tas5720-objs := tas5720.o snd-soc-tfa9879-objs := tfa9879.o @@ -112590,7 +112651,7 @@ index 77786e7f44a7fa22d9b5beed3eb687e2b7a28526..5a2db0d2fe2f49920eeccfecef62c969 snd-soc-tlv320aic23-objs := tlv320aic23.o snd-soc-tlv320aic23-i2c-objs := tlv320aic23-i2c.o snd-soc-tlv320aic23-spi-objs := tlv320aic23-spi.o -@@ -366,6 +367,7 @@ obj-$(CONFIG_SND_SOC_TAS5086) += snd-soc-tas5086.o +@@ -375,6 +376,7 @@ obj-$(CONFIG_SND_SOC_TAS5086) += snd-soc-tas5086.o obj-$(CONFIG_SND_SOC_TAS571X) += snd-soc-tas571x.o obj-$(CONFIG_SND_SOC_TAS5720) += snd-soc-tas5720.o obj-$(CONFIG_SND_SOC_TFA9879) += snd-soc-tfa9879.o @@ -112600,10 +112661,10 @@ index 77786e7f44a7fa22d9b5beed3eb687e2b7a28526..5a2db0d2fe2f49920eeccfecef62c969 obj-$(CONFIG_SND_SOC_TLV320AIC23_SPI) += snd-soc-tlv320aic23-spi.o diff --git a/sound/soc/codecs/tas5713.c b/sound/soc/codecs/tas5713.c new file mode 100644 -index 0000000000000000000000000000000000000000..9b2713861dcbed751842ca29c88eb1eae5867411 +index 0000000000000000000000000000000000000000..560234d58a6b0a6e7fd3a63e8de73339ee002b1c --- /dev/null +++ b/sound/soc/codecs/tas5713.c -@@ -0,0 +1,369 @@ +@@ -0,0 +1,371 @@ +/* + * ASoC Driver for TAS5713 + * @@ -112838,8 +112899,10 @@ index 0000000000000000000000000000000000000000..9b2713861dcbed751842ca29c88eb1ea +static struct snd_soc_codec_driver soc_codec_dev_tas5713 = { + .probe = tas5713_probe, + .remove = tas5713_remove, -+ .controls = tas5713_snd_controls, -+ .num_controls = ARRAY_SIZE(tas5713_snd_controls), ++ .component_driver = { ++ .controls = tas5713_snd_controls, ++ .num_controls = ARRAY_SIZE(tas5713_snd_controls), ++ }, +}; + + @@ -113190,835 +113253,10 @@ index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8 + +#endif /* _TAS5713_H */ -From 84ca64acfa31b7efdee66fa9b93a3e33740cd246 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Mon, 12 Dec 2016 16:26:54 +0000 -Subject: [PATCH 073/149] Revert "Added driver for HiFiBerry Amp amplifier - add-on board" - -This reverts commit 3e6b00833d92a50cbcc9922deb6e1bc8fcdbb587. ---- - sound/soc/bcm/Kconfig | 7 - - sound/soc/bcm/Makefile | 2 - - sound/soc/bcm/hifiberry_amp.c | 129 --------------- - sound/soc/codecs/Kconfig | 4 - - sound/soc/codecs/Makefile | 2 - - sound/soc/codecs/tas5713.c | 369 ------------------------------------------ - sound/soc/codecs/tas5713.h | 210 ------------------------ - 7 files changed, 723 deletions(-) - delete mode 100644 sound/soc/bcm/hifiberry_amp.c - delete mode 100644 sound/soc/codecs/tas5713.c - delete mode 100644 sound/soc/codecs/tas5713.h - -diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index b1d877407dd69c9bd6b2787b0a559f4113bc21f2..4473cc728097bda0ce9fe68d4a9da348ec41f8b3 100644 ---- a/sound/soc/bcm/Kconfig -+++ b/sound/soc/bcm/Kconfig -@@ -38,13 +38,6 @@ config SND_BCM2708_SOC_HIFIBERRY_DIGI - help - Say Y or M if you want to add support for HifiBerry Digi S/PDIF output board. - --config SND_BCM2708_SOC_HIFIBERRY_AMP -- tristate "Support for the HifiBerry Amp" -- depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S -- select SND_SOC_TAS5713 -- help -- Say Y or M if you want to add support for the HifiBerry Amp amplifier board. -- - config SND_BCM2708_SOC_RPI_DAC - tristate "Support for RPi-DAC" - depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S -diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index a4838e2cf8e93c9285836f95f4151daea33e1bd1..203afc03167acbcad15e836209956bc5ab151157 100644 ---- a/sound/soc/bcm/Makefile -+++ b/sound/soc/bcm/Makefile -@@ -12,13 +12,11 @@ obj-$(CONFIG_SND_SOC_CYGNUS) += snd-soc-cygnus.o - snd-soc-hifiberry-dac-objs := hifiberry_dac.o - snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o - snd-soc-hifiberry-digi-objs := hifiberry_digi.o --snd-soc-hifiberry-amp-objs := hifiberry_amp.o - snd-soc-rpi-dac-objs := rpi-dac.o - snd-soc-iqaudio-dac-objs := iqaudio-dac.o - - obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o - obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o - obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o --obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o - obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o - obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o -diff --git a/sound/soc/bcm/hifiberry_amp.c b/sound/soc/bcm/hifiberry_amp.c -deleted file mode 100644 -index d17c29780507dc31c50f1d567ff5cea7c8241ff5..0000000000000000000000000000000000000000 ---- a/sound/soc/bcm/hifiberry_amp.c -+++ /dev/null -@@ -1,129 +0,0 @@ --/* -- * ASoC Driver for HifiBerry AMP -- * -- * Author: Sebastian Eickhoff -- * Copyright 2014 -- * -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License -- * version 2 as published by the Free Software Foundation. -- * -- * This program is distributed in the hope that it will be useful, but -- * WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * General Public License for more details. -- */ -- --#include --#include -- --#include --#include --#include --#include --#include -- --static int snd_rpi_hifiberry_amp_init(struct snd_soc_pcm_runtime *rtd) --{ -- // ToDo: init of the dsp-registers. -- return 0; --} -- --static int snd_rpi_hifiberry_amp_hw_params( struct snd_pcm_substream *substream, -- struct snd_pcm_hw_params *params ) --{ -- struct snd_soc_pcm_runtime *rtd = substream->private_data; -- struct snd_soc_dai *cpu_dai = rtd->cpu_dai; -- -- return snd_soc_dai_set_bclk_ratio(cpu_dai, 64); --} -- --static struct snd_soc_ops snd_rpi_hifiberry_amp_ops = { -- .hw_params = snd_rpi_hifiberry_amp_hw_params, --}; -- --static struct snd_soc_dai_link snd_rpi_hifiberry_amp_dai[] = { -- { -- .name = "HifiBerry AMP", -- .stream_name = "HifiBerry AMP HiFi", -- .cpu_dai_name = "bcm2708-i2s.0", -- .codec_dai_name = "tas5713-hifi", -- .platform_name = "bcm2708-i2s.0", -- .codec_name = "tas5713.1-001b", -- .dai_fmt = SND_SOC_DAIFMT_I2S | -- SND_SOC_DAIFMT_NB_NF | -- SND_SOC_DAIFMT_CBS_CFS, -- .ops = &snd_rpi_hifiberry_amp_ops, -- .init = snd_rpi_hifiberry_amp_init, -- }, --}; -- -- --static struct snd_soc_card snd_rpi_hifiberry_amp = { -- .name = "snd_rpi_hifiberry_amp", -- .driver_name = "HifiberryAmp", -- .owner = THIS_MODULE, -- .dai_link = snd_rpi_hifiberry_amp_dai, -- .num_links = ARRAY_SIZE(snd_rpi_hifiberry_amp_dai), --}; -- --static const struct of_device_id snd_rpi_hifiberry_amp_of_match[] = { -- { .compatible = "hifiberry,hifiberry-amp", }, -- {}, --}; --MODULE_DEVICE_TABLE(of, snd_rpi_hifiberry_amp_of_match); -- -- --static int snd_rpi_hifiberry_amp_probe(struct platform_device *pdev) --{ -- int ret = 0; -- -- snd_rpi_hifiberry_amp.dev = &pdev->dev; -- -- if (pdev->dev.of_node) { -- struct device_node *i2s_node; -- struct snd_soc_dai_link *dai = &snd_rpi_hifiberry_amp_dai[0]; -- i2s_node = of_parse_phandle(pdev->dev.of_node, -- "i2s-controller", 0); -- -- if (i2s_node) { -- dai->cpu_dai_name = NULL; -- dai->cpu_of_node = i2s_node; -- dai->platform_name = NULL; -- dai->platform_of_node = i2s_node; -- } -- } -- -- ret = snd_soc_register_card(&snd_rpi_hifiberry_amp); -- -- if (ret != 0) { -- dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret); -- } -- -- return ret; --} -- -- --static int snd_rpi_hifiberry_amp_remove(struct platform_device *pdev) --{ -- return snd_soc_unregister_card(&snd_rpi_hifiberry_amp); --} -- -- --static struct platform_driver snd_rpi_hifiberry_amp_driver = { -- .driver = { -- .name = "snd-hifiberry-amp", -- .owner = THIS_MODULE, -- .of_match_table = snd_rpi_hifiberry_amp_of_match, -- }, -- .probe = snd_rpi_hifiberry_amp_probe, -- .remove = snd_rpi_hifiberry_amp_remove, --}; -- -- --module_platform_driver(snd_rpi_hifiberry_amp_driver); -- -- --MODULE_AUTHOR("Sebastian Eickhoff "); --MODULE_DESCRIPTION("ASoC driver for HiFiBerry-AMP"); --MODULE_LICENSE("GPL v2"); -diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig -index 9824cdd04b0c11c45b8cedd0187a0eba8f1dc2d4..74a93e52bdc8116df3db08aaf98fffa1e6f6cc1b 100644 ---- a/sound/soc/codecs/Kconfig -+++ b/sound/soc/codecs/Kconfig -@@ -139,7 +139,6 @@ config SND_SOC_ALL_CODECS - select SND_SOC_TFA9879 if I2C - select SND_SOC_TLV320AIC23_I2C if I2C - select SND_SOC_TLV320AIC23_SPI if SPI_MASTER -- select SND_SOC_TAS5713 if I2C - select SND_SOC_TLV320AIC26 if SPI_MASTER - select SND_SOC_TLV320AIC31XX if I2C - select SND_SOC_TLV320AIC32X4_I2C if I2C -@@ -822,9 +821,6 @@ config SND_SOC_TFA9879 - tristate "NXP Semiconductors TFA9879 amplifier" - depends on I2C - --config SND_SOC_TAS5713 -- tristate -- - config SND_SOC_TLV320AIC23 - tristate - -diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile -index 5a2db0d2fe2f49920eeccfecef62c969ae2e99a1..77786e7f44a7fa22d9b5beed3eb687e2b7a28526 100644 ---- a/sound/soc/codecs/Makefile -+++ b/sound/soc/codecs/Makefile -@@ -144,7 +144,6 @@ snd-soc-tas5086-objs := tas5086.o - snd-soc-tas571x-objs := tas571x.o - snd-soc-tas5720-objs := tas5720.o - snd-soc-tfa9879-objs := tfa9879.o --snd-soc-tas5713-objs := tas5713.o - snd-soc-tlv320aic23-objs := tlv320aic23.o - snd-soc-tlv320aic23-i2c-objs := tlv320aic23-i2c.o - snd-soc-tlv320aic23-spi-objs := tlv320aic23-spi.o -@@ -367,7 +366,6 @@ obj-$(CONFIG_SND_SOC_TAS5086) += snd-soc-tas5086.o - obj-$(CONFIG_SND_SOC_TAS571X) += snd-soc-tas571x.o - obj-$(CONFIG_SND_SOC_TAS5720) += snd-soc-tas5720.o - obj-$(CONFIG_SND_SOC_TFA9879) += snd-soc-tfa9879.o --obj-$(CONFIG_SND_SOC_TAS5713) += snd-soc-tas5713.o - obj-$(CONFIG_SND_SOC_TLV320AIC23) += snd-soc-tlv320aic23.o - obj-$(CONFIG_SND_SOC_TLV320AIC23_I2C) += snd-soc-tlv320aic23-i2c.o - obj-$(CONFIG_SND_SOC_TLV320AIC23_SPI) += snd-soc-tlv320aic23-spi.o -diff --git a/sound/soc/codecs/tas5713.c b/sound/soc/codecs/tas5713.c -deleted file mode 100644 -index 9b2713861dcbed751842ca29c88eb1eae5867411..0000000000000000000000000000000000000000 ---- a/sound/soc/codecs/tas5713.c -+++ /dev/null -@@ -1,369 +0,0 @@ --/* -- * ASoC Driver for TAS5713 -- * -- * Author: Sebastian Eickhoff -- * Copyright 2014 -- * -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License -- * version 2 as published by the Free Software Foundation. -- * -- * This program is distributed in the hope that it will be useful, but -- * WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * General Public License for more details. -- */ -- --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include -- --#include --#include --#include --#include -- --#include "tas5713.h" -- -- --static struct i2c_client *i2c; -- --struct tas5713_priv { -- struct regmap *regmap; -- int mclk_div; -- struct snd_soc_codec *codec; --}; -- --static struct tas5713_priv *priv_data; -- -- -- -- --/* -- * _ _ ___ _ ___ _ _ -- * /_\ | | / __| /_\ / __|___ _ _| |_ _ _ ___| |___ -- * / _ \| |__\__ \/ _ \ | (__/ _ \ ' \ _| '_/ _ \ (_-< -- * /_/ \_\____|___/_/ \_\ \___\___/_||_\__|_| \___/_/__/ -- * -- */ -- --static const DECLARE_TLV_DB_SCALE(tas5713_vol_tlv, -10000, 50, 1); -- -- --static const struct snd_kcontrol_new tas5713_snd_controls[] = { -- SOC_SINGLE_TLV ("Master" , TAS5713_VOL_MASTER, 0, 248, 1, tas5713_vol_tlv), -- SOC_DOUBLE_R_TLV("Channels" , TAS5713_VOL_CH1, TAS5713_VOL_CH2, 0, 248, 1, tas5713_vol_tlv) --}; -- -- -- -- --/* -- * __ __ _ _ ___ _ -- * | \/ |__ _ __| |_ (_)_ _ ___ | \ _ _(_)_ _____ _ _ -- * | |\/| / _` / _| ' \| | ' \/ -_) | |) | '_| \ V / -_) '_| -- * |_| |_\__,_\__|_||_|_|_||_\___| |___/|_| |_|\_/\___|_| -- * -- */ -- --static int tas5713_hw_params(struct snd_pcm_substream *substream, -- struct snd_pcm_hw_params *params, -- struct snd_soc_dai *dai) --{ -- u16 blen = 0x00; -- -- struct snd_soc_codec *codec; -- codec = dai->codec; -- priv_data->codec = dai->codec; -- -- switch (params_format(params)) { -- case SNDRV_PCM_FORMAT_S16_LE: -- blen = 0x03; -- break; -- case SNDRV_PCM_FORMAT_S20_3LE: -- blen = 0x1; -- break; -- case SNDRV_PCM_FORMAT_S24_LE: -- blen = 0x04; -- break; -- case SNDRV_PCM_FORMAT_S32_LE: -- blen = 0x05; -- break; -- default: -- dev_err(dai->dev, "Unsupported word length: %u\n", -- params_format(params)); -- return -EINVAL; -- } -- -- // set word length -- snd_soc_update_bits(codec, TAS5713_SERIAL_DATA_INTERFACE, 0x7, blen); -- -- return 0; --} -- -- --static int tas5713_mute_stream(struct snd_soc_dai *dai, int mute, int stream) --{ -- unsigned int val = 0; -- -- struct tas5713_priv *tas5713; -- struct snd_soc_codec *codec = dai->codec; -- tas5713 = snd_soc_codec_get_drvdata(codec); -- -- if (mute) { -- val = TAS5713_SOFT_MUTE_ALL; -- } -- -- return regmap_write(tas5713->regmap, TAS5713_SOFT_MUTE, val); --} -- -- --static const struct snd_soc_dai_ops tas5713_dai_ops = { -- .hw_params = tas5713_hw_params, -- .mute_stream = tas5713_mute_stream, --}; -- -- --static struct snd_soc_dai_driver tas5713_dai = { -- .name = "tas5713-hifi", -- .playback = { -- .stream_name = "Playback", -- .channels_min = 2, -- .channels_max = 2, -- .rates = SNDRV_PCM_RATE_8000_48000, -- .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE ), -- }, -- .ops = &tas5713_dai_ops, --}; -- -- -- -- --/* -- * ___ _ ___ _ -- * / __|___ __| |___ __ | \ _ _(_)_ _____ _ _ -- * | (__/ _ \/ _` / -_) _| | |) | '_| \ V / -_) '_| -- * \___\___/\__,_\___\__| |___/|_| |_|\_/\___|_| -- * -- */ -- --static int tas5713_remove(struct snd_soc_codec *codec) --{ -- struct tas5713_priv *tas5713; -- -- tas5713 = snd_soc_codec_get_drvdata(codec); -- -- return 0; --} -- -- --static int tas5713_probe(struct snd_soc_codec *codec) --{ -- struct tas5713_priv *tas5713; -- int i, ret; -- -- i2c = container_of(codec->dev, struct i2c_client, dev); -- -- tas5713 = snd_soc_codec_get_drvdata(codec); -- -- // Reset error -- ret = snd_soc_write(codec, TAS5713_ERROR_STATUS, 0x00); -- if (ret < 0) return ret; -- -- // Trim oscillator -- ret = snd_soc_write(codec, TAS5713_OSC_TRIM, 0x00); -- if (ret < 0) return ret; -- msleep(1000); -- -- // Reset error -- ret = snd_soc_write(codec, TAS5713_ERROR_STATUS, 0x00); -- if (ret < 0) return ret; -- -- // Clock mode: 44/48kHz, MCLK=64xfs -- ret = snd_soc_write(codec, TAS5713_CLOCK_CTRL, 0x60); -- if (ret < 0) return ret; -- -- // I2S 24bit -- ret = snd_soc_write(codec, TAS5713_SERIAL_DATA_INTERFACE, 0x05); -- if (ret < 0) return ret; -- -- // Unmute -- ret = snd_soc_write(codec, TAS5713_SYSTEM_CTRL2, 0x00); -- if (ret < 0) return ret; -- ret = snd_soc_write(codec, TAS5713_SOFT_MUTE, 0x00); -- if (ret < 0) return ret; -- -- // Set volume to 0db -- ret = snd_soc_write(codec, TAS5713_VOL_MASTER, 0x00); -- if (ret < 0) return ret; -- -- // Now start programming the default initialization sequence -- for (i = 0; i < ARRAY_SIZE(tas5713_init_sequence); ++i) { -- ret = i2c_master_send(i2c, -- tas5713_init_sequence[i].data, -- tas5713_init_sequence[i].size); -- if (ret < 0) { -- printk(KERN_INFO "TAS5713 CODEC PROBE: InitSeq returns: %d\n", ret); -- } -- } -- -- // Unmute -- ret = snd_soc_write(codec, TAS5713_SYSTEM_CTRL2, 0x00); -- if (ret < 0) return ret; -- -- return 0; --} -- -- --static struct snd_soc_codec_driver soc_codec_dev_tas5713 = { -- .probe = tas5713_probe, -- .remove = tas5713_remove, -- .controls = tas5713_snd_controls, -- .num_controls = ARRAY_SIZE(tas5713_snd_controls), --}; -- -- -- -- --/* -- * ___ ___ ___ ___ _ -- * |_ _|_ ) __| | \ _ _(_)_ _____ _ _ -- * | | / / (__ | |) | '_| \ V / -_) '_| -- * |___/___\___| |___/|_| |_|\_/\___|_| -- * -- */ -- --static const struct reg_default tas5713_reg_defaults[] = { -- { 0x07 ,0x80 }, // R7 - VOL_MASTER - -40dB -- { 0x08 , 30 }, // R8 - VOL_CH1 - 0dB -- { 0x09 , 30 }, // R9 - VOL_CH2 - 0dB -- { 0x0A ,0x80 }, // R10 - VOL_HEADPHONE - -40dB --}; -- -- --static bool tas5713_reg_volatile(struct device *dev, unsigned int reg) --{ -- switch (reg) { -- case TAS5713_DEVICE_ID: -- case TAS5713_ERROR_STATUS: -- return true; -- default: -- return false; -- } --} -- -- --static const struct of_device_id tas5713_of_match[] = { -- { .compatible = "ti,tas5713", }, -- { } --}; --MODULE_DEVICE_TABLE(of, tas5713_of_match); -- -- --static struct regmap_config tas5713_regmap_config = { -- .reg_bits = 8, -- .val_bits = 8, -- -- .max_register = TAS5713_MAX_REGISTER, -- .volatile_reg = tas5713_reg_volatile, -- -- .cache_type = REGCACHE_RBTREE, -- .reg_defaults = tas5713_reg_defaults, -- .num_reg_defaults = ARRAY_SIZE(tas5713_reg_defaults), --}; -- -- --static int tas5713_i2c_probe(struct i2c_client *i2c, -- const struct i2c_device_id *id) --{ -- int ret; -- -- priv_data = devm_kzalloc(&i2c->dev, sizeof *priv_data, GFP_KERNEL); -- if (!priv_data) -- return -ENOMEM; -- -- priv_data->regmap = devm_regmap_init_i2c(i2c, &tas5713_regmap_config); -- if (IS_ERR(priv_data->regmap)) { -- ret = PTR_ERR(priv_data->regmap); -- return ret; -- } -- -- i2c_set_clientdata(i2c, priv_data); -- -- ret = snd_soc_register_codec(&i2c->dev, -- &soc_codec_dev_tas5713, &tas5713_dai, 1); -- -- return ret; --} -- -- --static int tas5713_i2c_remove(struct i2c_client *i2c) --{ -- snd_soc_unregister_codec(&i2c->dev); -- i2c_set_clientdata(i2c, NULL); -- -- kfree(priv_data); -- -- return 0; --} -- -- --static const struct i2c_device_id tas5713_i2c_id[] = { -- { "tas5713", 0 }, -- { } --}; -- --MODULE_DEVICE_TABLE(i2c, tas5713_i2c_id); -- -- --static struct i2c_driver tas5713_i2c_driver = { -- .driver = { -- .name = "tas5713", -- .owner = THIS_MODULE, -- .of_match_table = tas5713_of_match, -- }, -- .probe = tas5713_i2c_probe, -- .remove = tas5713_i2c_remove, -- .id_table = tas5713_i2c_id --}; -- -- --static int __init tas5713_modinit(void) --{ -- int ret = 0; -- -- ret = i2c_add_driver(&tas5713_i2c_driver); -- if (ret) { -- printk(KERN_ERR "Failed to register tas5713 I2C driver: %d\n", -- ret); -- } -- -- return ret; --} --module_init(tas5713_modinit); -- -- --static void __exit tas5713_exit(void) --{ -- i2c_del_driver(&tas5713_i2c_driver); --} --module_exit(tas5713_exit); -- -- --MODULE_AUTHOR("Sebastian Eickhoff "); --MODULE_DESCRIPTION("ASoC driver for TAS5713"); --MODULE_LICENSE("GPL v2"); -diff --git a/sound/soc/codecs/tas5713.h b/sound/soc/codecs/tas5713.h -deleted file mode 100644 -index 8f019e04898754d2f87e9630137be9e8f612a342..0000000000000000000000000000000000000000 ---- a/sound/soc/codecs/tas5713.h -+++ /dev/null -@@ -1,210 +0,0 @@ --/* -- * ASoC Driver for TAS5713 -- * -- * Author: Sebastian Eickhoff -- * Copyright 2014 -- * -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License -- * version 2 as published by the Free Software Foundation. -- * -- * This program is distributed in the hope that it will be useful, but -- * WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * General Public License for more details. -- */ -- --#ifndef _TAS5713_H --#define _TAS5713_H -- -- --// TAS5713 I2C-bus register addresses -- --#define TAS5713_CLOCK_CTRL 0x00 --#define TAS5713_DEVICE_ID 0x01 --#define TAS5713_ERROR_STATUS 0x02 --#define TAS5713_SYSTEM_CTRL1 0x03 --#define TAS5713_SERIAL_DATA_INTERFACE 0x04 --#define TAS5713_SYSTEM_CTRL2 0x05 --#define TAS5713_SOFT_MUTE 0x06 --#define TAS5713_VOL_MASTER 0x07 --#define TAS5713_VOL_CH1 0x08 --#define TAS5713_VOL_CH2 0x09 --#define TAS5713_VOL_HEADPHONE 0x0A --#define TAS5713_VOL_CONFIG 0x0E --#define TAS5713_MODULATION_LIMIT 0x10 --#define TAS5713_IC_DLY_CH1 0x11 --#define TAS5713_IC_DLY_CH2 0x12 --#define TAS5713_IC_DLY_CH3 0x13 --#define TAS5713_IC_DLY_CH4 0x14 -- --#define TAS5713_START_STOP_PERIOD 0x1A --#define TAS5713_OSC_TRIM 0x1B --#define TAS5713_BKND_ERR 0x1C -- --#define TAS5713_INPUT_MUX 0x20 --#define TAS5713_SRC_SELECT_CH4 0x21 --#define TAS5713_PWM_MUX 0x25 -- --#define TAS5713_CH1_BQ0 0x29 --#define TAS5713_CH1_BQ1 0x2A --#define TAS5713_CH1_BQ2 0x2B --#define TAS5713_CH1_BQ3 0x2C --#define TAS5713_CH1_BQ4 0x2D --#define TAS5713_CH1_BQ5 0x2E --#define TAS5713_CH1_BQ6 0x2F --#define TAS5713_CH1_BQ7 0x58 --#define TAS5713_CH1_BQ8 0x59 -- --#define TAS5713_CH2_BQ0 0x30 --#define TAS5713_CH2_BQ1 0x31 --#define TAS5713_CH2_BQ2 0x32 --#define TAS5713_CH2_BQ3 0x33 --#define TAS5713_CH2_BQ4 0x34 --#define TAS5713_CH2_BQ5 0x35 --#define TAS5713_CH2_BQ6 0x36 --#define TAS5713_CH2_BQ7 0x5C --#define TAS5713_CH2_BQ8 0x5D -- --#define TAS5713_CH4_BQ0 0x5A --#define TAS5713_CH4_BQ1 0x5B --#define TAS5713_CH3_BQ0 0x5E --#define TAS5713_CH3_BQ1 0x5F -- --#define TAS5713_DRC1_SOFTENING_FILTER_ALPHA_OMEGA 0x3B --#define TAS5713_DRC1_ATTACK_RELEASE_RATE 0x3C --#define TAS5713_DRC2_SOFTENING_FILTER_ALPHA_OMEGA 0x3E --#define TAS5713_DRC2_ATTACK_RELEASE_RATE 0x3F --#define TAS5713_DRC1_ATTACK_RELEASE_THRES 0x40 --#define TAS5713_DRC2_ATTACK_RELEASE_THRES 0x43 --#define TAS5713_DRC_CTRL 0x46 -- --#define TAS5713_BANK_SW_CTRL 0x50 --#define TAS5713_CH1_OUTPUT_MIXER 0x51 --#define TAS5713_CH2_OUTPUT_MIXER 0x52 --#define TAS5713_CH1_INPUT_MIXER 0x53 --#define TAS5713_CH2_INPUT_MIXER 0x54 --#define TAS5713_OUTPUT_POST_SCALE 0x56 --#define TAS5713_OUTPUT_PRESCALE 0x57 -- --#define TAS5713_IDF_POST_SCALE 0x62 -- --#define TAS5713_CH1_INLINE_MIXER 0x70 --#define TAS5713_CH1_INLINE_DRC_EN_MIXER 0x71 --#define TAS5713_CH1_R_CHANNEL_MIXER 0x72 --#define TAS5713_CH1_L_CHANNEL_MIXER 0x73 --#define TAS5713_CH2_INLINE_MIXER 0x74 --#define TAS5713_CH2_INLINE_DRC_EN_MIXER 0x75 --#define TAS5713_CH2_L_CHANNEL_MIXER 0x76 --#define TAS5713_CH2_R_CHANNEL_MIXER 0x77 -- --#define TAS5713_UPDATE_DEV_ADDR_KEY 0xF8 --#define TAS5713_UPDATE_DEV_ADDR_REG 0xF9 -- --#define TAS5713_REGISTER_COUNT 0x46 --#define TAS5713_MAX_REGISTER 0xF9 -- -- --// Bitmasks for registers --#define TAS5713_SOFT_MUTE_ALL 0x07 -- -- -- --struct tas5713_init_command { -- const int size; -- const char *const data; --}; -- --static const struct tas5713_init_command tas5713_init_sequence[] = { -- -- // Trim oscillator -- { .size = 2, .data = "\x1B\x00" }, -- // System control register 1 (0x03): block DC -- { .size = 2, .data = "\x03\x80" }, -- // Mute everything -- { .size = 2, .data = "\x05\x40" }, -- // Modulation limit register (0x10): 97.7% -- { .size = 2, .data = "\x10\x02" }, -- // Interchannel delay registers -- // (0x11, 0x12, 0x13, and 0x14): BD mode -- { .size = 2, .data = "\x11\xB8" }, -- { .size = 2, .data = "\x12\x60" }, -- { .size = 2, .data = "\x13\xA0" }, -- { .size = 2, .data = "\x14\x48" }, -- // PWM shutdown group register (0x19): no shutdown -- { .size = 2, .data = "\x19\x00" }, -- // Input multiplexer register (0x20): BD mode -- { .size = 2, .data = "\x20\x00\x89\x77\x72" }, -- // PWM output mux register (0x25) -- // Channel 1 --> OUTA, channel 1 neg --> OUTB -- // Channel 2 --> OUTC, channel 2 neg --> OUTD -- { .size = 5, .data = "\x25\x01\x02\x13\x45" }, -- // DRC control (0x46): DRC off -- { .size = 5, .data = "\x46\x00\x00\x00\x00" }, -- // BKND_ERR register (0x1C): 299ms reset period -- { .size = 2, .data = "\x1C\x07" }, -- // Mute channel 3 -- { .size = 2, .data = "\x0A\xFF" }, -- // Volume configuration register (0x0E): volume slew 512 steps -- { .size = 2, .data = "\x0E\x90" }, -- // Clock control register (0x00): 44/48kHz, MCLK=64xfs -- { .size = 2, .data = "\x00\x60" }, -- // Bank switch and eq control (0x50): no bank switching -- { .size = 5, .data = "\x50\x00\x00\x00\x00" }, -- // Volume registers (0x07, 0x08, 0x09, 0x0A) -- { .size = 2, .data = "\x07\x20" }, -- { .size = 2, .data = "\x08\x30" }, -- { .size = 2, .data = "\x09\x30" }, -- { .size = 2, .data = "\x0A\xFF" }, -- // 0x72, 0x73, 0x76, 0x77 input mixer: -- // no intermix between channels -- { .size = 5, .data = "\x72\x00\x00\x00\x00" }, -- { .size = 5, .data = "\x73\x00\x80\x00\x00" }, -- { .size = 5, .data = "\x76\x00\x00\x00\x00" }, -- { .size = 5, .data = "\x77\x00\x80\x00\x00" }, -- // 0x70, 0x71, 0x74, 0x75 inline DRC mixer: -- // no inline DRC inmix -- { .size = 5, .data = "\x70\x00\x80\x00\x00" }, -- { .size = 5, .data = "\x71\x00\x00\x00\x00" }, -- { .size = 5, .data = "\x74\x00\x80\x00\x00" }, -- { .size = 5, .data = "\x75\x00\x00\x00\x00" }, -- // 0x56, 0x57 Output scale -- { .size = 5, .data = "\x56\x00\x80\x00\x00" }, -- { .size = 5, .data = "\x57\x00\x02\x00\x00" }, -- // 0x3B, 0x3c -- { .size = 9, .data = "\x3B\x00\x08\x00\x00\x00\x78\x00\x00" }, -- { .size = 9, .data = "\x3C\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, -- { .size = 9, .data = "\x3E\x00\x08\x00\x00\x00\x78\x00\x00" }, -- { .size = 9, .data = "\x3F\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, -- { .size = 9, .data = "\x40\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, -- { .size = 9, .data = "\x43\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, -- // 0x51, 0x52: output mixer -- { .size = 9, .data = "\x51\x00\x80\x00\x00\x00\x00\x00\x00" }, -- { .size = 9, .data = "\x52\x00\x80\x00\x00\x00\x00\x00\x00" }, -- // PEQ defaults -- { .size = 21, .data = "\x29\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x2A\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x2B\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x2C\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x2D\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x2E\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x2F\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x30\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x31\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x32\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x33\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x34\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x35\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x36\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x58\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x59\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x5C\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x5D\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x5E\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x5F\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x5A\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -- { .size = 21, .data = "\x5B\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, --}; -- -- --#endif /* _TAS5713_H */ - -From 3ad92216031fb0abb38c3eb9b42efc20c323ca0a Mon Sep 17 00:00:00 2001 +From 85a279eaea5b66242702171e5d140e417d678ee9 Mon Sep 17 00:00:00 2001 From: Ryan Coe Date: Sat, 31 Jan 2015 18:25:49 -0700 -Subject: [PATCH 074/149] Update ds1307 driver for device-tree support +Subject: [PATCH 071/143] Update ds1307 driver for device-tree support Signed-off-by: Ryan Coe --- @@ -114026,10 +113264,10 @@ Signed-off-by: Ryan Coe 1 file changed, 8 insertions(+) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c -index 4e31036ee2596dec93accd26f627c5b95591ae9f..b92044cf03e750afa521a93519500e9d128486f4 100644 +index 4ad97be480430babc3321075f2739114eaad8f04..2ac1c265dc9cea56a5949eb537949a1f8853edc5 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c -@@ -1675,6 +1675,14 @@ static int ds1307_remove(struct i2c_client *client) +@@ -1708,6 +1708,14 @@ static int ds1307_remove(struct i2c_client *client) return 0; } @@ -114045,10 +113283,10 @@ index 4e31036ee2596dec93accd26f627c5b95591ae9f..b92044cf03e750afa521a93519500e9d .driver = { .name = "rtc-ds1307", -From 3e53b65b6fb18596e332c01e58edecd91f955727 Mon Sep 17 00:00:00 2001 +From 053bc362322ac4e8bf60530e93aee667167e7f8a Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 -Subject: [PATCH 075/149] Add driver for rpi-proto +Subject: [PATCH 072/143] Add driver for rpi-proto Forward port of 3.10.x driver from https://github.com/koalo We are using a custom board and would like to use rpi 3.18.x @@ -114068,10 +113306,10 @@ Signed-off-by: Waldemar Brodkorb create mode 100644 sound/soc/bcm/rpi-proto.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 4473cc728097bda0ce9fe68d4a9da348ec41f8b3..ac0dbaf29b821c4b21855f22104a986f6e0849ec 100644 +index f650f1522d6ef1e02d87345fea01bb1458693423..3cb799da4687e10cd1cfe9258e109b9fcf701c4c 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -45,6 +45,13 @@ config SND_BCM2708_SOC_RPI_DAC +@@ -53,6 +53,13 @@ config SND_BCM2708_SOC_RPI_DAC help Say Y or M if you want to add support for RPi-DAC. @@ -114086,19 +113324,20 @@ index 4473cc728097bda0ce9fe68d4a9da348ec41f8b3..ac0dbaf29b821c4b21855f22104a986f tristate "Support for IQaudIO-DAC" depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 203afc03167acbcad15e836209956bc5ab151157..3badc43cbe1fcb6972829a6d5eb3143cfa812da9 100644 +index a4838e2cf8e93c9285836f95f4151daea33e1bd1..680d1b6d5e16819094fbfaa6c42b458267b54819 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -13,10 +13,12 @@ snd-soc-hifiberry-dac-objs := hifiberry_dac.o - snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o +@@ -14,6 +14,7 @@ snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o snd-soc-hifiberry-digi-objs := hifiberry_digi.o + snd-soc-hifiberry-amp-objs := hifiberry_amp.o snd-soc-rpi-dac-objs := rpi-dac.o +snd-soc-rpi-proto-objs := rpi-proto.o snd-soc-iqaudio-dac-objs := iqaudio-dac.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o - obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o +@@ -21,4 +22,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o +obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o @@ -114263,10 +113502,10 @@ index 0000000000000000000000000000000000000000..9db678e885efd63d84d60a098a84ed67 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); -From 758f1e9ce01267e15f56154dd9fa9042898d6094 Mon Sep 17 00:00:00 2001 +From 88224370fc80b8de92c73c3b0ae02c04bb8e496c Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 -Subject: [PATCH 076/149] RaspiDAC3 support +Subject: [PATCH 073/143] RaspiDAC3 support Signed-off-by: Jan Grulich @@ -114284,10 +113523,10 @@ Signed-off-by: Matthias Reichl create mode 100644 sound/soc/bcm/raspidac3.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index ac0dbaf29b821c4b21855f22104a986f6e0849ec..c59c835757a51aa8ad72933d35a83b73a889477c 100644 +index 3cb799da4687e10cd1cfe9258e109b9fcf701c4c..a1b6a78182c9c3698df90e6c8ddaf1003bf01f91 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -58,3 +58,11 @@ config SND_BCM2708_SOC_IQAUDIO_DAC +@@ -66,3 +66,11 @@ config SND_BCM2708_SOC_IQAUDIO_DAC select SND_SOC_PCM512x_I2C help Say Y or M if you want to add support for IQaudIO-DAC. @@ -114300,10 +113539,10 @@ index ac0dbaf29b821c4b21855f22104a986f6e0849ec..c59c835757a51aa8ad72933d35a83b73 + help + Say Y or M if you want to add support for RaspiDAC Rev.3x. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 3badc43cbe1fcb6972829a6d5eb3143cfa812da9..07d2b52376b1d16e427cf6f51cbf4779d6219ce0 100644 +index 680d1b6d5e16819094fbfaa6c42b458267b54819..18253b39addf831780fefe85578e72007c0d51d9 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -15,6 +15,7 @@ snd-soc-hifiberry-digi-objs := hifiberry_digi.o +@@ -16,6 +16,7 @@ snd-soc-hifiberry-amp-objs := hifiberry_amp.o snd-soc-rpi-dac-objs := rpi-dac.o snd-soc-rpi-proto-objs := rpi-proto.o snd-soc-iqaudio-dac-objs := iqaudio-dac.o @@ -114311,7 +113550,7 @@ index 3badc43cbe1fcb6972829a6d5eb3143cfa812da9..07d2b52376b1d16e427cf6f51cbf4779 obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o -@@ -22,3 +23,4 @@ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o +@@ -24,3 +25,4 @@ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o @@ -114509,10 +113748,10 @@ index 0000000000000000000000000000000000000000..dd9eeea2af0382307f437e6db09d1546 +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); -From ab387673881e745cc94dabab62476b5cf953ef70 Mon Sep 17 00:00:00 2001 +From 1385ec25eb578307ba8862c9ae77e0f06d14293c Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 7 Apr 2016 21:26:21 +0100 -Subject: [PATCH 077/149] Add Support for JustBoom Audio boards +Subject: [PATCH 074/143] Add Support for JustBoom Audio boards justboom-dac: Adjust for ALSA API change @@ -114530,10 +113769,10 @@ Signed-off-by: Phil Elwell create mode 100644 sound/soc/bcm/justboom-digi.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index c59c835757a51aa8ad72933d35a83b73a889477c..b2f6339c318cdfe3516d73952a5be1fd32bc1156 100644 +index a1b6a78182c9c3698df90e6c8ddaf1003bf01f91..c9c2f702a1ea5548eff093cc84dcc1de2f8724ad 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -52,6 +52,20 @@ config SND_BCM2708_SOC_RPI_PROTO +@@ -60,6 +60,20 @@ config SND_BCM2708_SOC_RPI_PROTO help Say Y or M if you want to add support for Audio Codec Board PROTO (WM8731). @@ -114555,7 +113794,7 @@ index c59c835757a51aa8ad72933d35a83b73a889477c..b2f6339c318cdfe3516d73952a5be1fd tristate "Support for IQaudIO-DAC" depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 07d2b52376b1d16e427cf6f51cbf4779d6219ce0..cb8ab1901b172bdee0bd9cddd2f2e7ab2f36c16a 100644 +index 18253b39addf831780fefe85578e72007c0d51d9..dbc45d892277bd0b4c0f82e57f0b782e770cddfd 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -12,6 +12,8 @@ obj-$(CONFIG_SND_SOC_CYGNUS) += snd-soc-cygnus.o @@ -114564,18 +113803,18 @@ index 07d2b52376b1d16e427cf6f51cbf4779d6219ce0..cb8ab1901b172bdee0bd9cddd2f2e7ab snd-soc-hifiberry-digi-objs := hifiberry_digi.o +snd-soc-justboom-dac-objs := justboom-dac.o +snd-soc-justboom-digi-objs := justboom-digi.o + snd-soc-hifiberry-amp-objs := hifiberry_amp.o snd-soc-rpi-dac-objs := rpi-dac.o snd-soc-rpi-proto-objs := rpi-proto.o - snd-soc-iqaudio-dac-objs := iqaudio-dac.o -@@ -20,6 +22,8 @@ snd-soc-raspidac3-objs := raspidac3.o +@@ -21,6 +23,8 @@ snd-soc-raspidac3-objs := raspidac3.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o +obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC) += snd-soc-justboom-dac.o +obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI) += snd-soc-justboom-digi.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o - obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o diff --git a/sound/soc/bcm/justboom-dac.c b/sound/soc/bcm/justboom-dac.c new file mode 100644 index 0000000000000000000000000000000000000000..8fd50dbe681508a2cfe8fdde1c9fedbe9a507fa7 @@ -114966,10 +114205,10 @@ index 0000000000000000000000000000000000000000..91acb666380faa3c0deb2230f8a0f8bb +MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card"); +MODULE_LICENSE("GPL v2"); -From ce34a03852642a387b52fd1e8f153fa1c278de29 Mon Sep 17 00:00:00 2001 +From fd8c46fea411354bb97265a5fb57bec83820ad4c Mon Sep 17 00:00:00 2001 From: Andrey Grodzovsky Date: Tue, 3 May 2016 22:10:59 -0400 -Subject: [PATCH 078/149] ARM: adau1977-adc: Add basic machine driver for +Subject: [PATCH 075/143] ARM: adau1977-adc: Add basic machine driver for adau1977 codec driver. This commit adds basic support for the codec usage including: Device tree overlay, @@ -114985,10 +114224,10 @@ Signed-off-by: Andrey Grodzovsky create mode 100644 sound/soc/bcm/adau1977-adc.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index b2f6339c318cdfe3516d73952a5be1fd32bc1156..190a79dffa53a34c2df9b2c9b5160065c759de65 100644 +index c9c2f702a1ea5548eff093cc84dcc1de2f8724ad..72b86dad16b3dd440e5919308a5312fbb72e8703 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -80,3 +80,10 @@ config SND_BCM2708_SOC_RASPIDAC3 +@@ -88,3 +88,10 @@ config SND_BCM2708_SOC_RASPIDAC3 select SND_SOC_TPA6130A2 help Say Y or M if you want to add support for RaspiDAC Rev.3x. @@ -115000,7 +114239,7 @@ index b2f6339c318cdfe3516d73952a5be1fd32bc1156..190a79dffa53a34c2df9b2c9b5160065 + help + Say Y or M if you want to add support for ADAU1977 ADC. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index cb8ab1901b172bdee0bd9cddd2f2e7ab2f36c16a..9dd0785532aae24f3366cc2910d4dbc558cb0e5d 100644 +index dbc45d892277bd0b4c0f82e57f0b782e770cddfd..2b3d1987ea449713b18f60cae3f6edcbd2bcff08 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -9,6 +9,7 @@ snd-soc-cygnus-objs := cygnus-pcm.o cygnus-ssp.o @@ -115011,7 +114250,7 @@ index cb8ab1901b172bdee0bd9cddd2f2e7ab2f36c16a..9dd0785532aae24f3366cc2910d4dbc5 snd-soc-hifiberry-dac-objs := hifiberry_dac.o snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o snd-soc-hifiberry-digi-objs := hifiberry_digi.o -@@ -19,6 +20,7 @@ snd-soc-rpi-proto-objs := rpi-proto.o +@@ -20,6 +21,7 @@ snd-soc-rpi-proto-objs := rpi-proto.o snd-soc-iqaudio-dac-objs := iqaudio-dac.o snd-soc-raspidac3-objs := raspidac3.o @@ -115151,10 +114390,10 @@ index 0000000000000000000000000000000000000000..6e2ee027926ee63c89222f75ceb89e3d +MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC"); +MODULE_LICENSE("GPL v2"); -From 0cf9d82ede2bf39b41fd3b76d0b2b79306b1a2fd Mon Sep 17 00:00:00 2001 +From d42f4ed4d2c918abc3db37daee953eec5c50ad80 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Mon, 16 May 2016 21:36:31 +1000 -Subject: [PATCH 079/149] New AudioInjector.net Pi soundcard with low jitter +Subject: [PATCH 076/143] New AudioInjector.net Pi soundcard with low jitter audio in and out. Contains the sound/soc/bcm ALSA machine driver and necessary alterations to the Kconfig and Makefile. @@ -115173,10 +114412,10 @@ This patch adds headphone and microphone capability to the Audio Injector sound create mode 100644 sound/soc/bcm/audioinjector-pi-soundcard.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 190a79dffa53a34c2df9b2c9b5160065c759de65..eb16c3a7fb316eb5938a54dfa864f66f9b167eb0 100644 +index 72b86dad16b3dd440e5919308a5312fbb72e8703..7ebfa8261a69d31a5add15ae03399dc6d8872581 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -87,3 +87,10 @@ config SND_BCM2708_SOC_ADAU1977_ADC +@@ -95,3 +95,10 @@ config SND_BCM2708_SOC_ADAU1977_ADC select SND_SOC_ADAU1977_I2C help Say Y or M if you want to add support for ADAU1977 ADC. @@ -115188,10 +114427,10 @@ index 190a79dffa53a34c2df9b2c9b5160065c759de65..eb16c3a7fb316eb5938a54dfa864f66f + help + Say Y or M if you want to add support for audioinjector.net Pi Hat diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 9dd0785532aae24f3366cc2910d4dbc558cb0e5d..a68469644535a38305bb5b0f3780e03e0ca4f519 100644 +index 2b3d1987ea449713b18f60cae3f6edcbd2bcff08..e61b0f6c7ccee06dfa763d2abbb667707184febc 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -19,6 +19,7 @@ snd-soc-rpi-dac-objs := rpi-dac.o +@@ -20,6 +20,7 @@ snd-soc-rpi-dac-objs := rpi-dac.o snd-soc-rpi-proto-objs := rpi-proto.o snd-soc-iqaudio-dac-objs := iqaudio-dac.o snd-soc-raspidac3-objs := raspidac3.o @@ -115199,7 +114438,7 @@ index 9dd0785532aae24f3366cc2910d4dbc558cb0e5d..a68469644535a38305bb5b0f3780e03e obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o -@@ -30,3 +31,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o +@@ -32,3 +33,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o @@ -115405,10 +114644,10 @@ index 0000000000000000000000000000000000000000..ef54e0f07ea03f59e9957b5d98f3e7fd +MODULE_ALIAS("platform:audioinjector-pi-soundcard"); + -From fa81fa8a4f1a95e6bc71206764aed742e9af58c5 Mon Sep 17 00:00:00 2001 +From 6689d861c13e3230c53f5f1b54b7987ef92aeba9 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Thu, 30 Jun 2016 18:38:42 +0100 -Subject: [PATCH 080/149] Add IQAudIO Digi WM8804 board support +Subject: [PATCH 077/143] Add IQAudIO Digi WM8804 board support Support IQAudIO Digi board with iqaudio_digi machine driver and iqaudio-digi-wm8804-audio overlay. @@ -115425,10 +114664,10 @@ Signed-off-by: DigitalDreamtime create mode 100644 sound/soc/bcm/iqaudio_digi.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index eb16c3a7fb316eb5938a54dfa864f66f9b167eb0..9cba69ab877ef73beb2dff2f4f82d1d243f7c604 100644 +index 7ebfa8261a69d31a5add15ae03399dc6d8872581..ebc2b3d7b0bd4a1126adbc1315120fe5c6aca413 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -73,6 +73,13 @@ config SND_BCM2708_SOC_IQAUDIO_DAC +@@ -81,6 +81,13 @@ config SND_BCM2708_SOC_IQAUDIO_DAC help Say Y or M if you want to add support for IQaudIO-DAC. @@ -115443,10 +114682,10 @@ index eb16c3a7fb316eb5938a54dfa864f66f9b167eb0..9cba69ab877ef73beb2dff2f4f82d1d2 tristate "Support for RaspiDAC Rev.3x" depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index a68469644535a38305bb5b0f3780e03e0ca4f519..fa2739206b79a9f9d2e1173b2099e1156e4e08c8 100644 +index e61b0f6c7ccee06dfa763d2abbb667707184febc..c4f2579b173c1232096c177f2e557a5337e2e97e 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -18,6 +18,7 @@ snd-soc-justboom-digi-objs := justboom-digi.o +@@ -19,6 +19,7 @@ snd-soc-hifiberry-amp-objs := hifiberry_amp.o snd-soc-rpi-dac-objs := rpi-dac.o snd-soc-rpi-proto-objs := rpi-proto.o snd-soc-iqaudio-dac-objs := iqaudio-dac.o @@ -115454,7 +114693,7 @@ index a68469644535a38305bb5b0f3780e03e0ca4f519..fa2739206b79a9f9d2e1173b2099e115 snd-soc-raspidac3-objs := raspidac3.o snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o -@@ -30,6 +31,7 @@ obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI) += snd-soc-justboom-digi.o +@@ -32,6 +33,7 @@ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o @@ -115708,10 +114947,10 @@ index 0000000000000000000000000000000000000000..9b6e829bcb5b1762a853775e78163196 +MODULE_DESCRIPTION("ASoC Driver for IQAudIO WM8804 Digi"); +MODULE_LICENSE("GPL v2"); -From ba5d3d9bdd11222a06508cffec229c236ada236f Mon Sep 17 00:00:00 2001 +From 821ba52756aaabe8947659b9be1744cad032d376 Mon Sep 17 00:00:00 2001 From: escalator2015 Date: Tue, 24 May 2016 16:20:09 +0100 -Subject: [PATCH 081/149] New driver for RRA DigiDAC1 soundcard using WM8741 + +Subject: [PATCH 078/143] New driver for RRA DigiDAC1 soundcard using WM8741 + WM8804 --- @@ -115722,10 +114961,10 @@ Subject: [PATCH 081/149] New driver for RRA DigiDAC1 soundcard using WM8741 + create mode 100644 sound/soc/bcm/digidac1-soundcard.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 9cba69ab877ef73beb2dff2f4f82d1d243f7c604..2be5b64fb0d5dcad0d5747626015a6886c3c273b 100644 +index ebc2b3d7b0bd4a1126adbc1315120fe5c6aca413..c09de7aac7b448ad3af1b50f25ec56f682f872b7 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -101,3 +101,11 @@ config SND_AUDIOINJECTOR_PI_SOUNDCARD +@@ -109,3 +109,11 @@ config SND_AUDIOINJECTOR_PI_SOUNDCARD select SND_SOC_WM8731 help Say Y or M if you want to add support for audioinjector.net Pi Hat @@ -115738,10 +114977,10 @@ index 9cba69ab877ef73beb2dff2f4f82d1d243f7c604..2be5b64fb0d5dcad0d5747626015a688 + help + Say Y or M if you want to add support for Red Rocks Audio DigiDAC1 board. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index fa2739206b79a9f9d2e1173b2099e1156e4e08c8..a5c30c0bdacafb2bd09b6ac2f8a3bdc6a85a8404 100644 +index c4f2579b173c1232096c177f2e557a5337e2e97e..290cfff1f982faba7b0089f04536ca82b319b919 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -21,6 +21,7 @@ snd-soc-iqaudio-dac-objs := iqaudio-dac.o +@@ -22,6 +22,7 @@ snd-soc-iqaudio-dac-objs := iqaudio-dac.o snd-soc-iqaudio-digi-objs := iqaudio_digi.o snd-soc-raspidac3-objs := raspidac3.o snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o @@ -115749,7 +114988,7 @@ index fa2739206b79a9f9d2e1173b2099e1156e4e08c8..a5c30c0bdacafb2bd09b6ac2f8a3bdc6 obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o -@@ -34,4 +35,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o +@@ -36,4 +37,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI) += snd-soc-iqaudio-digi.o obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o @@ -116184,10 +115423,10 @@ index 0000000000000000000000000000000000000000..446796e7e4c14a7d95b2f2a01211d9a0 +MODULE_DESCRIPTION("ASoC Driver for RRA DigiDAC1"); +MODULE_LICENSE("GPL v2"); -From 4f60dcef7c604f3294598e7477dee922bc0b94d4 Mon Sep 17 00:00:00 2001 +From 18217ab6c25f21d54af5891f725eacd148929a10 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Sat, 2 Jul 2016 16:26:19 +0100 -Subject: [PATCH 082/149] Add support for Dion Audio LOCO DAC-AMP HAT +Subject: [PATCH 079/143] Add support for Dion Audio LOCO DAC-AMP HAT Using dedicated machine driver and pcm5102a codec driver. @@ -116200,10 +115439,10 @@ Signed-off-by: DigitalDreamtime create mode 100644 sound/soc/bcm/dionaudio_loco.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 2be5b64fb0d5dcad0d5747626015a6886c3c273b..b8cb5eb7af9b3e6d8d100926e04bfef629641d1d 100644 +index c09de7aac7b448ad3af1b50f25ec56f682f872b7..aac9120b0865ce63b6c851dbe3917f5548b9a539 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -109,3 +109,10 @@ config SND_DIGIDAC1_SOUNDCARD +@@ -117,3 +117,10 @@ config SND_DIGIDAC1_SOUNDCARD select SND_SOC_WM8741 help Say Y or M if you want to add support for Red Rocks Audio DigiDAC1 board. @@ -116215,10 +115454,10 @@ index 2be5b64fb0d5dcad0d5747626015a6886c3c273b..b8cb5eb7af9b3e6d8d100926e04bfef6 + help + Say Y or M if you want to add support for Dion Audio LOCO. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index a5c30c0bdacafb2bd09b6ac2f8a3bdc6a85a8404..28cdf019dbc7aafda194c83817d260ad1a477666 100644 +index 290cfff1f982faba7b0089f04536ca82b319b919..3d09653b2e9eafc1d82f4b8349646fa174c86877 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -22,6 +22,7 @@ snd-soc-iqaudio-digi-objs := iqaudio_digi.o +@@ -23,6 +23,7 @@ snd-soc-iqaudio-digi-objs := iqaudio_digi.o snd-soc-raspidac3-objs := raspidac3.o snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o snd-soc-digidac1-soundcard-objs := digidac1-soundcard.o @@ -116226,7 +115465,7 @@ index a5c30c0bdacafb2bd09b6ac2f8a3bdc6a85a8404..28cdf019dbc7aafda194c83817d260ad obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o -@@ -36,4 +37,4 @@ obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI) += snd-soc-iqaudio-digi.o +@@ -38,4 +39,4 @@ obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI) += snd-soc-iqaudio-digi.o obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o obj-$(CONFIG_SND_DIGIDAC1_SOUNDCARD) += snd-soc-digidac1-soundcard.o @@ -116360,10 +115599,10 @@ index 0000000000000000000000000000000000000000..89e65317512bc774453ac8d0d5b0ff98 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO"); +MODULE_LICENSE("GPL v2"); -From 00627d7ba4d283e83fb73e22c018b56aba26cecd Mon Sep 17 00:00:00 2001 +From b8e26d7c19304135ac8bb435da3c95df604b9403 Mon Sep 17 00:00:00 2001 From: Clive Messer Date: Mon, 19 Sep 2016 14:01:04 +0100 -Subject: [PATCH 083/149] Allo Piano DAC boards: Initial 2 channel (stereo) +Subject: [PATCH 080/143] Allo Piano DAC boards: Initial 2 channel (stereo) support (#1645) Add initial 2 channel (stereo) support for Allo Piano DAC (2.0/2.1) boards, @@ -116388,10 +115627,10 @@ Tested-by: Clive Messer create mode 100644 sound/soc/bcm/allo-piano-dac.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index b8cb5eb7af9b3e6d8d100926e04bfef629641d1d..4f0330a6c06115f077938cba3dc744d4ae10f056 100644 +index aac9120b0865ce63b6c851dbe3917f5548b9a539..b600cfb98ac9baa21b3c6f09eff05149f14fda0a 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -116,3 +116,10 @@ config SND_BCM2708_SOC_DIONAUDIO_LOCO +@@ -124,3 +124,10 @@ config SND_BCM2708_SOC_DIONAUDIO_LOCO select SND_SOC_PCM5102a help Say Y or M if you want to add support for Dion Audio LOCO. @@ -116403,10 +115642,10 @@ index b8cb5eb7af9b3e6d8d100926e04bfef629641d1d..4f0330a6c06115f077938cba3dc744d4 + help + Say Y or M if you want to add support for Allo Piano DAC. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 28cdf019dbc7aafda194c83817d260ad1a477666..4b94a42efecaee41df37f3c59fddefa5fe78521c 100644 +index 3d09653b2e9eafc1d82f4b8349646fa174c86877..7d70655c226c1ecd59ee60aae4508699ee9d10ae 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -23,6 +23,7 @@ snd-soc-raspidac3-objs := raspidac3.o +@@ -24,6 +24,7 @@ snd-soc-raspidac3-objs := raspidac3.o snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o snd-soc-digidac1-soundcard-objs := digidac1-soundcard.o snd-soc-dionaudio-loco-objs := dionaudio_loco.o @@ -116414,7 +115653,7 @@ index 28cdf019dbc7aafda194c83817d260ad1a477666..4b94a42efecaee41df37f3c59fddefa5 obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o -@@ -38,3 +39,4 @@ obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o +@@ -40,3 +41,4 @@ obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o obj-$(CONFIG_SND_DIGIDAC1_SOUNDCARD) += snd-soc-digidac1-soundcard.o obj-$(CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO) += snd-soc-dionaudio-loco.o @@ -116570,10 +115809,10 @@ index 0000000000000000000000000000000000000000..8e8e62e5a36a279b425ed4655cfbac99 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC"); +MODULE_LICENSE("GPL v2"); -From 8c5f1ee54fa2de94daed5ebb5c778a2363894b13 Mon Sep 17 00:00:00 2001 +From 91e732e181547ba0f62c18fbe71687688d2c1878 Mon Sep 17 00:00:00 2001 From: gtrainavicius Date: Sun, 23 Oct 2016 12:06:53 +0300 -Subject: [PATCH 084/149] Support for Blokas Labs pisound board +Subject: [PATCH 081/143] Support for Blokas Labs pisound board Pisound dynamic overlay (#1760) @@ -116590,12 +115829,12 @@ Print a logline when the kernel module is removed. create mode 100644 sound/soc/bcm/pisound.c diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt -index f0a48ea78659c933839554ca879babb1b621b264..779c19033acad30ed8fd71f015ee76caef1a0568 100644 +index 16d3b5e7f5d1f52d1bf3c5f98220ba4f09b99b8f..596ea7815668327e3171fb8f53af428a953554dc 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt -@@ -40,6 +40,7 @@ auvidea Auvidea GmbH - avago Avago Technologies +@@ -43,6 +43,7 @@ avago Avago Technologies avic Shanghai AVIC Optoelectronics Co., Ltd. + axentia Axentia Technologies AB axis Axis Communications AB +blokaslabs Vilniaus Blokas UAB boe BOE Technology Group Co., Ltd. @@ -116724,10 +115963,10 @@ index 7cdfc29ba4fbffd3216376677922e7ae26019055..5197e656a3d741d14bd9dd6c812b4b93 - }; }; diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index 4f0330a6c06115f077938cba3dc744d4ae10f056..a0ef6a028136beb27ed13a4136712a70a60f2966 100644 +index b600cfb98ac9baa21b3c6f09eff05149f14fda0a..ff4284a0000fd8dc58deb9e50be1422fd7ad6e65 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -123,3 +123,9 @@ config SND_BCM2708_SOC_ALLO_PIANO_DAC +@@ -131,3 +131,9 @@ config SND_BCM2708_SOC_ALLO_PIANO_DAC select SND_SOC_PCM512x_I2C help Say Y or M if you want to add support for Allo Piano DAC. @@ -116738,10 +115977,10 @@ index 4f0330a6c06115f077938cba3dc744d4ae10f056..a0ef6a028136beb27ed13a4136712a70 + help + Say Y or M if you want to add support for Blokas Labs pisound. diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index 4b94a42efecaee41df37f3c59fddefa5fe78521c..f720a3d3b5832844ee6d0558317c728f00c40b65 100644 +index 7d70655c226c1ecd59ee60aae4508699ee9d10ae..222a7583891f632cc2297f49aa1a58ee46507875 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -24,6 +24,7 @@ snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o +@@ -25,6 +25,7 @@ snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o snd-soc-digidac1-soundcard-objs := digidac1-soundcard.o snd-soc-dionaudio-loco-objs := dionaudio_loco.o snd-soc-allo-piano-dac-objs := allo-piano-dac.o @@ -116749,7 +115988,7 @@ index 4b94a42efecaee41df37f3c59fddefa5fe78521c..f720a3d3b5832844ee6d0558317c728f obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o -@@ -40,3 +41,4 @@ obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundca +@@ -42,3 +43,4 @@ obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundca obj-$(CONFIG_SND_DIGIDAC1_SOUNDCARD) += snd-soc-digidac1-soundcard.o obj-$(CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO) += snd-soc-dionaudio-loco.o obj-$(CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC) += snd-soc-allo-piano-dac.o @@ -117750,10 +116989,10 @@ index 0000000000000000000000000000000000000000..4b8545487d06e4ea70073a5d063fb231 +MODULE_DESCRIPTION("ASoC Driver for pisound, http://blokas.io/pisound"); +MODULE_LICENSE("GPL v2"); -From 584a44b06094e9c0c44fee0d1d32b56bc14fa208 Mon Sep 17 00:00:00 2001 +From a78893616a488abf9b4c9dbf0cace4e130ea0907 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 -Subject: [PATCH 085/149] rpi_display: add backlight driver and overlay +Subject: [PATCH 082/143] rpi_display: add backlight driver and overlay Add a mailbox-driven backlight controller for the Raspberry Pi DSI touchscreen display. Requires updated GPU firmware to recognise the @@ -117922,10 +117161,10 @@ index 0000000000000000000000000000000000000000..14a0d9b037395497c1fdae2961feccd5 +MODULE_DESCRIPTION("Raspberry Pi mailbox based Backlight Driver"); +MODULE_LICENSE("GPL"); -From bc5419b31a5d1b28d302ca4c7183ae320ed77051 Mon Sep 17 00:00:00 2001 +From e3bcfd7cedcea1f6ce90667a860eba5d19e50ec6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 -Subject: [PATCH 086/149] bcm2835-virtgpio: Virtual GPIO driver +Subject: [PATCH 083/143] bcm2835-virtgpio: Virtual GPIO driver Add a virtual GPIO driver that uses the firmware mailbox interface to request that the VPU toggles LEDs. @@ -117938,7 +117177,7 @@ request that the VPU toggles LEDs. create mode 100644 drivers/gpio/gpio-bcm-virt.c diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig -index ed37e5908b910cd51cb378ffc171fe2a9104c082..edcb49f9051b703ce35fd1687a6cef8a31bf3627 100644 +index d5d36549ecc1ecea2c53cddea2a209e54ab94b56..ade9f7dd8f973fd44031a0a6d42c28f01b424d1b 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -134,6 +134,12 @@ config GPIO_BCM_KONA @@ -117955,10 +117194,10 @@ index ed37e5908b910cd51cb378ffc171fe2a9104c082..edcb49f9051b703ce35fd1687a6cef8a tristate "BRCMSTB GPIO support" default y if (ARCH_BRCMSTB || BMIPS_GENERIC) diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile -index d074c2299393dc9cef3456b0068ff2d229677c27..cfb8d4bad6b0b20bed56643b0870fcff311c12c5 100644 +index a7676b82de6f4accd75d57817fb2f0c4f5407bd1..dec0669a5f030023288047f2abe68b0f2e0946d7 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile -@@ -31,6 +31,7 @@ obj-$(CONFIG_GPIO_ATH79) += gpio-ath79.o +@@ -33,6 +33,7 @@ obj-$(CONFIG_GPIO_ATH79) += gpio-ath79.o obj-$(CONFIG_GPIO_ASPEED) += gpio-aspeed.o obj-$(CONFIG_GPIO_AXP209) += gpio-axp209.o obj-$(CONFIG_GPIO_BCM_KONA) += gpio-bcm-kona.o @@ -118187,7 +117426,7 @@ index 0000000000000000000000000000000000000000..c3725546def9d4a6264fbb1f6b9814d0 +MODULE_DESCRIPTION("brcmvirt GPIO driver"); +MODULE_ALIAS("platform:brcmvirt-gpio"); diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index b0f6e33bd30c35664ceee057f4c3ad32b914291d..e92278968b2b979db2a1f855f70e7aafb224fa98 100644 +index 4a3d79d3b48eb483a4e4bf498f617515e3ad158f..5f34e1257117fb48013c9926a8a223d64a598ab7 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -116,6 +116,7 @@ enum rpi_firmware_property_tag { @@ -118199,10 +117438,10 @@ index b0f6e33bd30c35664ceee057f4c3ad32b914291d..e92278968b2b979db2a1f855f70e7aaf RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From 832c72386a99ff317f811315e8dbb07f6394a747 Mon Sep 17 00:00:00 2001 +From afb0883dd8b8f571e565b59a5813f939a6cce163 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 -Subject: [PATCH 087/149] amba_pl011: Don't use DT aliases for numbering +Subject: [PATCH 084/143] amba_pl011: Don't use DT aliases for numbering The pl011 driver looks for DT aliases of the form "serial", and if found uses as the device ID. This can cause @@ -118214,10 +117453,10 @@ use the same logic. 1 file changed, 5 insertions(+) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index e2c33b9528d82ed7a2c27d083d7b1d222da68178..5a11ff833e1fd112ba04df3a427cd94bf6793ec5 100644 +index d4171d71a258f2696ab2ab2109376ee5a516bfba..6beb6233a0b6132b933cf8d85d8501dc1ce2fe4c 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -2441,7 +2441,12 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap, +@@ -2497,7 +2497,12 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap, if (IS_ERR(base)) return PTR_ERR(base); @@ -118231,10 +117470,10 @@ index e2c33b9528d82ed7a2c27d083d7b1d222da68178..5a11ff833e1fd112ba04df3a427cd94b uap->old_cr = 0; uap->port.dev = dev; -From 5e8bc5a5aa766db3328818aa104ec69c7465d015 Mon Sep 17 00:00:00 2001 +From fdfb4986a0abca080478d8449f4f257c835a9211 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 3 Dec 2014 13:23:28 +0200 -Subject: [PATCH 088/149] OF: DT-Overlay configfs interface +Subject: [PATCH 085/143] OF: DT-Overlay configfs interface This is a port of Pantelis Antoniou's v3 port that makes use of the new upstreamed configfs support for binary attributes. @@ -118666,10 +117905,10 @@ index 0000000000000000000000000000000000000000..0037e6868a6cda8706c88194c6a4454b +} +late_initcall(of_cfs_init); -From 10045e8386fd0416bb3b4909d021647122f9140f Mon Sep 17 00:00:00 2001 +From 3d29854cf0ba3548719f9977cdae2910bf4484db Mon Sep 17 00:00:00 2001 From: Cheong2K Date: Fri, 26 Feb 2016 18:20:10 +0800 -Subject: [PATCH 089/149] brcm: adds support for BCM43341 wifi +Subject: [PATCH 086/143] brcm: adds support for BCM43341 wifi brcmfmac: Disable power management @@ -118711,15 +117950,14 @@ Signed-off-by: Phil Elwell --- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 31 ++++++++++++++++------ .../wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +- - .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 ++ - .../broadcom/brcm80211/include/brcm_hw_ids.h | 1 + - 4 files changed, 27 insertions(+), 9 deletions(-) + .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 3 ++- + 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -index 78d9966a3957b2b934fe6b21de5cade494ec2839..3fcb1887b2d312e050c02e9fe66ea20f48f0abcb 100644 +index 7ffc4aba5bab0683fe993d1d5eef9e8e3d8389d0..5dfcf16428f9c8687237c3218183d8afa66ec331 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -2756,6 +2756,8 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev, +@@ -2749,6 +2749,8 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev, * preference in cfg struct to apply this to * FW later while initializing the dongle */ @@ -118728,7 +117966,7 @@ index 78d9966a3957b2b934fe6b21de5cade494ec2839..3fcb1887b2d312e050c02e9fe66ea20f cfg->pwr_save = enabled; if (!check_vif_up(ifp->vif)) { -@@ -4750,12 +4752,15 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev) +@@ -4659,12 +4661,15 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev) err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1); if (err < 0) brcmf_err("BRCMF_C_DOWN error %d\n", err); @@ -118747,7 +117985,7 @@ index 78d9966a3957b2b934fe6b21de5cade494ec2839..3fcb1887b2d312e050c02e9fe66ea20f if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS)) brcmf_fil_iovar_int_set(ifp, "mbss", 0); brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY, -@@ -6737,12 +6742,18 @@ static s32 brcmf_translate_country_code(struct brcmf_pub *drvr, char alpha2[2], +@@ -6650,12 +6655,18 @@ static s32 brcmf_translate_country_code(struct brcmf_pub *drvr, char alpha2[2], struct brcmfmac_pd_cc *country_codes; struct brcmfmac_pd_cc_entry *cc; s32 found_index; @@ -118768,7 +118006,7 @@ index 78d9966a3957b2b934fe6b21de5cade494ec2839..3fcb1887b2d312e050c02e9fe66ea20f } if ((alpha2[0] == ccreq->country_abbrev[0]) && -@@ -6766,10 +6777,14 @@ static s32 brcmf_translate_country_code(struct brcmf_pub *drvr, char alpha2[2], +@@ -6679,10 +6690,14 @@ static s32 brcmf_translate_country_code(struct brcmf_pub *drvr, char alpha2[2], brcmf_dbg(TRACE, "No country code match found\n"); return -EINVAL; } @@ -118800,7 +118038,7 @@ index 3e15d64c64813513bc22202dd9e468588699abb0..4051780f64f44a5ce522babe6c371a1b MODULE_PARM_DESC(roamoff, "Do not use internal roaming engine"); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c -index b892dac70f4b02f76e01a7ccb580c6d8aed4bfe4..db5f8b70b407879f1c006ca4b7ab78d12974609d 100644 +index dfb0658713d9b31714566b5003564a9a53eb5e97..db5f8b70b407879f1c006ca4b7ab78d12974609d 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -604,6 +604,7 @@ BRCMF_FW_NVRAM_DEF(4329, "brcmfmac4329-sdio.bin", "brcmfmac4329-sdio.txt"); @@ -118811,31 +118049,20 @@ index b892dac70f4b02f76e01a7ccb580c6d8aed4bfe4..db5f8b70b407879f1c006ca4b7ab78d1 BRCMF_FW_NVRAM_DEF(4335, "brcmfmac4335-sdio.bin", "brcmfmac4335-sdio.txt"); BRCMF_FW_NVRAM_DEF(43362, "brcmfmac43362-sdio.bin", "brcmfmac43362-sdio.txt"); BRCMF_FW_NVRAM_DEF(4339, "brcmfmac4339-sdio.bin", "brcmfmac4339-sdio.txt"); -@@ -621,6 +622,7 @@ static struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = { +@@ -621,7 +622,7 @@ static struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = { BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4330_CHIP_ID, 0xFFFFFFFF, 4330), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4334_CHIP_ID, 0xFFFFFFFF, 4334), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43340_CHIP_ID, 0xFFFFFFFF, 43340), +- BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43341_CHIP_ID, 0xFFFFFFFF, 43340), + BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43341_CHIP_ID, 0xFFFFFFFF, 43341), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4335_CHIP_ID, 0xFFFFFFFF, 4335), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, 43362), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, 4339), -diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h -index d0407d9ad7827cd756b6311410ffe2d9a7cacc78..f1fb8a3c7a3211e8429585861f2f42e014878654 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h -+++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h -@@ -36,6 +36,7 @@ - #define BRCM_CC_4330_CHIP_ID 0x4330 - #define BRCM_CC_4334_CHIP_ID 0x4334 - #define BRCM_CC_43340_CHIP_ID 43340 -+#define BRCM_CC_43341_CHIP_ID 43341 - #define BRCM_CC_43362_CHIP_ID 43362 - #define BRCM_CC_4335_CHIP_ID 0x4335 - #define BRCM_CC_4339_CHIP_ID 0x4339 -From b53fc29b9388190fe4a09d219c235585316c03ac Mon Sep 17 00:00:00 2001 +From a4b76e3a62a42b8e2b92de017f4a0fe6cdbe7abf Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 -Subject: [PATCH 090/149] hci_h5: Don't send conf_req when ACTIVE +Subject: [PATCH 087/143] hci_h5: Don't send conf_req when ACTIVE Without this patch, a modem and kernel can continuously bombard each other with conf_req and conf_rsp messages, in a demented game of tag. @@ -118844,10 +118071,10 @@ other with conf_req and conf_rsp messages, in a demented game of tag. 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c -index 0879d64b1caf58afb6e5d494c07d9ab7e7cdf983..5161ab30fd533d50f516bb93d5b9f402422e2974 100644 +index 90d0456b67446bcc624fab4b1542c4eaf21531b1..f9adeac3bbba6418dcca298c55706356b3004e34 100644 --- a/drivers/bluetooth/hci_h5.c +++ b/drivers/bluetooth/hci_h5.c -@@ -310,7 +310,8 @@ static void h5_handle_internal_rx(struct hci_uart *hu) +@@ -308,7 +308,8 @@ static void h5_handle_internal_rx(struct hci_uart *hu) h5_link_control(hu, conf_req, 3); } else if (memcmp(data, conf_req, 2) == 0) { h5_link_control(hu, conf_rsp, 2); @@ -118858,10 +118085,10 @@ index 0879d64b1caf58afb6e5d494c07d9ab7e7cdf983..5161ab30fd533d50f516bb93d5b9f402 if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 0x07); -From 1fec0af76b9706f88fe66b54b3aa9fd959169626 Mon Sep 17 00:00:00 2001 +From c3980d1190ae7a74abc71a39d774fbe92691b4ca Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 -Subject: [PATCH 091/149] config: Add default configs +Subject: [PATCH 088/143] config: Add default configs --- arch/arm/configs/bcm2709_defconfig | 1297 +++++++++++++++++++++++++++++++++++ @@ -121488,10 +120715,10 @@ index 0000000000000000000000000000000000000000..8acee9f31202ec14f2933d92dd70831c +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From c41a0687c5363e4ff1d8338bf80b7c4cb76a6501 Mon Sep 17 00:00:00 2001 +From c59ca307b42b2c8bab4bf1d3537ca164c96cb85b Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Wed, 24 Aug 2016 03:35:56 -0700 -Subject: [PATCH 092/149] Add arm64 configuration and device tree differences. +Subject: [PATCH 089/143] Add arm64 configuration and device tree differences. Disable MMC_BCM2835_SDHOST and MMC_BCM2835 since these drivers are crashing at the moment. @@ -121513,7 +120740,7 @@ Tested with raspbian-jessie 2016-09-23. create mode 100644 arch/arm64/configs/bcmrpi3_defconfig diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms -index 101794f5ce1008b7ff007fbfc7fa23d9e63bae67..7d213c2c904271c7a4622b83cd55a750d237bc2e 100644 +index 715ef1256838ed4b14d21c9ee8885d10c64fb0fc..5289515a5b3bdfc85b7b6f1153e55b8ee760e96c 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -1,5 +1,27 @@ @@ -121567,7 +120794,7 @@ index 0000000000000000000000000000000000000000..deb33441da95220db0ed672e41639626 +#include "../../../../arm/boot/dts/bcm2710-rpi-3-b.dts" diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig new file mode 100644 -index 0000000000000000000000000000000000000000..d7406f5a4620151044b8f716b4d10bb818648e06 +index 0000000000000000000000000000000000000000..e6b09fafa27eed2b762e3d53b55041f793683d27 --- /dev/null +++ b/arch/arm64/configs/bcmrpi3_defconfig @@ -0,0 +1,1334 @@ @@ -122904,90 +122131,765 @@ index 0000000000000000000000000000000000000000..d7406f5a4620151044b8f716b4d10bb8 +CONFIG_ARM64_CRYPTO=y +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -+CONFIG_BCM2708_VCHIQ=n ++CONFIG_BCM2835_VCHIQ=n -From 0ffcfdc6e8926afb60dfbcf9bc414c543028f62b Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Mon, 7 Mar 2016 15:05:11 +0000 -Subject: [PATCH 093/149] vchiq_arm: Tweak the logging output +From 8d3dcfb51bd8bee21c9e6e0296c8502ca09d1f70 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 27 Dec 2016 22:13:42 +0000 +Subject: [PATCH 090/143] Revert "staging: vc04_services: remove + vchiq_copy_from_user" -Signed-off-by: Phil Elwell +This reverts commit 49bec49fd7f273ec114e2e533c1bb8f21a654aaf. --- - .../vc04_services/interface/vchiq_arm/vchiq_core.c | 31 +++++++++------------- - 1 file changed, 13 insertions(+), 18 deletions(-) + .../staging/vc04_services/interface/vchi/vchi.h | 25 +- + .../interface/vchiq_arm/vchiq_2835_arm.c | 11 + + .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 103 +------- + .../vc04_services/interface/vchiq_arm/vchiq_core.c | 269 +++++++++------------ + .../vc04_services/interface/vchiq_arm/vchiq_core.h | 3 + + .../vc04_services/interface/vchiq_arm/vchiq_if.h | 9 +- + .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 64 ++++- + 7 files changed, 197 insertions(+), 287 deletions(-) +diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h +index d6937288210cef102e115f4265471ad9e9da7007..1b17e98f737979eef19906609bc19ecd19455618 100644 +--- a/drivers/staging/vc04_services/interface/vchi/vchi.h ++++ b/drivers/staging/vc04_services/interface/vchi/vchi.h +@@ -226,12 +226,25 @@ extern int32_t vchi_service_set_option( const VCHI_SERVICE_HANDLE_T handle, + int value); + + // Routine to send a message across a service +-extern int32_t +- vchi_msg_queue(VCHI_SERVICE_HANDLE_T handle, +- ssize_t (*copy_callback)(void *context, void *dest, +- size_t offset, size_t maxsize), +- void *context, +- uint32_t data_size); ++extern int32_t vchi_msg_queue( VCHI_SERVICE_HANDLE_T handle, ++ const void *data, ++ uint32_t data_size, ++ VCHI_FLAGS_T flags, ++ void *msg_handle ); ++ ++// scatter-gather (vector) and send message ++int32_t vchi_msg_queuev_ex( VCHI_SERVICE_HANDLE_T handle, ++ VCHI_MSG_VECTOR_EX_T *vector, ++ uint32_t count, ++ VCHI_FLAGS_T flags, ++ void *msg_handle ); ++ ++// legacy scatter-gather (vector) and send message, only handles pointers ++int32_t vchi_msg_queuev( VCHI_SERVICE_HANDLE_T handle, ++ VCHI_MSG_VECTOR_T *vector, ++ uint32_t count, ++ VCHI_FLAGS_T flags, ++ void *msg_handle ); + + // Routine to receive a msg from a service + // Dequeue is equivalent to hold, copy into client buffer, release +diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +index 2b500d85cebc768373a2dd48c779063262b52570..706e7f936c1a97352f7ef3d3fbd3b4a92943165d 100644 +--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c ++++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +@@ -232,6 +232,17 @@ remote_event_signal(REMOTE_EVENT_T *event) + writel(0, g_regs + BELL2); /* trigger vc interrupt */ + } + ++int ++vchiq_copy_from_user(void *dst, const void *src, int size) ++{ ++ if ((uint32_t)src < TASK_SIZE) { ++ return copy_from_user(dst, src, size); ++ } else { ++ memcpy(dst, src, size); ++ return 0; ++ } ++} ++ + VCHIQ_STATUS_T + vchiq_prepare_bulk_data(VCHIQ_BULK_T *bulk, VCHI_MEM_HANDLE_T memhandle, + void *offset, int size, int dir) +diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +index 0d987898b4f86abbd7d3f73046ef4ae5ffff5452..42998155eb4d7de8e49cc1ca82d84a430562a8da 100644 +--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c ++++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +@@ -402,107 +402,6 @@ static void close_delivered(USER_SERVICE_T *user_service) + } + } + +-struct vchiq_io_copy_callback_context { +- VCHIQ_ELEMENT_T *current_element; +- size_t current_element_offset; +- unsigned long elements_to_go; +- size_t current_offset; +-}; +- +-static ssize_t +-vchiq_ioc_copy_element_data( +- void *context, +- void *dest, +- size_t offset, +- size_t maxsize) +-{ +- long res; +- size_t bytes_this_round; +- struct vchiq_io_copy_callback_context *copy_context = +- (struct vchiq_io_copy_callback_context *)context; +- +- if (offset != copy_context->current_offset) +- return 0; +- +- if (!copy_context->elements_to_go) +- return 0; +- +- /* +- * Complex logic here to handle the case of 0 size elements +- * in the middle of the array of elements. +- * +- * Need to skip over these 0 size elements. +- */ +- while (1) { +- bytes_this_round = min(copy_context->current_element->size - +- copy_context->current_element_offset, +- maxsize); +- +- if (bytes_this_round) +- break; +- +- copy_context->elements_to_go--; +- copy_context->current_element++; +- copy_context->current_element_offset = 0; +- +- if (!copy_context->elements_to_go) +- return 0; +- } +- +- res = copy_from_user(dest, +- copy_context->current_element->data + +- copy_context->current_element_offset, +- bytes_this_round); +- +- if (res != 0) +- return -EFAULT; +- +- copy_context->current_element_offset += bytes_this_round; +- copy_context->current_offset += bytes_this_round; +- +- /* +- * Check if done with current element, and if so advance to the next. +- */ +- if (copy_context->current_element_offset == +- copy_context->current_element->size) { +- copy_context->elements_to_go--; +- copy_context->current_element++; +- copy_context->current_element_offset = 0; +- } +- +- return bytes_this_round; +-} +- +-/************************************************************************** +- * +- * vchiq_ioc_queue_message +- * +- **************************************************************************/ +-static VCHIQ_STATUS_T +-vchiq_ioc_queue_message(VCHIQ_SERVICE_HANDLE_T handle, +- VCHIQ_ELEMENT_T *elements, +- unsigned long count) +-{ +- struct vchiq_io_copy_callback_context context; +- unsigned long i; +- size_t total_size = 0; +- +- context.current_element = elements; +- context.current_element_offset = 0; +- context.elements_to_go = count; +- context.current_offset = 0; +- +- for (i = 0; i < count; i++) { +- if (!elements[i].data && elements[i].size != 0) +- return -EFAULT; +- +- total_size += elements[i].size; +- } +- +- return vchiq_queue_message(handle, vchiq_ioc_copy_element_data, +- &context, total_size); +-} +- + /**************************************************************************** + * + * vchiq_ioctl +@@ -752,7 +651,7 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + VCHIQ_ELEMENT_T elements[MAX_ELEMENTS]; + if (copy_from_user(elements, args.elements, + args.count * sizeof(VCHIQ_ELEMENT_T)) == 0) +- status = vchiq_ioc_queue_message ++ status = vchiq_queue_message + (args.handle, + elements, args.count); + else diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c -index 2c98da4307dff994a00dc246574ef0aaee05d5da..160db24aeea33a8296923501009c1f02bc41e599 100644 +index 028e90bc1cdcc3f305ce5b97b88dd5c6c4613a50..c5b06cc4ca53135ec9491116ca79beaa98f57bcc 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c -@@ -891,16 +891,14 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, - error_count); - return VCHIQ_ERROR; - } -- if (i == 0) { -- if (SRVTRACE_ENABLED(service, -- VCHIQ_LOG_INFO)) -- vchiq_log_dump_mem("Sent", 0, -- header->data + pos, -- min(64u, -- elements[0].size)); -- } - } +@@ -464,8 +464,8 @@ remote_event_pollall(VCHIQ_STATE_T *state) + ** enough for a header. This relies on header size being a power of two, which + ** has been verified earlier by a static assertion. */ + +-static inline size_t +-calc_stride(size_t size) ++static inline unsigned int ++calc_stride(unsigned int size) + { + /* Allow room for the header */ + size += sizeof(VCHIQ_HEADER_T); +@@ -544,7 +544,7 @@ request_poll(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, int poll_type) + /* Called from queue_message, by the slot handler and application threads, + ** with slot_mutex held */ + static VCHIQ_HEADER_T * +-reserve_space(VCHIQ_STATE_T *state, size_t space, int is_blocking) ++reserve_space(VCHIQ_STATE_T *state, int space, int is_blocking) + { + VCHIQ_SHARED_STATE_T *local = state->local; + int tx_pos = state->local_tx_pos; +@@ -726,66 +726,18 @@ process_free_queue(VCHIQ_STATE_T *state) + } + } + +-static ssize_t +-memcpy_copy_callback( +- void *context, void *dest, +- size_t offset, size_t maxsize) +-{ +- void *src = context; +- +- memcpy(dest + offset, src + offset, maxsize); +- return maxsize; +-} +- +-static ssize_t +-copy_message_data( +- ssize_t (*copy_callback)(void *context, void *dest, +- size_t offset, size_t maxsize), +- void *context, +- void *dest, +- size_t size) +-{ +- size_t pos = 0; +- +- while (pos < size) { +- ssize_t callback_result; +- size_t max_bytes = size - pos; +- +- callback_result = +- copy_callback(context, dest + pos, +- pos, max_bytes); +- +- if (callback_result < 0) +- return callback_result; +- +- if (!callback_result) +- return -EIO; +- +- if (callback_result > max_bytes) +- return -EIO; +- +- pos += callback_result; +- } +- +- return size; +-} +- + /* Called by the slot handler and application threads */ + static VCHIQ_STATUS_T + queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, +- int msgid, +- ssize_t (*copy_callback)(void *context, void *dest, +- size_t offset, size_t maxsize), +- void *context, +- size_t size, +- int flags) ++ int msgid, const VCHIQ_ELEMENT_T *elements, ++ int count, int size, int flags) + { + VCHIQ_SHARED_STATE_T *local; + VCHIQ_SERVICE_QUOTA_T *service_quota = NULL; + VCHIQ_HEADER_T *header; + int type = VCHIQ_MSG_TYPE(msgid); + +- size_t stride; ++ unsigned int stride; + + local = state->local; + +@@ -891,7 +843,7 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, + } + + if (type == VCHIQ_MSG_DATA) { +- ssize_t callback_result; ++ int i, pos; + int tx_end_index; + int slot_use_count; + +@@ -905,23 +857,27 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, + BUG_ON((flags & (QMFLAGS_NO_MUTEX_LOCK | + QMFLAGS_NO_MUTEX_UNLOCK)) != 0); + +- callback_result = +- copy_message_data(copy_callback, context, +- header->data, size); +- +- if (callback_result < 0) { +- mutex_unlock(&state->slot_mutex); +- VCHIQ_SERVICE_STATS_INC(service, ++ for (i = 0, pos = 0; i < (unsigned int)count; ++ pos += elements[i++].size) ++ if (elements[i].size) { ++ if (vchiq_copy_from_user ++ (header->data + pos, elements[i].data, ++ (size_t) elements[i].size) != ++ VCHIQ_SUCCESS) { ++ mutex_unlock(&state->slot_mutex); ++ VCHIQ_SERVICE_STATS_INC(service, + error_count); +- return VCHIQ_ERROR; +- } +- +- if (SRVTRACE_ENABLED(service, +- VCHIQ_LOG_INFO)) +- vchiq_log_dump_mem("Sent", 0, +- header->data, +- min((size_t)64, +- (size_t)callback_result)); ++ return VCHIQ_ERROR; ++ } ++ if (i == 0) { ++ if (SRVTRACE_ENABLED(service, ++ VCHIQ_LOG_INFO)) ++ vchiq_log_dump_mem("Sent", 0, ++ header->data + pos, ++ min(64u, ++ elements[0].size)); ++ } ++ } -+ if (SRVTRACE_ENABLED(service, -+ VCHIQ_LOG_INFO)) -+ vchiq_log_dump_mem("Sent", 0, -+ header->data, -+ min(16, pos)); -+ spin_lock("a_spinlock); service_quota->message_use_count++; +@@ -963,17 +919,9 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, + header, size, VCHIQ_MSG_SRCPORT(msgid), + VCHIQ_MSG_DSTPORT(msgid)); + if (size != 0) { +- /* It is assumed for now that this code path +- * only happens from calls inside this file. +- * +- * External callers are through the vchiq_queue_message +- * path which always sets the type to be VCHIQ_MSG_DATA +- * +- * At first glance this appears to be correct but +- * more review is needed. +- */ +- copy_message_data(copy_callback, context, +- header->data, size); ++ WARN_ON(!((count == 1) && (size == elements[0].size))); ++ memcpy(header->data, elements[0].data, ++ elements[0].size); + } + VCHIQ_STATS_INC(state, ctrl_tx_count); + } +@@ -1019,16 +967,11 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, + /* Called by the slot handler and application threads */ + static VCHIQ_STATUS_T + queue_message_sync(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, +- int msgid, +- ssize_t (*copy_callback)(void *context, void *dest, +- size_t offset, size_t maxsize), +- void *context, +- int size, +- int is_blocking) ++ int msgid, const VCHIQ_ELEMENT_T *elements, ++ int count, int size, int is_blocking) + { + VCHIQ_SHARED_STATE_T *local; + VCHIQ_HEADER_T *header; +- ssize_t callback_result; -@@ -1039,16 +1037,13 @@ queue_message_sync(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, - error_count); - return VCHIQ_ERROR; - } -- if (i == 0) { -- if (vchiq_sync_log_level >= -- VCHIQ_LOG_TRACE) -- vchiq_log_dump_mem("Sent Sync", -- 0, header->data + pos, -- min(64u, -- elements[0].size)); -- } - } + local = state->local; + +@@ -1051,34 +994,50 @@ queue_message_sync(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, + state->id, oldmsgid); + } + +- vchiq_log_info(vchiq_sync_log_level, +- "%d: qms %s@%pK,%x (%d->%d)", state->id, +- msg_type_str(VCHIQ_MSG_TYPE(msgid)), +- header, size, VCHIQ_MSG_SRCPORT(msgid), +- VCHIQ_MSG_DSTPORT(msgid)); +- +- callback_result = +- copy_message_data(copy_callback, context, +- header->data, size); ++ if (service) { ++ int i, pos; + +- if (callback_result < 0) { +- mutex_unlock(&state->slot_mutex); +- VCHIQ_SERVICE_STATS_INC(service, +- error_count); +- return VCHIQ_ERROR; +- } ++ vchiq_log_info(vchiq_sync_log_level, ++ "%d: qms %s@%pK,%x (%d->%d)", state->id, ++ msg_type_str(VCHIQ_MSG_TYPE(msgid)), ++ header, size, VCHIQ_MSG_SRCPORT(msgid), ++ VCHIQ_MSG_DSTPORT(msgid)); + +- if (service) { +- if (SRVTRACE_ENABLED(service, +- VCHIQ_LOG_INFO)) +- vchiq_log_dump_mem("Sent", 0, +- header->data, +- min((size_t)64, +- (size_t)callback_result)); ++ for (i = 0, pos = 0; i < (unsigned int)count; ++ pos += elements[i++].size) ++ if (elements[i].size) { ++ if (vchiq_copy_from_user ++ (header->data + pos, elements[i].data, ++ (size_t) elements[i].size) != ++ VCHIQ_SUCCESS) { ++ mutex_unlock(&state->sync_mutex); ++ VCHIQ_SERVICE_STATS_INC(service, ++ error_count); ++ return VCHIQ_ERROR; ++ } ++ if (i == 0) { ++ if (vchiq_sync_log_level >= ++ VCHIQ_LOG_TRACE) ++ vchiq_log_dump_mem("Sent Sync", ++ 0, header->data + pos, ++ min(64u, ++ elements[0].size)); ++ } ++ } -+ if (vchiq_sync_log_level >= VCHIQ_LOG_TRACE) -+ vchiq_log_dump_mem("Sent Sync", -+ 0, header->data, -+ min(16, pos)); -+ VCHIQ_SERVICE_STATS_INC(service, ctrl_tx_count); VCHIQ_SERVICE_STATS_ADD(service, ctrl_tx_bytes, size); } else { -@@ -1720,7 +1715,7 @@ parse_rx_slots(VCHIQ_STATE_T *state) - remoteport, localport, size); - if (size > 0) - vchiq_log_dump_mem("Rcvd", 0, header->data, -- min(64, size)); -+ min(16, size)); - } ++ vchiq_log_info(vchiq_sync_log_level, ++ "%d: qms %s@%pK,%x (%d->%d)", state->id, ++ msg_type_str(VCHIQ_MSG_TYPE(msgid)), ++ header, size, VCHIQ_MSG_SRCPORT(msgid), ++ VCHIQ_MSG_DSTPORT(msgid)); ++ if (size != 0) { ++ WARN_ON(!((count == 1) && (size == elements[0].size))); ++ memcpy(header->data, elements[0].data, ++ elements[0].size); ++ } + VCHIQ_STATS_INC(state, ctrl_tx_count); + } - if (((unsigned int)header & VCHIQ_SLOT_MASK) + calc_stride(size) -@@ -2187,7 +2182,7 @@ sync_func(void *v) - remoteport, localport, size); - if (size > 0) - vchiq_log_dump_mem("Rcvd", 0, header->data, -- min(64, size)); -+ min(16, size)); - } +@@ -1191,16 +1150,11 @@ notify_bulks(VCHIQ_SERVICE_T *service, VCHIQ_BULK_QUEUE_T *queue, + VCHIQ_MSG_BULK_RX_DONE : VCHIQ_MSG_BULK_TX_DONE; + int msgid = VCHIQ_MAKE_MSG(msgtype, service->localport, + service->remoteport); ++ VCHIQ_ELEMENT_T element = { &bulk->actual, 4 }; + /* Only reply to non-dummy bulk requests */ + if (bulk->remote_data) { +- status = queue_message( +- service->state, +- NULL, +- msgid, +- memcpy_copy_callback, +- &bulk->actual, +- 4, +- 0); ++ status = queue_message(service->state, NULL, ++ msgid, &element, 1, 4, 0); + if (status != VCHIQ_SUCCESS) + break; + } +@@ -1560,6 +1514,10 @@ parse_open(VCHIQ_STATE_T *state, VCHIQ_HEADER_T *header) + struct vchiq_openack_payload ack_payload = { + service->version + }; ++ VCHIQ_ELEMENT_T body = { ++ &ack_payload, ++ sizeof(ack_payload) ++ }; - switch (type) { + if (state->version_common < + VCHIQ_VERSION_SYNCHRONOUS_MODE) +@@ -1569,28 +1527,21 @@ parse_open(VCHIQ_STATE_T *state, VCHIQ_HEADER_T *header) + if (service->sync && + (state->version_common >= + VCHIQ_VERSION_SYNCHRONOUS_MODE)) { +- if (queue_message_sync( +- state, +- NULL, ++ if (queue_message_sync(state, NULL, + VCHIQ_MAKE_MSG( + VCHIQ_MSG_OPENACK, + service->localport, + remoteport), +- memcpy_copy_callback, +- &ack_payload, +- sizeof(ack_payload), ++ &body, 1, sizeof(ack_payload), + 0) == VCHIQ_RETRY) + goto bail_not_ready; + } else { +- if (queue_message(state, +- NULL, +- VCHIQ_MAKE_MSG( ++ if (queue_message(state, NULL, ++ VCHIQ_MAKE_MSG( + VCHIQ_MSG_OPENACK, + service->localport, + remoteport), +- memcpy_copy_callback, +- &ack_payload, +- sizeof(ack_payload), ++ &body, 1, sizeof(ack_payload), + 0) == VCHIQ_RETRY) + goto bail_not_ready; + } +@@ -2680,19 +2631,14 @@ vchiq_open_service_internal(VCHIQ_SERVICE_T *service, int client_id) + service->version, + service->version_min + }; ++ VCHIQ_ELEMENT_T body = { &payload, sizeof(payload) }; + VCHIQ_STATUS_T status = VCHIQ_SUCCESS; + + service->client_id = client_id; + vchiq_use_service_internal(service); +- status = queue_message(service->state, +- NULL, +- VCHIQ_MAKE_MSG(VCHIQ_MSG_OPEN, +- service->localport, +- 0), +- memcpy_copy_callback, +- &payload, +- sizeof(payload), +- QMFLAGS_IS_BLOCKING); ++ status = queue_message(service->state, NULL, ++ VCHIQ_MAKE_MSG(VCHIQ_MSG_OPEN, service->localport, 0), ++ &body, 1, sizeof(payload), QMFLAGS_IS_BLOCKING); + if (status == VCHIQ_SUCCESS) { + /* Wait for the ACK/NAK */ + if (down_interruptible(&service->remove_event) != 0) { +@@ -3360,18 +3306,15 @@ vchiq_bulk_transfer(VCHIQ_SERVICE_HANDLE_T handle, + VCHIQ_POLL_TXNOTIFY : VCHIQ_POLL_RXNOTIFY); + } else { + int payload[2] = { (int)(long)bulk->data, bulk->size }; ++ VCHIQ_ELEMENT_T element = { payload, sizeof(payload) }; + +- status = queue_message(state, +- NULL, +- VCHIQ_MAKE_MSG(dir_msgtype, +- service->localport, +- service->remoteport), +- memcpy_copy_callback, +- &payload, +- sizeof(payload), +- QMFLAGS_IS_BLOCKING | +- QMFLAGS_NO_MUTEX_LOCK | +- QMFLAGS_NO_MUTEX_UNLOCK); ++ status = queue_message(state, NULL, ++ VCHIQ_MAKE_MSG(dir_msgtype, ++ service->localport, service->remoteport), ++ &element, 1, sizeof(payload), ++ QMFLAGS_IS_BLOCKING | ++ QMFLAGS_NO_MUTEX_LOCK | ++ QMFLAGS_NO_MUTEX_UNLOCK); + if (status != VCHIQ_SUCCESS) { + goto unlock_both_error_exit; + } +@@ -3417,22 +3360,26 @@ vchiq_bulk_transfer(VCHIQ_SERVICE_HANDLE_T handle, + + VCHIQ_STATUS_T + vchiq_queue_message(VCHIQ_SERVICE_HANDLE_T handle, +- ssize_t (*copy_callback)(void *context, void *dest, +- size_t offset, size_t maxsize), +- void *context, +- size_t size) ++ const VCHIQ_ELEMENT_T *elements, unsigned int count) + { + VCHIQ_SERVICE_T *service = find_service_by_handle(handle); + VCHIQ_STATUS_T status = VCHIQ_ERROR; + ++ unsigned int size = 0; ++ unsigned int i; ++ + if (!service || + (vchiq_check_service(service) != VCHIQ_SUCCESS)) + goto error_exit; + +- if (!size) { +- VCHIQ_SERVICE_STATS_INC(service, error_count); +- goto error_exit; +- ++ for (i = 0; i < (unsigned int)count; i++) { ++ if (elements[i].size) { ++ if (elements[i].data == NULL) { ++ VCHIQ_SERVICE_STATS_INC(service, error_count); ++ goto error_exit; ++ } ++ size += elements[i].size; ++ } + } + + if (size > VCHIQ_MAX_MSG_SIZE) { +@@ -3446,14 +3393,14 @@ vchiq_queue_message(VCHIQ_SERVICE_HANDLE_T handle, + VCHIQ_MAKE_MSG(VCHIQ_MSG_DATA, + service->localport, + service->remoteport), +- copy_callback, context, size, 1); ++ elements, count, size, 1); + break; + case VCHIQ_SRVSTATE_OPENSYNC: + status = queue_message_sync(service->state, service, + VCHIQ_MAKE_MSG(VCHIQ_MSG_DATA, + service->localport, + service->remoteport), +- copy_callback, context, size, 1); ++ elements, count, size, 1); + break; + default: + status = VCHIQ_ERROR; +diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +index 9e164652548a42bac2646166e16961b88bc80594..1c2b1b5b8cc998f6f0490dc6460d8408e85f624b 100644 +--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h ++++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +@@ -634,6 +634,9 @@ vchiq_transfer_bulk(VCHIQ_BULK_T *bulk); + extern void + vchiq_complete_bulk(VCHIQ_BULK_T *bulk); + ++extern VCHIQ_STATUS_T ++vchiq_copy_from_user(void *dst, const void *src, int size); ++ + extern void + remote_event_signal(REMOTE_EVENT_T *event); + +diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h +index 377e8e48bb540465b34f2d4697504cb188d83e3b..8067bbe7ce8d70c41b2e6e0466d20a4612e39d93 100644 +--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h ++++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h +@@ -141,12 +141,9 @@ extern VCHIQ_STATUS_T vchiq_use_service(VCHIQ_SERVICE_HANDLE_T service); + extern VCHIQ_STATUS_T vchiq_use_service_no_resume( + VCHIQ_SERVICE_HANDLE_T service); + extern VCHIQ_STATUS_T vchiq_release_service(VCHIQ_SERVICE_HANDLE_T service); +-extern VCHIQ_STATUS_T +-vchiq_queue_message(VCHIQ_SERVICE_HANDLE_T handle, +- ssize_t (*copy_callback)(void *context, void *dest, +- size_t offset, size_t maxsize), +- void *context, +- size_t size); ++ ++extern VCHIQ_STATUS_T vchiq_queue_message(VCHIQ_SERVICE_HANDLE_T service, ++ const VCHIQ_ELEMENT_T *elements, unsigned int count); + extern void vchiq_release_message(VCHIQ_SERVICE_HANDLE_T service, + VCHIQ_HEADER_T *header); + extern VCHIQ_STATUS_T vchiq_queue_bulk_transmit(VCHIQ_SERVICE_HANDLE_T service, +diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +index d9771394a041bbb55daacd7744ac57758ae198d1..7694627b925c743552b093ce51d15c2f2fe71a69 100644 +--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c ++++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +@@ -148,10 +148,10 @@ EXPORT_SYMBOL(vchi_msg_remove); + * Name: vchi_msg_queue + * + * Arguments: VCHI_SERVICE_HANDLE_T handle, +- * ssize_t (*copy_callback)(void *context, void *dest, +- * size_t offset, size_t maxsize), +- * void *context, +- * uint32_t data_size ++ * const void *data, ++ * uint32_t data_size, ++ * VCHI_FLAGS_T flags, ++ * void *msg_handle, + * + * Description: Thin wrapper to queue a message onto a connection + * +@@ -159,19 +159,21 @@ EXPORT_SYMBOL(vchi_msg_remove); + * + ***********************************************************/ + int32_t vchi_msg_queue(VCHI_SERVICE_HANDLE_T handle, +- ssize_t (*copy_callback)(void *context, void *dest, +- size_t offset, size_t maxsize), +- void *context, +- uint32_t data_size) ++ const void *data, ++ uint32_t data_size, ++ VCHI_FLAGS_T flags, ++ void *msg_handle) + { + SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle; ++ VCHIQ_ELEMENT_T element = {data, data_size}; + VCHIQ_STATUS_T status; + ++ (void)msg_handle; ++ ++ WARN_ON(flags != VCHI_FLAGS_BLOCK_UNTIL_QUEUED); ++ + while (1) { +- status = vchiq_queue_message(service->handle, +- copy_callback, +- context, +- data_size); ++ status = vchiq_queue_message(service->handle, &element, 1); + + /* + * vchiq_queue_message() may return VCHIQ_RETRY, so we need to +@@ -354,6 +356,44 @@ int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle, + EXPORT_SYMBOL(vchi_msg_dequeue); + + /*********************************************************** ++ * Name: vchi_msg_queuev ++ * ++ * Arguments: VCHI_SERVICE_HANDLE_T handle, ++ * VCHI_MSG_VECTOR_T *vector, ++ * uint32_t count, ++ * VCHI_FLAGS_T flags, ++ * void *msg_handle ++ * ++ * Description: Thin wrapper to queue a message onto a connection ++ * ++ * Returns: int32_t - success == 0 ++ * ++ ***********************************************************/ ++ ++vchiq_static_assert(sizeof(VCHI_MSG_VECTOR_T) == sizeof(VCHIQ_ELEMENT_T)); ++vchiq_static_assert(offsetof(VCHI_MSG_VECTOR_T, vec_base) == ++ offsetof(VCHIQ_ELEMENT_T, data)); ++vchiq_static_assert(offsetof(VCHI_MSG_VECTOR_T, vec_len) == ++ offsetof(VCHIQ_ELEMENT_T, size)); ++ ++int32_t vchi_msg_queuev(VCHI_SERVICE_HANDLE_T handle, ++ VCHI_MSG_VECTOR_T *vector, ++ uint32_t count, ++ VCHI_FLAGS_T flags, ++ void *msg_handle) ++{ ++ SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle; ++ ++ (void)msg_handle; ++ ++ WARN_ON(flags != VCHI_FLAGS_BLOCK_UNTIL_QUEUED); ++ ++ return vchiq_status_to_vchi(vchiq_queue_message(service->handle, ++ (const VCHIQ_ELEMENT_T *)vector, count)); ++} ++EXPORT_SYMBOL(vchi_msg_queuev); ++ ++/*********************************************************** + * Name: vchi_held_msg_release + * + * Arguments: VCHI_HELD_MSG_T *message -From 4b7dca18f033bfd528ad5b56f6644eb9f096ea16 Mon Sep 17 00:00:00 2001 +From 37b3ac436056e51053ef5d0348ef93dc71e3be98 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 23 Mar 2016 14:16:25 +0000 -Subject: [PATCH 094/149] vchiq_arm: Access the dequeue_pending flag locked +Subject: [PATCH 091/143] vchiq_arm: Access the dequeue_pending flag locked Reading through this code looking for another problem (now found in userland) the use of dequeue_pending outside a lock didn't seem safe. @@ -122998,7 +122900,7 @@ Signed-off-by: Phil Elwell 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -index 7b6cd4d80621e38ff6d47fcd87b45fbe9cd4259b..d8669fa7f39b077877eca1829ba9538bf2e21a82 100644 +index 42998155eb4d7de8e49cc1ca82d84a430562a8da..74f1569097c7dd120cc68fb8d09d8c3d63d56977 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -279,6 +279,7 @@ service_callback(VCHIQ_REASON_T reason, VCHIQ_HEADER_T *header, @@ -123045,10 +122947,10 @@ index 7b6cd4d80621e38ff6d47fcd87b45fbe9cd4259b..d8669fa7f39b077877eca1829ba9538b return add_completion(instance, reason, header, user_service, -From f3ecbd88451f827d805429e022a3a3335b937092 Mon Sep 17 00:00:00 2001 +From 23dc62ffb692ae7e3a5be4bba257e51a87ac56c4 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 23 Mar 2016 20:53:47 +0000 -Subject: [PATCH 095/149] vchiq_arm: Service callbacks must not fail +Subject: [PATCH 092/143] vchiq_arm: Service callbacks must not fail Service callbacks are not allowed to return an error. The internal callback that delivers events and messages to user tasks does not enqueue them if @@ -123061,7 +122963,7 @@ Signed-off-by: Phil Elwell 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -index d8669fa7f39b077877eca1829ba9538bf2e21a82..54552c6ce54f413c9781ba279b936f98be4f47b0 100644 +index 74f1569097c7dd120cc68fb8d09d8c3d63d56977..3ba6485f0c7b32de9f2aa75164e8b1b901aa74ea 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -224,7 +224,7 @@ add_completion(VCHIQ_INSTANCE_T instance, VCHIQ_REASON_T reason, @@ -123074,10 +122976,10 @@ index d8669fa7f39b077877eca1829ba9538bf2e21a82..54552c6ce54f413c9781ba279b936f98 DEBUG_TRACE(SERVICE_CALLBACK_LINE); } -From e912e19aaf80dd0cb7cfe08665c9615da06b8c83 Mon Sep 17 00:00:00 2001 +From ce301053ff5dc3f25a290a8378927b355793c888 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 21 Apr 2016 13:49:32 +0100 -Subject: [PATCH 096/149] vchiq_arm: Add completion records under the mutex +Subject: [PATCH 093/143] vchiq_arm: Add completion records under the mutex An issue was observed when flushing openmax components which generate a large number of messages returning @@ -123096,7 +122998,7 @@ Signed-off-by: Phil Elwell 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -index 54552c6ce54f413c9781ba279b936f98be4f47b0..bde8955b7d8505d73579b77b5b3921549cb9d2fb 100644 +index 3ba6485f0c7b32de9f2aa75164e8b1b901aa74ea..07d8eadd2aa2dc997db13c80dc303673792b96c9 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -210,6 +210,8 @@ add_completion(VCHIQ_INSTANCE_T instance, VCHIQ_REASON_T reason, @@ -123140,10 +123042,10 @@ index 54552c6ce54f413c9781ba279b936f98be4f47b0..bde8955b7d8505d73579b77b5b392154 return VCHIQ_SUCCESS; -From 6740c95795e57bc48776ce72c7cfbd0ed5d63adb Mon Sep 17 00:00:00 2001 +From c1fe6df4ea43f0b9545a6050b72b7d1fe5e84a99 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 20 Jun 2016 13:51:44 +0100 -Subject: [PATCH 097/149] vchiq_arm: Avoid use of mutex in add_completion +Subject: [PATCH 094/143] vchiq_arm: Avoid use of mutex in add_completion Claiming the completion_mutex within add_completion did prevent some messages appearing twice, but provokes a deadlock caused by vcsm using @@ -123159,7 +123061,7 @@ Signed-off-by: Phil Elwell 2 files changed, 37 insertions(+), 32 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -index bde8955b7d8505d73579b77b5b3921549cb9d2fb..e5cdda12c7e5c35c69eb96991cfdb8326def167f 100644 +index 07d8eadd2aa2dc997db13c80dc303673792b96c9..a593c9df8128292525f6f1b89a351e1ded02977f 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -64,10 +64,10 @@ @@ -123280,7 +123182,7 @@ index bde8955b7d8505d73579b77b5b3921549cb9d2fb..e5cdda12c7e5c35c69eb96991cfdb832 service = completion->service_userdata; user_service = service->base.userdata; -@@ -903,7 +900,11 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) +@@ -901,7 +898,11 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) break; } @@ -123294,10 +123196,10 @@ index bde8955b7d8505d73579b77b5b3921549cb9d2fb..e5cdda12c7e5c35c69eb96991cfdb832 if (msgbufcount != args.msgbufcount) { diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c -index 160db24aeea33a8296923501009c1f02bc41e599..71a3bedc55314f3b22dbff40c05dedf03b5e7169 100644 +index c5b06cc4ca53135ec9491116ca79beaa98f57bcc..d6757ee263fb61a689c0d38c0dbb65c57a8e39bb 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c -@@ -610,15 +610,15 @@ process_free_queue(VCHIQ_STATE_T *state) +@@ -607,15 +607,15 @@ process_free_queue(VCHIQ_STATE_T *state) BITSET_T service_found[BITSET_SIZE(VCHIQ_MAX_SERVICES)]; int slot_queue_available; @@ -123318,16 +123220,16 @@ index 160db24aeea33a8296923501009c1f02bc41e599..71a3bedc55314f3b22dbff40c05dedf0 while (slot_queue_available != local->slot_queue_recycle) { unsigned int pos; int slot_index = local->slot_queue[slot_queue_available++ & -@@ -626,6 +626,8 @@ process_free_queue(VCHIQ_STATE_T *state) +@@ -623,6 +623,8 @@ process_free_queue(VCHIQ_STATE_T *state) char *data = (char *)SLOT_DATA_FROM_INDEX(state, slot_index); int data_found = 0; + rmb(); + - vchiq_log_trace(vchiq_core_log_level, "%d: pfq %d=%x %x %x", - state->id, slot_index, (unsigned int)data, + vchiq_log_trace(vchiq_core_log_level, "%d: pfq %d=%pK %x %x", + state->id, slot_index, data, local->slot_queue_recycle, slot_queue_available); -@@ -741,6 +743,8 @@ process_free_queue(VCHIQ_STATE_T *state) +@@ -721,6 +723,8 @@ process_free_queue(VCHIQ_STATE_T *state) up(&state->data_quota_event); } @@ -123337,170 +123239,10 @@ index 160db24aeea33a8296923501009c1f02bc41e599..71a3bedc55314f3b22dbff40c05dedf0 up(&state->slot_available_event); } -From 0b341ea57b440cbb2c775febb033d373239ffc44 Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Mon, 3 Oct 2016 10:14:10 -0700 -Subject: [PATCH 098/149] staging/vchi: Convert to current get_user_pages() - arguments. - -Signed-off-by: Eric Anholt ---- - drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 +- - drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 +-- - 2 files changed, 2 insertions(+), 3 deletions(-) - -diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -index 1091b9f1dd070e3d27c269402b43b0a09d96bcdc..8c7f31f8d39537e7e1c8135271c5f8eea76ed7a0 100644 ---- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -@@ -420,7 +420,7 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, - *need_release = 0; /* do not try and release vmalloc pages */ - } else { - down_read(&task->mm->mmap_sem); -- actual_pages = get_user_pages(task, task->mm, -+ actual_pages = get_user_pages( - (unsigned long)buf & ~(PAGE_SIZE - 1), - num_pages, - (type == PAGELIST_READ) ? FOLL_WRITE : 0, -diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -index e5cdda12c7e5c35c69eb96991cfdb8326def167f..085d37588c59198b4e5f00b9249bb8421695854f 100644 ---- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -@@ -1492,8 +1492,7 @@ dump_phys_mem(void *virt_addr, uint32_t num_bytes) - } - - down_read(¤t->mm->mmap_sem); -- rc = get_user_pages(current, /* task */ -- current->mm, /* mm */ -+ rc = get_user_pages( - (unsigned long)virt_addr, /* start */ - num_pages, /* len */ - 0, /* gup_flags */ - -From 7c3d6c332808b465aa7f14c1939cca686d4807f5 Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Mon, 3 Oct 2016 10:16:03 -0700 -Subject: [PATCH 099/149] staging/vchi: Update for rename of - page_cache_release() to put_page(). - -Signed-off-by: Eric Anholt ---- - drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 4 ++-- - drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -index 8c7f31f8d39537e7e1c8135271c5f8eea76ed7a0..862fabf5682c7dededc8d7ca6773d5b227b72f3c 100644 ---- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -@@ -438,7 +438,7 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, - while (actual_pages > 0) - { - actual_pages--; -- page_cache_release(pages[actual_pages]); -+ put_page(pages[actual_pages]); - } - kfree(pagelist); - if (actual_pages == 0) -@@ -577,7 +577,7 @@ free_pagelist(PAGELIST_T *pagelist, int actual) - offset = 0; - set_page_dirty(pg); - } -- page_cache_release(pg); -+ put_page(pg); - } - } - -diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -index 085d37588c59198b4e5f00b9249bb8421695854f..5a2b8fb459ebe086ec229f37b6381bdbe6f808ca 100644 ---- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c -@@ -1530,7 +1530,7 @@ dump_phys_mem(void *virt_addr, uint32_t num_bytes) - kunmap(page); - - for (page_idx = 0; page_idx < num_pages; page_idx++) -- page_cache_release(pages[page_idx]); -+ put_page(pages[page_idx]); - - kfree(pages); - } - -From 5705d6db4c0b4a3d1bf93ccaa2367d9879076558 Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Mon, 3 Oct 2016 10:21:17 -0700 -Subject: [PATCH 100/149] drivers/vchi: Remove dependency on CONFIG_BROKEN. - -The driver builds now. - -Signed-off-by: Eric Anholt ---- - drivers/staging/vc04_services/Kconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/staging/vc04_services/Kconfig b/drivers/staging/vc04_services/Kconfig -index 9676fb29075a457109e4d4235f086987aec74868..db8e1beb89f9f8c48ea5964016c8285ea82497d8 100644 ---- a/drivers/staging/vc04_services/Kconfig -+++ b/drivers/staging/vc04_services/Kconfig -@@ -1,6 +1,6 @@ - config BCM2708_VCHIQ - tristate "Videocore VCHIQ" -- depends on RASPBERRYPI_FIRMWARE && BROKEN -+ depends on RASPBERRYPI_FIRMWARE - default y - help - Kernel to VideoCore communication interface for the - -From 37f4b167c320fffb3c04e706978a398d7ccd1c90 Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Wed, 14 Sep 2016 09:16:19 +0100 -Subject: [PATCH 101/149] raspberrypi-firmware: Export the general transaction - function. - -The vc4-firmware-kms module is going to be doing the MBOX FB call. - -Signed-off-by: Eric Anholt ---- - drivers/firmware/raspberrypi.c | 3 ++- - include/soc/bcm2835/raspberrypi-firmware.h | 1 + - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c -index 3f070bd38a91511c986e3fb114b15bd4ac32634c..f261b64d1657c02290904d841e1f087c34e27ded 100644 ---- a/drivers/firmware/raspberrypi.c -+++ b/drivers/firmware/raspberrypi.c -@@ -42,7 +42,7 @@ static void response_callback(struct mbox_client *cl, void *msg) - * Sends a request to the firmware through the BCM2835 mailbox driver, - * and synchronously waits for the reply. - */ --static int -+int - rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data) - { - u32 message = MBOX_MSG(chan, data); -@@ -63,6 +63,7 @@ rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data) - - return ret; - } -+EXPORT_SYMBOL_GPL(rpi_firmware_transaction); - - /** - * rpi_firmware_property_list - Submit firmware property list -diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index e92278968b2b979db2a1f855f70e7aafb224fa98..09e3d871d110eb0762ebdb5ea329353738d58661 100644 ---- a/include/soc/bcm2835/raspberrypi-firmware.h -+++ b/include/soc/bcm2835/raspberrypi-firmware.h -@@ -131,5 +131,6 @@ int rpi_firmware_property(struct rpi_firmware *fw, - int rpi_firmware_property_list(struct rpi_firmware *fw, - void *data, size_t tag_size); - struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node); -+int rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data); - - #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ - -From 2443457bd6b2f30686d747b9179f7d9bc360bc53 Mon Sep 17 00:00:00 2001 +From 8c1a98f073a1510731dd6fec6e94ddeee3ed44fa Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:18:09 +0100 -Subject: [PATCH 102/149] raspberrypi-firmware: Define the MBOX channel in the +Subject: [PATCH 095/143] raspberrypi-firmware: Define the MBOX channel in the header. Signed-off-by: Eric Anholt @@ -123509,7 +123251,7 @@ Signed-off-by: Eric Anholt 1 file changed, 2 insertions(+) diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index 09e3d871d110eb0762ebdb5ea329353738d58661..2859db09e25bb945251e85edb39bc43430857168 100644 +index 5f34e1257117fb48013c9926a8a223d64a598ab7..7f0da0727422c690947e46e891a754de13dc1fea 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -12,6 +12,8 @@ @@ -123522,10 +123264,10 @@ index 09e3d871d110eb0762ebdb5ea329353738d58661..2859db09e25bb945251e85edb39bc434 enum rpi_firmware_property_status { -From f8e5187126bf6e49f89d53373a5b40726a16b46b Mon Sep 17 00:00:00 2001 +From 7d3bc19bbd84fefcdd27577dd37fc46fd8e94495 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 08:39:33 +0100 -Subject: [PATCH 103/149] drm/vc4: Add a mode for using the closed firmware for +Subject: [PATCH 096/143] drm/vc4: Add a mode for using the closed firmware for display. Signed-off-by: Eric Anholt @@ -123539,7 +123281,7 @@ Signed-off-by: Eric Anholt create mode 100644 drivers/gpu/drm/vc4/vc4_firmware_kms.c diff --git a/drivers/gpu/drm/vc4/Makefile b/drivers/gpu/drm/vc4/Makefile -index fb77db755e0a29d8589860da82186c7a1f394c72..c6dd06cca9830018c39b3b16afe4045e44d1ddf4 100644 +index 7757f69a8a77b355677314dbb1380c4803b5e104..3358ec8775cf6e8738ea8cdb2246dad57bd29139 100644 --- a/drivers/gpu/drm/vc4/Makefile +++ b/drivers/gpu/drm/vc4/Makefile @@ -8,6 +8,7 @@ vc4-y := \ @@ -123551,10 +123293,10 @@ index fb77db755e0a29d8589860da82186c7a1f394c72..c6dd06cca9830018c39b3b16afe4045e vc4_gem.o \ vc4_hdmi.o \ diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c -index d544ff9b0d4609aae945960bf82e8aeee6bc94a8..13212788eef0e4b77c1e92e6bf3a56c817c50322 100644 +index 7aadce1f7e7a0e56b302bded53ad8c0d5977cc22..bdf32c572fc2c46932daca934dfb002d05493883 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c -@@ -163,6 +163,9 @@ int vc4_crtc_get_scanoutpos(struct drm_device *dev, unsigned int crtc_id, +@@ -162,6 +162,9 @@ int vc4_crtc_get_scanoutpos(struct drm_device *dev, unsigned int crtc_id, int vblank_lines; int ret = 0; @@ -123564,7 +123306,7 @@ index d544ff9b0d4609aae945960bf82e8aeee6bc94a8..13212788eef0e4b77c1e92e6bf3a56c8 /* preempt_disable_rt() should go right here in PREEMPT_RT patchset. */ /* Get optional system timestamp before query. */ -@@ -656,6 +659,11 @@ int vc4_enable_vblank(struct drm_device *dev, unsigned int crtc_id) +@@ -655,6 +658,11 @@ int vc4_enable_vblank(struct drm_device *dev, unsigned int crtc_id) struct vc4_dev *vc4 = to_vc4_dev(dev); struct vc4_crtc *vc4_crtc = vc4->crtc[crtc_id]; @@ -123576,7 +123318,7 @@ index d544ff9b0d4609aae945960bf82e8aeee6bc94a8..13212788eef0e4b77c1e92e6bf3a56c8 CRTC_WRITE(PV_INTEN, PV_INT_VFP_START); return 0; -@@ -666,6 +674,11 @@ void vc4_disable_vblank(struct drm_device *dev, unsigned int crtc_id) +@@ -665,6 +673,11 @@ void vc4_disable_vblank(struct drm_device *dev, unsigned int crtc_id) struct vc4_dev *vc4 = to_vc4_dev(dev); struct vc4_crtc *vc4_crtc = vc4->crtc[crtc_id]; @@ -123589,10 +123331,10 @@ index d544ff9b0d4609aae945960bf82e8aeee6bc94a8..13212788eef0e4b77c1e92e6bf3a56c8 } diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c -index 8703f56b794774ac4130a7b487472e293ebe7cdf..6c4a4fbc86d0a30a6977b2081bca4372e693b817 100644 +index ac09ca7ff4308874c3772f2aad9c9c11190f3706..44cd22340d82dbd5d094806e777121951f25010a 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c -@@ -292,6 +292,7 @@ static struct platform_driver *const component_drivers[] = { +@@ -298,6 +298,7 @@ static struct platform_driver *const component_drivers[] = { &vc4_dpi_driver, &vc4_hvs_driver, &vc4_crtc_driver, @@ -123601,7 +123343,7 @@ index 8703f56b794774ac4130a7b487472e293ebe7cdf..6c4a4fbc86d0a30a6977b2081bca4372 }; diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index 7c1e4d97486fb57d9ce7002c30a23138519761ae..e1f6ab747f36dd412e00a1e7ea772f13c2fc32d5 100644 +index b5c4bb14d0d1b87a6bbb5b25fd93d156705e851d..61a9b3e81823a3c96f36f710329844cc032e2628 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -12,6 +12,9 @@ @@ -123614,7 +123356,7 @@ index 7c1e4d97486fb57d9ce7002c30a23138519761ae..e1f6ab747f36dd412e00a1e7ea772f13 struct vc4_hdmi *hdmi; struct vc4_hvs *hvs; struct vc4_crtc *crtc[3]; -@@ -460,6 +463,10 @@ void __iomem *vc4_ioremap_regs(struct platform_device *dev, int index); +@@ -465,6 +468,10 @@ void __iomem *vc4_ioremap_regs(struct platform_device *dev, int index); extern struct platform_driver vc4_dpi_driver; int vc4_dpi_debugfs_regs(struct seq_file *m, void *unused); @@ -124292,657 +124034,10 @@ index 0000000000000000000000000000000000000000..d18a1dae51a2275846c9826b5bf1ba57 + }, +}; -From 19d1bc897390eb34314a561e84cd12255a5e75bf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= -Date: Sat, 17 Sep 2016 15:07:10 +0200 -Subject: [PATCH 104/149] i2c: bcm2835: Fix hang for writing messages larger - than 16 bytes -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Writing messages larger than the FIFO size results in a hang, rendering -the machine unusable. This is because the RXD status flag is set on the -first interrupt which results in bcm2835_drain_rxfifo() stealing bytes -from the buffer. The controller continues to trigger interrupts waiting -for the missing bytes, but bcm2835_fill_txfifo() has none to give. -In this situation wait_for_completion_timeout() apparently is unable to -stop the madness. - -The BCM2835 ARM Peripherals datasheet has this to say about the flags: - TXD: is set when the FIFO has space for at least one byte of data. - RXD: is set when the FIFO contains at least one byte of data. - TXW: is set during a write transfer and the FIFO is less than full. - RXR: is set during a read transfer and the FIFO is or more full. - -Implementing the logic from the downstream i2c-bcm2708 driver solved -the hang problem. - -Signed-off-by: Noralf Trønnes -Reviewed-by: Eric Anholt -Reviewed-by: Martin Sperl ---- - drivers/i2c/busses/i2c-bcm2835.c | 22 ++++++++++++++-------- - 1 file changed, 14 insertions(+), 8 deletions(-) - -diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c -index d4f3239b56865919e1b781b20a7c5ebcd76b4eb9..f283b714aa79e2e4685ed95b04b6b289f7e9eee7 100644 ---- a/drivers/i2c/busses/i2c-bcm2835.c -+++ b/drivers/i2c/busses/i2c-bcm2835.c -@@ -64,6 +64,7 @@ struct bcm2835_i2c_dev { - int irq; - struct i2c_adapter adapter; - struct completion completion; -+ struct i2c_msg *curr_msg; - u32 msg_err; - u8 *msg_buf; - size_t msg_buf_remaining; -@@ -126,14 +127,13 @@ static irqreturn_t bcm2835_i2c_isr(int this_irq, void *data) - return IRQ_HANDLED; - } - -- if (val & BCM2835_I2C_S_RXD) { -- bcm2835_drain_rxfifo(i2c_dev); -- if (!(val & BCM2835_I2C_S_DONE)) -- return IRQ_HANDLED; -- } -- - if (val & BCM2835_I2C_S_DONE) { -- if (i2c_dev->msg_buf_remaining) -+ if (i2c_dev->curr_msg->flags & I2C_M_RD) { -+ bcm2835_drain_rxfifo(i2c_dev); -+ val = bcm2835_i2c_readl(i2c_dev, BCM2835_I2C_S); -+ } -+ -+ if ((val & BCM2835_I2C_S_RXD) || i2c_dev->msg_buf_remaining) - i2c_dev->msg_err = BCM2835_I2C_S_LEN; - else - i2c_dev->msg_err = 0; -@@ -141,11 +141,16 @@ static irqreturn_t bcm2835_i2c_isr(int this_irq, void *data) - return IRQ_HANDLED; - } - -- if (val & BCM2835_I2C_S_TXD) { -+ if (val & BCM2835_I2C_S_TXW) { - bcm2835_fill_txfifo(i2c_dev); - return IRQ_HANDLED; - } - -+ if (val & BCM2835_I2C_S_RXR) { -+ bcm2835_drain_rxfifo(i2c_dev); -+ return IRQ_HANDLED; -+ } -+ - return IRQ_NONE; - } - -@@ -155,6 +160,7 @@ static int bcm2835_i2c_xfer_msg(struct bcm2835_i2c_dev *i2c_dev, - u32 c; - unsigned long time_left; - -+ i2c_dev->curr_msg = msg; - i2c_dev->msg_buf = msg->buf; - i2c_dev->msg_buf_remaining = msg->len; - reinit_completion(&i2c_dev->completion); - -From 5095937527a0fc7f55aefcc02963fdc012cdcb59 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= -Date: Fri, 23 Sep 2016 18:24:38 +0200 -Subject: [PATCH 105/149] i2c: bcm2835: Protect against unexpected TXW/RXR - interrupts -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -If an unexpected TXW or RXR interrupt occurs (msg_buf_remaining == 0), -the driver has no way to fill/drain the FIFO to stop the interrupts. -In this case the controller has to be disabled and the transfer -completed to avoid hang. - -(CLKT | ERR) and DONE interrupts are completed in their own paths, and -the controller is disabled in the transfer function after completion. -Unite the code paths and do disabling inside the interrupt routine. - -Clear interrupt status bits in the united completion path instead of -trying to do it on every interrupt which isn't necessary. -Only CLKT, ERR and DONE can be cleared that way. - -Add the status value to the error value in case of TXW/RXR errors to -distinguish them from the other S_LEN error. - -Signed-off-by: Noralf Trønnes -Reviewed-by: Eric Anholt ---- - drivers/i2c/busses/i2c-bcm2835.c | 40 +++++++++++++++++++++++++++++++--------- - 1 file changed, 31 insertions(+), 9 deletions(-) - -diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c -index f283b714aa79e2e4685ed95b04b6b289f7e9eee7..d2ba1a4de36af512e8e3c97251bd3537ae61591a 100644 ---- a/drivers/i2c/busses/i2c-bcm2835.c -+++ b/drivers/i2c/busses/i2c-bcm2835.c -@@ -50,8 +50,6 @@ - #define BCM2835_I2C_S_CLKT BIT(9) - #define BCM2835_I2C_S_LEN BIT(10) /* Fake bit for SW error reporting */ - --#define BCM2835_I2C_BITMSK_S 0x03FF -- - #define BCM2835_I2C_CDIV_MIN 0x0002 - #define BCM2835_I2C_CDIV_MAX 0xFFFE - -@@ -111,20 +109,26 @@ static void bcm2835_drain_rxfifo(struct bcm2835_i2c_dev *i2c_dev) - } - } - -+/* -+ * Note about I2C_C_CLEAR on error: -+ * The I2C_C_CLEAR on errors will take some time to resolve -- if you were in -+ * non-idle state and I2C_C_READ, it sets an abort_rx flag and runs through -+ * the state machine to send a NACK and a STOP. Since we're setting CLEAR -+ * without I2CEN, that NACK will be hanging around queued up for next time -+ * we start the engine. -+ */ -+ - static irqreturn_t bcm2835_i2c_isr(int this_irq, void *data) - { - struct bcm2835_i2c_dev *i2c_dev = data; - u32 val, err; - - val = bcm2835_i2c_readl(i2c_dev, BCM2835_I2C_S); -- val &= BCM2835_I2C_BITMSK_S; -- bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_S, val); - - err = val & (BCM2835_I2C_S_CLKT | BCM2835_I2C_S_ERR); - if (err) { - i2c_dev->msg_err = err; -- complete(&i2c_dev->completion); -- return IRQ_HANDLED; -+ goto complete; - } - - if (val & BCM2835_I2C_S_DONE) { -@@ -137,21 +141,38 @@ static irqreturn_t bcm2835_i2c_isr(int this_irq, void *data) - i2c_dev->msg_err = BCM2835_I2C_S_LEN; - else - i2c_dev->msg_err = 0; -- complete(&i2c_dev->completion); -- return IRQ_HANDLED; -+ goto complete; - } - - if (val & BCM2835_I2C_S_TXW) { -+ if (!i2c_dev->msg_buf_remaining) { -+ i2c_dev->msg_err = val | BCM2835_I2C_S_LEN; -+ goto complete; -+ } -+ - bcm2835_fill_txfifo(i2c_dev); - return IRQ_HANDLED; - } - - if (val & BCM2835_I2C_S_RXR) { -+ if (!i2c_dev->msg_buf_remaining) { -+ i2c_dev->msg_err = val | BCM2835_I2C_S_LEN; -+ goto complete; -+ } -+ - bcm2835_drain_rxfifo(i2c_dev); - return IRQ_HANDLED; - } - - return IRQ_NONE; -+ -+complete: -+ bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, BCM2835_I2C_C_CLEAR); -+ bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_S, BCM2835_I2C_S_CLKT | -+ BCM2835_I2C_S_ERR | BCM2835_I2C_S_DONE); -+ complete(&i2c_dev->completion); -+ -+ return IRQ_HANDLED; - } - - static int bcm2835_i2c_xfer_msg(struct bcm2835_i2c_dev *i2c_dev, -@@ -181,8 +202,9 @@ static int bcm2835_i2c_xfer_msg(struct bcm2835_i2c_dev *i2c_dev, - - time_left = wait_for_completion_timeout(&i2c_dev->completion, - BCM2835_I2C_TIMEOUT); -- bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, BCM2835_I2C_C_CLEAR); - if (!time_left) { -+ bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, -+ BCM2835_I2C_C_CLEAR); - dev_err(i2c_dev->dev, "i2c transfer timed out\n"); - return -ETIMEDOUT; - } - -From 27ae7da16d901d83f96c0d282bf7af0f2b6e754a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= -Date: Mon, 19 Sep 2016 17:19:41 +0200 -Subject: [PATCH 106/149] i2c: bcm2835: Use dev_dbg logging on transfer errors -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Writing to an AT24C32 generates on average 2x i2c transfer errors per -32-byte page write. Which amounts to a lot for a 4k write. This is due -to the fact that the chip doesn't respond during it's internal write -cycle when the at24 driver tries and retries the next write. -Only a handful drivers use dev_err() on transfer error, so switch to -dev_dbg() instead. - -Signed-off-by: Noralf Trønnes -Reviewed-by: Eric Anholt ---- - drivers/i2c/busses/i2c-bcm2835.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c -index d2ba1a4de36af512e8e3c97251bd3537ae61591a..54d510abd46a117c9238fc6d7edec84019d1f60d 100644 ---- a/drivers/i2c/busses/i2c-bcm2835.c -+++ b/drivers/i2c/busses/i2c-bcm2835.c -@@ -216,7 +216,7 @@ static int bcm2835_i2c_xfer_msg(struct bcm2835_i2c_dev *i2c_dev, - (msg->flags & I2C_M_IGNORE_NAK)) - return 0; - -- dev_err(i2c_dev->dev, "i2c transfer failed: %x\n", i2c_dev->msg_err); -+ dev_dbg(i2c_dev->dev, "i2c transfer failed: %x\n", i2c_dev->msg_err); - - if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) - return -EREMOTEIO; - -From e3fb424b7f1194a69914d217f40577923c093189 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= -Date: Thu, 22 Sep 2016 22:05:50 +0200 -Subject: [PATCH 107/149] i2c: bcm2835: Can't support I2C_M_IGNORE_NAK -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The controller can't support this flag, so remove it. - -Documentation/i2c/i2c-protocol states that all of the message is sent: - -I2C_M_IGNORE_NAK: - Normally message is interrupted immediately if there is [NA] from the - client. Setting this flag treats any [NA] as [A], and all of - message is sent. - -From the BCM2835 ARM Peripherals datasheet: - - The ERR field is set when the slave fails to acknowledge either - its address or a data byte written to it. - -So when the controller doesn't receive an ack, it sets ERR and raises -an interrupt. In other words, the whole message is not sent. - -Signed-off-by: Noralf Trønnes -Reviewed-by: Eric Anholt ---- - drivers/i2c/busses/i2c-bcm2835.c | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c -index 54d510abd46a117c9238fc6d7edec84019d1f60d..565ef69ce61423544dc0558c85ef318b0ae9c324 100644 ---- a/drivers/i2c/busses/i2c-bcm2835.c -+++ b/drivers/i2c/busses/i2c-bcm2835.c -@@ -212,10 +212,6 @@ static int bcm2835_i2c_xfer_msg(struct bcm2835_i2c_dev *i2c_dev, - if (likely(!i2c_dev->msg_err)) - return 0; - -- if ((i2c_dev->msg_err & BCM2835_I2C_S_ERR) && -- (msg->flags & I2C_M_IGNORE_NAK)) -- return 0; -- - dev_dbg(i2c_dev->dev, "i2c transfer failed: %x\n", i2c_dev->msg_err); - - if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) - -From f2f7d14ebe1e56f8baefe99cedea68b3cee1da16 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= -Date: Fri, 23 Sep 2016 04:54:27 +0200 -Subject: [PATCH 108/149] i2c: bcm2835: Add support for Repeated Start - Condition -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Documentation/i2c/i2c-protocol states that Combined transactions should -separate messages with a Start bit and end the whole transaction with a -Stop bit. This patch adds support for issuing only a Start between -messages instead of a Stop followed by a Start. - -This implementation differs from downstream i2c-bcm2708 in 2 respects: -- it uses an interrupt to detect that the transfer is active instead - of using polling. There is no interrupt for Transfer Active, but by - not prefilling the FIFO it's possible to use the TXW interrupt. -- when resetting/disabling the controller between transfers it writes - CLEAR to the control register instead of just zero. - Using just zero gave many errors. This might be the reason why - downstream had to disable this feature and make it available with a - module parameter. - -I have run thousands of transfers to a DS1307 (rtc), MMA8451 (accel) -and AT24C32 (eeprom) in parallel without problems. - -Signed-off-by: Noralf Trønnes -Acked-by: Eric Anholt ---- - drivers/i2c/busses/i2c-bcm2835.c | 101 ++++++++++++++++++++++++--------------- - 1 file changed, 63 insertions(+), 38 deletions(-) - -diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c -index 565ef69ce61423544dc0558c85ef318b0ae9c324..241e08ae7c27cec23fad3c1bf3ebad3a4d2a8e6f 100644 ---- a/drivers/i2c/busses/i2c-bcm2835.c -+++ b/drivers/i2c/busses/i2c-bcm2835.c -@@ -63,6 +63,7 @@ struct bcm2835_i2c_dev { - struct i2c_adapter adapter; - struct completion completion; - struct i2c_msg *curr_msg; -+ int num_msgs; - u32 msg_err; - u8 *msg_buf; - size_t msg_buf_remaining; -@@ -110,6 +111,45 @@ static void bcm2835_drain_rxfifo(struct bcm2835_i2c_dev *i2c_dev) - } - - /* -+ * Repeated Start Condition (Sr) -+ * The BCM2835 ARM Peripherals datasheet mentions a way to trigger a Sr when it -+ * talks about reading from a slave with 10 bit address. This is achieved by -+ * issuing a write, poll the I2CS.TA flag and wait for it to be set, and then -+ * issue a read. -+ * A comment in https://github.com/raspberrypi/linux/issues/254 shows how the -+ * firmware actually does it using polling and says that it's a workaround for -+ * a problem in the state machine. -+ * It turns out that it is possible to use the TXW interrupt to know when the -+ * transfer is active, provided the FIFO has not been prefilled. -+ */ -+ -+static void bcm2835_i2c_start_transfer(struct bcm2835_i2c_dev *i2c_dev) -+{ -+ u32 c = BCM2835_I2C_C_ST | BCM2835_I2C_C_I2CEN; -+ struct i2c_msg *msg = i2c_dev->curr_msg; -+ bool last_msg = (i2c_dev->num_msgs == 1); -+ -+ if (!i2c_dev->num_msgs) -+ return; -+ -+ i2c_dev->num_msgs--; -+ i2c_dev->msg_buf = msg->buf; -+ i2c_dev->msg_buf_remaining = msg->len; -+ -+ if (msg->flags & I2C_M_RD) -+ c |= BCM2835_I2C_C_READ | BCM2835_I2C_C_INTR; -+ else -+ c |= BCM2835_I2C_C_INTT; -+ -+ if (last_msg) -+ c |= BCM2835_I2C_C_INTD; -+ -+ bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_A, msg->addr); -+ bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_DLEN, msg->len); -+ bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, c); -+} -+ -+/* - * Note about I2C_C_CLEAR on error: - * The I2C_C_CLEAR on errors will take some time to resolve -- if you were in - * non-idle state and I2C_C_READ, it sets an abort_rx flag and runs through -@@ -151,6 +191,12 @@ static irqreturn_t bcm2835_i2c_isr(int this_irq, void *data) - } - - bcm2835_fill_txfifo(i2c_dev); -+ -+ if (i2c_dev->num_msgs && !i2c_dev->msg_buf_remaining) { -+ i2c_dev->curr_msg++; -+ bcm2835_i2c_start_transfer(i2c_dev); -+ } -+ - return IRQ_HANDLED; - } - -@@ -175,30 +221,25 @@ static irqreturn_t bcm2835_i2c_isr(int this_irq, void *data) - return IRQ_HANDLED; - } - --static int bcm2835_i2c_xfer_msg(struct bcm2835_i2c_dev *i2c_dev, -- struct i2c_msg *msg) -+static int bcm2835_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], -+ int num) - { -- u32 c; -+ struct bcm2835_i2c_dev *i2c_dev = i2c_get_adapdata(adap); - unsigned long time_left; -+ int i; - -- i2c_dev->curr_msg = msg; -- i2c_dev->msg_buf = msg->buf; -- i2c_dev->msg_buf_remaining = msg->len; -- reinit_completion(&i2c_dev->completion); -- -- bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, BCM2835_I2C_C_CLEAR); -+ for (i = 0; i < (num - 1); i++) -+ if (msgs[i].flags & I2C_M_RD) { -+ dev_warn_once(i2c_dev->dev, -+ "only one read message supported, has to be last\n"); -+ return -EOPNOTSUPP; -+ } - -- if (msg->flags & I2C_M_RD) { -- c = BCM2835_I2C_C_READ | BCM2835_I2C_C_INTR; -- } else { -- c = BCM2835_I2C_C_INTT; -- bcm2835_fill_txfifo(i2c_dev); -- } -- c |= BCM2835_I2C_C_ST | BCM2835_I2C_C_INTD | BCM2835_I2C_C_I2CEN; -+ i2c_dev->curr_msg = msgs; -+ i2c_dev->num_msgs = num; -+ reinit_completion(&i2c_dev->completion); - -- bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_A, msg->addr); -- bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_DLEN, msg->len); -- bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, c); -+ bcm2835_i2c_start_transfer(i2c_dev); - - time_left = wait_for_completion_timeout(&i2c_dev->completion, - BCM2835_I2C_TIMEOUT); -@@ -209,31 +250,15 @@ static int bcm2835_i2c_xfer_msg(struct bcm2835_i2c_dev *i2c_dev, - return -ETIMEDOUT; - } - -- if (likely(!i2c_dev->msg_err)) -- return 0; -+ if (!i2c_dev->msg_err) -+ return num; - - dev_dbg(i2c_dev->dev, "i2c transfer failed: %x\n", i2c_dev->msg_err); - - if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) - return -EREMOTEIO; -- else -- return -EIO; --} -- --static int bcm2835_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], -- int num) --{ -- struct bcm2835_i2c_dev *i2c_dev = i2c_get_adapdata(adap); -- int i; -- int ret = 0; -- -- for (i = 0; i < num; i++) { -- ret = bcm2835_i2c_xfer_msg(i2c_dev, &msgs[i]); -- if (ret) -- break; -- } - -- return ret ?: i; -+ return -EIO; - } - - static u32 bcm2835_i2c_func(struct i2c_adapter *adap) - -From 57255125ee6f0f952e130c6e2d6705542757a9d1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= -Date: Fri, 23 Sep 2016 04:57:17 +0200 -Subject: [PATCH 109/149] i2c: bcm2835: Support i2c-dev ioctl I2C_TIMEOUT -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Use i2c_adapter->timeout for the completion timeout value. The core -default is 1 second. - -Signed-off-by: Noralf Trønnes -Reviewed-by: Eric Anholt ---- - drivers/i2c/busses/i2c-bcm2835.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c -index 241e08ae7c27cec23fad3c1bf3ebad3a4d2a8e6f..d2085dd3742eabebc537621968088261f8dc7ea8 100644 ---- a/drivers/i2c/busses/i2c-bcm2835.c -+++ b/drivers/i2c/busses/i2c-bcm2835.c -@@ -53,8 +53,6 @@ - #define BCM2835_I2C_CDIV_MIN 0x0002 - #define BCM2835_I2C_CDIV_MAX 0xFFFE - --#define BCM2835_I2C_TIMEOUT (msecs_to_jiffies(1000)) -- - struct bcm2835_i2c_dev { - struct device *dev; - void __iomem *regs; -@@ -242,7 +240,7 @@ static int bcm2835_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], - bcm2835_i2c_start_transfer(i2c_dev); - - time_left = wait_for_completion_timeout(&i2c_dev->completion, -- BCM2835_I2C_TIMEOUT); -+ adap->timeout); - if (!time_left) { - bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, - BCM2835_I2C_C_CLEAR); - -From c779af3ecc9f4e771fcd383ec8a0ee983195ddb3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= -Date: Tue, 27 Sep 2016 01:00:08 +0200 -Subject: [PATCH 110/149] i2c: bcm2835: Add support for dynamic clock -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Support a dynamic clock by reading the frequency and setting the -divisor in the transfer function instead of during probe. - -Signed-off-by: Noralf Trønnes -Reviewed-by: Martin Sperl ---- - drivers/i2c/busses/i2c-bcm2835.c | 51 +++++++++++++++++++++++++--------------- - 1 file changed, 32 insertions(+), 19 deletions(-) - -diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c -index d2085dd3742eabebc537621968088261f8dc7ea8..c3436f627028477f7e21b47e079fd5ab06ec188a 100644 ---- a/drivers/i2c/busses/i2c-bcm2835.c -+++ b/drivers/i2c/busses/i2c-bcm2835.c -@@ -58,6 +58,7 @@ struct bcm2835_i2c_dev { - void __iomem *regs; - struct clk *clk; - int irq; -+ u32 bus_clk_rate; - struct i2c_adapter adapter; - struct completion completion; - struct i2c_msg *curr_msg; -@@ -78,6 +79,30 @@ static inline u32 bcm2835_i2c_readl(struct bcm2835_i2c_dev *i2c_dev, u32 reg) - return readl(i2c_dev->regs + reg); - } - -+static int bcm2835_i2c_set_divider(struct bcm2835_i2c_dev *i2c_dev) -+{ -+ u32 divider; -+ -+ divider = DIV_ROUND_UP(clk_get_rate(i2c_dev->clk), -+ i2c_dev->bus_clk_rate); -+ /* -+ * Per the datasheet, the register is always interpreted as an even -+ * number, by rounding down. In other words, the LSB is ignored. So, -+ * if the LSB is set, increment the divider to avoid any issue. -+ */ -+ if (divider & 1) -+ divider++; -+ if ((divider < BCM2835_I2C_CDIV_MIN) || -+ (divider > BCM2835_I2C_CDIV_MAX)) { -+ dev_err_ratelimited(i2c_dev->dev, "Invalid clock-frequency\n"); -+ return -EINVAL; -+ } -+ -+ bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_DIV, divider); -+ -+ return 0; -+} -+ - static void bcm2835_fill_txfifo(struct bcm2835_i2c_dev *i2c_dev) - { - u32 val; -@@ -224,7 +249,7 @@ static int bcm2835_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], - { - struct bcm2835_i2c_dev *i2c_dev = i2c_get_adapdata(adap); - unsigned long time_left; -- int i; -+ int i, ret; - - for (i = 0; i < (num - 1); i++) - if (msgs[i].flags & I2C_M_RD) { -@@ -233,6 +258,10 @@ static int bcm2835_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], - return -EOPNOTSUPP; - } - -+ ret = bcm2835_i2c_set_divider(i2c_dev); -+ if (ret) -+ return ret; -+ - i2c_dev->curr_msg = msgs; - i2c_dev->num_msgs = num; - reinit_completion(&i2c_dev->completion); -@@ -282,7 +311,6 @@ static int bcm2835_i2c_probe(struct platform_device *pdev) - { - struct bcm2835_i2c_dev *i2c_dev; - struct resource *mem, *irq; -- u32 bus_clk_rate, divider; - int ret; - struct i2c_adapter *adap; - -@@ -306,27 +334,12 @@ static int bcm2835_i2c_probe(struct platform_device *pdev) - } - - ret = of_property_read_u32(pdev->dev.of_node, "clock-frequency", -- &bus_clk_rate); -+ &i2c_dev->bus_clk_rate); - if (ret < 0) { - dev_warn(&pdev->dev, - "Could not read clock-frequency property\n"); -- bus_clk_rate = 100000; -- } -- -- divider = DIV_ROUND_UP(clk_get_rate(i2c_dev->clk), bus_clk_rate); -- /* -- * Per the datasheet, the register is always interpreted as an even -- * number, by rounding down. In other words, the LSB is ignored. So, -- * if the LSB is set, increment the divider to avoid any issue. -- */ -- if (divider & 1) -- divider++; -- if ((divider < BCM2835_I2C_CDIV_MIN) || -- (divider > BCM2835_I2C_CDIV_MAX)) { -- dev_err(&pdev->dev, "Invalid clock-frequency\n"); -- return -ENODEV; -+ i2c_dev->bus_clk_rate = 100000; - } -- bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_DIV, divider); - - irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!irq) { - -From c3951b69ebc993fedc3f802e4b8c3e62b56ec87d Mon Sep 17 00:00:00 2001 +From b9d76cb88a9c87fe808ddb234e379d10a6c28e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Tue, 1 Nov 2016 15:15:41 +0100 -Subject: [PATCH 111/149] i2c: bcm2835: Add debug support +Subject: [PATCH 097/143] i2c: bcm2835: Add debug support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -125131,29 +124226,57 @@ index c3436f627028477f7e21b47e079fd5ab06ec188a..8642f580ce41803bd22c76a0fa80d083 if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) return -EREMOTEIO; -From 8db15206e43061e044bedbe5c1b8a9ba2caff6c1 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Sat, 31 Dec 2016 14:15:50 +0000 -Subject: [PATCH 112/149] arm64: Add CONFIG_ARCH_BCM2835 +From 0943957d423c895c065a0722eae050927a92e597 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 14 Sep 2016 09:16:19 +0100 +Subject: [PATCH 098/143] raspberrypi-firmware: Export the general transaction + function. +The vc4-firmware-kms module is going to be doing the MBOX FB call. + +Signed-off-by: Eric Anholt --- - arch/arm64/configs/bcmrpi3_defconfig | 1 + - 1 file changed, 1 insertion(+) + drivers/firmware/raspberrypi.c | 3 ++- + include/soc/bcm2835/raspberrypi-firmware.h | 1 + + 2 files changed, 3 insertions(+), 1 deletion(-) -diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig -index d7406f5a4620151044b8f716b4d10bb818648e06..53da5c7a33e5898a66e549fb0c39fe3da555ca87 100644 ---- a/arch/arm64/configs/bcmrpi3_defconfig -+++ b/arch/arm64/configs/bcmrpi3_defconfig -@@ -1332,3 +1332,4 @@ CONFIG_ARM64_CRYPTO=y - CONFIG_CRC_ITU_T=y - CONFIG_LIBCRC32C=y - CONFIG_BCM2708_VCHIQ=n -+CONFIG_ARCH_BCM2835=y +diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c +index 3f070bd38a91511c986e3fb114b15bd4ac32634c..f261b64d1657c02290904d841e1f087c34e27ded 100644 +--- a/drivers/firmware/raspberrypi.c ++++ b/drivers/firmware/raspberrypi.c +@@ -42,7 +42,7 @@ static void response_callback(struct mbox_client *cl, void *msg) + * Sends a request to the firmware through the BCM2835 mailbox driver, + * and synchronously waits for the reply. + */ +-static int ++int + rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data) + { + u32 message = MBOX_MSG(chan, data); +@@ -63,6 +63,7 @@ rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data) + + return ret; + } ++EXPORT_SYMBOL_GPL(rpi_firmware_transaction); + + /** + * rpi_firmware_property_list - Submit firmware property list +diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h +index 7f0da0727422c690947e46e891a754de13dc1fea..280791fb9656901392ce67e44cb742c96f090ed4 100644 +--- a/include/soc/bcm2835/raspberrypi-firmware.h ++++ b/include/soc/bcm2835/raspberrypi-firmware.h +@@ -152,5 +152,6 @@ static inline struct rpi_firmware *rpi_firmware_get(struct device_node *firmware + return NULL; + } + #endif ++int rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data); + + #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ -From 4648becd8c9c567a092e57d7036d2b40ac056452 Mon Sep 17 00:00:00 2001 +From d892ed3ef0153b2b3041f6f76a88410575270bd2 Mon Sep 17 00:00:00 2001 From: Alex Tucker Date: Tue, 13 Dec 2016 19:50:18 +0000 -Subject: [PATCH 113/149] Add support for Silicon Labs Si7013/20/21 +Subject: [PATCH 099/143] Add support for Silicon Labs Si7013/20/21 humidity/temperature sensor. --- @@ -125228,10 +124351,10 @@ index f6d134c095af2398fc55ae7d2b0e86456c30627c..31bda8da4cb6a56bfe493a81b9189009 }; }; -From bc3f78ae7e7e09c143167390bec1b02d04320b96 Mon Sep 17 00:00:00 2001 +From a7f4466713fc62e679070212dd09533d66db889c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 3 Jan 2017 21:27:46 +0000 -Subject: [PATCH 114/149] Document the si7020 option +Subject: [PATCH 100/143] Document the si7020 option --- arch/arm/boot/dts/overlays/README | 3 +++ @@ -125252,10 +124375,10 @@ index 81d991803be335e5a1bc3bb0a8c7a2c9f5c392bd..e8fa4ccb44c34a20485c4e6155467af9 Name: i2c0-bcm2708 Info: Enable the i2c_bcm2708 driver for the i2c0 bus. Not all pin combinations -From 784a27ffd9104a0c243d838c66aa52a2c355f828 Mon Sep 17 00:00:00 2001 +From 62211690633ae9f41cea842893da69f8ba168636 Mon Sep 17 00:00:00 2001 From: Giedrius Trainavicius Date: Thu, 5 Jan 2017 02:38:16 +0200 -Subject: [PATCH 115/149] pisound improvements: +Subject: [PATCH 101/143] pisound improvements: * Added a writable sysfs object to enable scripts / user space software to blink MIDI activity LEDs for variable duration. @@ -125549,958 +124672,10 @@ index 4b8545487d06e4ea70073a5d063fb2310b3b94d0..ba70734b89e61a11201657406223f0b3 }; -From 14dce25835053cc8812dedb47ea78e829fb11360 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Mon, 9 Jan 2017 09:23:06 +0000 -Subject: [PATCH 116/149] Revert "Revert "Added driver for HiFiBerry Amp - amplifier add-on board"" - -This reverts commit bf84babd8fffcb79c60f1342c2416f8e1e4b7af9. ---- - sound/soc/bcm/Kconfig | 7 + - sound/soc/bcm/Makefile | 2 + - sound/soc/bcm/hifiberry_amp.c | 129 +++++++++++++++ - sound/soc/codecs/Kconfig | 4 + - sound/soc/codecs/Makefile | 2 + - sound/soc/codecs/tas5713.c | 369 ++++++++++++++++++++++++++++++++++++++++++ - sound/soc/codecs/tas5713.h | 210 ++++++++++++++++++++++++ - 7 files changed, 723 insertions(+) - create mode 100644 sound/soc/bcm/hifiberry_amp.c - create mode 100644 sound/soc/codecs/tas5713.c - create mode 100644 sound/soc/codecs/tas5713.h - -diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index a0ef6a028136beb27ed13a4136712a70a60f2966..d024377e8450fb5402dcb5ea27161f774b04a8ec 100644 ---- a/sound/soc/bcm/Kconfig -+++ b/sound/soc/bcm/Kconfig -@@ -38,6 +38,13 @@ config SND_BCM2708_SOC_HIFIBERRY_DIGI - help - Say Y or M if you want to add support for HifiBerry Digi S/PDIF output board. - -+config SND_BCM2708_SOC_HIFIBERRY_AMP -+ tristate "Support for the HifiBerry Amp" -+ depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S -+ select SND_SOC_TAS5713 -+ help -+ Say Y or M if you want to add support for the HifiBerry Amp amplifier board. -+ - config SND_BCM2708_SOC_RPI_DAC - tristate "Support for RPi-DAC" - depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S -diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile -index f720a3d3b5832844ee6d0558317c728f00c40b65..bb1df438540193652ec5464e8bc51f636a1b844e 100644 ---- a/sound/soc/bcm/Makefile -+++ b/sound/soc/bcm/Makefile -@@ -10,6 +10,7 @@ obj-$(CONFIG_SND_SOC_CYGNUS) += snd-soc-cygnus.o - - # BCM2708 Machine Support - snd-soc-adau1977-adc-objs := adau1977-adc.o -+snd-soc-hifiberry-amp-objs := hifiberry_amp.o - snd-soc-hifiberry-dac-objs := hifiberry_dac.o - snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o - snd-soc-hifiberry-digi-objs := hifiberry_digi.o -@@ -27,6 +28,7 @@ snd-soc-allo-piano-dac-objs := allo-piano-dac.o - snd-soc-pisound-objs := pisound.o - - obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o -+obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o - obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o - obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o - obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o -diff --git a/sound/soc/bcm/hifiberry_amp.c b/sound/soc/bcm/hifiberry_amp.c -new file mode 100644 -index 0000000000000000000000000000000000000000..d17c29780507dc31c50f1d567ff5cea7c8241ff5 ---- /dev/null -+++ b/sound/soc/bcm/hifiberry_amp.c -@@ -0,0 +1,129 @@ -+/* -+ * ASoC Driver for HifiBerry AMP -+ * -+ * Author: Sebastian Eickhoff -+ * Copyright 2014 -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * version 2 as published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ */ -+ -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+static int snd_rpi_hifiberry_amp_init(struct snd_soc_pcm_runtime *rtd) -+{ -+ // ToDo: init of the dsp-registers. -+ return 0; -+} -+ -+static int snd_rpi_hifiberry_amp_hw_params( struct snd_pcm_substream *substream, -+ struct snd_pcm_hw_params *params ) -+{ -+ struct snd_soc_pcm_runtime *rtd = substream->private_data; -+ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; -+ -+ return snd_soc_dai_set_bclk_ratio(cpu_dai, 64); -+} -+ -+static struct snd_soc_ops snd_rpi_hifiberry_amp_ops = { -+ .hw_params = snd_rpi_hifiberry_amp_hw_params, -+}; -+ -+static struct snd_soc_dai_link snd_rpi_hifiberry_amp_dai[] = { -+ { -+ .name = "HifiBerry AMP", -+ .stream_name = "HifiBerry AMP HiFi", -+ .cpu_dai_name = "bcm2708-i2s.0", -+ .codec_dai_name = "tas5713-hifi", -+ .platform_name = "bcm2708-i2s.0", -+ .codec_name = "tas5713.1-001b", -+ .dai_fmt = SND_SOC_DAIFMT_I2S | -+ SND_SOC_DAIFMT_NB_NF | -+ SND_SOC_DAIFMT_CBS_CFS, -+ .ops = &snd_rpi_hifiberry_amp_ops, -+ .init = snd_rpi_hifiberry_amp_init, -+ }, -+}; -+ -+ -+static struct snd_soc_card snd_rpi_hifiberry_amp = { -+ .name = "snd_rpi_hifiberry_amp", -+ .driver_name = "HifiberryAmp", -+ .owner = THIS_MODULE, -+ .dai_link = snd_rpi_hifiberry_amp_dai, -+ .num_links = ARRAY_SIZE(snd_rpi_hifiberry_amp_dai), -+}; -+ -+static const struct of_device_id snd_rpi_hifiberry_amp_of_match[] = { -+ { .compatible = "hifiberry,hifiberry-amp", }, -+ {}, -+}; -+MODULE_DEVICE_TABLE(of, snd_rpi_hifiberry_amp_of_match); -+ -+ -+static int snd_rpi_hifiberry_amp_probe(struct platform_device *pdev) -+{ -+ int ret = 0; -+ -+ snd_rpi_hifiberry_amp.dev = &pdev->dev; -+ -+ if (pdev->dev.of_node) { -+ struct device_node *i2s_node; -+ struct snd_soc_dai_link *dai = &snd_rpi_hifiberry_amp_dai[0]; -+ i2s_node = of_parse_phandle(pdev->dev.of_node, -+ "i2s-controller", 0); -+ -+ if (i2s_node) { -+ dai->cpu_dai_name = NULL; -+ dai->cpu_of_node = i2s_node; -+ dai->platform_name = NULL; -+ dai->platform_of_node = i2s_node; -+ } -+ } -+ -+ ret = snd_soc_register_card(&snd_rpi_hifiberry_amp); -+ -+ if (ret != 0) { -+ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret); -+ } -+ -+ return ret; -+} -+ -+ -+static int snd_rpi_hifiberry_amp_remove(struct platform_device *pdev) -+{ -+ return snd_soc_unregister_card(&snd_rpi_hifiberry_amp); -+} -+ -+ -+static struct platform_driver snd_rpi_hifiberry_amp_driver = { -+ .driver = { -+ .name = "snd-hifiberry-amp", -+ .owner = THIS_MODULE, -+ .of_match_table = snd_rpi_hifiberry_amp_of_match, -+ }, -+ .probe = snd_rpi_hifiberry_amp_probe, -+ .remove = snd_rpi_hifiberry_amp_remove, -+}; -+ -+ -+module_platform_driver(snd_rpi_hifiberry_amp_driver); -+ -+ -+MODULE_AUTHOR("Sebastian Eickhoff "); -+MODULE_DESCRIPTION("ASoC driver for HiFiBerry-AMP"); -+MODULE_LICENSE("GPL v2"); -diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig -index 74a93e52bdc8116df3db08aaf98fffa1e6f6cc1b..9824cdd04b0c11c45b8cedd0187a0eba8f1dc2d4 100644 ---- a/sound/soc/codecs/Kconfig -+++ b/sound/soc/codecs/Kconfig -@@ -139,6 +139,7 @@ config SND_SOC_ALL_CODECS - select SND_SOC_TFA9879 if I2C - select SND_SOC_TLV320AIC23_I2C if I2C - select SND_SOC_TLV320AIC23_SPI if SPI_MASTER -+ select SND_SOC_TAS5713 if I2C - select SND_SOC_TLV320AIC26 if SPI_MASTER - select SND_SOC_TLV320AIC31XX if I2C - select SND_SOC_TLV320AIC32X4_I2C if I2C -@@ -821,6 +822,9 @@ config SND_SOC_TFA9879 - tristate "NXP Semiconductors TFA9879 amplifier" - depends on I2C - -+config SND_SOC_TAS5713 -+ tristate -+ - config SND_SOC_TLV320AIC23 - tristate - -diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile -index 77786e7f44a7fa22d9b5beed3eb687e2b7a28526..5a2db0d2fe2f49920eeccfecef62c969ae2e99a1 100644 ---- a/sound/soc/codecs/Makefile -+++ b/sound/soc/codecs/Makefile -@@ -144,6 +144,7 @@ snd-soc-tas5086-objs := tas5086.o - snd-soc-tas571x-objs := tas571x.o - snd-soc-tas5720-objs := tas5720.o - snd-soc-tfa9879-objs := tfa9879.o -+snd-soc-tas5713-objs := tas5713.o - snd-soc-tlv320aic23-objs := tlv320aic23.o - snd-soc-tlv320aic23-i2c-objs := tlv320aic23-i2c.o - snd-soc-tlv320aic23-spi-objs := tlv320aic23-spi.o -@@ -366,6 +367,7 @@ obj-$(CONFIG_SND_SOC_TAS5086) += snd-soc-tas5086.o - obj-$(CONFIG_SND_SOC_TAS571X) += snd-soc-tas571x.o - obj-$(CONFIG_SND_SOC_TAS5720) += snd-soc-tas5720.o - obj-$(CONFIG_SND_SOC_TFA9879) += snd-soc-tfa9879.o -+obj-$(CONFIG_SND_SOC_TAS5713) += snd-soc-tas5713.o - obj-$(CONFIG_SND_SOC_TLV320AIC23) += snd-soc-tlv320aic23.o - obj-$(CONFIG_SND_SOC_TLV320AIC23_I2C) += snd-soc-tlv320aic23-i2c.o - obj-$(CONFIG_SND_SOC_TLV320AIC23_SPI) += snd-soc-tlv320aic23-spi.o -diff --git a/sound/soc/codecs/tas5713.c b/sound/soc/codecs/tas5713.c -new file mode 100644 -index 0000000000000000000000000000000000000000..9b2713861dcbed751842ca29c88eb1eae5867411 ---- /dev/null -+++ b/sound/soc/codecs/tas5713.c -@@ -0,0 +1,369 @@ -+/* -+ * ASoC Driver for TAS5713 -+ * -+ * Author: Sebastian Eickhoff -+ * Copyright 2014 -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * version 2 as published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include "tas5713.h" -+ -+ -+static struct i2c_client *i2c; -+ -+struct tas5713_priv { -+ struct regmap *regmap; -+ int mclk_div; -+ struct snd_soc_codec *codec; -+}; -+ -+static struct tas5713_priv *priv_data; -+ -+ -+ -+ -+/* -+ * _ _ ___ _ ___ _ _ -+ * /_\ | | / __| /_\ / __|___ _ _| |_ _ _ ___| |___ -+ * / _ \| |__\__ \/ _ \ | (__/ _ \ ' \ _| '_/ _ \ (_-< -+ * /_/ \_\____|___/_/ \_\ \___\___/_||_\__|_| \___/_/__/ -+ * -+ */ -+ -+static const DECLARE_TLV_DB_SCALE(tas5713_vol_tlv, -10000, 50, 1); -+ -+ -+static const struct snd_kcontrol_new tas5713_snd_controls[] = { -+ SOC_SINGLE_TLV ("Master" , TAS5713_VOL_MASTER, 0, 248, 1, tas5713_vol_tlv), -+ SOC_DOUBLE_R_TLV("Channels" , TAS5713_VOL_CH1, TAS5713_VOL_CH2, 0, 248, 1, tas5713_vol_tlv) -+}; -+ -+ -+ -+ -+/* -+ * __ __ _ _ ___ _ -+ * | \/ |__ _ __| |_ (_)_ _ ___ | \ _ _(_)_ _____ _ _ -+ * | |\/| / _` / _| ' \| | ' \/ -_) | |) | '_| \ V / -_) '_| -+ * |_| |_\__,_\__|_||_|_|_||_\___| |___/|_| |_|\_/\___|_| -+ * -+ */ -+ -+static int tas5713_hw_params(struct snd_pcm_substream *substream, -+ struct snd_pcm_hw_params *params, -+ struct snd_soc_dai *dai) -+{ -+ u16 blen = 0x00; -+ -+ struct snd_soc_codec *codec; -+ codec = dai->codec; -+ priv_data->codec = dai->codec; -+ -+ switch (params_format(params)) { -+ case SNDRV_PCM_FORMAT_S16_LE: -+ blen = 0x03; -+ break; -+ case SNDRV_PCM_FORMAT_S20_3LE: -+ blen = 0x1; -+ break; -+ case SNDRV_PCM_FORMAT_S24_LE: -+ blen = 0x04; -+ break; -+ case SNDRV_PCM_FORMAT_S32_LE: -+ blen = 0x05; -+ break; -+ default: -+ dev_err(dai->dev, "Unsupported word length: %u\n", -+ params_format(params)); -+ return -EINVAL; -+ } -+ -+ // set word length -+ snd_soc_update_bits(codec, TAS5713_SERIAL_DATA_INTERFACE, 0x7, blen); -+ -+ return 0; -+} -+ -+ -+static int tas5713_mute_stream(struct snd_soc_dai *dai, int mute, int stream) -+{ -+ unsigned int val = 0; -+ -+ struct tas5713_priv *tas5713; -+ struct snd_soc_codec *codec = dai->codec; -+ tas5713 = snd_soc_codec_get_drvdata(codec); -+ -+ if (mute) { -+ val = TAS5713_SOFT_MUTE_ALL; -+ } -+ -+ return regmap_write(tas5713->regmap, TAS5713_SOFT_MUTE, val); -+} -+ -+ -+static const struct snd_soc_dai_ops tas5713_dai_ops = { -+ .hw_params = tas5713_hw_params, -+ .mute_stream = tas5713_mute_stream, -+}; -+ -+ -+static struct snd_soc_dai_driver tas5713_dai = { -+ .name = "tas5713-hifi", -+ .playback = { -+ .stream_name = "Playback", -+ .channels_min = 2, -+ .channels_max = 2, -+ .rates = SNDRV_PCM_RATE_8000_48000, -+ .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE ), -+ }, -+ .ops = &tas5713_dai_ops, -+}; -+ -+ -+ -+ -+/* -+ * ___ _ ___ _ -+ * / __|___ __| |___ __ | \ _ _(_)_ _____ _ _ -+ * | (__/ _ \/ _` / -_) _| | |) | '_| \ V / -_) '_| -+ * \___\___/\__,_\___\__| |___/|_| |_|\_/\___|_| -+ * -+ */ -+ -+static int tas5713_remove(struct snd_soc_codec *codec) -+{ -+ struct tas5713_priv *tas5713; -+ -+ tas5713 = snd_soc_codec_get_drvdata(codec); -+ -+ return 0; -+} -+ -+ -+static int tas5713_probe(struct snd_soc_codec *codec) -+{ -+ struct tas5713_priv *tas5713; -+ int i, ret; -+ -+ i2c = container_of(codec->dev, struct i2c_client, dev); -+ -+ tas5713 = snd_soc_codec_get_drvdata(codec); -+ -+ // Reset error -+ ret = snd_soc_write(codec, TAS5713_ERROR_STATUS, 0x00); -+ if (ret < 0) return ret; -+ -+ // Trim oscillator -+ ret = snd_soc_write(codec, TAS5713_OSC_TRIM, 0x00); -+ if (ret < 0) return ret; -+ msleep(1000); -+ -+ // Reset error -+ ret = snd_soc_write(codec, TAS5713_ERROR_STATUS, 0x00); -+ if (ret < 0) return ret; -+ -+ // Clock mode: 44/48kHz, MCLK=64xfs -+ ret = snd_soc_write(codec, TAS5713_CLOCK_CTRL, 0x60); -+ if (ret < 0) return ret; -+ -+ // I2S 24bit -+ ret = snd_soc_write(codec, TAS5713_SERIAL_DATA_INTERFACE, 0x05); -+ if (ret < 0) return ret; -+ -+ // Unmute -+ ret = snd_soc_write(codec, TAS5713_SYSTEM_CTRL2, 0x00); -+ if (ret < 0) return ret; -+ ret = snd_soc_write(codec, TAS5713_SOFT_MUTE, 0x00); -+ if (ret < 0) return ret; -+ -+ // Set volume to 0db -+ ret = snd_soc_write(codec, TAS5713_VOL_MASTER, 0x00); -+ if (ret < 0) return ret; -+ -+ // Now start programming the default initialization sequence -+ for (i = 0; i < ARRAY_SIZE(tas5713_init_sequence); ++i) { -+ ret = i2c_master_send(i2c, -+ tas5713_init_sequence[i].data, -+ tas5713_init_sequence[i].size); -+ if (ret < 0) { -+ printk(KERN_INFO "TAS5713 CODEC PROBE: InitSeq returns: %d\n", ret); -+ } -+ } -+ -+ // Unmute -+ ret = snd_soc_write(codec, TAS5713_SYSTEM_CTRL2, 0x00); -+ if (ret < 0) return ret; -+ -+ return 0; -+} -+ -+ -+static struct snd_soc_codec_driver soc_codec_dev_tas5713 = { -+ .probe = tas5713_probe, -+ .remove = tas5713_remove, -+ .controls = tas5713_snd_controls, -+ .num_controls = ARRAY_SIZE(tas5713_snd_controls), -+}; -+ -+ -+ -+ -+/* -+ * ___ ___ ___ ___ _ -+ * |_ _|_ ) __| | \ _ _(_)_ _____ _ _ -+ * | | / / (__ | |) | '_| \ V / -_) '_| -+ * |___/___\___| |___/|_| |_|\_/\___|_| -+ * -+ */ -+ -+static const struct reg_default tas5713_reg_defaults[] = { -+ { 0x07 ,0x80 }, // R7 - VOL_MASTER - -40dB -+ { 0x08 , 30 }, // R8 - VOL_CH1 - 0dB -+ { 0x09 , 30 }, // R9 - VOL_CH2 - 0dB -+ { 0x0A ,0x80 }, // R10 - VOL_HEADPHONE - -40dB -+}; -+ -+ -+static bool tas5713_reg_volatile(struct device *dev, unsigned int reg) -+{ -+ switch (reg) { -+ case TAS5713_DEVICE_ID: -+ case TAS5713_ERROR_STATUS: -+ return true; -+ default: -+ return false; -+ } -+} -+ -+ -+static const struct of_device_id tas5713_of_match[] = { -+ { .compatible = "ti,tas5713", }, -+ { } -+}; -+MODULE_DEVICE_TABLE(of, tas5713_of_match); -+ -+ -+static struct regmap_config tas5713_regmap_config = { -+ .reg_bits = 8, -+ .val_bits = 8, -+ -+ .max_register = TAS5713_MAX_REGISTER, -+ .volatile_reg = tas5713_reg_volatile, -+ -+ .cache_type = REGCACHE_RBTREE, -+ .reg_defaults = tas5713_reg_defaults, -+ .num_reg_defaults = ARRAY_SIZE(tas5713_reg_defaults), -+}; -+ -+ -+static int tas5713_i2c_probe(struct i2c_client *i2c, -+ const struct i2c_device_id *id) -+{ -+ int ret; -+ -+ priv_data = devm_kzalloc(&i2c->dev, sizeof *priv_data, GFP_KERNEL); -+ if (!priv_data) -+ return -ENOMEM; -+ -+ priv_data->regmap = devm_regmap_init_i2c(i2c, &tas5713_regmap_config); -+ if (IS_ERR(priv_data->regmap)) { -+ ret = PTR_ERR(priv_data->regmap); -+ return ret; -+ } -+ -+ i2c_set_clientdata(i2c, priv_data); -+ -+ ret = snd_soc_register_codec(&i2c->dev, -+ &soc_codec_dev_tas5713, &tas5713_dai, 1); -+ -+ return ret; -+} -+ -+ -+static int tas5713_i2c_remove(struct i2c_client *i2c) -+{ -+ snd_soc_unregister_codec(&i2c->dev); -+ i2c_set_clientdata(i2c, NULL); -+ -+ kfree(priv_data); -+ -+ return 0; -+} -+ -+ -+static const struct i2c_device_id tas5713_i2c_id[] = { -+ { "tas5713", 0 }, -+ { } -+}; -+ -+MODULE_DEVICE_TABLE(i2c, tas5713_i2c_id); -+ -+ -+static struct i2c_driver tas5713_i2c_driver = { -+ .driver = { -+ .name = "tas5713", -+ .owner = THIS_MODULE, -+ .of_match_table = tas5713_of_match, -+ }, -+ .probe = tas5713_i2c_probe, -+ .remove = tas5713_i2c_remove, -+ .id_table = tas5713_i2c_id -+}; -+ -+ -+static int __init tas5713_modinit(void) -+{ -+ int ret = 0; -+ -+ ret = i2c_add_driver(&tas5713_i2c_driver); -+ if (ret) { -+ printk(KERN_ERR "Failed to register tas5713 I2C driver: %d\n", -+ ret); -+ } -+ -+ return ret; -+} -+module_init(tas5713_modinit); -+ -+ -+static void __exit tas5713_exit(void) -+{ -+ i2c_del_driver(&tas5713_i2c_driver); -+} -+module_exit(tas5713_exit); -+ -+ -+MODULE_AUTHOR("Sebastian Eickhoff "); -+MODULE_DESCRIPTION("ASoC driver for TAS5713"); -+MODULE_LICENSE("GPL v2"); -diff --git a/sound/soc/codecs/tas5713.h b/sound/soc/codecs/tas5713.h -new file mode 100644 -index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8f612a342 ---- /dev/null -+++ b/sound/soc/codecs/tas5713.h -@@ -0,0 +1,210 @@ -+/* -+ * ASoC Driver for TAS5713 -+ * -+ * Author: Sebastian Eickhoff -+ * Copyright 2014 -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * version 2 as published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ */ -+ -+#ifndef _TAS5713_H -+#define _TAS5713_H -+ -+ -+// TAS5713 I2C-bus register addresses -+ -+#define TAS5713_CLOCK_CTRL 0x00 -+#define TAS5713_DEVICE_ID 0x01 -+#define TAS5713_ERROR_STATUS 0x02 -+#define TAS5713_SYSTEM_CTRL1 0x03 -+#define TAS5713_SERIAL_DATA_INTERFACE 0x04 -+#define TAS5713_SYSTEM_CTRL2 0x05 -+#define TAS5713_SOFT_MUTE 0x06 -+#define TAS5713_VOL_MASTER 0x07 -+#define TAS5713_VOL_CH1 0x08 -+#define TAS5713_VOL_CH2 0x09 -+#define TAS5713_VOL_HEADPHONE 0x0A -+#define TAS5713_VOL_CONFIG 0x0E -+#define TAS5713_MODULATION_LIMIT 0x10 -+#define TAS5713_IC_DLY_CH1 0x11 -+#define TAS5713_IC_DLY_CH2 0x12 -+#define TAS5713_IC_DLY_CH3 0x13 -+#define TAS5713_IC_DLY_CH4 0x14 -+ -+#define TAS5713_START_STOP_PERIOD 0x1A -+#define TAS5713_OSC_TRIM 0x1B -+#define TAS5713_BKND_ERR 0x1C -+ -+#define TAS5713_INPUT_MUX 0x20 -+#define TAS5713_SRC_SELECT_CH4 0x21 -+#define TAS5713_PWM_MUX 0x25 -+ -+#define TAS5713_CH1_BQ0 0x29 -+#define TAS5713_CH1_BQ1 0x2A -+#define TAS5713_CH1_BQ2 0x2B -+#define TAS5713_CH1_BQ3 0x2C -+#define TAS5713_CH1_BQ4 0x2D -+#define TAS5713_CH1_BQ5 0x2E -+#define TAS5713_CH1_BQ6 0x2F -+#define TAS5713_CH1_BQ7 0x58 -+#define TAS5713_CH1_BQ8 0x59 -+ -+#define TAS5713_CH2_BQ0 0x30 -+#define TAS5713_CH2_BQ1 0x31 -+#define TAS5713_CH2_BQ2 0x32 -+#define TAS5713_CH2_BQ3 0x33 -+#define TAS5713_CH2_BQ4 0x34 -+#define TAS5713_CH2_BQ5 0x35 -+#define TAS5713_CH2_BQ6 0x36 -+#define TAS5713_CH2_BQ7 0x5C -+#define TAS5713_CH2_BQ8 0x5D -+ -+#define TAS5713_CH4_BQ0 0x5A -+#define TAS5713_CH4_BQ1 0x5B -+#define TAS5713_CH3_BQ0 0x5E -+#define TAS5713_CH3_BQ1 0x5F -+ -+#define TAS5713_DRC1_SOFTENING_FILTER_ALPHA_OMEGA 0x3B -+#define TAS5713_DRC1_ATTACK_RELEASE_RATE 0x3C -+#define TAS5713_DRC2_SOFTENING_FILTER_ALPHA_OMEGA 0x3E -+#define TAS5713_DRC2_ATTACK_RELEASE_RATE 0x3F -+#define TAS5713_DRC1_ATTACK_RELEASE_THRES 0x40 -+#define TAS5713_DRC2_ATTACK_RELEASE_THRES 0x43 -+#define TAS5713_DRC_CTRL 0x46 -+ -+#define TAS5713_BANK_SW_CTRL 0x50 -+#define TAS5713_CH1_OUTPUT_MIXER 0x51 -+#define TAS5713_CH2_OUTPUT_MIXER 0x52 -+#define TAS5713_CH1_INPUT_MIXER 0x53 -+#define TAS5713_CH2_INPUT_MIXER 0x54 -+#define TAS5713_OUTPUT_POST_SCALE 0x56 -+#define TAS5713_OUTPUT_PRESCALE 0x57 -+ -+#define TAS5713_IDF_POST_SCALE 0x62 -+ -+#define TAS5713_CH1_INLINE_MIXER 0x70 -+#define TAS5713_CH1_INLINE_DRC_EN_MIXER 0x71 -+#define TAS5713_CH1_R_CHANNEL_MIXER 0x72 -+#define TAS5713_CH1_L_CHANNEL_MIXER 0x73 -+#define TAS5713_CH2_INLINE_MIXER 0x74 -+#define TAS5713_CH2_INLINE_DRC_EN_MIXER 0x75 -+#define TAS5713_CH2_L_CHANNEL_MIXER 0x76 -+#define TAS5713_CH2_R_CHANNEL_MIXER 0x77 -+ -+#define TAS5713_UPDATE_DEV_ADDR_KEY 0xF8 -+#define TAS5713_UPDATE_DEV_ADDR_REG 0xF9 -+ -+#define TAS5713_REGISTER_COUNT 0x46 -+#define TAS5713_MAX_REGISTER 0xF9 -+ -+ -+// Bitmasks for registers -+#define TAS5713_SOFT_MUTE_ALL 0x07 -+ -+ -+ -+struct tas5713_init_command { -+ const int size; -+ const char *const data; -+}; -+ -+static const struct tas5713_init_command tas5713_init_sequence[] = { -+ -+ // Trim oscillator -+ { .size = 2, .data = "\x1B\x00" }, -+ // System control register 1 (0x03): block DC -+ { .size = 2, .data = "\x03\x80" }, -+ // Mute everything -+ { .size = 2, .data = "\x05\x40" }, -+ // Modulation limit register (0x10): 97.7% -+ { .size = 2, .data = "\x10\x02" }, -+ // Interchannel delay registers -+ // (0x11, 0x12, 0x13, and 0x14): BD mode -+ { .size = 2, .data = "\x11\xB8" }, -+ { .size = 2, .data = "\x12\x60" }, -+ { .size = 2, .data = "\x13\xA0" }, -+ { .size = 2, .data = "\x14\x48" }, -+ // PWM shutdown group register (0x19): no shutdown -+ { .size = 2, .data = "\x19\x00" }, -+ // Input multiplexer register (0x20): BD mode -+ { .size = 2, .data = "\x20\x00\x89\x77\x72" }, -+ // PWM output mux register (0x25) -+ // Channel 1 --> OUTA, channel 1 neg --> OUTB -+ // Channel 2 --> OUTC, channel 2 neg --> OUTD -+ { .size = 5, .data = "\x25\x01\x02\x13\x45" }, -+ // DRC control (0x46): DRC off -+ { .size = 5, .data = "\x46\x00\x00\x00\x00" }, -+ // BKND_ERR register (0x1C): 299ms reset period -+ { .size = 2, .data = "\x1C\x07" }, -+ // Mute channel 3 -+ { .size = 2, .data = "\x0A\xFF" }, -+ // Volume configuration register (0x0E): volume slew 512 steps -+ { .size = 2, .data = "\x0E\x90" }, -+ // Clock control register (0x00): 44/48kHz, MCLK=64xfs -+ { .size = 2, .data = "\x00\x60" }, -+ // Bank switch and eq control (0x50): no bank switching -+ { .size = 5, .data = "\x50\x00\x00\x00\x00" }, -+ // Volume registers (0x07, 0x08, 0x09, 0x0A) -+ { .size = 2, .data = "\x07\x20" }, -+ { .size = 2, .data = "\x08\x30" }, -+ { .size = 2, .data = "\x09\x30" }, -+ { .size = 2, .data = "\x0A\xFF" }, -+ // 0x72, 0x73, 0x76, 0x77 input mixer: -+ // no intermix between channels -+ { .size = 5, .data = "\x72\x00\x00\x00\x00" }, -+ { .size = 5, .data = "\x73\x00\x80\x00\x00" }, -+ { .size = 5, .data = "\x76\x00\x00\x00\x00" }, -+ { .size = 5, .data = "\x77\x00\x80\x00\x00" }, -+ // 0x70, 0x71, 0x74, 0x75 inline DRC mixer: -+ // no inline DRC inmix -+ { .size = 5, .data = "\x70\x00\x80\x00\x00" }, -+ { .size = 5, .data = "\x71\x00\x00\x00\x00" }, -+ { .size = 5, .data = "\x74\x00\x80\x00\x00" }, -+ { .size = 5, .data = "\x75\x00\x00\x00\x00" }, -+ // 0x56, 0x57 Output scale -+ { .size = 5, .data = "\x56\x00\x80\x00\x00" }, -+ { .size = 5, .data = "\x57\x00\x02\x00\x00" }, -+ // 0x3B, 0x3c -+ { .size = 9, .data = "\x3B\x00\x08\x00\x00\x00\x78\x00\x00" }, -+ { .size = 9, .data = "\x3C\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, -+ { .size = 9, .data = "\x3E\x00\x08\x00\x00\x00\x78\x00\x00" }, -+ { .size = 9, .data = "\x3F\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, -+ { .size = 9, .data = "\x40\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, -+ { .size = 9, .data = "\x43\x00\x00\x01\x00\xFF\xFF\xFF\x00" }, -+ // 0x51, 0x52: output mixer -+ { .size = 9, .data = "\x51\x00\x80\x00\x00\x00\x00\x00\x00" }, -+ { .size = 9, .data = "\x52\x00\x80\x00\x00\x00\x00\x00\x00" }, -+ // PEQ defaults -+ { .size = 21, .data = "\x29\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x2A\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x2B\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x2C\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x2D\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x2E\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x2F\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x30\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x31\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x32\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x33\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x34\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x35\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x36\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x58\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x59\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x5C\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x5D\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x5E\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x5F\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x5A\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+ { .size = 21, .data = "\x5B\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" }, -+}; -+ -+ -+#endif /* _TAS5713_H */ - -From 221948e8d60efe31ba9027bd7916033617db3613 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Mon, 9 Jan 2017 09:42:09 +0000 -Subject: [PATCH 117/149] hifiberry-amp: Adjust for ALSA object refactoring - -See: https://github.com/raspberrypi/linux/issues/1775 ---- - sound/soc/codecs/tas5713.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/sound/soc/codecs/tas5713.c b/sound/soc/codecs/tas5713.c -index 9b2713861dcbed751842ca29c88eb1eae5867411..560234d58a6b0a6e7fd3a63e8de73339ee002b1c 100644 ---- a/sound/soc/codecs/tas5713.c -+++ b/sound/soc/codecs/tas5713.c -@@ -232,8 +232,10 @@ static int tas5713_probe(struct snd_soc_codec *codec) - static struct snd_soc_codec_driver soc_codec_dev_tas5713 = { - .probe = tas5713_probe, - .remove = tas5713_remove, -- .controls = tas5713_snd_controls, -- .num_controls = ARRAY_SIZE(tas5713_snd_controls), -+ .component_driver = { -+ .controls = tas5713_snd_controls, -+ .num_controls = ARRAY_SIZE(tas5713_snd_controls), -+ }, - }; - - - -From be3ed0c637843862f3a0d7dd9068e75c2ea66070 Mon Sep 17 00:00:00 2001 -From: Giedrius Trainavicius -Date: Sun, 8 Jan 2017 15:58:54 +0200 -Subject: [PATCH 118/149] bcm2835-i2s: Changes for allowing asymmetric sample - formats. - -This is achieved by making changes only to the requested -stream direction format, keeping the other stream direction -configuration intact. - -Signed-off-by: Giedrius Trainavicius ---- - sound/soc/bcm/bcm2835-i2s.c | 54 +++++++++++++++++++++++++++++++-------------- - 1 file changed, 38 insertions(+), 16 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 6ba20498202ed36906b52096893a88867a79269f..171c2401dfe192740fca3356268aff6432f284ea 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -237,7 +237,9 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - unsigned int sampling_rate = params_rate(params); - unsigned int data_length, data_delay, bclk_ratio; - unsigned int ch1pos, ch2pos, mode, format; -+ unsigned int previous_ftxp, previous_frxp; - uint32_t csreg; -+ bool packed; - - /* - * If a stream is already enabled, -@@ -320,26 +322,46 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - return -EINVAL; - } - -- /* -- * Set format for both streams. -- * We cannot set another frame length -- * (and therefore word length) anyway, -- * so the format will be the same. -- */ -- regmap_write(dev->i2s_regmap, BCM2835_I2S_RXC_A_REG, format); -- regmap_write(dev->i2s_regmap, BCM2835_I2S_TXC_A_REG, format); -+ /* Set the format for the matching stream direction. */ -+ switch (substream->stream) { -+ case SNDRV_PCM_STREAM_PLAYBACK: -+ regmap_write(dev->i2s_regmap, BCM2835_I2S_TXC_A_REG, format); -+ break; -+ case SNDRV_PCM_STREAM_CAPTURE: -+ regmap_write(dev->i2s_regmap, BCM2835_I2S_RXC_A_REG, format); -+ break; -+ default: -+ return -EINVAL; -+ } - - /* Setup the I2S mode */ -+ /* Keep existing FTXP and FRXP values. */ -+ regmap_read(dev->i2s_regmap, BCM2835_I2S_MODE_A_REG, &mode); -+ -+ previous_ftxp = mode & BCM2835_I2S_FTXP; -+ previous_frxp = mode & BCM2835_I2S_FRXP; -+ - mode = 0; - -- if (data_length <= 16) { -- /* -- * Use frame packed mode (2 channels per 32 bit word) -- * We cannot set another frame length in the second stream -- * (and therefore word length) anyway, -- * so the format will be the same. -- */ -- mode |= BCM2835_I2S_FTXP | BCM2835_I2S_FRXP; -+ /* -+ * Retain the frame packed mode (2 channels per 32 bit word) -+ * of the other direction stream intact. The formats of each -+ * direction can be different as long as the frame length is -+ * shared for both. -+ */ -+ packed = data_length <= 16; -+ -+ switch (substream->stream) { -+ case SNDRV_PCM_STREAM_PLAYBACK: -+ mode |= previous_frxp; -+ mode |= packed ? BCM2835_I2S_FTXP : 0; -+ break; -+ case SNDRV_PCM_STREAM_CAPTURE: -+ mode |= previous_ftxp; -+ mode |= packed ? BCM2835_I2S_FRXP : 0; -+ break; -+ default: -+ return -EINVAL; - } - - mode |= BCM2835_I2S_FLEN(bclk_ratio - 1); - -From b8bbe16e827ecc88d18d8fe2e8d960dae5b96f56 Mon Sep 17 00:00:00 2001 +From d72d3147ef62a6da9b073b2d103a529aa7481c67 Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Tue, 10 Jan 2017 16:05:41 +0000 -Subject: [PATCH 119/149] Add driver_name property +Subject: [PATCH 102/143] Add driver_name property Add driver name property for use with 5.1 passthrough audio in LibreElec and other Kodi based OSs --- @@ -126520,10 +124695,10 @@ index 8fd50dbe681508a2cfe8fdde1c9fedbe9a507fa7..05a224ec712d06b8b7587ab6b8bb562d .dai_link = snd_rpi_justboom_dac_dai, .num_links = ARRAY_SIZE(snd_rpi_justboom_dac_dai), -From a977159dd672ff78d5389c02f6ba978ebd63ba0c Mon Sep 17 00:00:00 2001 +From 38aedb6db6a04fc234a823f2da4274b0712f8c8d Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Tue, 10 Jan 2017 16:11:04 +0000 -Subject: [PATCH 120/149] Add driver_name paramater +Subject: [PATCH 103/143] Add driver_name paramater Add driver_name parameter for use with 5.1 passthrough audio in LibreElec and other Kodi OSs --- @@ -126543,10 +124718,10 @@ index 91acb666380faa3c0deb2230f8a0f8bbec59417b..abfdc5c4dd5811e6847bddda4921abe3 .dai_link = snd_rpi_justboom_digi_dai, .num_links = ARRAY_SIZE(snd_rpi_justboom_digi_dai), -From e66f8251c1708277794ac5c778af99a2be1eef62 Mon Sep 17 00:00:00 2001 +From 777083226e9e5b3d06c24bac85ced08f6f822cfd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 11 Jan 2017 13:01:21 +0000 -Subject: [PATCH 121/149] BCM270X_DT: Add pi3-disable-wifi overlay +Subject: [PATCH 104/143] BCM270X_DT: Add pi3-disable-wifi overlay pi3-disable-wifi is a minimal overlay to disable the onboard WiFi. @@ -126607,10 +124782,10 @@ index 0000000000000000000000000000000000000000..017199554bf2f4e381efcc7bb71e750c + }; +}; -From 85fc7151c062d272d89f68487413f43d3191f215 Mon Sep 17 00:00:00 2001 +From 8c98940e11190aa70ee56241e0b666e7adae7675 Mon Sep 17 00:00:00 2001 From: Electron752 Date: Thu, 12 Jan 2017 07:07:08 -0800 -Subject: [PATCH 122/149] ARM64: Make it work again on 4.9 (#1790) +Subject: [PATCH 105/143] ARM64: Make it work again on 4.9 (#1790) * Invoke the dtc compiler with the same options used in arm mode. * ARM64 now uses the bcm2835 platform just like ARM32. @@ -126621,12 +124796,12 @@ Signed-off-by: Michael Zoran arch/arm64/Kconfig.platforms | 22 ------ arch/arm64/boot/dts/broadcom/Makefile | 10 ++- arch/arm64/boot/dts/overlays | 1 + - arch/arm64/configs/bcmrpi3_defconfig | 126 ++++++++++------------------------ - 4 files changed, 48 insertions(+), 111 deletions(-) + arch/arm64/configs/bcmrpi3_defconfig | 125 +++++++++++----------------------- + 4 files changed, 48 insertions(+), 110 deletions(-) create mode 120000 arch/arm64/boot/dts/overlays diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms -index 7d213c2c904271c7a4622b83cd55a750d237bc2e..101794f5ce1008b7ff007fbfc7fa23d9e63bae67 100644 +index 5289515a5b3bdfc85b7b6f1153e55b8ee760e96c..715ef1256838ed4b14d21c9ee8885d10c64fb0fc 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -1,27 +1,5 @@ @@ -126687,7 +124862,7 @@ index 0000000000000000000000000000000000000000..ded08646b6f66cdf734f8bf9c1be3a2e +../../../arm/boot/dts/overlays \ No newline at end of file diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig -index 53da5c7a33e5898a66e549fb0c39fe3da555ca87..c7e891d72969a388d9b135a36dbfc9c9cb609bf8 100644 +index e6b09fafa27eed2b762e3d53b55041f793683d27..c7e891d72969a388d9b135a36dbfc9c9cb609bf8 100644 --- a/arch/arm64/configs/bcmrpi3_defconfig +++ b/arch/arm64/configs/bcmrpi3_defconfig @@ -1,52 +1,9 @@ @@ -127008,17 +125183,224 @@ index 53da5c7a33e5898a66e549fb0c39fe3da555ca87..c7e891d72969a388d9b135a36dbfc9c9 CONFIG_IRQSOFF_TRACER=y CONFIG_SCHED_TRACER=y CONFIG_STACK_TRACER=y -@@ -1331,5 +1283,3 @@ CONFIG_CRYPTO_USER_API_SKCIPHER=m +@@ -1331,4 +1283,3 @@ CONFIG_CRYPTO_USER_API_SKCIPHER=m CONFIG_ARM64_CRYPTO=y CONFIG_CRC_ITU_T=y CONFIG_LIBCRC32C=y --CONFIG_BCM2708_VCHIQ=n --CONFIG_ARCH_BCM2835=y +-CONFIG_BCM2835_VCHIQ=n -From a87c30ed2b1e1597f229201b847d32e3b748e265 Mon Sep 17 00:00:00 2001 +From 8f1f3cb604b6a02ae7aec733ac4930f9409a9470 Mon Sep 17 00:00:00 2001 +From: Michael Zoran +Date: Thu, 12 Jan 2017 18:56:54 -0800 +Subject: [PATCH 106/143] ARM64: Fix bad cast in vc04_services + +The function vchiq_copy_from_user contains a non-portable +cast to uint32_t. Convert this to a cast to unsigned long +which is portable. + +Signed-off-by: Michael Zoran +--- + drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +index 706e7f936c1a97352f7ef3d3fbd3b4a92943165d..c2108dec3096fffd68261f0eb29a37d3c5ef218c 100644 +--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c ++++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +@@ -235,7 +235,7 @@ remote_event_signal(REMOTE_EVENT_T *event) + int + vchiq_copy_from_user(void *dst, const void *src, int size) + { +- if ((uint32_t)src < TASK_SIZE) { ++ if ((unsigned long)src < TASK_SIZE) { + return copy_from_user(dst, src, size); + } else { + memcpy(dst, src, size); + +From 9676247b36fc83b7ed908c052b00a3fcc323e9b9 Mon Sep 17 00:00:00 2001 +From: Michael Zoran +Date: Thu, 12 Jan 2017 19:05:46 -0800 +Subject: [PATCH 107/143] ARM64/SND_BCM2835: Port it to arm64. + +In the messages sent to VCHIQ, SND_BCM2835 passes a callback +and a context into two 32 bit pointers. Since this +message is interpreted by the firmware, it can't be easily +changed. Luckily only one of these fields is actual used, +so on ARM64 only use one of the fields to store the upper +half of the 64 bit callback pointer. + +The Kconfig is also changed to allow ARM audio to work for ARM64 +as well. + +Signed-off-by: Michael Zoran +--- + sound/arm/Kconfig | 2 +- + sound/arm/bcm2835-vchiq.c | 11 +++++++++++ + sound/arm/vc_vchi_audioserv_defs.h | 10 ++++++++++ + 3 files changed, 22 insertions(+), 1 deletion(-) + +diff --git a/sound/arm/Kconfig b/sound/arm/Kconfig +index 42581e2f65dfedba6207b6a377a1e1b5df4f2e4b..b427dfe35ad0427db74776dfcb43b7573d9e6e7d 100644 +--- a/sound/arm/Kconfig ++++ b/sound/arm/Kconfig +@@ -2,7 +2,7 @@ + + menuconfig SND_ARM + bool "ARM sound devices" +- depends on ARM ++ depends on (ARM || ARM64) + default y + help + Support for sound devices specific to ARM architectures. +diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c +index 7ee436ca9fa2903d41d1bdd8f8f0774025d22ae0..246ae501b7d98498964b41f355ad65046a6ae893 100755 +--- a/sound/arm/bcm2835-vchiq.c ++++ b/sound/arm/bcm2835-vchiq.c +@@ -226,7 +226,13 @@ static void audio_vchi_callback(void *param, + complete(&instance->msg_avail_comp); + } else if (m.type == VC_AUDIO_MSG_TYPE_COMPLETE) { + bcm2835_alsa_stream_t *alsa_stream = instance->alsa_stream; ++#if defined(CONFIG_64BIT) ++ irq_handler_t callback = ++ (irq_handler_t) (((unsigned long)m.u.complete.callbackl) | ++ ((unsigned long)m.u.complete.callbackh << 32)); ++#else + irq_handler_t callback = (irq_handler_t) m.u.complete.callback; ++#endif + LOG_DBG + (" .. instance=%p, m.type=VC_AUDIO_MSG_TYPE_COMPLETE, complete=%d\n", + instance, m.u.complete.count); +@@ -803,8 +809,13 @@ int bcm2835_audio_write_worker(bcm2835_alsa_stream_t *alsa_stream, + m.u.write.count = count; + // old version uses bulk, new version uses control + m.u.write.max_packet = instance->peer_version < 2 || force_bulk ? 0:4000; ++#if defined(CONFIG_64BIT) ++ m.u.write.callbackl = (uint32_t)(((unsigned long)alsa_stream->fifo_irq_handler)&0xFFFFFFFF); ++ m.u.write.callbackh = (uint32_t)((((unsigned long)alsa_stream->fifo_irq_handler) >> 32)&0xFFFFFFFF); ++#else + m.u.write.callback = alsa_stream->fifo_irq_handler; + m.u.write.cookie = alsa_stream; ++#endif + m.u.write.silence = src == NULL; + + /* Send the message to the videocore */ +diff --git a/sound/arm/vc_vchi_audioserv_defs.h b/sound/arm/vc_vchi_audioserv_defs.h +index af3e6eb690113fc32ce9e06bd2f0f294da7a7f00..ede6154bc09d38469a82008174d0e35749fd9932 100644 +--- a/sound/arm/vc_vchi_audioserv_defs.h ++++ b/sound/arm/vc_vchi_audioserv_defs.h +@@ -78,8 +78,13 @@ typedef struct { + // configure the write audio samples + typedef struct { + uint32_t count; // in bytes ++#if defined(CONFIG_64BIT) ++ uint32_t callbackl; ++ uint32_t callbackh; ++#else + void *callback; + void *cookie; ++#endif + uint16_t silence; + uint16_t max_packet; + } VC_AUDIO_WRITE_T; +@@ -93,8 +98,13 @@ typedef struct { + // Generic result for a request (VC->HOST) + typedef struct { + int32_t count; // Success value ++#if defined(CONFIG_64BIT) ++ uint32_t callbackl; ++ uint32_t callbackh; ++#else + void *callback; + void *cookie; ++#endif + } VC_AUDIO_COMPLETE_T; + + // Message header for all messages in HOST->VC direction + +From 0e2f25b763a178a40c3d41db607f8274356cf9ee Mon Sep 17 00:00:00 2001 +From: Michael Zoran +Date: Thu, 12 Jan 2017 19:10:07 -0800 +Subject: [PATCH 108/143] ARM64: Enable HDMI audio and vc04_services in + bcmrpi3_defconfig + +Signed-off-by: Michael Zoran +--- + arch/arm64/configs/bcmrpi3_defconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig +index c7e891d72969a388d9b135a36dbfc9c9cb609bf8..4b90f9b64abe9f089ba56b13d5a00de33343bfb9 100644 +--- a/arch/arm64/configs/bcmrpi3_defconfig ++++ b/arch/arm64/configs/bcmrpi3_defconfig +@@ -841,6 +841,7 @@ CONFIG_SND_VIRMIDI=m + CONFIG_SND_MTPAV=m + CONFIG_SND_SERIAL_U16550=m + CONFIG_SND_MPU401=m ++CONFIG_SND_BCM2835=m + CONFIG_SND_USB_AUDIO=m + CONFIG_SND_USB_UA101=m + CONFIG_SND_USB_CAIAQ=m +@@ -1125,7 +1126,6 @@ CONFIG_FB_TFT_UPD161704=m + CONFIG_FB_TFT_WATTEROTT=m + CONFIG_FB_FLEX=m + CONFIG_FB_TFT_FBTFT_DEVICE=m +-# CONFIG_BCM2708_VCHIQ is not set + CONFIG_MAILBOX=y + CONFIG_BCM2835_MBOX=y + # CONFIG_IOMMU_SUPPORT is not set + +From 03d5ad561d3ffd312f88445ec5f6ec0ab9527fde Mon Sep 17 00:00:00 2001 +From: Michael Zoran +Date: Thu, 12 Jan 2017 19:14:03 -0800 +Subject: [PATCH 109/143] ARM64: Run bcmrpi3_defconfig through savedefconfig. + +Signed-off-by: Michael Zoran +--- + arch/arm64/configs/bcmrpi3_defconfig | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig +index 4b90f9b64abe9f089ba56b13d5a00de33343bfb9..dac962ca1634662ce7d966f1ffb53b5bfa27c506 100644 +--- a/arch/arm64/configs/bcmrpi3_defconfig ++++ b/arch/arm64/configs/bcmrpi3_defconfig +@@ -113,8 +113,6 @@ CONFIG_NF_CONNTRACK=m + CONFIG_NF_CONNTRACK_ZONES=y + CONFIG_NF_CONNTRACK_EVENTS=y + CONFIG_NF_CONNTRACK_TIMESTAMP=y +-CONFIG_NF_CT_PROTO_DCCP=m +-CONFIG_NF_CT_PROTO_UDPLITE=m + CONFIG_NF_CONNTRACK_AMANDA=m + CONFIG_NF_CONNTRACK_FTP=m + CONFIG_NF_CONNTRACK_H323=m +@@ -177,7 +175,6 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m + CONFIG_NETFILTER_XT_MATCH_RATEEST=m + CONFIG_NETFILTER_XT_MATCH_REALM=m + CONFIG_NETFILTER_XT_MATCH_RECENT=m +-CONFIG_NETFILTER_XT_MATCH_SOCKET=m + CONFIG_NETFILTER_XT_MATCH_STATE=m + CONFIG_NETFILTER_XT_MATCH_STATISTIC=m + CONFIG_NETFILTER_XT_MATCH_STRING=m +@@ -578,7 +575,6 @@ CONFIG_GAMEPORT_L4=m + # CONFIG_BCM2835_DEVGPIOMEM is not set + # CONFIG_BCM2835_SMI_DEV is not set + # CONFIG_LEGACY_PTYS is not set +-# CONFIG_DEVKMEM is not set + CONFIG_SERIAL_8250=y + # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set + CONFIG_SERIAL_8250_CONSOLE=y +@@ -1095,7 +1091,6 @@ CONFIG_LIRC_STAGING=y + CONFIG_LIRC_IMON=m + CONFIG_LIRC_RPI=m + CONFIG_LIRC_SASEM=m +-CONFIG_LIRC_SERIAL=m + CONFIG_FB_TFT=m + CONFIG_FB_TFT_AGM1264K_FL=m + CONFIG_FB_TFT_BD663474=m + +From bae403b696c8f60057e8a025886ae67b287fc4c0 Mon Sep 17 00:00:00 2001 From: Electron752 Date: Sat, 14 Jan 2017 02:54:26 -0800 -Subject: [PATCH 123/149] ARM64: Enable Kernel Address Space Randomization +Subject: [PATCH 110/143] ARM64: Enable Kernel Address Space Randomization (#1792) Randomization allows the mapping between virtual addresses and physical @@ -127038,7 +125420,7 @@ Signed-off-by: Michael Zoran 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig -index c7e891d72969a388d9b135a36dbfc9c9cb609bf8..974d8889c0cf695eb88b57bbef11bc5aa556b635 100644 +index dac962ca1634662ce7d966f1ffb53b5bfa27c506..aae33b4b3c3e736ea7cd3ca242158ad6ba558aff 100644 --- a/arch/arm64/configs/bcmrpi3_defconfig +++ b/arch/arm64/configs/bcmrpi3_defconfig @@ -53,6 +53,7 @@ CONFIG_ARMV8_DEPRECATED=y @@ -127050,10 +125432,10 @@ index c7e891d72969a388d9b135a36dbfc9c9cb609bf8..974d8889c0cf695eb88b57bbef11bc5a CONFIG_BINFMT_MISC=y CONFIG_COMPAT=y -From 5cfbc146224a3927a6df84d785d0232dffede66e Mon Sep 17 00:00:00 2001 +From 3942188f6df384656ecc00a8721bdbc1cdea8438 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sun, 15 Jan 2017 07:31:59 -0800 -Subject: [PATCH 124/149] ARM64: Enable RTL8187/RTL8192CU wifi in build config +Subject: [PATCH 111/143] ARM64: Enable RTL8187/RTL8192CU wifi in build config These drivers build now, so they can be enabled back in the build configuration just like they are for @@ -127065,10 +125447,10 @@ Signed-off-by: Michael Zoran 1 file changed, 2 insertions(+) diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig -index 974d8889c0cf695eb88b57bbef11bc5aa556b635..4670a490dfb1e582ec24a3b39a3cb9b2488b1864 100644 +index aae33b4b3c3e736ea7cd3ca242158ad6ba558aff..b7d762df19b85e369a32cd823dfd062145bdefa7 100644 --- a/arch/arm64/configs/bcmrpi3_defconfig +++ b/arch/arm64/configs/bcmrpi3_defconfig -@@ -531,6 +531,8 @@ CONFIG_RT2800USB_RT3573=y +@@ -528,6 +528,8 @@ CONFIG_RT2800USB_RT3573=y CONFIG_RT2800USB_RT53XX=y CONFIG_RT2800USB_RT55XX=y CONFIG_RT2800USB_UNKNOWN=y @@ -127078,10 +125460,10 @@ index 974d8889c0cf695eb88b57bbef11bc5aa556b635..4670a490dfb1e582ec24a3b39a3cb9b2 CONFIG_ZD1211RW=m CONFIG_MAC80211_HWSIM=m -From 5bcbaf6edf9d75012b7150d7341cb36df540f897 Mon Sep 17 00:00:00 2001 +From 9d0130fcb9311c2db10e4b49b4faab7e28f19d4b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 16 Jan 2017 14:53:12 +0000 -Subject: [PATCH 125/149] BCM270X_DT: Add spi0-cs overlay +Subject: [PATCH 112/143] BCM270X_DT: Add spi0-cs overlay The spi0-cs overlay allows the software chip selectts to be modified using the cs0_pin and cs1_pin parameters. @@ -127169,10 +125551,10 @@ index 0000000000000000000000000000000000000000..7f79029d043c04d7496c7c3480450c69 + }; +}; -From 86353d0f5bf515a823da66db6d50f71117005387 Mon Sep 17 00:00:00 2001 +From 06935466e531c3423bb46c5043b14d0577ce113d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 Jul 2016 22:09:24 +0100 -Subject: [PATCH 126/149] spi-bcm2835: Disable forced software CS +Subject: [PATCH 113/143] spi-bcm2835: Disable forced software CS Select software CS in bcm2708_common.dtsi, and disable the automatic conversion in the driver to allow hardware CS to be re-enabled with an @@ -127186,10 +125568,10 @@ Signed-off-by: Phil Elwell 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi -index 74dd21b7373c7564ede01d84a4f63b93a6d52fa7..51cdefbf5eb265f49bd05e0aa91dfbeee3fbfdcc 100644 +index 9a44da19089717f02462c657840ae9f24fd942ba..b710a4d67b8ec8c8c18ce8efb6f270e7cfb68e52 100644 --- a/arch/arm/boot/dts/bcm283x.dtsi +++ b/arch/arm/boot/dts/bcm283x.dtsi -@@ -163,6 +163,7 @@ +@@ -366,6 +366,7 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; @@ -127198,141 +125580,10 @@ index 74dd21b7373c7564ede01d84a4f63b93a6d52fa7..51cdefbf5eb265f49bd05e0aa91dfbee i2c0: i2c@7e205000 { -From f804c96b11f07849e37fe71e732cfc855b6d5b7f Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Mon, 16 Jan 2017 16:33:54 +0000 -Subject: [PATCH 127/149] config: Add CONFIG_TCP_CONG_BBR See: - https://github.com/raspberrypi/linux/issues/1784 - ---- - arch/arm/configs/bcm2709_defconfig | 2 ++ - arch/arm/configs/bcmrpi_defconfig | 2 ++ - 2 files changed, 4 insertions(+) - -diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 12e8155c175deaecea6fcf1f81ec3f6c1ddf5f7c..22ade0fe5a1515b59b0ac6e58bd133b64e6252f3 100644 ---- a/arch/arm/configs/bcm2709_defconfig -+++ b/arch/arm/configs/bcm2709_defconfig -@@ -99,6 +99,8 @@ CONFIG_INET_XFRM_MODE_TRANSPORT=m - CONFIG_INET_XFRM_MODE_TUNNEL=m - CONFIG_INET_XFRM_MODE_BEET=m - CONFIG_INET_DIAG=m -+CONFIG_TCP_CONG_ADVANCED=y -+CONFIG_TCP_CONG_BBR=m - CONFIG_IPV6=m - CONFIG_IPV6_ROUTER_PREF=y - CONFIG_INET6_AH=m -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 8acee9f31202ec14f2933d92dd70831cda8d7b51..219f67051a2542329449b0099165ae2885022bec 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -95,6 +95,8 @@ CONFIG_INET_XFRM_MODE_TRANSPORT=m - CONFIG_INET_XFRM_MODE_TUNNEL=m - CONFIG_INET_XFRM_MODE_BEET=m - CONFIG_INET_DIAG=m -+CONFIG_TCP_CONG_ADVANCED=y -+CONFIG_TCP_CONG_BBR=m - CONFIG_IPV6=m - CONFIG_IPV6_ROUTER_PREF=y - CONFIG_INET6_AH=m - -From 54682764ccd01af5122b7b2619575d2371646124 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Mon, 16 Jan 2017 21:02:26 +0000 -Subject: [PATCH 128/149] Revert "bcm2835-i2s: Changes for allowing asymmetric - sample formats." - -This reverts commit f5a6236a32e82068122301d246a94ca755d61704. - -See: https://github.com/raspberrypi/linux/issues/1799 - -Signed-off-by: Phil Elwell ---- - sound/soc/bcm/bcm2835-i2s.c | 54 ++++++++++++++------------------------------- - 1 file changed, 16 insertions(+), 38 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 171c2401dfe192740fca3356268aff6432f284ea..6ba20498202ed36906b52096893a88867a79269f 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -237,9 +237,7 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - unsigned int sampling_rate = params_rate(params); - unsigned int data_length, data_delay, bclk_ratio; - unsigned int ch1pos, ch2pos, mode, format; -- unsigned int previous_ftxp, previous_frxp; - uint32_t csreg; -- bool packed; - - /* - * If a stream is already enabled, -@@ -322,46 +320,26 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - return -EINVAL; - } - -- /* Set the format for the matching stream direction. */ -- switch (substream->stream) { -- case SNDRV_PCM_STREAM_PLAYBACK: -- regmap_write(dev->i2s_regmap, BCM2835_I2S_TXC_A_REG, format); -- break; -- case SNDRV_PCM_STREAM_CAPTURE: -- regmap_write(dev->i2s_regmap, BCM2835_I2S_RXC_A_REG, format); -- break; -- default: -- return -EINVAL; -- } -+ /* -+ * Set format for both streams. -+ * We cannot set another frame length -+ * (and therefore word length) anyway, -+ * so the format will be the same. -+ */ -+ regmap_write(dev->i2s_regmap, BCM2835_I2S_RXC_A_REG, format); -+ regmap_write(dev->i2s_regmap, BCM2835_I2S_TXC_A_REG, format); - - /* Setup the I2S mode */ -- /* Keep existing FTXP and FRXP values. */ -- regmap_read(dev->i2s_regmap, BCM2835_I2S_MODE_A_REG, &mode); -- -- previous_ftxp = mode & BCM2835_I2S_FTXP; -- previous_frxp = mode & BCM2835_I2S_FRXP; -- - mode = 0; - -- /* -- * Retain the frame packed mode (2 channels per 32 bit word) -- * of the other direction stream intact. The formats of each -- * direction can be different as long as the frame length is -- * shared for both. -- */ -- packed = data_length <= 16; -- -- switch (substream->stream) { -- case SNDRV_PCM_STREAM_PLAYBACK: -- mode |= previous_frxp; -- mode |= packed ? BCM2835_I2S_FTXP : 0; -- break; -- case SNDRV_PCM_STREAM_CAPTURE: -- mode |= previous_ftxp; -- mode |= packed ? BCM2835_I2S_FRXP : 0; -- break; -- default: -- return -EINVAL; -+ if (data_length <= 16) { -+ /* -+ * Use frame packed mode (2 channels per 32 bit word) -+ * We cannot set another frame length in the second stream -+ * (and therefore word length) anyway, -+ * so the format will be the same. -+ */ -+ mode |= BCM2835_I2S_FTXP | BCM2835_I2S_FRXP; - } - - mode |= BCM2835_I2S_FLEN(bclk_ratio - 1); - -From eedc59743c00dde5c9d8cc84e1d2201c1020e1a6 Mon Sep 17 00:00:00 2001 +From 344059857429edb2332ea788e2c256668f24a609 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 17 Jan 2017 11:34:58 +0000 -Subject: [PATCH 129/149] BCM270X_DT: Enable UART0 on CM3 +Subject: [PATCH 114/143] BCM270X_DT: Enable UART0 on CM3 Signed-off-by: Phil Elwell --- @@ -127355,24 +125606,41 @@ index 41874c25a84226c0e4af92ec4059e0a571fe6123..3ba6e621856c288ae4694f758604619f sdhost_pins: sdhost_pins { brcm,pins = <48 49 50 51 52 53>; -From aa0ddaf213aa2aaa6c2e0b1bfdd084dc5596a110 Mon Sep 17 00:00:00 2001 +From af4413600326fef6041165c26a66c1cee892233a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 17 Jan 2017 14:39:39 +0000 -Subject: [PATCH 130/149] config: Add CONFIG_MD_M25P80 and CONFIG_MD_SPI_NOR +Subject: [PATCH 115/143] config: Add CONFIG_MD_M25P80 and CONFIG_MD_SPI_NOR See: https://github.com/raspberrypi/linux/issues/1781 Signed-off-by: Phil Elwell --- - arch/arm/configs/bcm2709_defconfig | 2 ++ - arch/arm/configs/bcmrpi_defconfig | 2 ++ - 2 files changed, 4 insertions(+) + arch/arm/configs/bcm2709_defconfig | 7 ++----- + arch/arm/configs/bcmrpi_defconfig | 7 ++----- + 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 22ade0fe5a1515b59b0ac6e58bd133b64e6252f3..d5d699e175025e5d928fcac04d22d1508e0b5fde 100644 +index 12e8155c175deaecea6fcf1f81ec3f6c1ddf5f7c..c36f01d28097a513b32df092ce64a7d6b974e615 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig -@@ -406,7 +406,9 @@ CONFIG_DMA_CMA=y +@@ -115,8 +115,6 @@ CONFIG_NF_CONNTRACK=m + CONFIG_NF_CONNTRACK_ZONES=y + CONFIG_NF_CONNTRACK_EVENTS=y + CONFIG_NF_CONNTRACK_TIMESTAMP=y +-CONFIG_NF_CT_PROTO_DCCP=m +-CONFIG_NF_CT_PROTO_UDPLITE=m + CONFIG_NF_CONNTRACK_AMANDA=m + CONFIG_NF_CONNTRACK_FTP=m + CONFIG_NF_CONNTRACK_H323=m +@@ -179,7 +177,6 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m + CONFIG_NETFILTER_XT_MATCH_RATEEST=m + CONFIG_NETFILTER_XT_MATCH_REALM=m + CONFIG_NETFILTER_XT_MATCH_RECENT=m +-CONFIG_NETFILTER_XT_MATCH_SOCKET=m + CONFIG_NETFILTER_XT_MATCH_STATE=m + CONFIG_NETFILTER_XT_MATCH_STATISTIC=m + CONFIG_NETFILTER_XT_MATCH_STRING=m +@@ -404,7 +401,9 @@ CONFIG_DMA_CMA=y CONFIG_CMA_SIZE_MBYTES=5 CONFIG_MTD=m CONFIG_MTD_BLOCK=m @@ -127382,11 +125650,44 @@ index 22ade0fe5a1515b59b0ac6e58bd133b64e6252f3..d5d699e175025e5d928fcac04d22d150 CONFIG_MTD_UBI=m CONFIG_OF_CONFIGFS=y CONFIG_ZRAM=m +@@ -584,7 +583,6 @@ CONFIG_BCM_VC_CMA=y + CONFIG_BCM_VCIO=y + CONFIG_BCM_VC_SM=y + # CONFIG_LEGACY_PTYS is not set +-# CONFIG_DEVKMEM is not set + CONFIG_SERIAL_8250=y + # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set + CONFIG_SERIAL_8250_CONSOLE=y +@@ -1104,7 +1102,6 @@ CONFIG_LIRC_STAGING=y + CONFIG_LIRC_IMON=m + CONFIG_LIRC_RPI=m + CONFIG_LIRC_SASEM=m +-CONFIG_LIRC_SERIAL=m + CONFIG_FB_TFT=m + CONFIG_FB_TFT_AGM1264K_FL=m + CONFIG_FB_TFT_BD663474=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 219f67051a2542329449b0099165ae2885022bec..c4898d63d74718097ec3a1d1fe60b2307a6a3140 100644 +index 8acee9f31202ec14f2933d92dd70831cda8d7b51..aca8903da3156de11ba62afa64a0693900ee3611 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -402,7 +402,9 @@ CONFIG_DMA_CMA=y +@@ -111,8 +111,6 @@ CONFIG_NF_CONNTRACK=m + CONFIG_NF_CONNTRACK_ZONES=y + CONFIG_NF_CONNTRACK_EVENTS=y + CONFIG_NF_CONNTRACK_TIMESTAMP=y +-CONFIG_NF_CT_PROTO_DCCP=m +-CONFIG_NF_CT_PROTO_UDPLITE=m + CONFIG_NF_CONNTRACK_AMANDA=m + CONFIG_NF_CONNTRACK_FTP=m + CONFIG_NF_CONNTRACK_H323=m +@@ -175,7 +173,6 @@ CONFIG_NETFILTER_XT_MATCH_QUOTA=m + CONFIG_NETFILTER_XT_MATCH_RATEEST=m + CONFIG_NETFILTER_XT_MATCH_REALM=m + CONFIG_NETFILTER_XT_MATCH_RECENT=m +-CONFIG_NETFILTER_XT_MATCH_SOCKET=m + CONFIG_NETFILTER_XT_MATCH_STATE=m + CONFIG_NETFILTER_XT_MATCH_STATISTIC=m + CONFIG_NETFILTER_XT_MATCH_STRING=m +@@ -400,7 +397,9 @@ CONFIG_DMA_CMA=y CONFIG_CMA_SIZE_MBYTES=5 CONFIG_MTD=m CONFIG_MTD_BLOCK=m @@ -127396,11 +125697,27 @@ index 219f67051a2542329449b0099165ae2885022bec..c4898d63d74718097ec3a1d1fe60b230 CONFIG_MTD_UBI=m CONFIG_OF_CONFIGFS=y CONFIG_ZRAM=m +@@ -579,7 +578,6 @@ CONFIG_BCM_VC_CMA=y + CONFIG_BCM_VCIO=y + CONFIG_BCM_VC_SM=y + # CONFIG_LEGACY_PTYS is not set +-# CONFIG_DEVKMEM is not set + CONFIG_SERIAL_8250=y + # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set + CONFIG_SERIAL_8250_CONSOLE=y +@@ -1113,7 +1111,6 @@ CONFIG_LIRC_STAGING=y + CONFIG_LIRC_IMON=m + CONFIG_LIRC_RPI=m + CONFIG_LIRC_SASEM=m +-CONFIG_LIRC_SERIAL=m + CONFIG_FB_TFT=m + CONFIG_FB_TFT_AGM1264K_FL=m + CONFIG_FB_TFT_BD663474=m -From 0ba04737b4084397e421438959854be82e9ed39a Mon Sep 17 00:00:00 2001 +From 2db22e08eb782d9b31df67d4a2d2b6d3e2229222 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:33:51 -0800 -Subject: [PATCH 131/149] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 +Subject: [PATCH 116/143] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 In ARM64, the FIQ mechanism used by this driver is not current implemented. As a workaround, reqular IRQ is used instead @@ -127743,10 +126060,10 @@ index 6b2c7d0c93f36a63863ff4b0ecc1f3eab77e058b..d7b700ff17821ad1944e36721fe6b2db /** The OS page size */ #define DWC_OS_PAGE_SIZE PAGE_SIZE -From f73fbbcf313db778386bc6c9876e82f9dfd8f539 Mon Sep 17 00:00:00 2001 +From 3fd685e26219daae1087d48f160f6121f6fffb87 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:43:57 -0800 -Subject: [PATCH 132/149] ARM64: Round-Robin dispatch IRQs between CPUs. +Subject: [PATCH 117/143] ARM64: Round-Robin dispatch IRQs between CPUs. IRQ-CPU mapping is round robined on ARM64 to increase concurrency and allow multiple interrupts to be serviced @@ -127788,7 +126105,7 @@ index 8ed457fd74bd23bee27b64a2c9e3828ce0e4fb87..a035e1ceacc0494fa293e6811ff8f7e3 static int armctrl_xlate(struct irq_domain *d, struct device_node *ctrlr, diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c -index 93e3f7660c4230c9f1dd3b195958cb498949b0ca..486bcbfb32305ee417f6b3be7e91a3ff069a586c 100644 +index a8db33b50ad9ff83d284fa54fe4d3b65f859df0f..67dcac46cca72db4ebe2300eab04f0a867e8e14b 100644 --- a/drivers/irqchip/irq-bcm2836.c +++ b/drivers/irqchip/irq-bcm2836.c @@ -145,6 +145,27 @@ static void bcm2836_arm_irqchip_unmask_gpu_irq(struct irq_data *d) @@ -127820,10 +126137,10 @@ index 93e3f7660c4230c9f1dd3b195958cb498949b0ca..486bcbfb32305ee417f6b3be7e91a3ff .name = "bcm2836-gpu", .irq_mask = bcm2836_arm_irqchip_mask_gpu_irq, -From 9fed57ad096fea66274b5a6abb8f2d0c40bed7da Mon Sep 17 00:00:00 2001 +From 5798b8a6ee69242586c8d244d79acb4a49b32ffe Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:45:03 -0800 -Subject: [PATCH 133/149] ARM64: Enable DWC_OTG Driver In ARM64 Build +Subject: [PATCH 118/143] ARM64: Enable DWC_OTG Driver In ARM64 Build Config(bcmrpi3_defconfig) Signed-off-by: Michael Zoran @@ -127832,10 +126149,10 @@ Signed-off-by: Michael Zoran 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig -index 4670a490dfb1e582ec24a3b39a3cb9b2488b1864..8c4392344eb4495689c220d5d176ee8c189079fd 100644 +index b7d762df19b85e369a32cd823dfd062145bdefa7..4d85c231c5ea0244e1b05fb4a5e3c8fd3e651ddf 100644 --- a/arch/arm64/configs/bcmrpi3_defconfig +++ b/arch/arm64/configs/bcmrpi3_defconfig -@@ -932,6 +932,7 @@ CONFIG_USB_HIDDEV=y +@@ -929,6 +929,7 @@ CONFIG_USB_HIDDEV=y CONFIG_USB=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y CONFIG_USB_MON=m @@ -127844,10 +126161,10 @@ index 4670a490dfb1e582ec24a3b39a3cb9b2488b1864..8c4392344eb4495689c220d5d176ee8c CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE_REALTEK=m -From f5c19a9417262d924ac229bfd9a40a8e03b69048 Mon Sep 17 00:00:00 2001 +From 72a5e963ed3e8137b91a721c8e5c151746a86b7d Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:46:04 -0800 -Subject: [PATCH 134/149] ARM64: Use dwc_otg driver by default for USB. +Subject: [PATCH 119/143] ARM64: Use dwc_otg driver by default for USB. If it breaks on anybody, they can use the standard device tree overlays to switch back to the dwc2 driver. @@ -127873,10 +126190,46 @@ index f6def5d7e5d622cf09e8f87332c7374fe28da08b..3e134a1208610b90e2d0fc22f03c6e9f -}; -#endif -From 9bcbde4275e9332cd79e42746a3bcc107023b30e Mon Sep 17 00:00:00 2001 +From de0e945d578f47f93f927ef11f16b92eb0fe1de8 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 19 Jan 2017 11:18:55 +0000 +Subject: [PATCH 120/143] config: Add CONFIG_USB_DWC2 and CONFIG_USB_GADGET + +The introduction of CM3 makes gadget mode on 2709 a useful option, +so enable the building of the required modules. Note that these +modules are not loaded by default and must be enabled with a DT +overlay. + +Signed-off-by: Phil Elwell +--- + arch/arm/configs/bcm2709_defconfig | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index c36f01d28097a513b32df092ce64a7d6b974e615..2e2b88fefdf367b2d9190ca227ea6eb393faa666 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -958,6 +958,7 @@ CONFIG_USB_MICROTEK=m + CONFIG_USBIP_CORE=m + CONFIG_USBIP_VHCI_HCD=m + CONFIG_USBIP_HOST=m ++CONFIG_USB_DWC2=m + CONFIG_USB_SERIAL=m + CONFIG_USB_SERIAL_GENERIC=y + CONFIG_USB_SERIAL_AIRCABLE=m +@@ -1030,6 +1031,7 @@ CONFIG_USB_SPEEDTOUCH=m + CONFIG_USB_CXACRU=m + CONFIG_USB_UEAGLEATM=m + CONFIG_USB_XUSBATM=m ++CONFIG_USB_GADGET=m + CONFIG_MMC=y + CONFIG_MMC_BLOCK_MINORS=32 + CONFIG_MMC_BCM2835=y + +From bf4fff3dc99c07e8aed32dcbe9e77bf88199a5ba Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 23 Jan 2017 17:36:50 +0000 -Subject: [PATCH 135/149] BCM270X_DT: Add reference to audio_pins to CM dtb +Subject: [PATCH 121/143] BCM270X_DT: Add reference to audio_pins to CM dtb The CM1 dtb contains an empty audio_pins node, but no reference to it. Adding the usual pinctrl reference from the audio node enables the @@ -127904,10 +126257,10 @@ index eb8662f0d222b4c0a9a2bcb8bccb13e86a0006b3..10be69972bd1440f574e35d515f3d6a0 hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; }; -From c89a31b53c17f273198270a18d0613e0c54be761 Mon Sep 17 00:00:00 2001 +From acd57d74b3c2b58a8e30fda9a7690ab3617e12d3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 25 Jan 2017 11:30:38 +0000 -Subject: [PATCH 136/149] config: Add additional network scheduling modules +Subject: [PATCH 122/143] config: Add additional network scheduling modules --- arch/arm/configs/bcm2709_defconfig | 4 ++++ @@ -127915,10 +126268,10 @@ Subject: [PATCH 136/149] config: Add additional network scheduling modules 2 files changed, 8 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index d5d699e175025e5d928fcac04d22d1508e0b5fde..a02d5ebf170be870acb715cc30611bc57e7fd39b 100644 +index 2e2b88fefdf367b2d9190ca227ea6eb393faa666..ce5b564ba5fd0e152a7679747b0d252b8bb2c77a 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig -@@ -296,6 +296,7 @@ CONFIG_NET_SCHED=y +@@ -291,6 +291,7 @@ CONFIG_NET_SCHED=y CONFIG_NET_SCH_CBQ=m CONFIG_NET_SCH_HTB=m CONFIG_NET_SCH_HFSC=m @@ -127926,7 +126279,7 @@ index d5d699e175025e5d928fcac04d22d1508e0b5fde..a02d5ebf170be870acb715cc30611bc5 CONFIG_NET_SCH_PRIO=m CONFIG_NET_SCH_MULTIQ=m CONFIG_NET_SCH_RED=m -@@ -312,6 +313,9 @@ CONFIG_NET_SCH_CHOKE=m +@@ -307,6 +308,9 @@ CONFIG_NET_SCH_CHOKE=m CONFIG_NET_SCH_QFQ=m CONFIG_NET_SCH_CODEL=m CONFIG_NET_SCH_FQ_CODEL=m @@ -127937,10 +126290,10 @@ index d5d699e175025e5d928fcac04d22d1508e0b5fde..a02d5ebf170be870acb715cc30611bc5 CONFIG_NET_SCH_PLUG=m CONFIG_NET_CLS_BASIC=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index c4898d63d74718097ec3a1d1fe60b2307a6a3140..b448eaa866c200f48351819072c7fefcd8ad8132 100644 +index aca8903da3156de11ba62afa64a0693900ee3611..c8c66751f263227e86cc21ad5b23861a88a636a6 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -292,6 +292,7 @@ CONFIG_NET_SCHED=y +@@ -287,6 +287,7 @@ CONFIG_NET_SCHED=y CONFIG_NET_SCH_CBQ=m CONFIG_NET_SCH_HTB=m CONFIG_NET_SCH_HFSC=m @@ -127948,7 +126301,7 @@ index c4898d63d74718097ec3a1d1fe60b2307a6a3140..b448eaa866c200f48351819072c7fefc CONFIG_NET_SCH_PRIO=m CONFIG_NET_SCH_MULTIQ=m CONFIG_NET_SCH_RED=m -@@ -308,6 +309,9 @@ CONFIG_NET_SCH_CHOKE=m +@@ -303,6 +304,9 @@ CONFIG_NET_SCH_CHOKE=m CONFIG_NET_SCH_QFQ=m CONFIG_NET_SCH_CODEL=m CONFIG_NET_SCH_FQ_CODEL=m @@ -127959,10 +126312,48 @@ index c4898d63d74718097ec3a1d1fe60b2307a6a3140..b448eaa866c200f48351819072c7fefc CONFIG_NET_SCH_PLUG=m CONFIG_NET_CLS_BASIC=m -From 464f3dd7fdb322ed62ec9c9163b26492e8f40b5e Mon Sep 17 00:00:00 2001 +From 7eb8cc55a5c43be9072c29138436df54131cc9da Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Mon, 16 Jan 2017 16:33:54 +0000 +Subject: [PATCH 123/143] config: Add CONFIG_TCP_CONG_BBR See: + https://github.com/raspberrypi/linux/issues/1784 + +--- + arch/arm/configs/bcm2709_defconfig | 2 ++ + arch/arm/configs/bcmrpi_defconfig | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index ce5b564ba5fd0e152a7679747b0d252b8bb2c77a..4c0d62d91c2ad6408fbff730b08cb76b62c5e068 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -99,6 +99,8 @@ CONFIG_INET_XFRM_MODE_TRANSPORT=m + CONFIG_INET_XFRM_MODE_TUNNEL=m + CONFIG_INET_XFRM_MODE_BEET=m + CONFIG_INET_DIAG=m ++CONFIG_TCP_CONG_ADVANCED=y ++CONFIG_TCP_CONG_BBR=m + CONFIG_IPV6=m + CONFIG_IPV6_ROUTER_PREF=y + CONFIG_INET6_AH=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index c8c66751f263227e86cc21ad5b23861a88a636a6..e483bdb7aa869b212ef69ed779c6055ef3b70e2a 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -95,6 +95,8 @@ CONFIG_INET_XFRM_MODE_TRANSPORT=m + CONFIG_INET_XFRM_MODE_TUNNEL=m + CONFIG_INET_XFRM_MODE_BEET=m + CONFIG_INET_DIAG=m ++CONFIG_TCP_CONG_ADVANCED=y ++CONFIG_TCP_CONG_BBR=m + CONFIG_IPV6=m + CONFIG_IPV6_ROUTER_PREF=y + CONFIG_INET6_AH=m + +From 736809cbe89cb56b087efaaccc55eb4a5627db33 Mon Sep 17 00:00:00 2001 From: chris johnson Date: Sun, 22 Jan 2017 03:27:31 +0000 -Subject: [PATCH 137/149] ASoC: A simple-card overlay for ADAU7002 +Subject: [PATCH 124/143] ASoC: A simple-card overlay for ADAU7002 Usage: `dtoverlay=adau7002-simple` --- @@ -128060,10 +126451,10 @@ index 0000000000000000000000000000000000000000..e67e6625d7967abc92cf00cb604d4c12 + }; +}; -From f936625f7b6bf04ee9bf4f235b3ef275e8e06d77 Mon Sep 17 00:00:00 2001 +From 8178b62fa432470071fb0fca59a200376094c8b8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Jan 2017 21:17:23 +0000 -Subject: [PATCH 138/149] config: Add SND_SOC_ADAU7002 codec module +Subject: [PATCH 125/143] config: Add SND_SOC_ADAU7002 codec module As there is now an overlay requiring it, build the codec module. @@ -128074,10 +126465,10 @@ Signed-off-by: Phil Elwell 2 files changed, 2 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index a02d5ebf170be870acb715cc30611bc57e7fd39b..31163b59b9c6f2cc4f4f94afe1b10bd1a195470f 100644 +index 4c0d62d91c2ad6408fbff730b08cb76b62c5e068..e017702a34d1e6c7df7aea26032b1fc70b330a40 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig -@@ -884,6 +884,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m +@@ -880,6 +880,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m CONFIG_SND_PISOUND=m CONFIG_SND_SOC_ADAU1701=m @@ -128086,10 +126477,10 @@ index a02d5ebf170be870acb715cc30611bc57e7fd39b..31163b59b9c6f2cc4f4f94afe1b10bd1 CONFIG_SND_SOC_WM8804_I2C=m CONFIG_SND_SIMPLE_CARD=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index b448eaa866c200f48351819072c7fefcd8ad8132..5105a592c9bcfee1cc6a8b50fd1c6c32f1381158 100644 +index e483bdb7aa869b212ef69ed779c6055ef3b70e2a..1927b1671b6eced73e4b4d76352bb4b1301d077c 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -878,6 +878,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m +@@ -874,6 +874,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m CONFIG_SND_PISOUND=m CONFIG_SND_SOC_ADAU1701=m @@ -128098,10 +126489,10 @@ index b448eaa866c200f48351819072c7fefcd8ad8132..5105a592c9bcfee1cc6a8b50fd1c6c32 CONFIG_SND_SOC_WM8804_I2C=m CONFIG_SND_SIMPLE_CARD=m -From bb664687dcd742f62272ab66c02ed61954d11869 Mon Sep 17 00:00:00 2001 +From a6d7fbc3f756abc3c51088ac8509f85c49b16fff Mon Sep 17 00:00:00 2001 From: Scott Ellis Date: Fri, 27 Jan 2017 06:42:42 -0500 -Subject: [PATCH 139/149] Add overlay for mcp3008 adc (#1818) +Subject: [PATCH 126/143] Add overlay for mcp3008 adc (#1818) Some example usage: @@ -128387,65 +126778,10 @@ index 0000000000000000000000000000000000000000..06bf4264959c380d8a9f90f74e780397 + }; +}; -From 98e7504d55858766ba2a9d7450ef18a383845873 Mon Sep 17 00:00:00 2001 -From: ED6E0F17 -Date: Fri, 3 Feb 2017 14:52:42 +0000 -Subject: [PATCH 140/149] usb: dwc2: Avoid suspending if we're in gadget mode - (#1825) - -I've found when booting HiKey with the usb gadget cable attached -if I then try to connect via adb, I get an infinite spew of: - -dwc2 f72c0000.usb: dwc2_hsotg_ep_sethalt(ep ffffffc0790ecb18 ep1out, 0) -dwc2 f72c0000.usb: dwc2_hsotg_ep_sethalt(ep ffffffc0790eca18 ep1in, 0) - -It seems that the usb autosuspend is suspending the bus shortly -after bootup when the gadget cable is attached. So when adbd -then tries to use the device, it doesn't work and it then tries -to restart it over and over via the ep_sethalt calls (via -FUNCTIONFS_CLEAR_HALT ioctl). - -Chen Yu suggested this patch to avoid suspending if we're -in device mode, and it avoids the problem. - -Cc: Wei Xu -Cc: Guodong Xu -Cc: Amit Pundir -Cc: Rob Herring -Cc: John Youn -Cc: Douglas Anderson -Cc: Chen Yu -Cc: Kishon Vijay Abraham I -Cc: Felipe Balbi -Cc: Greg Kroah-Hartman -Cc: linux-usb@vger.kernel.org -Suggested-by: Chen Yu -Signed-off-by: John Stultz -Signed-off-by: John Youn -Signed-off-by: Felipe Balbi ---- - drivers/usb/dwc2/hcd.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c -index df5a065780054f21841ca9f08b8ab118922c530b..619ccfe1eafc4643b16970f8a1129ff9cac38013 100644 ---- a/drivers/usb/dwc2/hcd.c -+++ b/drivers/usb/dwc2/hcd.c -@@ -4365,6 +4365,9 @@ static int _dwc2_hcd_suspend(struct usb_hcd *hcd) - if (!HCD_HW_ACCESSIBLE(hcd)) - goto unlock; - -+ if (hsotg->op_state == OTG_STATE_B_PERIPHERAL) -+ goto unlock; -+ - if (!hsotg->core_params->hibernation) - goto skip_power_saving; - - -From d561e58e9ee26109accc414327bfe142696d6d59 Mon Sep 17 00:00:00 2001 +From fd202b0efb38df7c056c3a0e97cfdebb6470c04d Mon Sep 17 00:00:00 2001 From: JamesH65 Date: Mon, 6 Feb 2017 15:24:47 +0000 -Subject: [PATCH 141/149] gpio_mem: Remove unnecessary dev_info output (#1830) +Subject: [PATCH 127/143] gpio_mem: Remove unnecessary dev_info output (#1830) The open function was spamming syslog every time called, so have removed call completely. @@ -128467,10 +126803,223 @@ index 911f5b7393ed48ceed8751f06967ae6463453f9c..f5e7f1ba8fb6f18dee77fad06a17480c dev_err(inst->dev, "Unknown minor device: %d", dev); ret = -ENXIO; -From 6cfe84eeb23c071019dc6ee8aa6c32950c572e19 Mon Sep 17 00:00:00 2001 +From 46c74000bbbec747bca0c5ab07a538e64392494c Mon Sep 17 00:00:00 2001 +From: Claggy3 +Date: Sat, 11 Feb 2017 14:00:30 +0000 +Subject: [PATCH 128/143] Update vfpmodule.c + +Christopher Alexander Tobias Schulze - May 2, 2015, 11:57 a.m. +This patch fixes a problem with VFP state save and restore related +to exception handling (panic with message "BUG: unsupported FP +instruction in kernel mode") present on VFP11 floating point units +(as used with ARM1176JZF-S CPUs, e.g. on first generation Raspberry +Pi boards). This patch was developed and discussed on + + https://github.com/raspberrypi/linux/issues/859 + +A precondition to see the crashes is that floating point exception +traps are enabled. In this case, the VFP11 might determine that a FPU +operation needs to trap at a point in time when it is not possible to +signal this to the ARM11 core any more. The VFP11 will then set the +FPEXC.EX bit and store the trapped opcode in FPINST. (In some cases, +a second opcode might have been accepted by the VFP11 before the +exception was detected and could be reported to the ARM11 - in this +case, the VFP11 also sets FPEXC.FP2V and stores the second opcode in +FPINST2.) + +If FPEXC.EX is set, the VFP11 will "bounce" the next FPU opcode issued +by the ARM11 CPU, which will be seen by the ARM11 as an undefined opcode +trap. The VFP support code examines the FPEXC.EX and FPEXC.FP2V bits +to decide what actions to take, i.e., whether to emulate the opcodes +found in FPINST and FPINST2, and whether to retry the bounced instruction. + +If a user space application has left the VFP11 in this "pending trap" +state, the next FPU opcode issued to the VFP11 might actually be the +VSTMIA operation vfp_save_state() uses to store the FPU registers +to memory (in our test cases, when building the signal stack frame). +In this case, the kernel crashes as described above. + +This patch fixes the problem by making sure that vfp_save_state() is +always entered with FPEXC.EX cleared. (The current value of FPEXC has +already been saved, so this does not corrupt the context. Clearing +FPEXC.EX has no effects on FPINST or FPINST2. Also note that many +callers already modify FPEXC by setting FPEXC.EN before invoking +vfp_save_state().) + +This patch also addresses a second problem related to FPEXC.EX: After +returning from signal handling, the kernel reloads the VFP context +from the user mode stack. However, the current code explicitly clears +both FPEXC.EX and FPEXC.FP2V during reload. As VFP11 requires these +bits to be preserved, this patch disables clearing them for VFP +implementations belonging to architecture 1. There should be no +negative side effects: the user can set both bits by executing FPU +opcodes anyway, and while user code may now place arbitrary values +into FPINST and FPINST2 (e.g., non-VFP ARM opcodes) the VFP support +code knows which instructions can be emulated, and rejects other +opcodes with "unhandled bounce" messages, so there should be no +security impact from allowing reloading FPEXC.EX and FPEXC.FP2V. + +Signed-off-by: Christopher Alexander Tobias Schulze +--- + arch/arm/vfp/vfpmodule.c | 25 +++++++++++++++++++------ + 1 file changed, 19 insertions(+), 6 deletions(-) + +diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c +index 569d5a650a4a2c6266ddf8fc6d38e0cd96b985f6..5822a3f60a96510201a6d88828ac5262582e0743 100644 +--- a/arch/arm/vfp/vfpmodule.c ++++ b/arch/arm/vfp/vfpmodule.c +@@ -179,8 +179,11 @@ static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) + * case the thread migrates to a different CPU. The + * restoring is done lazily. + */ +- if ((fpexc & FPEXC_EN) && vfp_current_hw_state[cpu]) ++ if ((fpexc & FPEXC_EN) && vfp_current_hw_state[cpu]) { ++ /* vfp_save_state oopses on VFP11 if EX bit set */ ++ fmxr(FPEXC, fpexc & ~FPEXC_EX); + vfp_save_state(vfp_current_hw_state[cpu], fpexc); ++ } + #endif + + /* +@@ -463,13 +466,16 @@ static int vfp_pm_suspend(void) + /* if vfp is on, then save state for resumption */ + if (fpexc & FPEXC_EN) { + pr_debug("%s: saving vfp state\n", __func__); ++ /* vfp_save_state oopses on VFP11 if EX bit set */ ++ fmxr(FPEXC, fpexc & ~FPEXC_EX); + vfp_save_state(&ti->vfpstate, fpexc); + + /* disable, just in case */ + fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN); + } else if (vfp_current_hw_state[ti->cpu]) { + #ifndef CONFIG_SMP +- fmxr(FPEXC, fpexc | FPEXC_EN); ++ /* vfp_save_state oopses on VFP11 if EX bit set */ ++ fmxr(FPEXC, (fpexc & ~FPEXC_EX) | FPEXC_EN); + vfp_save_state(vfp_current_hw_state[ti->cpu], fpexc); + fmxr(FPEXC, fpexc); + #endif +@@ -532,7 +538,8 @@ void vfp_sync_hwstate(struct thread_info *thread) + /* + * Save the last VFP state on this CPU. + */ +- fmxr(FPEXC, fpexc | FPEXC_EN); ++ /* vfp_save_state oopses on VFP11 if EX bit set */ ++ fmxr(FPEXC, (fpexc & ~FPEXC_EX) | FPEXC_EN); + vfp_save_state(&thread->vfpstate, fpexc | FPEXC_EN); + fmxr(FPEXC, fpexc); + } +@@ -604,6 +611,7 @@ int vfp_restore_user_hwstate(struct user_vfp __user *ufp, + struct vfp_hard_struct *hwstate = &thread->vfpstate.hard; + unsigned long fpexc; + int err = 0; ++ u32 fpsid = fmrx(FPSID); + + /* Disable VFP to avoid corrupting the new thread state. */ + vfp_flush_hwstate(thread); +@@ -627,8 +635,12 @@ int vfp_restore_user_hwstate(struct user_vfp __user *ufp, + /* Ensure the VFP is enabled. */ + fpexc |= FPEXC_EN; + +- /* Ensure FPINST2 is invalid and the exception flag is cleared. */ +- fpexc &= ~(FPEXC_EX | FPEXC_FP2V); ++ /* Mask FPXEC_EX and FPEXC_FP2V if not required by VFP arch */ ++ if ((fpsid & FPSID_ARCH_MASK) != (1 << FPSID_ARCH_BIT)) { ++ /* Ensure FPINST2 is invalid and the exception flag is cleared. */ ++ fpexc &= ~(FPEXC_EX | FPEXC_FP2V); ++ } ++ + hwstate->fpexc = fpexc; + + __get_user_error(hwstate->fpinst, &ufp_exc->fpinst, err); +@@ -698,7 +710,8 @@ void kernel_neon_begin(void) + cpu = get_cpu(); + + fpexc = fmrx(FPEXC) | FPEXC_EN; +- fmxr(FPEXC, fpexc); ++ /* vfp_save_state oopses on VFP11 if EX bit set */ ++ fmxr(FPEXC, fpexc & ~FPEXC_EX); + + /* + * Save the userland NEON/VFP state. Under UP, + +From 9e197d6809356852ca185489f156071cc5d47a7d Mon Sep 17 00:00:00 2001 +From: Michael Zoran +Date: Sat, 11 Feb 2017 01:18:31 -0800 +Subject: [PATCH 129/143] ARM64: Force hardware emulation of deprecated + instructions. + +--- + arch/arm64/kernel/armv8_deprecated.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c +index ecf9298a12d48f11d5833dca0584d8ab028cf422..14e9146709857124891f8a3927efec872fb7be39 100644 +--- a/arch/arm64/kernel/armv8_deprecated.c ++++ b/arch/arm64/kernel/armv8_deprecated.c +@@ -182,10 +182,15 @@ static void __init register_insn_emulation(struct insn_emulation_ops *ops) + + switch (ops->status) { + case INSN_DEPRECATED: ++#if 0 + insn->current_mode = INSN_EMULATE; + /* Disable the HW mode if it was turned on at early boot time */ + run_all_cpu_set_hw_mode(insn, false); ++#else ++ insn->current_mode = INSN_HW; ++ run_all_cpu_set_hw_mode(insn, true); + insn->max = INSN_HW; ++#endif + break; + case INSN_OBSOLETE: + insn->current_mode = INSN_UNDEF; + +From 919d9f14f43a8dd52c0008537f00dfccb96d5ef6 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Mon, 13 Feb 2017 15:33:47 +0000 +Subject: [PATCH 130/143] squash: fix order of sound/soc/bcm makefile + +--- + sound/soc/bcm/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index 222a7583891f632cc2297f49aa1a58ee46507875..bb1df438540193652ec5464e8bc51f636a1b844e 100644 +--- a/sound/soc/bcm/Makefile ++++ b/sound/soc/bcm/Makefile +@@ -10,12 +10,12 @@ obj-$(CONFIG_SND_SOC_CYGNUS) += snd-soc-cygnus.o + + # BCM2708 Machine Support + snd-soc-adau1977-adc-objs := adau1977-adc.o ++snd-soc-hifiberry-amp-objs := hifiberry_amp.o + snd-soc-hifiberry-dac-objs := hifiberry_dac.o + snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o + snd-soc-hifiberry-digi-objs := hifiberry_digi.o + snd-soc-justboom-dac-objs := justboom-dac.o + snd-soc-justboom-digi-objs := justboom-digi.o +-snd-soc-hifiberry-amp-objs := hifiberry_amp.o + snd-soc-rpi-dac-objs := rpi-dac.o + snd-soc-rpi-proto-objs := rpi-proto.o + snd-soc-iqaudio-dac-objs := iqaudio-dac.o +@@ -28,12 +28,12 @@ snd-soc-allo-piano-dac-objs := allo-piano-dac.o + snd-soc-pisound-objs := pisound.o + + obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o ++obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o + obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC) += snd-soc-justboom-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI) += snd-soc-justboom-digi.o +-obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o + obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o + obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o + +From 56bd4eb7b09c4d016c8f7908d496b11bbadbd9a0 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:36 +0100 -Subject: [PATCH 142/149] config: Enable regulator support +Subject: [PATCH 131/143] config: Enable regulator support Signed-off-by: Matthias Reichl --- @@ -128479,10 +127028,10 @@ Signed-off-by: Matthias Reichl 2 files changed, 4 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 31163b59b9c6f2cc4f4f94afe1b10bd1a195470f..611b63c3fdf18f1df6288bb229f827ecd1619958 100644 +index e017702a34d1e6c7df7aea26032b1fc70b330a40..3b2abe9c203e176e7088e504a7952e9b2c96aec8 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig -@@ -664,6 +664,8 @@ CONFIG_STMPE_SPI=y +@@ -660,6 +660,8 @@ CONFIG_STMPE_SPI=y CONFIG_MFD_ARIZONA_I2C=m CONFIG_MFD_ARIZONA_SPI=m CONFIG_MFD_WM5102=y @@ -128492,10 +127041,10 @@ index 31163b59b9c6f2cc4f4f94afe1b10bd1a195470f..611b63c3fdf18f1df6288bb229f827ec CONFIG_MEDIA_CAMERA_SUPPORT=y CONFIG_MEDIA_ANALOG_TV_SUPPORT=y diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 5105a592c9bcfee1cc6a8b50fd1c6c32f1381158..74bc0d81bcb4d7f6676368926cdcc10e581fbcae 100644 +index 1927b1671b6eced73e4b4d76352bb4b1301d077c..5351a59b7f670985f47fdbafa26117346cafe87d 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -658,6 +658,8 @@ CONFIG_STMPE_SPI=y +@@ -654,6 +654,8 @@ CONFIG_STMPE_SPI=y CONFIG_MFD_ARIZONA_I2C=m CONFIG_MFD_ARIZONA_SPI=m CONFIG_MFD_WM5102=y @@ -128505,10 +127054,10 @@ index 5105a592c9bcfee1cc6a8b50fd1c6c32f1381158..74bc0d81bcb4d7f6676368926cdcc10e CONFIG_MEDIA_CAMERA_SUPPORT=y CONFIG_MEDIA_ANALOG_TV_SUPPORT=y -From 2f68de29b74600a5ed75d12e32344ddc6b42ca8c Mon Sep 17 00:00:00 2001 +From f135ac30c31d61724299d0449887727ce9def765 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:36 +0100 -Subject: [PATCH 143/149] BCM270x DT: expose 3.3V and 5V system rails +Subject: [PATCH 132/143] BCM270x DT: expose 3.3V and 5V system rails Signed-off-by: Matthias Reichl --- @@ -128541,10 +127090,10 @@ index a46cb4a8b1419edd95e0e07c18b0f373222dc2bf..36d853715f2379e1952ce3d3be58dd67 + }; }; -From a637ecb60454d14e2a116b9fca25745cda6ee968 Mon Sep 17 00:00:00 2001 +From 437ca0a4918b034a16d8ac151b950cf838d484c5 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:36 +0100 -Subject: [PATCH 144/149] BCM270x DT: Consolidate audio card overlays +Subject: [PATCH 133/143] BCM270x DT: Consolidate audio card overlays Reference 3.3V / 5V system rails instead of instantiating local regulators. @@ -128839,10 +127388,10 @@ index 16b1247bfa618ff85936ddf78c3aea58075eaa67..f8d48233e28c7c18509b4a95692f6aff __overlay__ { compatible = "rra,digidac1-soundcard"; -From 5b7c4cf04f87b0366c5dab8ccbc767d840003218 Mon Sep 17 00:00:00 2001 +From 82906808c3fbe9c74524b2c055fad291c39c2fca Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:37 +0100 -Subject: [PATCH 145/149] ASoC: Add driver for Cirrus Logic Audio Card +Subject: [PATCH 134/143] ASoC: Add driver for Cirrus Logic Audio Card Note: due to problems with deferred probing of regulators the following softdep should be added to a modprobe.d file @@ -129043,10 +127592,10 @@ index 0000000000000000000000000000000000000000..cf85f0af224067cf58053a143664f071 + }; +}; diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig -index d024377e8450fb5402dcb5ea27161f774b04a8ec..10f6b201777946af8e8e78d2ffb0b0cff38093df 100644 +index ff4284a0000fd8dc58deb9e50be1422fd7ad6e65..c0489e591b9b8c8da004ca9e300e97f1a21e5ce1 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig -@@ -45,6 +45,15 @@ config SND_BCM2708_SOC_HIFIBERRY_AMP +@@ -46,6 +46,15 @@ config SND_BCM2708_SOC_HIFIBERRY_AMP help Say Y or M if you want to add support for the HifiBerry Amp amplifier board. @@ -130092,10 +128641,10 @@ index 0000000000000000000000000000000000000000..ac8651ddff7bd3701dffe22c7fb88352 +MODULE_DESCRIPTION("ASoC driver for Cirrus Logic Audio Card"); +MODULE_LICENSE("GPL"); -From 7dff660e8da1fbf145f0bfc8a9c70948695e2400 Mon Sep 17 00:00:00 2001 +From 4dc3d4c1f881814cccba7de2c34e8a78345223fb Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:37 +0100 -Subject: [PATCH 146/149] config: enable Cirrus Logic Audio Card +Subject: [PATCH 135/143] config: enable Cirrus Logic Audio Card Signed-off-by: Matthias Reichl --- @@ -130104,10 +128653,10 @@ Signed-off-by: Matthias Reichl 2 files changed, 4 insertions(+) diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig -index 611b63c3fdf18f1df6288bb229f827ecd1619958..858143b9b68a9cf29714452394cb800e4f41198d 100644 +index 3b2abe9c203e176e7088e504a7952e9b2c96aec8..59f58450f4f7932dbfe051d7431c227737902b37 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig -@@ -666,6 +666,7 @@ CONFIG_MFD_ARIZONA_SPI=m +@@ -662,6 +662,7 @@ CONFIG_MFD_ARIZONA_SPI=m CONFIG_MFD_WM5102=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=m @@ -130115,7 +128664,7 @@ index 611b63c3fdf18f1df6288bb229f827ecd1619958..858143b9b68a9cf29714452394cb800e CONFIG_MEDIA_SUPPORT=m CONFIG_MEDIA_CAMERA_SUPPORT=y CONFIG_MEDIA_ANALOG_TV_SUPPORT=y -@@ -872,6 +873,7 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m +@@ -868,6 +869,7 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m @@ -130124,10 +128673,10 @@ index 611b63c3fdf18f1df6288bb229f827ecd1619958..858143b9b68a9cf29714452394cb800e CONFIG_SND_BCM2708_SOC_RPI_PROTO=m CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 74bc0d81bcb4d7f6676368926cdcc10e581fbcae..f0b87d15e959d88eb26e5a11244365dadb57a298 100644 +index 5351a59b7f670985f47fdbafa26117346cafe87d..062a89f0e5fc723559ddc5739e19eb20c030f0f1 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -660,6 +660,7 @@ CONFIG_MFD_ARIZONA_SPI=m +@@ -656,6 +656,7 @@ CONFIG_MFD_ARIZONA_SPI=m CONFIG_MFD_WM5102=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=m @@ -130135,7 +128684,7 @@ index 74bc0d81bcb4d7f6676368926cdcc10e581fbcae..f0b87d15e959d88eb26e5a11244365da CONFIG_MEDIA_SUPPORT=m CONFIG_MEDIA_CAMERA_SUPPORT=y CONFIG_MEDIA_ANALOG_TV_SUPPORT=y -@@ -866,6 +867,7 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m +@@ -862,6 +863,7 @@ CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m @@ -130144,10 +128693,72 @@ index 74bc0d81bcb4d7f6676368926cdcc10e581fbcae..f0b87d15e959d88eb26e5a11244365da CONFIG_SND_BCM2708_SOC_RPI_PROTO=m CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC=m -From a68682f7e9f51e79ecc4e190aadaf03b7e70f700 Mon Sep 17 00:00:00 2001 +From e3ef450ae4a4d20765f724e5b91e3378d2a8ba3c Mon Sep 17 00:00:00 2001 +From: Martin Cerveny +Date: Mon, 13 Feb 2017 17:23:47 +0100 +Subject: [PATCH 136/143] dwc_otg: fix summarize urb->actual_length for + isochronous transfers + +Kernel does not copy input data of ISO transfers to userspace +if actual_length is set only in ISO transfers and not summarized +in urb->actual_length. Fixes raspberrypi/linux#903 +--- + drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +index 162a656501988e56c9d780b7793d365fde09f801..992269d61ecf48126379a38e528f719009ee1d75 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +@@ -334,10 +334,12 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, + int i; + + urb->error_count = dwc_otg_hcd_urb_get_error_count(dwc_otg_urb); ++ urb->actual_length = 0; + for (i = 0; i < urb->number_of_packets; ++i) { + urb->iso_frame_desc[i].actual_length = + dwc_otg_hcd_urb_get_iso_desc_actual_length + (dwc_otg_urb, i); ++ urb->actual_length += urb->iso_frame_desc[i].actual_length; + urb->iso_frame_desc[i].status = + dwc_otg_hcd_urb_get_iso_desc_status(dwc_otg_urb, i); + } + +From a58a00d172f51f697284a485ae1f3a6161ede074 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 13 Feb 2017 17:20:08 +0000 +Subject: [PATCH 137/143] clk-bcm2835: Mark used PLLs and dividers CRITICAL + +The VPU configures and relies on several PLLs and dividers. Mark all +enabled dividers and their PLLs as CRITICAL to prevent the kernel from +switching them off. + +Signed-off-by: Phil Elwell +--- + drivers/clk/bcm/clk-bcm2835.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 093694e00caec6e133eb26712f890691cad999aa..33bfa2008479153402d188d71d382f0274c104ea 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1266,6 +1266,11 @@ bcm2835_register_pll_divider(struct bcm2835_cprman *cprman, + divider->div.hw.init = &init; + divider->div.table = NULL; + ++ if (!(cprman_read(cprman, data->cm_reg) & data->hold_mask)) { ++ init.flags |= CLK_IS_CRITICAL; ++ divider->div.flags |= CLK_IS_CRITICAL; ++ } ++ + divider->cprman = cprman; + divider->data = data; + + +From cef191d42985b1a1ba2c4a169b80e4628db23195 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:33:30 +0000 -Subject: [PATCH 147/149] irq-bcm2836: Avoid "Invalid trigger warning" +Subject: [PATCH 138/143] irq-bcm2836: Avoid "Invalid trigger warning" Initialise the level for each IRQ to avoid a warning from the arm arch timer code. @@ -130158,7 +128769,7 @@ Signed-off-by: Phil Elwell 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c -index 486bcbfb32305ee417f6b3be7e91a3ff069a586c..e10597c1a1e51e5e27aa574b6a26d87181f26221 100644 +index 67dcac46cca72db4ebe2300eab04f0a867e8e14b..9a7ee04ee0d9b7aa734cf3159ed59c19a338de0d 100644 --- a/drivers/irqchip/irq-bcm2836.c +++ b/drivers/irqchip/irq-bcm2836.c @@ -178,7 +178,7 @@ static void bcm2836_arm_irqchip_register_irq(int hwirq, struct irq_chip *chip) @@ -130171,10 +128782,10 @@ index 486bcbfb32305ee417f6b3be7e91a3ff069a586c..e10597c1a1e51e5e27aa574b6a26d871 static void -From 0778b29615c3c15b035378ef97fff43da5b1c313 Mon Sep 17 00:00:00 2001 +From 70cab3f1bb92d60cf794a5baf22ac1fbdbec7ba2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:36:44 +0000 -Subject: [PATCH 148/149] sound: Demote deferral errors to INFO level +Subject: [PATCH 139/143] sound: Demote deferral errors to INFO level At present there is no mechanism to specify driver load order, which can lead to deferrals and repeated retries until successful. @@ -130187,10 +128798,10 @@ Signed-off-by: Phil Elwell 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c -index c0bbcd9032613a78aef551ce697cabc792880bad..a2504d8c83d74d7227e65be142a26cc9d0a88158 100644 +index baa1afa41e3dd57fdc36655b7d3bbd147ade820f..0ddeffcc48d6c14f275ea6409d1a7de8f1f64183 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c -@@ -1013,7 +1013,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card, +@@ -1056,7 +1056,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card, cpu_dai_component.dai_name = dai_link->cpu_dai_name; rtd->cpu_dai = snd_soc_find_dai(&cpu_dai_component); if (!rtd->cpu_dai) { @@ -130199,7 +128810,7 @@ index c0bbcd9032613a78aef551ce697cabc792880bad..a2504d8c83d74d7227e65be142a26cc9 dai_link->cpu_dai_name); goto _err_defer; } -@@ -1025,7 +1025,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card, +@@ -1068,7 +1068,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card, for (i = 0; i < rtd->num_codecs; i++) { codec_dais[i] = snd_soc_find_dai(&codecs[i]); if (!codec_dais[i]) { @@ -130209,10 +128820,10 @@ index c0bbcd9032613a78aef551ce697cabc792880bad..a2504d8c83d74d7227e65be142a26cc9 goto _err_defer; } -From 58bf3f17f21d883435fee48ca034eb5920b56ea3 Mon Sep 17 00:00:00 2001 +From cb1e295e8b8cf1edbab91d7d42919c28ebe3069e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:40:33 +0000 -Subject: [PATCH 149/149] sound: Suppress error message about deferrals +Subject: [PATCH 140/143] sound: Suppress error message about deferrals Since driver load deferrals are expected and will already have resulted in a kernel message, suppress an essentially @@ -130458,3 +129069,250 @@ index 9db678e885efd63d84d60a098a84ed6772b19a2d..fadbfade100228aaafabb0d3bdf35c01 return ret; } + +From 13607ce48ba1e8c887aeee343ac3f37ab9bf143b Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 17 Feb 2017 09:47:11 +0000 +Subject: [PATCH 141/143] BCM270X_DT: Add SMSC ethernet controller to DT + +With an ethernet node in the DT, a suitable firmware can populate the +local-mac-address property, removing the need for a downstream patch +to the driver to read its MAC address from a module parameter. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 1 + + arch/arm/boot/dts/bcm2708-rpi-b.dts | 1 + + arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 1 + + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 1 + + 4 files changed, 4 insertions(+) + +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +index 360da5c928dc5599b0d2a9055728087604c6b189..0b66ac9f25a5f7ae51f3d0666cfcb908f85e1d24 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +@@ -1,6 +1,7 @@ + /dts-v1/; + + #include "bcm2708.dtsi" ++#include "bcm283x-rpi-smsc9514.dtsi" + + / { + model = "Raspberry Pi Model B+"; +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts +index 9c49659ab246bce0656f3514f3b924bc4826b421..e99e9d999e4142060c41eb47b93c8ac70a30f384 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-b.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts +@@ -1,6 +1,7 @@ + /dts-v1/; + + #include "bcm2708.dtsi" ++#include "bcm283x-rpi-smsc9512.dtsi" + + / { + model = "Raspberry Pi Model B"; +diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +index 19c83823420fc3cc20a01d07091100cb8720ff4d..20674f250af922e9f9a43e3e8b13aee42e3930be 100644 +--- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts ++++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +@@ -1,6 +1,7 @@ + /dts-v1/; + + #include "bcm2709.dtsi" ++#include "bcm283x-rpi-smsc9514.dtsi" + + / { + model = "Raspberry Pi 2 Model B"; +diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +index 12764a3495b2372ffaf47e32ea0d21326ca83686..2a5b512d3e1acb17c6a40bf9d370f22279c4d552 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +@@ -5,6 +5,7 @@ + #endif + + #include "bcm2710.dtsi" ++#include "bcm283x-rpi-smsc9514.dtsi" + + / { + model = "Raspberry Pi 3 Model B"; + +From e1d3ee3e5c9e549cec2088efeb1cbc9b1a682b31 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 17 Feb 2017 15:26:13 +0000 +Subject: [PATCH 142/143] brcmfmac: Mute expected startup 'errors' + +The brcmfmac WiFi driver always complains about the '00' country code +and the firmware version is reported as an error. Modify the driver to +ignore '00' silently and display firmware version at INFO level. + +Signed-off-by: Phil Elwell +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 ++ + drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +index 5dfcf16428f9c8687237c3218183d8afa66ec331..873ec96c300fa152ecf3b1c2d3b3a890de7df115 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +@@ -6717,6 +6717,8 @@ static void brcmf_cfg80211_reg_notifier(struct wiphy *wiphy, + /* ignore non-ISO3166 country codes */ + for (i = 0; i < sizeof(req->alpha2); i++) + if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') { ++ if (req->alpha2[0] == '0' && req->alpha2[1] == '0') ++ return; + brcmf_err("not a ISO3166 code (0x%02x 0x%02x)\n", + req->alpha2[0], req->alpha2[1]); + return; +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +index 4051780f64f44a5ce522babe6c371a1beb79a824..b081673abcb4aa72d70d8e0834b608f65fea16e8 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +@@ -161,7 +161,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp) + strsep(&ptr, "\n"); + + /* Print fw version info */ +- brcmf_err("Firmware version = %s\n", buf); ++ pr_info("Firmware version = %s\n", buf); + + /* locate firmware version number for ethtool */ + ptr = strrchr(buf, ' ') + 1; + +From cbeb4f8aeb1dd71e911d365a921c0da4fbbdfdbb Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 13 Feb 2017 17:20:08 +0000 +Subject: [PATCH 143/143] clk-bcm2835: Add claim-clocks property + +The claim-clocks property can be used to prevent PLLs and dividers +from being marked as critical. It contains a vector of clock IDs, +as defined by dt-bindings/clock/bcm2835.h. + +Use this mechanism to claim PLLD_DSI0, PLLD_DSI1, PLLH_AUX and +PLLH_PIX for the vc4_kms_v3d driver. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 15 ++++++++++ + drivers/clk/bcm/clk-bcm2835.c | 34 ++++++++++++++++++++-- + 2 files changed, 47 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +index 4f1cc20f90dc6780f74e08ebee00e5a1a6062c85..fb45c6456b181b047d6cff8784f7696eb75da3c7 100644 +--- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts +@@ -5,6 +5,8 @@ + /dts-v1/; + /plugin/; + ++#include ++ + / { + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; + +@@ -126,6 +128,19 @@ + }; + }; + ++ ++ fragment@16 { ++ target = <&clocks>; ++ __overlay__ { ++ claim-clocks = < ++ BCM2835_PLLD_DSI0 ++ BCM2835_PLLD_DSI1 ++ BCM2835_PLLH_AUX ++ BCM2835_PLLH_PIX ++ >; ++ }; ++ }; ++ + __overrides__ { + cma-256 = <0>,"+0-1-2-3-4"; + cma-192 = <0>,"-0+1-2-3-4"; +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 33bfa2008479153402d188d71d382f0274c104ea..0b62d20f8b718cfd03c0346af784688e26e9dcb6 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1198,6 +1198,8 @@ static const struct clk_ops bcm2835_vpu_clock_clk_ops = { + .debug_init = bcm2835_clock_debug_init, + }; + ++static bool bcm2835_clk_is_claimed(const char *name); ++ + static struct clk_hw *bcm2835_register_pll(struct bcm2835_cprman *cprman, + const struct bcm2835_pll_data *data) + { +@@ -1214,6 +1216,9 @@ static struct clk_hw *bcm2835_register_pll(struct bcm2835_cprman *cprman, + init.ops = &bcm2835_pll_clk_ops; + init.flags = CLK_IGNORE_UNUSED; + ++ if (!bcm2835_clk_is_claimed(data->name)) ++ init.flags |= CLK_IS_CRITICAL; ++ + pll = kzalloc(sizeof(*pll), GFP_KERNEL); + if (!pll) + return NULL; +@@ -1267,8 +1272,10 @@ bcm2835_register_pll_divider(struct bcm2835_cprman *cprman, + divider->div.table = NULL; + + if (!(cprman_read(cprman, data->cm_reg) & data->hold_mask)) { +- init.flags |= CLK_IS_CRITICAL; +- divider->div.flags |= CLK_IS_CRITICAL; ++ if (!bcm2835_clk_is_claimed(data->source_pll)) ++ init.flags |= CLK_IS_CRITICAL; ++ if (!bcm2835_clk_is_claimed(data->name)) ++ divider->div.flags |= CLK_IS_CRITICAL; + } + + divider->cprman = cprman; +@@ -1901,6 +1908,8 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .ctl_reg = CM_PERIICTL), + }; + ++static bool bcm2835_clk_claimed[ARRAY_SIZE(clk_desc_array)]; ++ + /* + * Permanently take a reference on the parent of the SDRAM clock. + * +@@ -1920,6 +1929,19 @@ static int bcm2835_mark_sdc_parent_critical(struct clk *sdc) + return clk_prepare_enable(parent); + } + ++static bool bcm2835_clk_is_claimed(const char *name) ++{ ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(clk_desc_array); i++) { ++ const char *clk_name = *(const char **)(clk_desc_array[i].data); ++ if (!strcmp(name, clk_name)) ++ return bcm2835_clk_claimed[i]; ++ } ++ ++ return false; ++} ++ + static int bcm2835_clk_probe(struct platform_device *pdev) + { + struct device *dev = &pdev->dev; +@@ -1929,6 +1951,7 @@ static int bcm2835_clk_probe(struct platform_device *pdev) + const struct bcm2835_clk_desc *desc; + const size_t asize = ARRAY_SIZE(clk_desc_array); + size_t i; ++ u32 clk_id; + int ret; + + cprman = devm_kzalloc(dev, sizeof(*cprman) + +@@ -1944,6 +1967,13 @@ static int bcm2835_clk_probe(struct platform_device *pdev) + if (IS_ERR(cprman->regs)) + return PTR_ERR(cprman->regs); + ++ memset(bcm2835_clk_claimed, 0, sizeof(bcm2835_clk_claimed)); ++ for (i = 0; ++ !of_property_read_u32_index(pdev->dev.of_node, "claim-clocks", ++ i, &clk_id); ++ i++) ++ bcm2835_clk_claimed[clk_id]= true; ++ + cprman->osc_name = of_clk_get_parent_name(dev->of_node, 0); + if (!cprman->osc_name) + return -ENODEV; From 595e48b17deafe7e9f3335b76d01328befc52ca1 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Thu, 23 Feb 2017 01:27:00 +0000 Subject: [PATCH 9/9] media_build: add 4.10 patch --- .../media_build-02-add-to-backports.patch | 3 ++- .../linux-250-fix-for-kernel-4.10.patch | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 packages/linux-drivers/media_build/sources/backports/linux-250-fix-for-kernel-4.10.patch diff --git a/packages/linux-drivers/media_build/patches/media_build-02-add-to-backports.patch b/packages/linux-drivers/media_build/patches/media_build-02-add-to-backports.patch index 1f3f1999e4..60afdda162 100644 --- a/packages/linux-drivers/media_build/patches/media_build-02-add-to-backports.patch +++ b/packages/linux-drivers/media_build/patches/media_build-02-add-to-backports.patch @@ -1,6 +1,6 @@ --- a/backports/backports.txt +++ b/backports/backports.txt -@@ -25,6 +25,14 @@ +@@ -25,6 +25,15 @@ add pr_fmt.patch add debug.patch add drx39xxj.patch @@ -12,6 +12,7 @@ +add linux-057-Removed-MCE-customer-code-restriction-in-rc6-decode.patch +add linux-062-imon_pad_ignore_diagonal.patch +add linux-240-pctv452e_kernel_oops_in_4.9.patch ++add linux-250-fix-for-kernel-4.10.patch [4.8.255] add v4.8_user_pages_flag.patch diff --git a/packages/linux-drivers/media_build/sources/backports/linux-250-fix-for-kernel-4.10.patch b/packages/linux-drivers/media_build/sources/backports/linux-250-fix-for-kernel-4.10.patch new file mode 100644 index 0000000000..f3d1cb2ec8 --- /dev/null +++ b/packages/linux-drivers/media_build/sources/backports/linux-250-fix-for-kernel-4.10.patch @@ -0,0 +1,21 @@ +mm: use vmf->address instead of of vmf->virtual_address +drop at media_build bump +taken from https://github.com/torvalds/linux/commit/1a29d85eb0f19b7d8271923d8917d7b4f5540b3e +--- a/drivers/media/v4l2-core/videobuf-dma-sg.c ++++ b/drivers/media/v4l2-core/videobuf-dma-sg.c +@@ -439,13 +439,12 @@ static int videobuf_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) + struct page *page; + + dprintk(3, "fault: fault @ %08lx [vma %08lx-%08lx]\n", +- (unsigned long)vmf->virtual_address, +- vma->vm_start, vma->vm_end); ++ vmf->address, vma->vm_start, vma->vm_end); + + page = alloc_page(GFP_USER | __GFP_DMA32); + if (!page) + return VM_FAULT_OOM; +- clear_user_highpage(page, (unsigned long)vmf->virtual_address); ++ clear_user_highpage(page, vmf->address); + vmf->page = page; + + return 0;