diff --git a/packages/linux-drivers/RTL8188EU/package.mk b/packages/linux-drivers/RTL8188EU/package.mk index b8f8472d55..b11a681726 100644 --- a/packages/linux-drivers/RTL8188EU/package.mk +++ b/packages/linux-drivers/RTL8188EU/package.mk @@ -17,13 +17,13 @@ ################################################################################ PKG_NAME="RTL8188EU" -PKG_VERSION="3091828" +PKG_VERSION="ced2b64" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" # realtek: PKG_SITE="http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PFid=48&Level=5&Conn=4&ProdID=274&DownTypeID=3&GetDown=false&Downloads=true" PKG_SITE="https://github.com/lwfinger/rtl8188eu" -PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_URL="https://github.com/lwfinger/rtl8188eu/archive/$PKG_VERSION.tar.gz" PKG_DEPENDS_TARGET="toolchain linux" PKG_NEED_UNPACK="$LINUX_DEPENDS" PKG_PRIORITY="optional" diff --git a/packages/linux-drivers/RTL8812AU/package.mk b/packages/linux-drivers/RTL8812AU/package.mk index a5a6582bcd..b649262362 100644 --- a/packages/linux-drivers/RTL8812AU/package.mk +++ b/packages/linux-drivers/RTL8812AU/package.mk @@ -17,12 +17,12 @@ ################################################################################ PKG_NAME="RTL8812AU" -PKG_VERSION="3f015f0" +PKG_VERSION="9fc227c" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" -PKG_SITE="git@github.com:abperiasamy/rtl8812AU_8821AU_linux.git" -PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_SITE="https://github.com/Grawp/rtl8812au_rtl8821au" +PKG_URL="https://github.com/Grawp/rtl8812au_rtl8821au/archive/$PKG_VERSION.tar.gz" PKG_DEPENDS_TARGET="toolchain linux" PKG_NEED_UNPACK="$LINUX_DEPENDS" PKG_PRIORITY="optional" diff --git a/packages/linux-drivers/RTL8812AU/patches/RTL8812AU-01-add_new_cards.patch b/packages/linux-drivers/RTL8812AU/patches/RTL8812AU-01-add_new_cards.patch index 5b0b492b72..802a3fe54b 100644 --- a/packages/linux-drivers/RTL8812AU/patches/RTL8812AU-01-add_new_cards.patch +++ b/packages/linux-drivers/RTL8812AU/patches/RTL8812AU-01-add_new_cards.patch @@ -1,36 +1,30 @@ -diff -Naur RTL8812AU-3f015f0/os_dep/linux/usb_intf.c RTL8812AU-3f015f0.patch/os_dep/linux/usb_intf.c ---- RTL8812AU-3f015f0/os_dep/linux/usb_intf.c 2015-07-14 21:45:26.000000000 +0200 -+++ RTL8812AU-3f015f0.patch/os_dep/linux/usb_intf.c 2016-01-17 12:01:14.594776191 +0100 -@@ -278,7 +278,7 @@ - {USB_DEVICE(0x13B1, 0x003F),.driver_info = RTL8812}, /* Linksys - SerComm */ +diff -Naur RTL8812AU-9fc227c/os_dep/linux/usb_intf.c RTL8812AU-9fc227c.patch/os_dep/linux/usb_intf.c +--- RTL8812AU-9fc227c/os_dep/linux/usb_intf.c 2016-03-11 11:11:45.000000000 +0100 ++++ RTL8812AU-9fc227c.patch/os_dep/linux/usb_intf.c 2016-03-11 11:56:52.508514651 +0100 +@@ -300,6 +300,10 @@ + {USB_DEVICE(0x13b1, 0x003f),.driver_info = RTL8812}, /* Linksys - WUSB6300 */ {USB_DEVICE(0x2357, 0x0101),.driver_info = RTL8812}, /* TP-Link - T4U */ - {USB_DEVICE(0x148F, 0x9097),.driver_info = RTL8812}, /* Amped Wireless ACA1 */ -- {USB_DEVICE(0x2357, 0x0103),.driver_info = RTL8812}, /* TP-Link - T4UH */ -+ {USB_DEVICE(0x2357, 0x0103),.driver_info = RTL8812}, /* TP-Link - T4UH */ + {USB_DEVICE(0x2357, 0x0103),.driver_info = RTL8812}, /* TP-Link - T4UH */ ++ /*=== Patched ID ===*/ ++ {USB_DEVICE(0x050D, 0x1109),.driver_info = RTL8812}, /* Belkin F9L1109 - SerComm */ ++ {USB_DEVICE(0x20F4, 0x805B),.driver_info = RTL8812}, /* TRENDnet - Cameo */ ++ {USB_DEVICE(0x148F, 0x9097),.driver_info = RTL8812}, /* Amped Wireless ACA1 */ #endif #ifdef CONFIG_RTL8821A -@@ -288,15 +288,19 @@ - {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8822),.driver_info = RTL8821},/* Default ID */ - {USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0x0820,0xff,0xff,0xff),.driver_info = RTL8821}, /* 8821AU */ - /*=== Customer ID ===*/ -+ {USB_DEVICE(0x056e, 0x4007),.driver_info = RTL8821}, /* Elecom - WDC-433DU2HBK */ - {USB_DEVICE(0x7392, 0xA811),.driver_info = RTL8821}, /* Edimax - Edimax */ -- {USB_DEVICE(0x0BDA, 0xA811),.driver_info = RTL8821}, /* OUTLINK - Edimax */ -+ {USB_DEVICE(0x0BDA, 0xA811),.driver_info = RTL8821}, /* OUTLINK - Edimax */ - {USB_DEVICE(0x7392, 0xA812),.driver_info = RTL8821}, /* Edimax - Edimax */ -+ {USB_DEVICE(0x7392, 0xA813),.driver_info = RTL8821}, /* Edimax - EW-7811UAC */ - {USB_DEVICE(0x2001, 0x3314),.driver_info = RTL8821}, /* D-Link - Cameo */ +@@ -316,6 +320,15 @@ + {USB_DEVICE(0x2001, 0x3318),.driver_info = RTL8821}, /* D-Link - Cameo */ + {USB_DEVICE(0x0E66, 0x0023),.driver_info = RTL8821}, /* HAWKING - Edimax */ {USB_DEVICE(0x0846, 0x9052),.driver_info = RTL8821}, /* Netgear - A6100 */ -- {USB_DEVICE(0x04BB, 0x0953),.driver_info = RTL8821}, /* I-O DATA - Edimax */ -- {USB_DEVICE(0x2001, 0x3318),.driver_info = RTL8821}, /* D-Link - Cameo */ -- {USB_DEVICE(0x0E66, 0x0023),.driver_info = RTL8821}, /* HAWKING - Edimax */ ++ /*=== Patched ID ===*/ ++ {USB_DEVICE(0x0BDA, 0xA811),.driver_info = RTL8821}, /* OUTLINK - Edimax */ ++ {USB_DEVICE(0x7392, 0xA812),.driver_info = RTL8821}, /* Edimax - Edimax */ ++ {USB_DEVICE(0x0411, 0x0242),.driver_info = RTL8821}, /* BUFFALO - Edimax */ ++ {USB_DEVICE(0x2001, 0x3318),.driver_info = RTL8821}, /* D-Link DWA-172 */ ++ {USB_DEVICE(0x056e, 0x4007),.driver_info = RTL8821}, /* Elecom - WDC-433DU2HBK */ ++ {USB_DEVICE(0x7392, 0xA813),.driver_info = RTL8821}, /* Edimax - EW-7811UAC */ + {USB_DEVICE(0x2019, 0xAB32),.driver_info = RTL8821}, /* Planex - GW-450S */ -+ {USB_DEVICE(0x04BB, 0x0953),.driver_info = RTL8821}, /* I-O DATA - Edimax */ -+ {USB_DEVICE(0x2001, 0x3318),.driver_info = RTL8821}, /* D-Link - Cameo */ -+ {USB_DEVICE(0x0E66, 0x0023),.driver_info = RTL8821}, /* HAWKING - Edimax */ - {USB_DEVICE(0x0411, 0x0242),.driver_info = RTL8821}, /* BUFFALO - Edimax */ + {USB_DEVICE(0x0411, 0x025D),.driver_info = RTL8821}, /* BUFFALO WI-U3-866D */ - {USB_DEVICE(0x2001, 0x3318),.driver_info = RTL8821}, /* D-Link DWA-172 */ #endif + #ifdef CONFIG_RTL8192E diff --git a/packages/linux-drivers/RTL8812AU/patches/RTL8812AU-fix-build-kernel-4.2.patch b/packages/linux-drivers/RTL8812AU/patches/RTL8812AU-fix-build-kernel-4.2.patch deleted file mode 100644 index 117f87c13a..0000000000 --- a/packages/linux-drivers/RTL8812AU/patches/RTL8812AU-fix-build-kernel-4.2.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0aa1823aa7e658422f49f558b8b82b03a32f0c30 Mon Sep 17 00:00:00 2001 -From: Jos Dehaes -Date: Fri, 25 Sep 2015 23:11:57 +0200 -Subject: [PATCH] adapt to api in linux 4.2 - ---- - os_dep/linux/ioctl_cfg80211.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c -index 4946de3..6a751fd 100644 ---- a/os_dep/linux/ioctl_cfg80211.c -+++ b/os_dep/linux/ioctl_cfg80211.c -@@ -601,8 +601,12 @@ void rtw_cfg80211_indicate_disconnect(_adapter *padapter) - else if(pwdev->sme_state==CFG80211_SME_CONNECTED) - cfg80211_disconnected(padapter->pnetdev, 0, NULL, 0, GFP_ATOMIC); - #else -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0) -+ cfg80211_disconnected(padapter->pnetdev, 0, NULL, 0, 0, GFP_ATOMIC); -+#else - cfg80211_disconnected(padapter->pnetdev, 0, NULL, 0, GFP_ATOMIC); - #endif -+#endif - - //DBG_8192C("pwdev->sme_state(a)=%d\n", pwdev->sme_state); - } diff --git a/packages/linux/package.mk b/packages/linux/package.mk index fcf9bf39c5..17ca6436ee 100644 --- a/packages/linux/package.mk +++ b/packages/linux/package.mk @@ -157,7 +157,7 @@ makeinstall_target() { elif [ "$BOOTLOADER" = "bcm2835-bootloader" ]; then mkdir -p $INSTALL/usr/share/bootloader/overlays cp -p arch/$TARGET_KERNEL_ARCH/boot/dts/*.dtb $INSTALL/usr/share/bootloader - for dtb in arch/$TARGET_KERNEL_ARCH/boot/dts/overlays/*.dtb; do + for dtb in arch/$TARGET_KERNEL_ARCH/boot/dts/overlays/*.dtbo; do cp $dtb $INSTALL/usr/share/bootloader/overlays 2>/dev/null || : done cp -p arch/$TARGET_KERNEL_ARCH/boot/dts/overlays/README $INSTALL/usr/share/bootloader/overlays diff --git a/packages/multimedia/libdvbcsa/package.mk b/packages/multimedia/libdvbcsa/package.mk index a011149db2..93db8dc55e 100644 --- a/packages/multimedia/libdvbcsa/package.mk +++ b/packages/multimedia/libdvbcsa/package.mk @@ -17,12 +17,13 @@ ################################################################################ PKG_NAME="libdvbcsa" -PKG_VERSION="1.1.0" +PKG_VERSION="f988715" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="LGPL" PKG_SITE="http://www.videolan.org/developers/libdvbcsa.html" -PKG_URL="http://download.videolan.org/pub/videolan/libdvbcsa/${PKG_VERSION}/libdvbcsa-${PKG_VERSION}.tar.gz" +PKG_SITE="https://github.com/glenvt18/libdvbcsa/" +PKG_URL="https://github.com/glenvt18/libdvbcsa/archive/$PKG_VERSION.tar.gz" PKG_DEPENDS_TARGET="toolchain" PKG_PRIORITY="optional" PKG_SECTION="lib" @@ -33,3 +34,21 @@ PKG_IS_ADDON="no" PKG_AUTORECONF="yes" PKG_CONFIGURE_OPTS_TARGET="--disable-shared --enable-static --with-sysroot=$SYSROOT_PREFIX" + +if echo "$TARGET_FPU" | grep -q '^neon'; then + PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-neon" +elif [ "$TARGET_ARCH" = x86_64 ]; then + if echo "$PROJECT_CFLAGS" | grep -q '\-mssse3'; then + PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-ssse3" + elif echo "$PROJECT_CFLAGS" | grep -q '\-msse2'; then + PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-sse2" + else + PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-uint64" + fi +fi + +pre_configure_target() { +# libdvbcsa is a bit faster without LTO, and tests will fail with gcc-5.x + strip_lto +} + diff --git a/packages/x11/driver/xf86-video-intel/package.mk b/packages/x11/driver/xf86-video-intel/package.mk index 027317def1..0581d40d43 100644 --- a/packages/x11/driver/xf86-video-intel/package.mk +++ b/packages/x11/driver/xf86-video-intel/package.mk @@ -17,13 +17,13 @@ ################################################################################ PKG_NAME="xf86-video-intel" -PKG_VERSION="300319e" +PKG_VERSION="0204e55" PKG_REV="1" PKG_ARCH="x86_64" PKG_LICENSE="OSS" PKG_SITE="http://intellinuxgraphics.org/" -PKG_URL="http://xorg.freedesktop.org/archive/individual/driver/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_URL="https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/snapshot/$PKG_VERSION.tar.xz" +PKG_SOURCE_DIR="$PKG_VERSION" PKG_DEPENDS_TARGET="toolchain libXcomposite util-macros fontsproto systemd xorg-server" PKG_PRIORITY="optional" PKG_SECTION="x11/driver" @@ -50,7 +50,6 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-backlight \ --disable-xaa \ --disable-dga \ --disable-tear-free \ - --disable-rendernode \ --disable-create2 \ --disable-async-swap \ --with-xorg-module-dir=$XORG_PATH_MODULES" diff --git a/projects/RPi/linux/linux.arm.conf b/projects/RPi/linux/linux.arm.conf index 825a3092a7..26584c3ab7 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.4.2 Kernel Configuration +# Linux/arm 4.4.5 Kernel Configuration # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -961,12 +961,15 @@ CONFIG_OF=y # CONFIG_OF_UNITTEST is not set CONFIG_OF_FLATTREE=y CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_DYNAMIC=y CONFIG_OF_ADDRESS=y CONFIG_OF_IRQ=y CONFIG_OF_NET=y CONFIG_OF_MDIO=y CONFIG_OF_RESERVED_MEM=y -# CONFIG_OF_OVERLAY is not set +CONFIG_OF_RESOLVE=y +CONFIG_OF_OVERLAY=y +CONFIG_OF_CONFIGFS=y CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y # CONFIG_PARPORT is not set CONFIG_BLK_DEV=y @@ -1118,6 +1121,7 @@ CONFIG_MACVLAN=m # CONFIG_IPVLAN is not set # CONFIG_VXLAN is not set CONFIG_NETCONSOLE=y +# CONFIG_NETCONSOLE_DYNAMIC is not set CONFIG_NETPOLL=y CONFIG_NET_POLL_CONTROLLER=y CONFIG_TUN=y @@ -1773,7 +1777,13 @@ CONFIG_POWER_SUPPLY=y # CONFIG_CHARGER_SMB347 is not set # CONFIG_BATTERY_GAUGE_LTC2941 is not set # CONFIG_CHARGER_RT9455 is not set -# CONFIG_POWER_RESET is not set +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_GPIO=y +CONFIG_POWER_RESET_GPIO_RESTART=y +# CONFIG_POWER_RESET_LTC2952 is not set +CONFIG_POWER_RESET_RESTART=y +# CONFIG_POWER_RESET_SYSCON is not set +# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set # CONFIG_POWER_AVS is not set CONFIG_HWMON=y # CONFIG_HWMON_VID is not set @@ -3336,6 +3346,7 @@ CONFIG_XFS_FS=m # CONFIG_XFS_WARN is not set # CONFIG_XFS_DEBUG is not set # CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set CONFIG_BTRFS_FS=m # CONFIG_BTRFS_FS_POSIX_ACL is not set # CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set @@ -3398,7 +3409,7 @@ CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y CONFIG_TMPFS_XATTR=y # CONFIG_HUGETLB_PAGE is not set -# CONFIG_CONFIGFS_FS is not set +CONFIG_CONFIGFS_FS=y CONFIG_MISC_FILESYSTEMS=y # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set @@ -3526,6 +3537,7 @@ CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_MAC_ROMANIAN is not set # CONFIG_NLS_MAC_TURKISH is not set CONFIG_NLS_UTF8=y +# CONFIG_DLM is not set # # Kernel hacking @@ -3669,7 +3681,6 @@ CONFIG_HAVE_ARCH_KGDB=y # CONFIG_DEBUG_LL is not set CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" # CONFIG_DEBUG_UART_8250 is not set -# CONFIG_DEBUG_UART_BCM63XX is not set CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" # CONFIG_PID_IN_CONTEXTIDR is not set # CONFIG_DEBUG_SET_MODULE_RONX is not set diff --git a/projects/RPi/patches/linux/linux-01-RPi_support.patch b/projects/RPi/patches/linux/linux-01-RPi_support.patch index 863e39ebca..6eadb288ed 100644 --- a/projects/RPi/patches/linux/linux-01-RPi_support.patch +++ b/projects/RPi/patches/linux/linux-01-RPi_support.patch @@ -1,7 +1,1057 @@ -From b6cc28abbbf710379772d3da9227ce66926c46a3 Mon Sep 17 00:00:00 2001 +From 9453a7778a3b6d0ecc1878d451a22616e1248d4b Mon Sep 17 00:00:00 2001 +From: Lukas Rusak +Date: Tue, 15 Mar 2016 01:29:53 -0700 +Subject: [PATCH 000/181] *** SUBJECT HERE *** +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +*** BLURB HERE *** + +Alistair Buxton (1): + Build i2c_gpio module and add a device tree overlay to configure it. + +Andrew Litt (2): + bcm2835-mmc: Don't override bus width capabilities from devicetree + SDIO-overlay: add bus_width parameter + +Aron Szabo (1): + lirc: added support for RaspberryPi GPIO + +Craig Roberts (1): + Updated smsc95xx driver to check for a valid MAC address in eeprom + before using smsc95xx.macaddr parameter passed on command line. + +Daniel Matuschek (5): + 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 additional mclk_div divider, it is now possible to control + the behaviour. This allows using 256xfs PLL frequency on all sample + rates up to 96kHz. It should allow lower jitter and better signal + quality. The behavior has to be controlled by the sound card driver, + because some sample frequency share the same setting. e.g. 192kHz + and 96kHz use 24.576MHz master clock. The only difference is the + MCLK divider. + ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the + patched WM8804 driver. + ASoC: wm8804: Set idle_bias_off to false Idle bias has been change to + remove warning on driver startup + Added support for HiFiBerry DAC+ + Added driver for HiFiBerry Amp amplifier add-on board + +Dave Stevenson (1): + DT: Add overlays to configure I2C pins + +Devon Fyson (1): + Extend clock timeout, fix modprobe baudrate parameter. + +Dhiraj Goel (1): + bcm2835-camera: fix a bug in computation of frame timestamp + +Digital Dreamtime (2): + Allow up to 24dB digital gain to be applied when using IQAudIO DAC+ + Limit PCM512x "Digital" gain to 0dB by default with HiFiBerry DAC+ + +DigitalDreamtime (1): + Remove I2S config from bt_pins. + +Eric Anholt (23): + drm/vc4: Add suport for 3D rendering using the V3D engine. + drm/vc4: Force HDMI to connected. + drm/vc4: bo cache locking fixes. + drm/vc4: bo cache locking cleanup. + drm/vc4: Use job_lock to protect seqno_cb_list. + drm/vc4: Drop struct_mutex around CL validation. + drm/vc4: Drop struct_mutex around CL validation. + drm/vc4: Add support for more display plane formats. + drm/vc4: No need to stop the stopped threads. + drm/vc4: Remove extra barrier()s aroudn CTnCA/CTnEA setup. + drm/vc4: Fix a typo in a V3D debug register. + clk: bcm2835: Also build the driver for downstream kernels. + mm: Remove the PFN busy warning + drm: Put an optional field in the driver struct for GEM obj struct + size. + drm/vc4: Add an interface for capturing the GPU state after a hang. + drm/vc4: Update a bunch of code to match upstream submission. + drm: Use the driver's gem_object_free function from CMA helpers. + drm/vc4: Add support for MSAA rendering. + drm/vc4: A few more non-functional changes to sync to upstream. + drm/vc4: Use "hpd-gpios" for HDMI GPIO, like what landed upstream. + drm/vc4: Synchronize validation code for v2 submission upstream. + clk: bcm2835: Add bindings for the auxiliary peripheral clock gates. + clk: bcm2835: Add a driver for the auxiliary peripheral clock gates. + +Florian Meier (4): + dmaengine: Add support for BCM2708 + ASoC: Add support for PCM5102A codec + ASoC: Add support for HifiBerry DAC + ASoC: Add support for Rpi-DAC + +Fraser (1): + Aux SPI 1&2 implementation + +Gordon Garrity (1): + Add IQaudIO Sound Card support for Raspberry Pi + +Gordon Hollingworth (1): + rpi-ft5406: Add touchscreen driver for pi LCD display + +Harm Hanemaaijer (1): + Speed up console framebuffer imageblit function + +Holger Steinhaus (1): + dts: Added overlay for gpio_ir_recv driver + +Jan Grulich (2): + RaspiDAC3 support + tpa6130a2: Add headphone switch control + +Luke Wren (3): + Add /dev/gpiomem device for rootless user GPIO access + Add SMI driver + Add SMI NAND driver + +Matthias Reichl (10): + bcm2835-i2s: get base address for DMA from devicetree + bcm2835-i2s: add 24bit support, update bclk_ratio to more correct + values + bcm2835-i2s: setup clock only if CPU is clock master + bcm2835-i2s: Eliminate debugfs directory error + bcm2835-i2s: Register PCM device + bcm2835-i2s: Enable MMAP support via a DT property + bcm2835-dma: Fix dreq not set for slave transfers + bcm2835-dma: Limit cyclic transfers on lite channels to 32k + bcm2835-dma: Fix up convert to DMA pool + ASoC: bcm: add missing .owner fields in sound card drivers + +Michael Lange (1): + rtc: ds1307: add support for the DT property 'wakeup-source' + +Noralf Trønnes (13): + irqchip: bcm2835: Add FIQ support + irqchip: irq-bcm2835: Add 2836 FIQ support + ARM: bcm2835: Set Serial number and Revision + dmaengine: bcm2835: Add slave dma support + dmaengine: bcm2835: set residue_granularity field + dmaengine: bcm2835: Load driver early and support legacy API + bcm2835: Add support for uart1 + firmware: bcm2835: Add missing property tags + char: broadcom: Add vcio module + firmware: bcm2835: Support ARCH_BCM270x + bcm2835: Match with BCM2708 Device Trees + bcm2835: bcm2835_defconfig + bcm270x_dt: Add dwc2 and dwc-otg overlays + +Ondrej Wisniewski (1): + dts: Added overlay for Adafruit PiTFT 2.8" capacitive touch screen + +P33M (1): + rpi_display: add backlight driver and overlay + +Pantelis Antoniou (2): + configfs: implement binary attributes + OF: DT-Overlay configfs interface + +Phil Elwell (51): + irq-bcm2836: Prevent spurious interrupts, and trap them early + serial: 8250: Don't crash when nr_uarts is 0 + pinctrl-bcm2835: Fix interrupt handling for GPIOs 28-31 and 46-53 + pinctrl-bcm2835: Only request the interrupts listed in the DTB + spi-bcm2835: Support pin groups other than 7-11 + Adding bcm2835-sdhost driver, and an overlay to enable it + scripts: Add mkknlimg and knlinfo scripts from tools repo + fdt: Add support for the CONFIG_CMDLINE_EXTEND option + BCM270x_DT: Add pwr_led, and the required "input" trigger + enc28j60: Add device tree compatible string and an overlay + Improve __copy_to_user and __copy_from_user performance + gpio-poweroff: Allow it to work on Raspberry Pi + spidev: Add "spidev" compatible string to silence warning + scripts/dtc: Add overlay support + mfd: Add Raspberry Pi Sense HAT core driver + scripts: Multi-platform support for mkknlimg and knlinfo + drm/vc4: Enable VC4 modules, and increase CMA size with overlay + BCM270X_DT: Add at86rf233 overlay + BCM270X_DT: Add the sdtweak overlay, for tuning sdhost + bcm2835-sdhost: Add workaround for odd behaviour on some cards + bcm2835-sdhost: Add debug_flags dtparam + BCM270X_DT: Add sdio_overclock parameter to sdio overlay + FIXUP i2c_bcm2708: Don't change module baudrate parameter + BCM270X_DT: Adjust overlay README formatting + pinctrl-bcm2835: Fix cut-and-paste error in "pull" parsing + bcm2835-sdhost: Major revision + BCM270X_DT: Add dtparams for the SD interface + bcm2835-sdhost: Restore ATOMIC flag to PIO sg mapping + BCM270X_DT: at86rf233 overlay - drop to 3MHz + bcm2835-sdhost: Downgrade log message status + config: Enable HCI over UARTs + hci_h5: Don't send conf_req when ACTIVE + amba_pl011: Don't use DT aliases for numbering + BCM270X_DT: Add Pi3 support + BCM270X_DT: Add pi3-disable-bt overlay + BCM270X_DT: Add pi3-miniuart-bt DT overlay + Pi3 DT: Add dtparams for the SD interface + vchiq_arm: Tweak the logging output + bcm2835-sdhost: Only claim one DMA channel + bcm2835-mmc: Only claim one DMA channel + Pi3 DT: Add pull-ups on the UART RX lines + brcmfmac: Disable power management + BCM270X_DT: rpi-display overlay - add swapxy param + Revert "scripts/dtc: Add overlay support" + scripts/dtc: Update to upstream version 1.4.1 + Protect __release_resource against resources without parents + BCM270X_DT: Add a .dtbo target, use for overlays + scripts/knlinfo: Decode DDTK atom + Enable Dynamic Device Tree for bcmrpi_defconfig and bcm2709_defconfig + SQUASH: Add CONFIG_OF_CONFIGFS to bcmrpi_defconfig + dts, kbuild: dtbs_install installs .dtbo files too + +Robert Tiemann (1): + BCM2835_DT: Fix I2S register map + +Ryan Coe (1): + Update ds1307 driver for device-tree support + +Siarhei Siamashka (1): + fbdev: add FBIOCOPYAREA ioctl + +Steve Glendinning (1): + smsx95xx: fix crimes against truesize + +Stuart MacLean (1): + Add support for the HiFiBerry DAC+ Pro. + +Tim Gover (1): + vcsm: VideoCore shared memory service for BCM2835 + +Vincent Sanders (1): + bcm2835: add v4l2 camera device + +Waldemar Brodkorb (1): + Add driver for rpi-proto + +gellert (1): + MMC: added alternative MMC driver + +janluca (1): + MMC: Do not use mmc_debug if CONFIG_MMC_BCM2835 is not set + +mwilliams03 (1): + New overlay for PiScreen2r + +notro (2): + pinctrl-bcm2835: Set base to 0 give expected gpio numbering + BCM2708: Add core Device Tree support + +popcornmix (27): + smsc95xx: Disable turbo mode by default + vmstat: Workaround for issue where dirty page count goes negative + Main bcm2708/bcm2709 linux port + squash: include ARCH_BCM2708 / ARCH_BCM2709 + Add dwc_otg driver + bcm2708 framebuffer driver + cma: Add vc_cma driver to enable use of CMA + bcm2708: alsa sound driver + bcm2708 vchiq driver + vc_mem: Add vc_mem driver + Add cpufreq driver + Added hwmon/thermal driver for reporting core temperature. Thanks + Dorian + Add Chris Boot's i2c driver + Allow mac address to be set in smsc95xx + enabling the realtime clock 1-wire chip DS1307 and 1-wire on GPIO4 (as + a module) + config: Enable CONFIG_MEMCG, but leave it disabled (due to memory + cost). Enable with cgroup_enable=memory. + hid: Reduce default mouse polling interval to 60Hz + config: Add default configs + irq-bcm2835: Fix building with 2708 + squash: fixups + squash: add missing vc4-kms-v3d-overlay.dtb to makefile + dcw_otg: trim xfer length when buffer larger than allocated size is + received + dcw_otg: Make trimming messages less noisy + smsx95xx: Add option to disable the crimes against truesize fix + bcm2835-virtgpio: Virtual GPIO driver + config: rebuild with savedefconfig + config: Add module for mcp3422 ADC + +vitalogy (1): + dt-overlay: add wittypi-overlay.dts + +wm4 (8): + bcm2835: extend allowed range of channels and samplerates + bcm2835: restrict channels*rate to 8*960000 + rpi: update vc_vchi_audioserv_defs.h + bcm2835: implement channel map API + bcm2835: access controls under the audio mutex + bcm2835: always use 2/4/8 channels for multichannel layouts + bcm2835: only allow stereo if analogue jack is selected + bcm2835: interpolate audio delay + + .../bindings/clock/brcm,bcm2835-aux-clock.txt | 31 + + .../devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 +- + .../bindings/misc/brcm,bcm2835-smi-dev.txt | 17 + + .../devicetree/bindings/misc/brcm,bcm2835-smi.txt | 48 + + .../bindings/mtd/brcm,bcm2835-smi-nand.txt | 42 + + .../devicetree/bindings/sound/brcm,bcm2835-i2s.txt | 4 +- + Documentation/devicetree/configfs-overlays.txt | 31 + + Documentation/filesystems/configfs/configfs.txt | 57 +- + Documentation/video4linux/bcm2835-v4l2.txt | 60 + + arch/arm/Kconfig | 49 + + arch/arm/Kconfig.debug | 8 + + arch/arm/Makefile | 2 + + arch/arm/boot/.gitignore | 2 +- + arch/arm/boot/dts/Makefile | 31 + + arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 149 + + arch/arm/boot/dts/bcm2708-rpi-b.dts | 139 + + arch/arm/boot/dts/bcm2708-rpi-cm.dts | 101 + + arch/arm/boot/dts/bcm2708-rpi-cm.dtsi | 53 + + arch/arm/boot/dts/bcm2708.dtsi | 40 + + arch/arm/boot/dts/bcm2708_common.dtsi | 379 ++ + arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 149 + + arch/arm/boot/dts/bcm2709.dtsi | 102 + + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 196 + + arch/arm/boot/dts/bcm2710.dtsi | 102 + + arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 132 +- + arch/arm/boot/dts/bcm2835-rpi-b.dts | 115 +- + arch/arm/boot/dts/bcm2835-rpi-cm.dts | 93 + + arch/arm/boot/dts/bcm2835-rpi-cm.dtsi | 30 + + arch/arm/boot/dts/bcm2835.dtsi | 195 +- + arch/arm/boot/dts/overlays/Makefile | 84 + + arch/arm/boot/dts/overlays/README | 943 +++ + arch/arm/boot/dts/overlays/ads7846-overlay.dts | 83 + + arch/arm/boot/dts/overlays/at86rf233-overlay.dts | 54 + + .../dts/overlays/bmp085_i2c-sensor-overlay.dts | 23 + + arch/arm/boot/dts/overlays/dht11-overlay.dts | 39 + + arch/arm/boot/dts/overlays/dwc-otg-overlay.dts | 20 + + arch/arm/boot/dts/overlays/dwc2-overlay.dts | 29 + + arch/arm/boot/dts/overlays/enc28j60-overlay.dts | 50 + + arch/arm/boot/dts/overlays/gpio-ir-overlay.dts | 45 + + .../boot/dts/overlays/gpio-poweroff-overlay.dts | 34 + + .../boot/dts/overlays/hifiberry-amp-overlay.dts | 39 + + .../boot/dts/overlays/hifiberry-dac-overlay.dts | 34 + + .../dts/overlays/hifiberry-dacplus-overlay.dts | 54 + + .../boot/dts/overlays/hifiberry-digi-overlay.dts | 39 + + arch/arm/boot/dts/overlays/hy28a-overlay.dts | 87 + + arch/arm/boot/dts/overlays/hy28b-overlay.dts | 142 + + arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts | 28 + + arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts | 55 + + .../arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts | 36 + + .../arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts | 37 + + arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts | 13 + + arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts | 39 + + .../boot/dts/overlays/iqaudio-dacplus-overlay.dts | 43 + + arch/arm/boot/dts/overlays/lirc-rpi-overlay.dts | 57 + + .../arm/boot/dts/overlays/mcp2515-can0-overlay.dts | 69 + + .../arm/boot/dts/overlays/mcp2515-can1-overlay.dts | 69 + + arch/arm/boot/dts/overlays/mmc-overlay.dts | 38 + + arch/arm/boot/dts/overlays/mz61581-overlay.dts | 111 + + .../boot/dts/overlays/pi3-disable-bt-overlay.dts | 48 + + .../boot/dts/overlays/pi3-miniuart-bt-overlay.dts | 61 + + arch/arm/boot/dts/overlays/piscreen-overlay.dts | 96 + + arch/arm/boot/dts/overlays/piscreen2r-overlay.dts | 100 + + .../dts/overlays/pitft28-capacitive-overlay.dts | 88 + + .../dts/overlays/pitft28-resistive-overlay.dts | 115 + + arch/arm/boot/dts/overlays/pps-gpio-overlay.dts | 34 + + arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts | 46 + + arch/arm/boot/dts/overlays/pwm-overlay.dts | 42 + + arch/arm/boot/dts/overlays/raspidac3-overlay.dts | 45 + + .../boot/dts/overlays/rpi-backlight-overlay.dts | 21 + + arch/arm/boot/dts/overlays/rpi-dac-overlay.dts | 34 + + arch/arm/boot/dts/overlays/rpi-display-overlay.dts | 83 + + arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts | 17 + + arch/arm/boot/dts/overlays/rpi-proto-overlay.dts | 39 + + arch/arm/boot/dts/overlays/rpi-sense-overlay.dts | 47 + + arch/arm/boot/dts/overlays/sdhost-overlay.dts | 32 + + arch/arm/boot/dts/overlays/sdio-overlay.dts | 36 + + arch/arm/boot/dts/overlays/sdtweak-overlay.dts | 23 + + arch/arm/boot/dts/overlays/smi-dev-overlay.dts | 18 + + arch/arm/boot/dts/overlays/smi-nand-overlay.dts | 69 + + arch/arm/boot/dts/overlays/smi-overlay.dts | 37 + + .../boot/dts/overlays/spi-gpio35-39-overlay.dts | 31 + + arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts | 57 + + arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts | 69 + + arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts | 81 + + arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts | 57 + + arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts | 69 + + arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts | 81 + + arch/arm/boot/dts/overlays/tinylcd35-overlay.dts | 216 + + arch/arm/boot/dts/overlays/uart1-overlay.dts | 38 + + arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 95 + + arch/arm/boot/dts/overlays/vga666-overlay.dts | 30 + + arch/arm/boot/dts/overlays/w1-gpio-overlay.dts | 39 + + .../boot/dts/overlays/w1-gpio-pullup-overlay.dts | 41 + + arch/arm/boot/dts/overlays/wittypi-overlay.dts | 44 + + arch/arm/configs/bcm2709_defconfig | 1263 ++++ + arch/arm/configs/bcm2835_defconfig | 1166 +++- + arch/arm/configs/bcmrpi_defconfig | 1273 ++++ + arch/arm/include/asm/irqflags.h | 16 +- + arch/arm/include/asm/string.h | 5 + + arch/arm/include/asm/uaccess.h | 3 + + arch/arm/kernel/fiqasm.S | 4 + + arch/arm/kernel/head.S | 8 + + arch/arm/kernel/process.c | 10 + + arch/arm/lib/Makefile | 15 +- + arch/arm/lib/arm-mem.h | 159 + + arch/arm/lib/copy_from_user.S | 4 +- + arch/arm/lib/exports_rpi.c | 37 + + arch/arm/lib/memcmp_rpi.S | 285 + + arch/arm/lib/memcpy_rpi.S | 61 + + arch/arm/lib/memcpymove.h | 506 ++ + arch/arm/lib/memmove_rpi.S | 61 + + arch/arm/lib/memset_rpi.S | 123 + + arch/arm/lib/uaccess_with_memcpy.c | 112 +- + arch/arm/mach-bcm/Kconfig | 1 + + arch/arm/mach-bcm/board_bcm2835.c | 34 + + arch/arm/mach-bcm2708/Kconfig | 23 + + arch/arm/mach-bcm2708/Makefile | 5 + + arch/arm/mach-bcm2708/Makefile.boot | 3 + + arch/arm/mach-bcm2708/bcm2708.c | 231 + + arch/arm/mach-bcm2708/include/mach/debug-macro.S | 22 + + arch/arm/mach-bcm2708/include/mach/io.h | 27 + + arch/arm/mach-bcm2708/include/mach/memory.h | 57 + + arch/arm/mach-bcm2708/include/mach/platform.h | 114 + + arch/arm/mach-bcm2708/include/mach/system.h | 37 + + arch/arm/mach-bcm2708/include/mach/uncompress.h | 84 + + arch/arm/mach-bcm2708/include/mach/vmalloc.h | 20 + + arch/arm/mach-bcm2709/Kconfig | 16 + + arch/arm/mach-bcm2709/Makefile | 5 + + arch/arm/mach-bcm2709/Makefile.boot | 3 + + arch/arm/mach-bcm2709/bcm2709.c | 380 ++ + arch/arm/mach-bcm2709/include/mach/debug-macro.S | 22 + + arch/arm/mach-bcm2709/include/mach/entry-macro.S | 123 + + arch/arm/mach-bcm2709/include/mach/io.h | 27 + + arch/arm/mach-bcm2709/include/mach/memory.h | 57 + + arch/arm/mach-bcm2709/include/mach/platform.h | 190 + + arch/arm/mach-bcm2709/include/mach/system.h | 37 + + arch/arm/mach-bcm2709/include/mach/uncompress.h | 84 + + arch/arm/mach-bcm2709/include/mach/vmalloc.h | 20 + + arch/arm/mm/Kconfig | 2 +- + arch/arm/mm/proc-v6.S | 15 +- + arch/arm/mm/proc-v7.S | 1 + + arch/arm/tools/mach-types | 2 + + drivers/bluetooth/hci_h5.c | 3 +- + drivers/char/Kconfig | 2 + + drivers/char/Makefile | 1 + + drivers/char/broadcom/Kconfig | 57 + + drivers/char/broadcom/Makefile | 7 + + drivers/char/broadcom/bcm2835-gpiomem.c | 260 + + drivers/char/broadcom/bcm2835_smi_dev.c | 402 ++ + drivers/char/broadcom/vc_cma/Makefile | 14 + + drivers/char/broadcom/vc_cma/vc_cma.c | 1193 ++++ + drivers/char/broadcom/vc_mem.c | 422 ++ + drivers/char/broadcom/vc_sm/Makefile | 20 + + drivers/char/broadcom/vc_sm/vc_sm_defs.h | 181 + + drivers/char/broadcom/vc_sm/vc_sm_knl.h | 55 + + drivers/char/broadcom/vc_sm/vc_vchi_sm.c | 492 ++ + drivers/char/broadcom/vc_sm/vc_vchi_sm.h | 82 + + drivers/char/broadcom/vc_sm/vmcs_sm.c | 3211 +++++++++ + drivers/char/broadcom/vcio.c | 175 + + drivers/char/hw_random/Kconfig | 2 +- + drivers/clk/Makefile | 1 + + drivers/clk/bcm/Makefile | 3 +- + drivers/clk/bcm/clk-bcm2835-aux.c | 85 + + drivers/clk/clk-hifiberry-dacpro.c | 160 + + drivers/clocksource/Makefile | 2 +- + drivers/cpufreq/Kconfig.arm | 9 + + drivers/cpufreq/Makefile | 1 + + drivers/cpufreq/bcm2835-cpufreq.c | 213 + + drivers/dma/Kconfig | 6 +- + drivers/dma/Makefile | 1 + + drivers/dma/bcm2708-dmaengine.c | 281 + + drivers/dma/bcm2835-dma.c | 261 +- + drivers/firmware/raspberrypi.c | 41 +- + drivers/gpio/Kconfig | 6 + + drivers/gpio/Makefile | 1 + + drivers/gpio/gpio-bcm-virt.c | 180 + + drivers/gpu/drm/drm_fb_cma_helper.c | 6 +- + drivers/gpu/drm/drm_gem_cma_helper.c | 14 +- + drivers/gpu/drm/vc4/Kconfig | 2 +- + drivers/gpu/drm/vc4/Makefile | 11 +- + drivers/gpu/drm/vc4/vc4_bo.c | 534 +- + drivers/gpu/drm/vc4/vc4_crtc.c | 99 +- + drivers/gpu/drm/vc4/vc4_debugfs.c | 3 + + drivers/gpu/drm/vc4/vc4_drv.c | 46 +- + drivers/gpu/drm/vc4/vc4_drv.h | 319 +- + drivers/gpu/drm/vc4/vc4_gem.c | 867 +++ + drivers/gpu/drm/vc4/vc4_hdmi.c | 2 + + drivers/gpu/drm/vc4/vc4_irq.c | 210 + + drivers/gpu/drm/vc4/vc4_kms.c | 149 +- + drivers/gpu/drm/vc4/vc4_packet.h | 399 ++ + drivers/gpu/drm/vc4/vc4_plane.c | 56 + + drivers/gpu/drm/vc4/vc4_qpu_defines.h | 264 + + drivers/gpu/drm/vc4/vc4_regs.h | 2 +- + drivers/gpu/drm/vc4/vc4_render_cl.c | 634 ++ + drivers/gpu/drm/vc4/vc4_trace.h | 63 + + drivers/gpu/drm/vc4/vc4_trace_points.c | 14 + + drivers/gpu/drm/vc4/vc4_v3d.c | 270 + + drivers/gpu/drm/vc4/vc4_validate.c | 900 +++ + drivers/gpu/drm/vc4/vc4_validate_shaders.c | 513 ++ + drivers/hid/usbhid/hid-core.c | 10 +- + drivers/i2c/busses/Kconfig | 21 +- + drivers/i2c/busses/Makefile | 2 + + drivers/i2c/busses/i2c-bcm2708.c | 508 ++ + drivers/input/joystick/Kconfig | 8 + + drivers/input/joystick/Makefile | 1 + + drivers/input/joystick/rpisense-js.c | 153 + + drivers/input/touchscreen/Kconfig | 7 + + drivers/input/touchscreen/Makefile | 1 + + drivers/input/touchscreen/rpi-ft5406.c | 246 + + drivers/irqchip/Makefile | 3 + + drivers/irqchip/irq-bcm2835.c | 90 +- + drivers/irqchip/irq-bcm2836.c | 3 +- + drivers/leds/leds-gpio.c | 18 +- + drivers/leds/trigger/Kconfig | 7 + + drivers/leds/trigger/Makefile | 1 + + drivers/leds/trigger/ledtrig-input.c | 54 + + drivers/mailbox/Kconfig | 2 +- + drivers/mailbox/bcm2835-mailbox.c | 18 +- + drivers/media/platform/Kconfig | 2 + + drivers/media/platform/Makefile | 2 + + drivers/media/platform/bcm2835/Kconfig | 25 + + drivers/media/platform/bcm2835/Makefile | 5 + + drivers/media/platform/bcm2835/bcm2835-camera.c | 1843 +++++ + drivers/media/platform/bcm2835/bcm2835-camera.h | 126 + + drivers/media/platform/bcm2835/controls.c | 1324 ++++ + drivers/media/platform/bcm2835/mmal-common.h | 53 + + drivers/media/platform/bcm2835/mmal-encodings.h | 127 + + drivers/media/platform/bcm2835/mmal-msg-common.h | 50 + + drivers/media/platform/bcm2835/mmal-msg-format.h | 81 + + drivers/media/platform/bcm2835/mmal-msg-port.h | 107 + + drivers/media/platform/bcm2835/mmal-msg.h | 404 ++ + drivers/media/platform/bcm2835/mmal-parameters.h | 656 ++ + drivers/media/platform/bcm2835/mmal-vchiq.c | 1916 ++++++ + drivers/media/platform/bcm2835/mmal-vchiq.h | 178 + + drivers/mfd/Kconfig | 8 + + drivers/mfd/Makefile | 2 + + drivers/mfd/rpisense-core.c | 157 + + drivers/misc/Kconfig | 9 + + drivers/misc/Makefile | 2 + + drivers/misc/bcm2835_smi.c | 985 +++ + drivers/misc/vc04_services/Kconfig | 9 + + drivers/misc/vc04_services/Makefile | 14 + + .../interface/vchi/connections/connection.h | 328 + + .../interface/vchi/message_drivers/message.h | 204 + + drivers/misc/vc04_services/interface/vchi/vchi.h | 378 ++ + .../misc/vc04_services/interface/vchi/vchi_cfg.h | 224 + + .../interface/vchi/vchi_cfg_internal.h | 71 + + .../vc04_services/interface/vchi/vchi_common.h | 175 + + .../misc/vc04_services/interface/vchi/vchi_mh.h | 42 + + .../misc/vc04_services/interface/vchiq_arm/vchiq.h | 40 + + .../vc04_services/interface/vchiq_arm/vchiq_2835.h | 42 + + .../interface/vchiq_arm/vchiq_2835_arm.c | 586 ++ + .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 2903 ++++++++ + .../vc04_services/interface/vchiq_arm/vchiq_arm.h | 220 + + .../interface/vchiq_arm/vchiq_build_info.h | 37 + + .../vc04_services/interface/vchiq_arm/vchiq_cfg.h | 69 + + .../interface/vchiq_arm/vchiq_connected.c | 120 + + .../interface/vchiq_arm/vchiq_connected.h | 50 + + .../vc04_services/interface/vchiq_arm/vchiq_core.c | 3929 +++++++++++ + .../vc04_services/interface/vchiq_arm/vchiq_core.h | 712 ++ + .../interface/vchiq_arm/vchiq_debugfs.c | 383 ++ + .../interface/vchiq_arm/vchiq_debugfs.h | 52 + + .../interface/vchiq_arm/vchiq_genversion | 87 + + .../vc04_services/interface/vchiq_arm/vchiq_if.h | 189 + + .../interface/vchiq_arm/vchiq_ioctl.h | 131 + + .../interface/vchiq_arm/vchiq_kern_lib.c | 458 ++ + .../interface/vchiq_arm/vchiq_killable.h | 69 + + .../interface/vchiq_arm/vchiq_memdrv.h | 71 + + .../interface/vchiq_arm/vchiq_pagelist.h | 58 + + .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 860 +++ + .../vc04_services/interface/vchiq_arm/vchiq_util.c | 156 + + .../vc04_services/interface/vchiq_arm/vchiq_util.h | 82 + + .../interface/vchiq_arm/vchiq_version.c | 59 + + drivers/mmc/core/quirks.c | 10 + + drivers/mmc/host/Kconfig | 39 + + drivers/mmc/host/Makefile | 2 + + drivers/mmc/host/bcm2835-mmc.c | 1571 +++++ + drivers/mmc/host/bcm2835-sdhost.c | 2079 ++++++ + drivers/mtd/nand/Kconfig | 7 + + drivers/mtd/nand/Makefile | 1 + + drivers/mtd/nand/bcm2835_smi_nand.c | 268 + + drivers/net/ethernet/microchip/enc28j60.c | 7 + + drivers/net/usb/smsc95xx.c | 70 +- + drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 2 + + drivers/of/Kconfig | 7 + + drivers/of/Makefile | 1 + + drivers/of/configfs.c | 314 + + drivers/of/fdt.c | 29 +- + drivers/pinctrl/Makefile | 1 + + drivers/pinctrl/bcm/pinctrl-bcm2835.c | 57 +- + drivers/power/reset/gpio-poweroff.c | 4 +- + drivers/pwm/Kconfig | 2 +- + drivers/rtc/rtc-ds1307.c | 37 +- + drivers/spi/Kconfig | 4 +- + drivers/spi/spi-bcm2835.c | 45 +- + drivers/spi/spidev.c | 1 + + drivers/staging/media/lirc/Kconfig | 6 + + drivers/staging/media/lirc/Makefile | 1 + + drivers/staging/media/lirc/lirc_rpi.c | 730 ++ + drivers/thermal/Kconfig | 7 + + drivers/thermal/Makefile | 1 + + drivers/thermal/bcm2835-thermal.c | 141 + + drivers/tty/serial/8250/8250_core.c | 2 + + drivers/tty/serial/amba-pl011.c | 5 + + drivers/usb/Makefile | 1 + + drivers/usb/core/generic.c | 1 + + drivers/usb/core/hub.c | 2 +- + drivers/usb/core/message.c | 79 + + drivers/usb/core/otg_whitelist.h | 114 +- + drivers/usb/gadget/file_storage.c | 3676 ++++++++++ + drivers/usb/host/Kconfig | 13 + + drivers/usb/host/Makefile | 2 + + drivers/usb/host/dwc_common_port/Makefile | 58 + + drivers/usb/host/dwc_common_port/Makefile.fbsd | 17 + + drivers/usb/host/dwc_common_port/Makefile.linux | 49 + + drivers/usb/host/dwc_common_port/changes.txt | 174 + + drivers/usb/host/dwc_common_port/doc/doxygen.cfg | 270 + + drivers/usb/host/dwc_common_port/dwc_cc.c | 532 ++ + drivers/usb/host/dwc_common_port/dwc_cc.h | 224 + + drivers/usb/host/dwc_common_port/dwc_common_fbsd.c | 1308 ++++ + .../usb/host/dwc_common_port/dwc_common_linux.c | 1433 ++++ + drivers/usb/host/dwc_common_port/dwc_common_nbsd.c | 1275 ++++ + drivers/usb/host/dwc_common_port/dwc_crypto.c | 308 + + drivers/usb/host/dwc_common_port/dwc_crypto.h | 111 + + drivers/usb/host/dwc_common_port/dwc_dh.c | 291 + + drivers/usb/host/dwc_common_port/dwc_dh.h | 106 + + drivers/usb/host/dwc_common_port/dwc_list.h | 594 ++ + drivers/usb/host/dwc_common_port/dwc_mem.c | 245 + + drivers/usb/host/dwc_common_port/dwc_modpow.c | 636 ++ + drivers/usb/host/dwc_common_port/dwc_modpow.h | 34 + + drivers/usb/host/dwc_common_port/dwc_notifier.c | 319 + + drivers/usb/host/dwc_common_port/dwc_notifier.h | 122 + + drivers/usb/host/dwc_common_port/dwc_os.h | 1276 ++++ + drivers/usb/host/dwc_common_port/usb.h | 946 +++ + drivers/usb/host/dwc_otg/Makefile | 82 + + drivers/usb/host/dwc_otg/doc/doxygen.cfg | 224 + + drivers/usb/host/dwc_otg/dummy_audio.c | 1575 +++++ + drivers/usb/host/dwc_otg/dwc_cfi_common.h | 142 + + drivers/usb/host/dwc_otg/dwc_otg_adp.c | 854 +++ + drivers/usb/host/dwc_otg/dwc_otg_adp.h | 80 + + drivers/usb/host/dwc_otg/dwc_otg_attr.c | 1210 ++++ + drivers/usb/host/dwc_otg/dwc_otg_attr.h | 89 + + drivers/usb/host/dwc_otg/dwc_otg_cfi.c | 1876 +++++ + drivers/usb/host/dwc_otg/dwc_otg_cfi.h | 320 + + drivers/usb/host/dwc_otg/dwc_otg_cil.c | 7141 ++++++++++++++++++++ + drivers/usb/host/dwc_otg/dwc_otg_cil.h | 1464 ++++ + drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c | 1594 +++++ + drivers/usb/host/dwc_otg/dwc_otg_core_if.h | 705 ++ + drivers/usb/host/dwc_otg/dwc_otg_dbg.h | 117 + + drivers/usb/host/dwc_otg/dwc_otg_driver.c | 1757 +++++ + drivers/usb/host/dwc_otg/dwc_otg_driver.h | 86 + + drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c | 1355 ++++ + drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h | 370 + + drivers/usb/host/dwc_otg/dwc_otg_fiq_stub.S | 80 + + drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 4257 ++++++++++++ + drivers/usb/host/dwc_otg/dwc_otg_hcd.h | 862 +++ + drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c | 1132 ++++ + drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h | 417 ++ + drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 2727 ++++++++ + drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 1005 +++ + drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c | 957 +++ + drivers/usb/host/dwc_otg/dwc_otg_os_dep.h | 188 + + drivers/usb/host/dwc_otg/dwc_otg_pcd.c | 2712 ++++++++ + drivers/usb/host/dwc_otg/dwc_otg_pcd.h | 266 + + drivers/usb/host/dwc_otg/dwc_otg_pcd_if.h | 360 + + drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c | 5147 ++++++++++++++ + drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c | 1280 ++++ + drivers/usb/host/dwc_otg/dwc_otg_regs.h | 2550 +++++++ + drivers/usb/host/dwc_otg/test/Makefile | 16 + + drivers/usb/host/dwc_otg/test/dwc_otg_test.pm | 337 + + drivers/usb/host/dwc_otg/test/test_mod_param.pl | 133 + + drivers/usb/host/dwc_otg/test/test_sysfs.pl | 193 + + drivers/video/backlight/Kconfig | 6 + + drivers/video/backlight/Makefile | 1 + + drivers/video/backlight/rpi_backlight.c | 119 + + drivers/video/fbdev/Kconfig | 27 + + drivers/video/fbdev/Makefile | 2 + + drivers/video/fbdev/bcm2708_fb.c | 847 +++ + drivers/video/fbdev/core/cfbimgblt.c | 152 +- + drivers/video/fbdev/core/fbmem.c | 30 + + drivers/video/fbdev/rpisense-fb.c | 293 + + drivers/video/logo/logo_linux_clut224.ppm | 2483 +++---- + drivers/w1/masters/w1-gpio.c | 69 +- + drivers/w1/w1.h | 6 + + drivers/w1/w1_int.c | 14 + + drivers/w1/w1_io.c | 18 +- + drivers/watchdog/Kconfig | 2 +- + fs/configfs/configfs_internal.h | 14 +- + fs/configfs/dir.c | 18 +- + fs/configfs/file.c | 255 +- + fs/configfs/inode.c | 2 +- + include/drm/drmP.h | 7 + + include/dt-bindings/clock/bcm2835-aux.h | 17 + + include/linux/broadcom/bcm2835_smi.h | 391 ++ + include/linux/broadcom/vc_cma.h | 36 + + include/linux/broadcom/vc_mem.h | 35 + + include/linux/broadcom/vmcs_sm_ioctl.h | 248 + + include/linux/configfs.h | 50 + + include/linux/leds.h | 3 + + include/linux/mfd/rpisense/core.h | 47 + + include/linux/mfd/rpisense/framebuffer.h | 32 + + include/linux/mfd/rpisense/joystick.h | 35 + + include/linux/mmc/host.h | 1 + + include/linux/platform_data/bcm2708.h | 23 + + include/linux/platform_data/dma-bcm2708.h | 143 + + include/linux/vmstat.h | 4 + + include/linux/w1-gpio.h | 1 + + include/soc/bcm2835/raspberrypi-firmware.h | 10 + + include/uapi/drm/vc4_drm.h | 279 + + include/uapi/linux/fb.h | 5 + + kernel/cgroup.c | 23 +- + kernel/resource.c | 6 + + mm/page_alloc.c | 2 - + scripts/Makefile.dtbinst | 10 +- + scripts/Makefile.lib | 10 + + scripts/dtc/checks.c | 105 +- + scripts/dtc/dtc-lexer.l | 5 + + scripts/dtc/dtc-lexer.lex.c_shipped | 490 +- + scripts/dtc/dtc-parser.tab.c_shipped | 722 +- + scripts/dtc/dtc-parser.tab.h_shipped | 46 +- + scripts/dtc/dtc-parser.y | 22 +- + scripts/dtc/dtc.c | 9 +- + scripts/dtc/dtc.h | 40 + + scripts/dtc/flattree.c | 202 + + scripts/dtc/version_gen.h | 2 +- + scripts/knlinfo | 171 + + scripts/mkknlimg | 264 + + sound/arm/Kconfig | 8 + + sound/arm/Makefile | 5 + + sound/arm/bcm2835-ctl.c | 662 ++ + sound/arm/bcm2835-pcm.c | 626 ++ + sound/arm/bcm2835-vchiq.c | 915 +++ + sound/arm/bcm2835.c | 511 ++ + sound/arm/bcm2835.h | 172 + + sound/arm/vc_vchi_audioserv_defs.h | 125 + + sound/soc/bcm/Kconfig | 59 +- + sound/soc/bcm/Makefile | 18 + + sound/soc/bcm/bcm2835-i2s.c | 90 +- + sound/soc/bcm/hifiberry_amp.c | 128 + + sound/soc/bcm/hifiberry_dac.c | 123 + + sound/soc/bcm/hifiberry_dacplus.c | 352 + + sound/soc/bcm/hifiberry_digi.c | 224 + + sound/soc/bcm/iqaudio-dac.c | 141 + + sound/soc/bcm/raspidac3.c | 192 + + sound/soc/bcm/rpi-dac.c | 119 + + sound/soc/bcm/rpi-proto.c | 154 + + sound/soc/codecs/Kconfig | 18 + + sound/soc/codecs/Makefile | 6 + + sound/soc/codecs/pcm1794a.c | 69 + + sound/soc/codecs/pcm5102a.c | 70 + + sound/soc/codecs/pcm512x.c | 3 +- + sound/soc/codecs/tas5713.c | 369 + + sound/soc/codecs/tas5713.h | 210 + + sound/soc/codecs/tpa6130a2.c | 29 +- + sound/soc/codecs/wm8804.c | 5 +- + 455 files changed, 124739 insertions(+), 2662 deletions(-) + create mode 100644 Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt + create mode 100644 Documentation/devicetree/bindings/misc/brcm,bcm2835-smi-dev.txt + create mode 100644 Documentation/devicetree/bindings/misc/brcm,bcm2835-smi.txt + create mode 100644 Documentation/devicetree/bindings/mtd/brcm,bcm2835-smi-nand.txt + create mode 100644 Documentation/devicetree/configfs-overlays.txt + create mode 100644 Documentation/video4linux/bcm2835-v4l2.txt + create mode 100644 arch/arm/boot/dts/bcm2708-rpi-b-plus.dts + create mode 100644 arch/arm/boot/dts/bcm2708-rpi-b.dts + create mode 100755 arch/arm/boot/dts/bcm2708-rpi-cm.dts + create mode 100644 arch/arm/boot/dts/bcm2708-rpi-cm.dtsi + create mode 100644 arch/arm/boot/dts/bcm2708.dtsi + create mode 100644 arch/arm/boot/dts/bcm2708_common.dtsi + create mode 100644 arch/arm/boot/dts/bcm2709-rpi-2-b.dts + create mode 100644 arch/arm/boot/dts/bcm2709.dtsi + create mode 100644 arch/arm/boot/dts/bcm2710-rpi-3-b.dts + create mode 100644 arch/arm/boot/dts/bcm2710.dtsi + create mode 100644 arch/arm/boot/dts/bcm2835-rpi-cm.dts + create mode 100644 arch/arm/boot/dts/bcm2835-rpi-cm.dtsi + create mode 100644 arch/arm/boot/dts/overlays/Makefile + create mode 100644 arch/arm/boot/dts/overlays/README + create mode 100644 arch/arm/boot/dts/overlays/ads7846-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/at86rf233-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/bmp085_i2c-sensor-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/dht11-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/dwc-otg-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/dwc2-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/enc28j60-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/gpio-ir-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/gpio-poweroff-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/hy28a-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/hy28b-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/lirc-rpi-overlay.dts + create mode 100755 arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/mmc-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/mz61581-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/piscreen-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/piscreen2r-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/pps-gpio-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/pwm-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/raspidac3-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/rpi-dac-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/rpi-display-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/rpi-proto-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/rpi-sense-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/sdhost-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/sdio-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/sdtweak-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/smi-dev-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/smi-nand-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/smi-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/spi-gpio35-39-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/tinylcd35-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/uart1-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/vga666-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/w1-gpio-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/wittypi-overlay.dts + create mode 100644 arch/arm/configs/bcm2709_defconfig + create mode 100644 arch/arm/configs/bcmrpi_defconfig + create mode 100644 arch/arm/lib/arm-mem.h + create mode 100644 arch/arm/lib/exports_rpi.c + create mode 100644 arch/arm/lib/memcmp_rpi.S + create mode 100644 arch/arm/lib/memcpy_rpi.S + create mode 100644 arch/arm/lib/memcpymove.h + create mode 100644 arch/arm/lib/memmove_rpi.S + create mode 100644 arch/arm/lib/memset_rpi.S + create mode 100644 arch/arm/mach-bcm2708/Kconfig + create mode 100644 arch/arm/mach-bcm2708/Makefile + create mode 100644 arch/arm/mach-bcm2708/Makefile.boot + create mode 100644 arch/arm/mach-bcm2708/bcm2708.c + create mode 100644 arch/arm/mach-bcm2708/include/mach/debug-macro.S + create mode 100644 arch/arm/mach-bcm2708/include/mach/io.h + create mode 100644 arch/arm/mach-bcm2708/include/mach/memory.h + create mode 100644 arch/arm/mach-bcm2708/include/mach/platform.h + create mode 100644 arch/arm/mach-bcm2708/include/mach/system.h + create mode 100644 arch/arm/mach-bcm2708/include/mach/uncompress.h + create mode 100644 arch/arm/mach-bcm2708/include/mach/vmalloc.h + create mode 100644 arch/arm/mach-bcm2709/Kconfig + create mode 100644 arch/arm/mach-bcm2709/Makefile + create mode 100644 arch/arm/mach-bcm2709/Makefile.boot + create mode 100644 arch/arm/mach-bcm2709/bcm2709.c + create mode 100644 arch/arm/mach-bcm2709/include/mach/debug-macro.S + create mode 100644 arch/arm/mach-bcm2709/include/mach/entry-macro.S + create mode 100644 arch/arm/mach-bcm2709/include/mach/io.h + create mode 100644 arch/arm/mach-bcm2709/include/mach/memory.h + create mode 100644 arch/arm/mach-bcm2709/include/mach/platform.h + create mode 100644 arch/arm/mach-bcm2709/include/mach/system.h + create mode 100644 arch/arm/mach-bcm2709/include/mach/uncompress.h + create mode 100644 arch/arm/mach-bcm2709/include/mach/vmalloc.h + create mode 100644 drivers/char/broadcom/Kconfig + create mode 100644 drivers/char/broadcom/Makefile + create mode 100644 drivers/char/broadcom/bcm2835-gpiomem.c + create mode 100644 drivers/char/broadcom/bcm2835_smi_dev.c + create mode 100644 drivers/char/broadcom/vc_cma/Makefile + create mode 100644 drivers/char/broadcom/vc_cma/vc_cma.c + create mode 100644 drivers/char/broadcom/vc_mem.c + create mode 100644 drivers/char/broadcom/vc_sm/Makefile + create mode 100644 drivers/char/broadcom/vc_sm/vc_sm_defs.h + create mode 100644 drivers/char/broadcom/vc_sm/vc_sm_knl.h + create mode 100644 drivers/char/broadcom/vc_sm/vc_vchi_sm.c + create mode 100644 drivers/char/broadcom/vc_sm/vc_vchi_sm.h + create mode 100644 drivers/char/broadcom/vc_sm/vmcs_sm.c + create mode 100644 drivers/char/broadcom/vcio.c + create mode 100644 drivers/clk/bcm/clk-bcm2835-aux.c + create mode 100644 drivers/clk/clk-hifiberry-dacpro.c + create mode 100644 drivers/cpufreq/bcm2835-cpufreq.c + create mode 100644 drivers/dma/bcm2708-dmaengine.c + create mode 100644 drivers/gpio/gpio-bcm-virt.c + create mode 100644 drivers/gpu/drm/vc4/vc4_gem.c + create mode 100644 drivers/gpu/drm/vc4/vc4_irq.c + create mode 100644 drivers/gpu/drm/vc4/vc4_packet.h + create mode 100644 drivers/gpu/drm/vc4/vc4_qpu_defines.h + create mode 100644 drivers/gpu/drm/vc4/vc4_render_cl.c + create mode 100644 drivers/gpu/drm/vc4/vc4_trace.h + create mode 100644 drivers/gpu/drm/vc4/vc4_trace_points.c + create mode 100644 drivers/gpu/drm/vc4/vc4_v3d.c + create mode 100644 drivers/gpu/drm/vc4/vc4_validate.c + create mode 100644 drivers/gpu/drm/vc4/vc4_validate_shaders.c + create mode 100644 drivers/i2c/busses/i2c-bcm2708.c + create mode 100644 drivers/input/joystick/rpisense-js.c + create mode 100644 drivers/input/touchscreen/rpi-ft5406.c + create mode 100644 drivers/leds/trigger/ledtrig-input.c + create mode 100644 drivers/media/platform/bcm2835/Kconfig + create mode 100644 drivers/media/platform/bcm2835/Makefile + create mode 100644 drivers/media/platform/bcm2835/bcm2835-camera.c + create mode 100644 drivers/media/platform/bcm2835/bcm2835-camera.h + create mode 100644 drivers/media/platform/bcm2835/controls.c + create mode 100644 drivers/media/platform/bcm2835/mmal-common.h + create mode 100644 drivers/media/platform/bcm2835/mmal-encodings.h + create mode 100644 drivers/media/platform/bcm2835/mmal-msg-common.h + create mode 100644 drivers/media/platform/bcm2835/mmal-msg-format.h + create mode 100644 drivers/media/platform/bcm2835/mmal-msg-port.h + create mode 100644 drivers/media/platform/bcm2835/mmal-msg.h + create mode 100644 drivers/media/platform/bcm2835/mmal-parameters.h + create mode 100644 drivers/media/platform/bcm2835/mmal-vchiq.c + create mode 100644 drivers/media/platform/bcm2835/mmal-vchiq.h + create mode 100644 drivers/mfd/rpisense-core.c + create mode 100644 drivers/misc/bcm2835_smi.c + create mode 100644 drivers/misc/vc04_services/Kconfig + create mode 100644 drivers/misc/vc04_services/Makefile + create mode 100644 drivers/misc/vc04_services/interface/vchi/connections/connection.h + create mode 100644 drivers/misc/vc04_services/interface/vchi/message_drivers/message.h + create mode 100644 drivers/misc/vc04_services/interface/vchi/vchi.h + create mode 100644 drivers/misc/vc04_services/interface/vchi/vchi_cfg.h + create mode 100644 drivers/misc/vc04_services/interface/vchi/vchi_cfg_internal.h + create mode 100644 drivers/misc/vc04_services/interface/vchi/vchi_common.h + create mode 100644 drivers/misc/vc04_services/interface/vchi/vchi_mh.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_build_info.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_cfg.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.c + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_debugfs.c + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_debugfs.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_genversion + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_if.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_ioctl.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_killable.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_memdrv.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_pagelist.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.c + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_version.c + create mode 100644 drivers/mmc/host/bcm2835-mmc.c + create mode 100644 drivers/mmc/host/bcm2835-sdhost.c + create mode 100644 drivers/mtd/nand/bcm2835_smi_nand.c + create mode 100644 drivers/of/configfs.c + create mode 100644 drivers/staging/media/lirc/lirc_rpi.c + create mode 100644 drivers/thermal/bcm2835-thermal.c + create mode 100644 drivers/usb/gadget/file_storage.c + create mode 100644 drivers/usb/host/dwc_common_port/Makefile + create mode 100644 drivers/usb/host/dwc_common_port/Makefile.fbsd + create mode 100644 drivers/usb/host/dwc_common_port/Makefile.linux + create mode 100644 drivers/usb/host/dwc_common_port/changes.txt + create mode 100644 drivers/usb/host/dwc_common_port/doc/doxygen.cfg + create mode 100644 drivers/usb/host/dwc_common_port/dwc_cc.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_cc.h + create mode 100644 drivers/usb/host/dwc_common_port/dwc_common_fbsd.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_common_linux.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_common_nbsd.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_crypto.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_crypto.h + create mode 100644 drivers/usb/host/dwc_common_port/dwc_dh.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_dh.h + create mode 100644 drivers/usb/host/dwc_common_port/dwc_list.h + create mode 100644 drivers/usb/host/dwc_common_port/dwc_mem.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_modpow.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_modpow.h + create mode 100644 drivers/usb/host/dwc_common_port/dwc_notifier.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_notifier.h + create mode 100644 drivers/usb/host/dwc_common_port/dwc_os.h + create mode 100644 drivers/usb/host/dwc_common_port/usb.h + create mode 100644 drivers/usb/host/dwc_otg/Makefile + create mode 100644 drivers/usb/host/dwc_otg/doc/doxygen.cfg + create mode 100644 drivers/usb/host/dwc_otg/dummy_audio.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_cfi_common.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_adp.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_adp.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_attr.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_attr.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_cfi.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_cfi.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_cil.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_cil.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_core_if.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_dbg.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_driver.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_driver.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_fiq_stub.S + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_hcd.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_hcd.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_os_dep.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_pcd.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_pcd.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_pcd_if.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_regs.h + create mode 100644 drivers/usb/host/dwc_otg/test/Makefile + create mode 100644 drivers/usb/host/dwc_otg/test/dwc_otg_test.pm + create mode 100644 drivers/usb/host/dwc_otg/test/test_mod_param.pl + create mode 100644 drivers/usb/host/dwc_otg/test/test_sysfs.pl + create mode 100644 drivers/video/backlight/rpi_backlight.c + create mode 100644 drivers/video/fbdev/bcm2708_fb.c + create mode 100644 drivers/video/fbdev/rpisense-fb.c + create mode 100644 include/dt-bindings/clock/bcm2835-aux.h + create mode 100644 include/linux/broadcom/bcm2835_smi.h + create mode 100644 include/linux/broadcom/vc_cma.h + create mode 100644 include/linux/broadcom/vc_mem.h + create mode 100644 include/linux/broadcom/vmcs_sm_ioctl.h + create mode 100644 include/linux/mfd/rpisense/core.h + create mode 100644 include/linux/mfd/rpisense/framebuffer.h + create mode 100644 include/linux/mfd/rpisense/joystick.h + create mode 100644 include/linux/platform_data/bcm2708.h + create mode 100644 include/linux/platform_data/dma-bcm2708.h + create mode 100644 include/uapi/drm/vc4_drm.h + create mode 100755 scripts/knlinfo + create mode 100755 scripts/mkknlimg + create mode 100755 sound/arm/bcm2835-ctl.c + create mode 100755 sound/arm/bcm2835-pcm.c + create mode 100755 sound/arm/bcm2835-vchiq.c + create mode 100644 sound/arm/bcm2835.c + create mode 100755 sound/arm/bcm2835.h + create mode 100644 sound/arm/vc_vchi_audioserv_defs.h + create mode 100644 sound/soc/bcm/hifiberry_amp.c + create mode 100644 sound/soc/bcm/hifiberry_dac.c + create mode 100644 sound/soc/bcm/hifiberry_dacplus.c + create mode 100644 sound/soc/bcm/hifiberry_digi.c + create mode 100644 sound/soc/bcm/iqaudio-dac.c + create mode 100644 sound/soc/bcm/raspidac3.c + create mode 100644 sound/soc/bcm/rpi-dac.c + create mode 100644 sound/soc/bcm/rpi-proto.c + create mode 100644 sound/soc/codecs/pcm1794a.c + create mode 100644 sound/soc/codecs/pcm5102a.c + create mode 100644 sound/soc/codecs/tas5713.c + create mode 100644 sound/soc/codecs/tas5713.h + +-- +2.5.0 + +From 7ca7dc6a38d1df30b98d042af1328e1febd7f1cd Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 -Subject: [PATCH 001/170] smsx95xx: fix crimes against truesize +Subject: [PATCH 001/181] 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. @@ -35,11 +1085,14 @@ index 66b3ab9..b544181 usbnet_skb_return(dev, ax_skb); } +-- +2.5.0 -From 37e24d2f0af32632a17692076dddcf176d1af1f7 Mon Sep 17 00:00:00 2001 + +From b00627adba1a54fbc9250d6d8815fb8a95fdbfed Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 17 Apr 2015 16:58:45 +0100 -Subject: [PATCH 002/170] smsc95xx: Disable turbo mode by default +Subject: [PATCH 002/181] smsc95xx: Disable turbo mode by default --- drivers/net/usb/smsc95xx.c | 2 +- @@ -58,11 +1111,14 @@ index b544181..9c0da18 100755 module_param(turbo_mode, bool, 0644); MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction"); +-- +2.5.0 -From d5cb475205138f9df1fdbb74d8810ab1928696ea Mon Sep 17 00:00:00 2001 + +From 31da329495a05de10159b81216b38bc57500b2b7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Jun 2014 13:42:01 +0100 -Subject: [PATCH 003/170] vmstat: Workaround for issue where dirty page count +Subject: [PATCH 003/181] vmstat: Workaround for issue where dirty page count goes negative See: @@ -88,11 +1144,14 @@ index 3e5d907..2539068 100644 } static inline void __inc_zone_page_state(struct page *page, +-- +2.5.0 -From 249a499b1d4b6f8a57b3377d4f505841e99f60c8 Mon Sep 17 00:00:00 2001 + +From c56b66b3b8f33f699b3c4b5b2806fa8b190aec9b Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 -Subject: [PATCH 004/170] BCM2835_DT: Fix I2S register map +Subject: [PATCH 004/181] BCM2835_DT: Fix I2S register map --- Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 ++-- @@ -145,11 +1204,14 @@ index aef64de..864a3ef 100644 dmas = <&dma 2>, <&dma 3>; +-- +2.5.0 -From c24657505a2aac71d0409b0ef703fc21ecab4b2e Mon Sep 17 00:00:00 2001 + +From e4b2247659fd211ca744ad26c0b851d230a65171 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 -Subject: [PATCH 005/170] irq-bcm2836: Prevent spurious interrupts, and trap +Subject: [PATCH 005/181] irq-bcm2836: Prevent spurious interrupts, and trap them early The old arch-specific IRQ macros included a dsb to ensure the @@ -179,11 +1241,14 @@ index f687082..4cd8ebe 100644 u32 hwirq = ffs(stat) - 1; handle_IRQ(irq_linear_revmap(intc.domain, hwirq), regs); +-- +2.5.0 -From 229bcf2e73ce37e8a18d68773471024c848d84bd Mon Sep 17 00:00:00 2001 + +From 1640c389480be51d78127909965aa01eba6fce69 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 006/170] irqchip: bcm2835: Add FIQ support +Subject: [PATCH 006/181] irqchip: bcm2835: Add FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -201,7 +1266,7 @@ Acked-by: Stephen Warren 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig -index 8c53c55..c943747b 100644 +index 8c53c55..c943747 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig @@ -128,6 +128,7 @@ config ARCH_BCM2835 @@ -311,11 +1376,14 @@ index bf9cc5f..3f601f9 100644 return 0; } +-- +2.5.0 -From 6780f0a5c6af19f2b9850e961a0f81fbfdfa48fe Mon Sep 17 00:00:00 2001 + +From 937729fda083614abb4d069a271e3f3cf54853ef 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 007/170] irqchip: irq-bcm2835: Add 2836 FIQ support +Subject: [PATCH 007/181] irqchip: irq-bcm2835: Add 2836 FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -410,11 +1478,14 @@ index 3f601f9..20deb28 100644 /* Make a duplicate irq range which is used to enable FIQ */ for (b = 0; b < NR_BANKS; b++) { for (i = 0; i < bank_irqs[b]; i++) { +-- +2.5.0 -From 4b9529b98c01569dff06f4e67ba28a47318e5ea5 Mon Sep 17 00:00:00 2001 + +From 9b24083716198addfb64bfefe38e18878394b826 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 30 Jun 2015 14:12:42 +0100 -Subject: [PATCH 008/170] serial: 8250: Don't crash when nr_uarts is 0 +Subject: [PATCH 008/181] serial: 8250: Don't crash when nr_uarts is 0 --- drivers/tty/serial/8250/8250_core.c | 2 ++ @@ -433,11 +1504,14 @@ index 3912646..b51a59c 100644 for (i = 0; i < nr_uarts; i++) { struct uart_8250_port *up = &serial8250_ports[i]; +-- +2.5.0 -From 5fd6ab82b1027504faa66cf4fc8b999fafaacd12 Mon Sep 17 00:00:00 2001 + +From 0723b442ea663b8da24cf64641dc95fd9bf4cd49 Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 009/170] pinctrl-bcm2835: Set base to 0 give expected gpio +Subject: [PATCH 009/181] pinctrl-bcm2835: Set base to 0 give expected gpio numbering Signed-off-by: Noralf Tronnes @@ -458,11 +1532,14 @@ index 2e6ca69..62cc363 100644 .ngpio = BCM2835_NUM_GPIOS, .can_sleep = false, }; +-- +2.5.0 -From 4254ef2647e89061427836443eac60351b3306a7 Mon Sep 17 00:00:00 2001 + +From d4e883dc20d8a40ac78d9a15860c893036e6d171 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 24 Feb 2015 13:40:50 +0000 -Subject: [PATCH 010/170] pinctrl-bcm2835: Fix interrupt handling for GPIOs +Subject: [PATCH 010/181] pinctrl-bcm2835: Fix interrupt handling for GPIOs 28-31 and 46-53 Contrary to the documentation, the BCM2835 GPIO controller actually has @@ -607,11 +1684,14 @@ index 62cc363..ab345f4 100644 .of_match_table = bcm2835_pinctrl_match, }, }; +-- +2.5.0 -From 93b12e64d0e2a8a65189dedd667e00b0a0fab60a Mon Sep 17 00:00:00 2001 + +From 89460aa2bad6d630b45b5d47bbb5156604b57903 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 26 Feb 2015 09:58:22 +0000 -Subject: [PATCH 011/170] pinctrl-bcm2835: Only request the interrupts listed +Subject: [PATCH 011/181] pinctrl-bcm2835: Only request the interrupts listed in the DTB Although the GPIO controller can generate three interrupts (four counting @@ -637,11 +1717,14 @@ index ab345f4..640e3b0 100644 pc->irq_data[i].pc = pc; pc->irq_data[i].irqgroup = i; +-- +2.5.0 -From bb8ff388ad26721eebb7249afb6f6f57bc196de4 Mon Sep 17 00:00:00 2001 + +From 743e250a18d926f14d2167010214e9b01b2e80c4 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 -Subject: [PATCH 012/170] spi-bcm2835: Support pin groups other than 7-11 +Subject: [PATCH 012/181] 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 @@ -721,11 +1804,14 @@ index cf04960..a2b1f45 100644 /* and set up the "mode" and level */ dev_info(&spi->dev, "setting up native-CS%i as GPIO %i\n", +-- +2.5.0 -From bfcfed788d152e828747ea889a88f8b179217ddb Mon Sep 17 00:00:00 2001 + +From da9e187499d174087bafacaa41e8ff2f206d0d4b 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 013/170] ARM: bcm2835: Set Serial number and Revision +Subject: [PATCH 013/181] ARM: bcm2835: Set Serial number and Revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -750,7 +1836,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 9 insertions(+) diff --git a/arch/arm/mach-bcm/board_bcm2835.c b/arch/arm/mach-bcm/board_bcm2835.c -index 0f7b9ea..1e6f1cf9 100644 +index 0f7b9ea..1e6f1cf 100644 --- a/arch/arm/mach-bcm/board_bcm2835.c +++ b/arch/arm/mach-bcm/board_bcm2835.c @@ -17,12 +17,16 @@ @@ -782,11 +1868,14 @@ index 0f7b9ea..1e6f1cf9 100644 } static const char * const bcm2835_compat[] = { +-- +2.5.0 -From fb968a02c00e2722df2dcfec6f54b7524ff5a155 Mon Sep 17 00:00:00 2001 + +From 7a3e53c30d9126c7e76e18b3b985ed9a78a44de2 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 16:44:05 +0200 -Subject: [PATCH 014/170] bcm2835-i2s: get base address for DMA from devicetree +Subject: [PATCH 014/181] bcm2835-i2s: get base address for DMA from devicetree Code copied from spi-bcm2835. Get physical address from devicetree instead of using hardcoded constant. @@ -850,11 +1939,14 @@ index 8c435be..0bc4f47 100644 /* Set the bus width */ dev->dma_data[SNDRV_PCM_STREAM_PLAYBACK].addr_width = +-- +2.5.0 -From abbe565abfe075b76e01b9671c6fc4cf42cc0328 Mon Sep 17 00:00:00 2001 + +From f570ab28e8023f14cb2a107fb9277c9a91830cd3 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:21:16 +0200 -Subject: [PATCH 015/170] bcm2835-i2s: add 24bit support, update bclk_ratio to +Subject: [PATCH 015/181] bcm2835-i2s: add 24bit support, update bclk_ratio to more correct values Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -932,11 +2024,14 @@ index 0bc4f47..cf60390 100644 | SNDRV_PCM_FMTBIT_S32_LE }, .ops = &bcm2835_i2s_dai_ops, +-- +2.5.0 -From b2cc62cd13099d6d2f21b9927df248aa3bdd8d5b Mon Sep 17 00:00:00 2001 + +From 7e568e18bc527d50370cb1cceb0cc2420d8b6c3e Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:25:51 +0200 -Subject: [PATCH 016/170] bcm2835-i2s: setup clock only if CPU is clock master +Subject: [PATCH 016/181] bcm2835-i2s: setup clock only if CPU is clock master Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -990,11 +2085,14 @@ index cf60390..4ac4e92 100644 /* Setup the frame format */ format = BCM2835_I2S_CHEN; +-- +2.5.0 -From 71b2c93cd332be280b9ca7f293e463f30d5fb108 Mon Sep 17 00:00:00 2001 + +From 217512b6b8889048f0e3df7ddc31c7f08e6f0f44 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:49:51 +0200 -Subject: [PATCH 017/170] bcm2835-i2s: Eliminate debugfs directory error +Subject: [PATCH 017/181] bcm2835-i2s: Eliminate debugfs directory error Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -1029,11 +2127,14 @@ index 4ac4e92..aab3df9 100644 }, }; +-- +2.5.0 -From fae43fcaa20df1d39c09c98372100bb1dedd6090 Mon Sep 17 00:00:00 2001 + +From 337b88c4bfce56ae5a30a7d579034e6bb7295780 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:35:20 +0200 -Subject: [PATCH 018/170] bcm2835-i2s: Register PCM device +Subject: [PATCH 018/181] bcm2835-i2s: Register PCM device Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -1095,11 +2196,14 @@ index aab3df9..0e5c787 100644 if (ret) { dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); return ret; +-- +2.5.0 -From c9e2eeee4889f965a29744718bbff2de409ac649 Mon Sep 17 00:00:00 2001 + +From 0edf24e2f7a56aaf31d6fdd7bf8263f845acf4f9 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:55:21 +0200 -Subject: [PATCH 019/170] bcm2835-i2s: Enable MMAP support via a DT property +Subject: [PATCH 019/181] bcm2835-i2s: Enable MMAP support via a DT property Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -1142,11 +2246,14 @@ index 0e5c787..04c1d13 100644 /* Request both ioareas */ for (i = 0; i <= 1; i++) { void __iomem *base; +-- +2.5.0 -From dc5b926436bccc4efbb1695ec3696b5db6746d3b Mon Sep 17 00:00:00 2001 + +From 325c1787d61e5d28128dee5b5b5d17d4121bb487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Thu, 9 Apr 2015 12:34:11 +0200 -Subject: [PATCH 020/170] dmaengine: bcm2835: Add slave dma support +Subject: [PATCH 020/181] dmaengine: bcm2835: Add slave dma support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1465,11 +2572,14 @@ index 996c4b0..b278c66 100644 MODULE_AUTHOR("Florian Meier "); +MODULE_AUTHOR("Gellert Weisz "); MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From 9c6955f3fbfbb46242c63b4640886b9a0d87910a Mon Sep 17 00:00:00 2001 + +From fce46e603440b8b6318fc3fd21b449bd128370d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 3 Oct 2015 15:58:59 +0200 -Subject: [PATCH 021/170] dmaengine: bcm2835: set residue_granularity field +Subject: [PATCH 021/181] dmaengine: bcm2835: set residue_granularity field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1497,11 +2607,14 @@ index b278c66..696fb30 100644 od->ddev.dev = &pdev->dev; INIT_LIST_HEAD(&od->ddev.channels); spin_lock_init(&od->lock); +-- +2.5.0 -From 8da7ee8d9b714dbbac842fb5ae0471b52e0393ec Mon Sep 17 00:00:00 2001 + +From cc9bc526ee726da07e7258a7aafacd46265b3079 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 022/170] dmaengine: bcm2835: Load driver early and support +Subject: [PATCH 022/181] dmaengine: bcm2835: Load driver early and support legacy API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -1600,11 +2713,14 @@ index 696fb30..5db0a95 100644 MODULE_ALIAS("platform:bcm2835-dma"); MODULE_DESCRIPTION("BCM2835 DMA engine driver"); +-- +2.5.0 -From 0f3a30eb7ad7e709fdc6447c70bc3f1d5704eb63 Mon Sep 17 00:00:00 2001 + +From 844fedc0f8399362bbefab438943c45e22333c7c Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sat, 10 Oct 2015 12:29:18 +0200 -Subject: [PATCH 023/170] bcm2835-dma: Fix dreq not set for slave transfers +Subject: [PATCH 023/181] bcm2835-dma: Fix dreq not set for slave transfers Set dreq to slave_id if it is not set like in bcm2708-dmaengine. --- @@ -1624,11 +2740,14 @@ index 5db0a95..fe1fd60 100644 return 0; } +-- +2.5.0 -From 305370f7caaecafbabb77b630380dbc0c436bb4c Mon Sep 17 00:00:00 2001 + +From 6f06bca1f5f18b4464eaa1f64ab13dd824c6cc71 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 12:28:30 +0200 -Subject: [PATCH 024/170] bcm2835-dma: Limit cyclic transfers on lite channels +Subject: [PATCH 024/181] bcm2835-dma: Limit cyclic transfers on lite channels to 32k Transfers larger than 32k cause repeated clicking with I2S soundcards. @@ -1664,11 +2783,14 @@ index fe1fd60..0adc347 100644 else max_size = MAX_NORMAL_TRANSFER; period_len = min(period_len, max_size); +-- +2.5.0 -From d801c33b7e2fb0d02ac11b95ea92b7d692286ffc Mon Sep 17 00:00:00 2001 + +From 1da5de7245640e71973241ac02e2d0d520d8fc96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 15 Aug 2015 20:50:02 +0200 -Subject: [PATCH 025/170] bcm2835: Add support for uart1 +Subject: [PATCH 025/181] bcm2835: Add support for uart1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1682,7 +2804,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 25 insertions(+) diff --git a/arch/arm/mach-bcm/board_bcm2835.c b/arch/arm/mach-bcm/board_bcm2835.c -index 1e6f1cf9..ea36eec 100644 +index 1e6f1cf..ea36eec 100644 --- a/arch/arm/mach-bcm/board_bcm2835.c +++ b/arch/arm/mach-bcm/board_bcm2835.c @@ -22,6 +22,29 @@ @@ -1724,11 +2846,14 @@ index 1e6f1cf9..ea36eec 100644 } static const char * const bcm2835_compat[] = { +-- +2.5.0 -From 5e90e32b539720ad8c6c8d7ec462378685924f22 Mon Sep 17 00:00:00 2001 + +From cbdf6010751ec8faaa7c5704948deaa85bce2670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:21:20 +0200 -Subject: [PATCH 026/170] firmware: bcm2835: Add missing property tags +Subject: [PATCH 026/181] firmware: bcm2835: Add missing property tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1789,11 +2914,14 @@ index c07d74a..525816d 100644 RPI_FIRMWARE_GET_COMMAND_LINE = 0x00050001, RPI_FIRMWARE_GET_DMA_CHANNELS = 0x00060001, +-- +2.5.0 -From 894f124497e95c9af506af2ed7335857f2e71358 Mon Sep 17 00:00:00 2001 + +From 47acd4ef63a230a9f050a5045a3ca47d73db5978 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 027/170] Main bcm2708/bcm2709 linux port +Subject: [PATCH 027/181] Main bcm2708/bcm2709 linux port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2693,7 +3821,7 @@ index 0000000..502c617 +#define VMALLOC_END (0xe8000000) diff --git a/arch/arm/mach-bcm2709/Kconfig b/arch/arm/mach-bcm2709/Kconfig new file mode 100644 -index 0000000..643b4b98 +index 0000000..643b4b9 --- /dev/null +++ b/arch/arm/mach-bcm2709/Kconfig @@ -0,0 +1,16 @@ @@ -4307,11 +5435,14 @@ index 8673ffe..ad22ebb 100644 mmc_pm_flag_t pm_caps; /* supported pm features */ +-- +2.5.0 -From 74b2c26348d94949561979a9a3ad61adcac74398 Mon Sep 17 00:00:00 2001 + +From 0d8d26615a7222ee0ce532a00249190651751e3a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 11 Nov 2015 21:01:15 +0000 -Subject: [PATCH 028/170] squash: include ARCH_BCM2708 / ARCH_BCM2709 +Subject: [PATCH 028/181] squash: include ARCH_BCM2708 / ARCH_BCM2709 --- drivers/char/hw_random/Kconfig | 2 +- @@ -4400,7 +5531,7 @@ index cfb4b44..d9c6c21 100644 MODULE_AUTHOR("Lubomir Rintel "); MODULE_DESCRIPTION("BCM2835 mailbox IPC driver"); diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile -index 738cb492..4fd086f 100644 +index 738cb49..4fd086f 100644 --- a/drivers/pinctrl/Makefile +++ b/drivers/pinctrl/Makefile @@ -40,6 +40,7 @@ obj-$(CONFIG_PINCTRL_TB10X) += pinctrl-tb10x.o @@ -4462,11 +5593,14 @@ index 6a834e1..c5070ae 100644 select SND_SOC_GENERIC_DMAENGINE_PCM select REGMAP_MMIO help +-- +2.5.0 -From a03df8d0f93365689c718f3d1fb62695e9fffe31 Mon Sep 17 00:00:00 2001 + +From c4642bcc9c8838d91f43801f2c749be422bb1998 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 029/170] Add dwc_otg driver +Subject: [PATCH 029/181] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -5107,7 +6241,7 @@ index 8dd26e1..eef4847 100644 + mov pc, r8 +ENDPROC(__FIQ_Branch) diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile -index d5c57f1e..0e15a22 100644 +index d5c57f1..0e15a22 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile @@ -7,6 +7,7 @@ @@ -5147,7 +6281,7 @@ diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 8e641b5..de3ed7d 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c -@@ -1909,6 +1909,85 @@ int usb_set_configuration(struct usb_device *dev, int configuration) +@@ -1909,6 +1909,85 @@ free_interfaces: if (cp->string == NULL && !(dev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS)) cp->string = usb_cache_string(dev, cp->desc.iConfiguration); @@ -5392,7 +6526,7 @@ index a95b0c9..17b605f 100644 diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c new file mode 100644 -index 0000000..a896d73f +index 0000000..a896d73 --- /dev/null +++ b/drivers/usb/gadget/file_storage.c @@ -0,0 +1,3676 @@ @@ -13230,7 +14364,7 @@ index 0000000..4664684 +#endif /* DWC_LIBMODULE */ diff --git a/drivers/usb/host/dwc_common_port/dwc_common_nbsd.c b/drivers/usb/host/dwc_common_port/dwc_common_nbsd.c new file mode 100644 -index 0000000..49b07e17 +index 0000000..49b07e1 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_common_nbsd.c @@ -0,0 +1,1275 @@ @@ -25757,7 +26891,7 @@ index 0000000..bbb3d32 +#endif //DWC_UTE_CFI diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cfi.h b/drivers/usb/host/dwc_otg/dwc_otg_cfi.h new file mode 100644 -index 0000000..55fd337a +index 0000000..55fd337 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cfi.h @@ -0,0 +1,320 @@ @@ -55748,7 +56882,7 @@ index 0000000..c8d2e0e +#endif /* DWC_HOST_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c new file mode 100644 -index 0000000..c8590b52 +index 0000000..c8590b5 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c @@ -0,0 +1,5147 @@ @@ -65444,11 +66578,14 @@ index 0000000..cdc9963 + +test_main(); +0; +-- +2.5.0 -From 845f985818d3d9ba162ab1102da78b0e39eaedba Mon Sep 17 00:00:00 2001 + +From be1767ce9178c9dd3af56ce65e0bdd303a99418d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 -Subject: [PATCH 030/170] bcm2708 framebuffer driver +Subject: [PATCH 030/181] bcm2708 framebuffer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -66420,7 +67557,7 @@ index 0000000..a20539a +MODULE_PARM_DESC(fbdepth, "Bit depth of ARM Framebuffer"); +MODULE_PARM_DESC(fbswap, "Swap order of red and blue in 24 and 32 bit modes"); diff --git a/drivers/video/logo/logo_linux_clut224.ppm b/drivers/video/logo/logo_linux_clut224.ppm -index 3c14e43..7626beb6a 100644 +index 3c14e43..7626beb 100644 --- a/drivers/video/logo/logo_linux_clut224.ppm +++ b/drivers/video/logo/logo_linux_clut224.ppm @@ -1,1604 +1,883 @@ @@ -68909,11 +70046,14 @@ index 3c14e43..7626beb6a 100644 +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 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 +-- +2.5.0 -From a35139d316b78606bfdeb0f10656ba6f1729c83f Mon Sep 17 00:00:00 2001 + +From d15083a3f5ab99fe6cbbb2a6d33d99bddcadf35c Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 031/170] dmaengine: Add support for BCM2708 +Subject: [PATCH 031/181] dmaengine: Add support for BCM2708 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -69532,97 +70672,14 @@ index 0000000..99cc7fd +#endif /* CONFIG_DMA_BCM2708 */ + +#endif /* _PLAT_BCM2708_DMA_H */ +-- +2.5.0 -From 462591cf98f15614620667e93b7f8bc0da6e86da Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Fri, 17 Apr 2015 19:30:22 +0100 -Subject: [PATCH 032/170] Add blk_pos parameter to mmc multi_io_quirk callback ---- - drivers/mmc/card/block.c | 1 + - drivers/mmc/host/omap_hsmmc.c | 4 +++- - drivers/mmc/host/sh_mobile_sdhi.c | 4 +++- - drivers/mmc/host/tmio_mmc_pio.c | 4 +++- - include/linux/mmc/host.h | 4 +++- - 5 files changed, 13 insertions(+), 4 deletions(-) - -diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c -index d848616..b35f0c4 100644 ---- a/drivers/mmc/card/block.c -+++ b/drivers/mmc/card/block.c -@@ -1510,6 +1510,7 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, - brq->data.blocks = card->host->ops->multi_io_quirk(card, - (rq_data_dir(req) == READ) ? - MMC_DATA_READ : MMC_DATA_WRITE, -+ blk_rq_pos(req), - brq->data.blocks); - } - -diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c -index 7fb0753..708d0fa 100644 ---- a/drivers/mmc/host/omap_hsmmc.c -+++ b/drivers/mmc/host/omap_hsmmc.c -@@ -1832,7 +1832,9 @@ static void omap_hsmmc_conf_bus_power(struct omap_hsmmc_host *host) - } - - static int omap_hsmmc_multi_io_quirk(struct mmc_card *card, -- unsigned int direction, int blk_size) -+ unsigned int direction, -+ u32 blk_pos, -+ int blk_size) - { - /* This controller can't do multiblock reads due to hw bugs */ - if (direction == MMC_DATA_READ) -diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c -index 354f4f3..4f1ccf3 100644 ---- a/drivers/mmc/host/sh_mobile_sdhi.c -+++ b/drivers/mmc/host/sh_mobile_sdhi.c -@@ -170,7 +170,9 @@ static int sh_mobile_sdhi_write16_hook(struct tmio_mmc_host *host, int addr) - } - - static int sh_mobile_sdhi_multi_io_quirk(struct mmc_card *card, -- unsigned int direction, int blk_size) -+ unsigned int direction, -+ u32 blk_pos, -+ int blk_size) - { - /* - * In Renesas controllers, when performing a -diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c -index a10fde4..7b730d8 100644 ---- a/drivers/mmc/host/tmio_mmc_pio.c -+++ b/drivers/mmc/host/tmio_mmc_pio.c -@@ -1003,7 +1003,9 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc) - } - - static int tmio_multi_io_quirk(struct mmc_card *card, -- unsigned int direction, int blk_size) -+ unsigned int direction, -+ u32 blk_pos, -+ int blk_size) - { - struct tmio_mmc_host *host = mmc_priv(card->host); - -diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h -index ad22ebb..105b3e6 100644 ---- a/include/linux/mmc/host.h -+++ b/include/linux/mmc/host.h -@@ -143,7 +143,9 @@ struct mmc_host_ops { - * I/O. Returns the number of supported blocks for the request. - */ - int (*multi_io_quirk)(struct mmc_card *card, -- unsigned int direction, int blk_size); -+ unsigned int direction, -+ u32 blk_pos, -+ int blk_size); - }; - - struct mmc_card; - -From 3d0ca77d187abbbde572f4a73b1f864ffb8b5d8a Mon Sep 17 00:00:00 2001 +From 5f894aedb0398b3c5733e3fa9f0fa4fe87c48bc8 Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 033/170] MMC: added alternative MMC driver +Subject: [PATCH 032/181] MMC: added alternative MMC driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -71319,11 +72376,14 @@ index 0000000..43aed6e +MODULE_DESCRIPTION("BCM2835 SDHCI driver"); +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Gellert Weisz"); +-- +2.5.0 -From 756bf8b8f081be45e16d4d58d3fbe2ca073df298 Mon Sep 17 00:00:00 2001 + +From 98a9634da0d669b8b8cb674a3a6cd2b9f796b226 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 -Subject: [PATCH 034/170] Adding bcm2835-sdhost driver, and an overlay to +Subject: [PATCH 033/181] Adding bcm2835-sdhost driver, and an overlay to enable it BCM2835 has two SD card interfaces. This driver uses the other one. @@ -73349,11 +74409,14 @@ index 0000000..da089985 +MODULE_DESCRIPTION("BCM2835 SDHost driver"); +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); +-- +2.5.0 -From 8dbb0430386b772f636f474ed45496076d135428 Mon Sep 17 00:00:00 2001 + +From df10df3386271557f47256ff8f51cfd397914b80 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:31:47 +0100 -Subject: [PATCH 035/170] cma: Add vc_cma driver to enable use of CMA +Subject: [PATCH 034/181] 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 @@ -74695,11 +75758,14 @@ index 0000000..be2819d +#endif + +#endif /* VC_CMA_H */ +-- +2.5.0 -From 1e8eb30b259278ea7ab9d14c66d2fab5f580f73c Mon Sep 17 00:00:00 2001 + +From 4172b5cd7e85a51efb8c188813c0dfb8a7c88029 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 26 Mar 2012 22:15:50 +0100 -Subject: [PATCH 036/170] bcm2708: alsa sound driver +Subject: [PATCH 035/181] bcm2708: alsa sound driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -77396,11 +78462,14 @@ index 0000000..af3e6eb +} VC_AUDIO_MSG_T; + +#endif // _VC_AUDIO_DEFS_H_ +-- +2.5.0 -From 20c0f57db9cca65943519bd404b3e346958f4544 Mon Sep 17 00:00:00 2001 + +From 2b30868551a9ff0aae3299e82f9c288be7d72fd4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 2 Jul 2013 23:42:01 +0100 -Subject: [PATCH 037/170] bcm2708 vchiq driver +Subject: [PATCH 036/181] bcm2708 vchiq driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -78658,7 +79727,7 @@ index 0000000..1b17e98 +/****************************** End of file **********************************/ diff --git a/drivers/misc/vc04_services/interface/vchi/vchi_cfg.h b/drivers/misc/vc04_services/interface/vchi/vchi_cfg.h new file mode 100644 -index 0000000..26bc2d38 +index 0000000..26bc2d3 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/vchi_cfg.h @@ -0,0 +1,224 @@ @@ -90704,11 +91773,14 @@ index 0000000..b6bfa21 +{ + return vchiq_build_time; +} +-- +2.5.0 -From 2cabfc660c80dd79f24a8323b3913b5060ebf750 Mon Sep 17 00:00:00 2001 + +From 741ebbd46de0d68d46b1aeeae58785c33f9d7c16 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 16:07:06 +0100 -Subject: [PATCH 038/170] vc_mem: Add vc_mem driver +Subject: [PATCH 037/181] vc_mem: Add vc_mem driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -91712,11 +92784,14 @@ index 0000000..20a4753 +#endif + +#endif /* _VC_MEM_H */ +-- +2.5.0 -From 01574b9e0f1086399e7f796cc1dc8fcadabf4a46 Mon Sep 17 00:00:00 2001 + +From 544b532a3aebd7a268c7b9bf56866a1f9240339d Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 039/170] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 038/181] vcsm: VideoCore shared memory service for BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -96131,11 +97206,14 @@ index 0000000..334f36d +/* ---- Function Prototypes ---------------------------------------------- */ + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ +-- +2.5.0 -From 832077a0f61e44a9259b153f60eb233fa723c2a9 Mon Sep 17 00:00:00 2001 + +From 32c916a358c5ec7b80c8337d89fdccd65d213d2e Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 -Subject: [PATCH 040/170] Add /dev/gpiomem device for rootless user GPIO access +Subject: [PATCH 039/181] Add /dev/gpiomem device for rootless user GPIO access Signed-off-by: Luke Wren @@ -96445,11 +97523,14 @@ index 0000000..911f5b7 +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); +-- +2.5.0 -From 6609b15c34f26f34b4b49e7726693a1de321078c Mon Sep 17 00:00:00 2001 + +From 1968cf3fe7e697bd606f7589c96a11684c306aad Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 -Subject: [PATCH 041/170] Add SMI driver +Subject: [PATCH 040/181] Add SMI driver Signed-off-by: Luke Wren --- @@ -98399,11 +99480,14 @@ index 0000000..ee3a75e +#endif /* BCM2835_SMI_IMPLEMENTATION */ + +#endif /* BCM2835_SMI_H */ +-- +2.5.0 -From f4d44b2c447c401791645627e88d0ef9830c1239 Mon Sep 17 00:00:00 2001 + +From b143b93a4c13998f4f396545a19cb26b5151f3ef Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 -Subject: [PATCH 042/170] Add SMI NAND driver +Subject: [PATCH 041/181] Add SMI NAND driver Signed-off-by: Luke Wren --- @@ -98483,7 +99567,7 @@ index 2896640..56ff00b 100644 tristate diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile -index 2c7f014b..30e22f0 100644 +index 2c7f014..30e22f0 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -14,6 +14,7 @@ obj-$(CONFIG_MTD_NAND_DENALI) += denali.o @@ -98768,11 +99852,14 @@ index 0000000..b747326 +MODULE_DESCRIPTION + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); +-- +2.5.0 -From 2faad8f6644fa53418c5a7b80da8d5400b72df3f Mon Sep 17 00:00:00 2001 + +From 98e8d0052c9d94199f9b2a557c6014e3e862e325 Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 043/170] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 042/181] 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 @@ -99620,11 +100707,14 @@ index 0000000..fb69624 + bcm2708_gpio_pull_t value); + +#endif +-- +2.5.0 -From 3c7ea37319a4974cbf6b89a84c109a53f4d6b408 Mon Sep 17 00:00:00 2001 + +From b8bf5c8200b17a92ca80502e7e5d5feab3a2d180 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 044/170] Add cpufreq driver +Subject: [PATCH 043/181] Add cpufreq driver Signed-off-by: popcornmix --- @@ -99885,11 +100975,14 @@ index 0000000..3eb9e93 + +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); +-- +2.5.0 -From 776e87ffc8b137ea465e7b0076e56cd71d9c56d1 Mon Sep 17 00:00:00 2001 + +From 9fd68c24df6a09c061b14d360323988820f082d8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 045/170] Added hwmon/thermal driver for reporting core +Subject: [PATCH 044/181] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -100086,11 +101179,14 @@ index 0000000..08d8dc7 +MODULE_AUTHOR("Noralf Trønnes"); +MODULE_DESCRIPTION("Thermal driver for bcm2835 chip"); +MODULE_LICENSE("GPL"); +-- +2.5.0 -From 72181304010d3aa74cd2b98db592554a541ce4c2 Mon Sep 17 00:00:00 2001 + +From 14fb9c7c71cc37c1cd51c5331df954adad6a2b96 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 -Subject: [PATCH 046/170] Add Chris Boot's i2c driver +Subject: [PATCH 045/181] Add Chris Boot's i2c driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -100729,11 +101825,14 @@ index 0000000..85f411c +MODULE_AUTHOR("Chris Boot "); +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); +-- +2.5.0 -From abcf04d54ccb3d0897b1f7a95ddf9d9ccf63dc76 Mon Sep 17 00:00:00 2001 + +From c294afc3e5cf2a23490bb8dc9d22c47c41c04aa2 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 047/170] char: broadcom: Add vcio module +Subject: [PATCH 046/181] char: broadcom: Add vcio module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -100958,11 +102057,14 @@ index 0000000..c19bc20 +MODULE_AUTHOR("Noralf Trønnes"); +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); +-- +2.5.0 -From a205e934b63b6bf3f5f74bc39974ec6ff09df596 Mon Sep 17 00:00:00 2001 + +From fcbd747993df68ce377203f763f8879b3142c039 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 048/170] firmware: bcm2835: Support ARCH_BCM270x +Subject: [PATCH 047/181] firmware: bcm2835: Support ARCH_BCM270x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -101067,11 +102169,14 @@ index dd506cd3..b980d53 100644 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); +-- +2.5.0 -From 4d74ee3d433df319ae3fc36bd16fd96b4bbff865 Mon Sep 17 00:00:00 2001 + +From 72a20d812e360332a6cf062a9674c740f55248d2 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 30 Jan 2013 12:45:18 +0000 -Subject: [PATCH 049/170] bcm2835: add v4l2 camera device +Subject: [PATCH 048/181] bcm2835: add v4l2 camera device - Supports raw YUV capture, preview, JPEG and H264. - Uses videobuf2 for data transfer, using dma_buf. @@ -104831,7 +105936,7 @@ index 0000000..f9f903f +} diff --git a/drivers/media/platform/bcm2835/mmal-common.h b/drivers/media/platform/bcm2835/mmal-common.h new file mode 100644 -index 0000000..840fd139 +index 0000000..840fd13 --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-common.h @@ -0,0 +1,53 @@ @@ -108455,11 +109560,14 @@ index 0000000..9d1d11e + struct mmal_buffer *buf); + +#endif /* MMAL_VCHIQ_H */ +-- +2.5.0 -From 03435989bbadbd333a810644c8246dd7eb0bad07 Mon Sep 17 00:00:00 2001 + +From d29ba33e497f0d3c992ceb9fa98c758201cc9195 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 -Subject: [PATCH 050/170] scripts: Add mkknlimg and knlinfo scripts from tools +Subject: [PATCH 049/181] scripts: Add mkknlimg and knlinfo scripts from tools repo The Raspberry Pi firmware looks for a trailer on the kernel image to @@ -108923,11 +110031,14 @@ index 0000000..3998d43 + my $val = $configs->{$wanted} || 'n'; + return (($val eq 'y') || ($val eq '1')); +} +-- +2.5.0 -From a251bf4a37d8fd468bc3ff853bcebe8ee452a31e Mon Sep 17 00:00:00 2001 + +From 67f1cc9ee84ebca32e00846102be832bdb2ee6d9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 5 Dec 2014 17:26:26 +0000 -Subject: [PATCH 051/170] fdt: Add support for the CONFIG_CMDLINE_EXTEND option +Subject: [PATCH 050/181] fdt: Add support for the CONFIG_CMDLINE_EXTEND option --- drivers/of/fdt.c | 29 ++++++++++++++++++++++++----- @@ -108981,11 +110092,14 @@ index 655f79d..fdc4501 100644 #endif /* CONFIG_CMDLINE */ pr_debug("Command line is: %s\n", (char*)data); +-- +2.5.0 -From 0112c4ce9db6cdc53af67dc7634966c3594de7ff Mon Sep 17 00:00:00 2001 + +From d23531bc7abf658556614ce6f6602a5a73313b67 Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 052/170] BCM2708: Add core Device Tree support +Subject: [PATCH 051/181] BCM2708: Add core Device Tree support Add the bare minimum needed to boot BCM2708 from a Device Tree. @@ -110319,7 +111433,7 @@ index 0000000..a8cfd7c +}; diff --git a/arch/arm/boot/dts/bcm2835-rpi-cm.dts b/arch/arm/boot/dts/bcm2835-rpi-cm.dts new file mode 100644 -index 0000000..c6e6860a +index 0000000..c6e6860 --- /dev/null +++ b/arch/arm/boot/dts/bcm2835-rpi-cm.dts @@ -0,0 +1,93 @@ @@ -110529,7 +111643,7 @@ index 0000000..d8c2771 +endif diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README new file mode 100644 -index 0000000..44e33a4 +index 0000000..268d400 --- /dev/null +++ b/arch/arm/boot/dts/overlays/README @@ -0,0 +1,648 @@ @@ -110644,7 +111758,7 @@ index 0000000..44e33a4 + (default "off") + + random Set to "on" to enable the hardware random -+ number generator (default "off") ++ number generator (default "on") + + uart0 Set to "off" to disable uart0 (default "on") + @@ -111487,7 +112601,7 @@ index 0000000..2c81448 +}; diff --git a/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts new file mode 100644 -index 0000000..5e7633ae +index 0000000..5e7633a --- /dev/null +++ b/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts @@ -0,0 +1,34 @@ @@ -111527,7 +112641,7 @@ index 0000000..5e7633ae +}; diff --git a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts new file mode 100644 -index 0000000..deb9c625 +index 0000000..deb9c62 --- /dev/null +++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts @@ -0,0 +1,39 @@ @@ -112817,7 +113931,7 @@ index 0000000..1bd8054 +}; diff --git a/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts b/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts new file mode 100644 -index 0000000..7fc6ac99 +index 0000000..7fc6ac9 --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts @@ -0,0 +1,34 @@ @@ -113710,11 +114824,14 @@ index 0000000..66a98f6 + pullup = <&w1>,"rpi,parasitic-power:0"; + }; +}; +-- +2.5.0 -From 23eabf2220f0f748df3e88a35e55a82c53242b4a Mon Sep 17 00:00:00 2001 + +From 2ed3dc300f5c00646f32245928164c51b88c4692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 15 Aug 2015 20:47:07 +0200 -Subject: [PATCH 053/170] bcm2835: Match with BCM2708 Device Trees +Subject: [PATCH 052/181] bcm2835: Match with BCM2708 Device Trees MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -114231,11 +115348,14 @@ index 864a3ef..3256bff 100644 +&watchdog { + status = "okay"; +}; +-- +2.5.0 -From f978fb3b816681159b6cc97104954dea31488add Mon Sep 17 00:00:00 2001 + +From 18cc1e2bbcbe55e4dcb9e168111b4462463532ac Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 054/170] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 053/181] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -114312,7 +115432,7 @@ index 0705d88..771992a 100644 case FBIOBLANK: ret = do_fb_ioctl(info, cmd, arg); diff --git a/include/uapi/linux/fb.h b/include/uapi/linux/fb.h -index fb795c3..fa72af0c 100644 +index fb795c3..fa72af0 100644 --- a/include/uapi/linux/fb.h +++ b/include/uapi/linux/fb.h @@ -34,6 +34,11 @@ @@ -114327,11 +115447,14 @@ index fb795c3..fa72af0c 100644 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ +-- +2.5.0 -From 53bcd6e5a43a353508c7aff48abcdcaae1b35ca8 Mon Sep 17 00:00:00 2001 + +From 6ec61d0def25509df1c2ee6eb8f9d53744759a78 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 058/170] Speed up console framebuffer imageblit function +Subject: [PATCH 054/181] 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 @@ -114539,11 +115662,14 @@ index a2bb276..436494f 100644 slow_imageblit(image, p, dst1, fgcolor, bgcolor, start_index, pitch_index); } else +-- +2.5.0 -From 6c0a9150827dc58fac38c8e787c050626325842e Mon Sep 17 00:00:00 2001 + +From 5596c599c153a7c17e80aa790c1e33f8e44e8e66 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 059/170] Allow mac address to be set in smsc95xx +Subject: [PATCH 055/181] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -114633,11 +115759,14 @@ index 9c0da18..3244a90 100755 /* try reading mac address from EEPROM */ if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN, dev->net->dev_addr) == 0) { +-- +2.5.0 -From e172d31b8402f13aed5679cd7023f0c0935aab05 Mon Sep 17 00:00:00 2001 + +From b562c49577aeda9b7ccb12952f2b108cf1a4ae8f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 060/170] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 056/181] 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 @@ -114886,11 +116015,14 @@ index d58594a..feae942 100644 void (*enable_external_pullup)(int enable); unsigned int ext_pullup_enable_pin; unsigned int pullup_duration; +-- +2.5.0 -From d0f48fe7aab3e4036fd55b491a9be94ea24f377d Mon Sep 17 00:00:00 2001 + +From 8e3b423f2df18bd2a86457914091794470e4b366 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Dec 2013 22:16:19 +0000 -Subject: [PATCH 062/170] config: Enable CONFIG_MEMCG, but leave it disabled +Subject: [PATCH 057/181] config: Enable CONFIG_MEMCG, but leave it disabled (due to memory cost). Enable with cgroup_enable=memory. --- @@ -114938,11 +116070,14 @@ index fb1ecfd..888d308 100644 /** * css_tryget_online_from_dir - get corresponding css from a cgroup dentry * @dentry: directory dentry of interest +-- +2.5.0 -From 8d35b3a72d3580ad6f5bc5835bfe13b00cce6086 Mon Sep 17 00:00:00 2001 + +From f7857273bd55b5365f425ac1fd467a8124ece30f Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:59:51 +0100 -Subject: [PATCH 063/170] ASoC: Add support for PCM5102A codec +Subject: [PATCH 058/181] ASoC: Add support for PCM5102A codec Some definitions to support the PCM5102A codec by Texas Instruments. @@ -115074,11 +116209,14 @@ index 0000000..7c6598e +MODULE_DESCRIPTION("ASoC PCM5102A codec driver"); +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From 9ced0e86593de2214ff8a81f71c802d7e7301b05 Mon Sep 17 00:00:00 2001 + +From 5a0dcbcbea3c0659e634cebb7acb0e4de785cdc6 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 064/170] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 059/181] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -115247,11 +116385,14 @@ index 0000000..3ab0f47 +MODULE_AUTHOR("Florian Meier "); +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From f16a654f57b024d44fe58d62b660e01de6a7811a Mon Sep 17 00:00:00 2001 + +From cd2fe7df671e672a24df8f3b00c902f7b87d36af Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:21:34 +0100 -Subject: [PATCH 065/170] ASoC: Add support for Rpi-DAC +Subject: [PATCH 060/181] ASoC: Add support for Rpi-DAC --- sound/soc/bcm/Kconfig | 7 +++ @@ -115537,11 +116678,14 @@ index 0000000..afe1b41 +MODULE_DESCRIPTION("ASoC PCM1794A codec driver"); +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From dbdeca565b0850da182d3bd0b3ed41f667ca8a45 Mon Sep 17 00:00:00 2001 + +From 1dc98aeabdedcbf0c466da3500603b52013651dc Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 066/170] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 061/181] 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 @@ -115580,11 +116724,14 @@ index 8d91470..5795fb1 100644 #define WM8804_RATES (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_64000 | \ +-- +2.5.0 -From 0c2e64d3eda229c2f52ce6ed9d0b1c1572dd9b19 Mon Sep 17 00:00:00 2001 + +From 22e44c2b091c516200133019218f6ff52a7fd00a Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 067/170] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 062/181] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -115870,11 +117017,14 @@ index 0000000..80732b8 +MODULE_AUTHOR("Daniel Matuschek "); +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From f2789622ff7c1297e28f38bb198f5fd24b4602ef Mon Sep 17 00:00:00 2001 + +From 9633f3d849f5bd66a860199b8282f5364da39eb6 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:36:35 +0100 -Subject: [PATCH 068/170] ASoC: wm8804: Set idle_bias_off to false Idle bias +Subject: [PATCH 063/181] ASoC: wm8804: Set idle_bias_off to false Idle bias has been change to remove warning on driver startup Signed-off-by: Daniel Matuschek @@ -115895,11 +117045,14 @@ index 5795fb1..c846716 100644 .dapm_widgets = wm8804_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(wm8804_dapm_widgets), +-- +2.5.0 -From 80fa31f923b4967bc86be20c5af780ef284fc972 Mon Sep 17 00:00:00 2001 + +From 2ffbee31800ab35e78cfcfa1e6962492ba51860a Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 069/170] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 064/181] Add IQaudIO Sound Card support for Raspberry Pi Set a limit of 0dB on Digital Volume Control @@ -116081,11 +117234,14 @@ index 0000000..37038d4 +MODULE_AUTHOR("Florian Meier "); +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From b15f112ddaf2cd20a8f999ac823ddb51d7d513b9 Mon Sep 17 00:00:00 2001 + +From 736deadfa1c085de7b3dc01e8c789aa29ef316c9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 070/170] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 065/181] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -116120,11 +117276,14 @@ index 5dd426f..9ae0cd5 100644 ret = -ENOMEM; if (usb_endpoint_dir_in(endpoint)) { +-- +2.5.0 -From debd3d30b1127328b5a1e444bd1550cb45c50362 Mon Sep 17 00:00:00 2001 + +From 00aa756b22a6c915e95c28cd1d3966fb1e61cf33 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 071/170] Added support for HiFiBerry DAC+ +Subject: [PATCH 066/181] 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. @@ -116318,11 +117477,14 @@ index 0000000..11e4f39 +MODULE_AUTHOR("Daniel Matuschek "); +MODULE_DESCRIPTION("ASoC Driver for HiFiBerry DAC+"); +MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From 9c6f0b1812313d39afeefd700b7f9df9a82a47cd Mon Sep 17 00:00:00 2001 + +From 82b9cc2714dfed6e05ffe920aa244f8bce1c866b Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 072/170] Added driver for HiFiBerry Amp amplifier add-on board +Subject: [PATCH 067/181] 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. @@ -117152,11 +118314,14 @@ index 0000000..8f019e0 + + +#endif /* _TAS5713_H */ +-- +2.5.0 -From 21d08f232ffc350b2930f761f3da26f9867b1d4d Mon Sep 17 00:00:00 2001 + +From 8749024eb42ef2b1c8c0ec7f0ab946f02b4a43fd Mon Sep 17 00:00:00 2001 From: Ryan Coe Date: Sat, 31 Jan 2015 18:25:49 -0700 -Subject: [PATCH 073/170] Update ds1307 driver for device-tree support +Subject: [PATCH 068/181] Update ds1307 driver for device-tree support Signed-off-by: Ryan Coe --- @@ -117182,11 +118347,14 @@ index aa705bb..1cb13fee 100644 static struct i2c_driver ds1307_driver = { .driver = { .name = "rtc-ds1307", +-- +2.5.0 -From a2b52a3af1314e2b691d9518afb3051193758671 Mon Sep 17 00:00:00 2001 + +From 56c41eecb515d218b5f1d42290013be448bf6f40 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 -Subject: [PATCH 074/170] BCM270x_DT: Add pwr_led, and the required "input" +Subject: [PATCH 069/181] BCM270x_DT: Add pwr_led, and the required "input" trigger The "input" trigger makes the associated GPIO an input. This is to support @@ -117364,11 +118532,14 @@ index fa359c7..4b25a1a 100644 /* Set LED brightness level */ /* Must not sleep, use a workqueue if needed */ +-- +2.5.0 -From 12ad9b7c670220b1b8b80ebf507651d106cb28c0 Mon Sep 17 00:00:00 2001 + +From da32c806a964570a894c7e0cc0829b33bcd316bf Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 27 Feb 2015 15:10:24 +0000 -Subject: [PATCH 075/170] enc28j60: Add device tree compatible string and an +Subject: [PATCH 070/181] enc28j60: Add device tree compatible string and an overlay --- @@ -117396,11 +118567,14 @@ index 86ea17e..a1b20c1 100644 }, .probe = enc28j60_probe, .remove = enc28j60_remove, +-- +2.5.0 -From 660d2fba0483aafc4a1ce678016620c0871bb759 Mon Sep 17 00:00:00 2001 + +From 3cca9b33e952122e120731798f9b9c791e77b4cf Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 -Subject: [PATCH 076/170] Add driver for rpi-proto +Subject: [PATCH 071/181] 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 @@ -117614,11 +118788,14 @@ index 0000000..c6e45a0 +MODULE_AUTHOR("Florian Meier"); +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); +-- +2.5.0 -From e2af169e60b4ebd710e733996d57ad86264bae27 Mon Sep 17 00:00:00 2001 + +From 871b14af40ad5e52e42c6c1afbda8a4c749e572b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 -Subject: [PATCH 077/170] config: Add default configs +Subject: [PATCH 072/181] config: Add default configs --- arch/arm/configs/bcm2709_defconfig | 1254 +++++++++++++++++++++++++++++++++++ @@ -120158,11 +121335,14 @@ index 0000000..1d1b799 +CONFIG_CRYPTO_AES_ARM=m +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y +-- +2.5.0 -From e5292198fc83805a9f4751fddeb802f69c0270f0 Mon Sep 17 00:00:00 2001 + +From bdfe27bd1dc15598a946288419eb9f77b51672df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Wed, 29 Apr 2015 17:24:02 +0200 -Subject: [PATCH 078/170] bcm2835: bcm2835_defconfig +Subject: [PATCH 073/181] bcm2835: bcm2835_defconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -120304,7 +121484,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 1140 insertions(+), 26 deletions(-) diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig -index 31cb073..fdb2e2a8 100644 +index 31cb073..fdb2e2a 100644 --- a/arch/arm/configs/bcm2835_defconfig +++ b/arch/arm/configs/bcm2835_defconfig @@ -1,105 +1,1103 @@ @@ -121587,11 +122767,14 @@ index 31cb073..fdb2e2a8 100644 +CONFIG_LIBCRC32C=y # CONFIG_XZ_DEC_ARM is not set # CONFIG_XZ_DEC_ARMTHUMB is not set +-- +2.5.0 -From 6fb12ee15eb9b0f5b6fea66c861a9db8ec6671ed Mon Sep 17 00:00:00 2001 + +From 58aa31edba9ca1c3c253756287a88863c30ee5fc Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 -Subject: [PATCH 079/170] rpi-ft5406: Add touchscreen driver for pi LCD display +Subject: [PATCH 074/181] 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 @@ -121885,11 +123068,14 @@ index 0000000..b27dbee +MODULE_AUTHOR("Gordon Hollingworth"); +MODULE_DESCRIPTION("Touchscreen driver for memory based FT5406"); +MODULE_LICENSE("GPL"); +-- +2.5.0 -From b57a6269e03fe055f78ab50add6e2c68d43254e2 Mon Sep 17 00:00:00 2001 + +From 2f11cc37fbc88accd801b3f730099900c83802dc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Oct 2014 11:47:53 +0100 -Subject: [PATCH 080/170] Improve __copy_to_user and __copy_from_user +Subject: [PATCH 075/181] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use @@ -123341,7 +124527,7 @@ index 588bbc2..c29df92 100644 __copy_to_user_memcpy(void __user *to, const void *from, unsigned long n) { unsigned long ua_flags; -@@ -138,6 +183,54 @@ __copy_to_user_memcpy(void __user *to, const void *from, unsigned long n) +@@ -138,6 +183,54 @@ out: return n; } @@ -123427,11 +124613,14 @@ index 588bbc2..c29df92 100644 static unsigned long noinline __clear_user_memset(void __user *addr, unsigned long n) +-- +2.5.0 -From 44d43099a94c8b2db818c80c67789ef5f9857b81 Mon Sep 17 00:00:00 2001 + +From 2c49ea27901b7bbddd15273ac18b1858fb419e73 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 -Subject: [PATCH 081/170] gpio-poweroff: Allow it to work on Raspberry Pi +Subject: [PATCH 076/181] 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 @@ -123465,11 +124654,14 @@ index be3d81f..a030ae9 100644 dev_err(&pdev->dev, "%s: pm_power_off function already registered", __func__); +-- +2.5.0 -From 5b2d8bca046bd6f1a426e9205f194ece5b95e300 Mon Sep 17 00:00:00 2001 + +From 73ee4604d2e4b3e413a748fbba57cab68f47b2ed Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 -Subject: [PATCH 082/170] spidev: Add "spidev" compatible string to silence +Subject: [PATCH 077/181] spidev: Add "spidev" compatible string to silence warning See: https://github.com/raspberrypi/linux/issues/1054 @@ -123489,11 +124681,14 @@ index d0e7dfc..57b0760 100644 {}, }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); +-- +2.5.0 -From 534c337ea28bee34f886a1d1e00d281365c94efa Mon Sep 17 00:00:00 2001 + +From 55e0f3ebceab7623cdd61097bc9acbaa086e7e00 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 17:00:18 +0100 -Subject: [PATCH 083/170] scripts/dtc: Add overlay support +Subject: [PATCH 078/181] scripts/dtc: Add overlay support --- scripts/dtc/checks.c | 119 ++- @@ -123664,7 +124859,7 @@ index e81a8c74..efd1bc6 100644 }; diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l -index 0ee1caf0..dd44ba2 100644 +index 0ee1caf..dd44ba2 100644 --- a/scripts/dtc/dtc-lexer.l +++ b/scripts/dtc/dtc-lexer.l @@ -113,6 +113,11 @@ static void lexical_error(const char *fmt, ...); @@ -127897,11 +129092,14 @@ index 5b8c7d5..86b7338 100644 @@ -1 +1 @@ -#define DTC_VERSION "DTC 1.4.1-g9d3649bd" +#define DTC_VERSION "DTC 1.4.1-g9d3649bd-dirty" +-- +2.5.0 -From b065c580329ecb7c7e77bb7019c6059d7db83398 Mon Sep 17 00:00:00 2001 + +From e48abac09663399b57304777eb18d8cf2f44bda7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 -Subject: [PATCH 084/170] mfd: Add Raspberry Pi Sense HAT core driver +Subject: [PATCH 079/181] mfd: Add Raspberry Pi Sense HAT core driver --- drivers/input/joystick/Kconfig | 8 + @@ -127925,7 +129123,7 @@ Subject: [PATCH 084/170] mfd: Add Raspberry Pi Sense HAT core driver create mode 100644 include/linux/mfd/rpisense/joystick.h diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig -index 4215b53..4364d7c8 100644 +index 4215b53..4364d7c 100644 --- a/drivers/input/joystick/Kconfig +++ b/drivers/input/joystick/Kconfig @@ -330,4 +330,12 @@ config JOYSTICK_MAPLE @@ -128766,11 +129964,14 @@ index 0000000..56196dc + + +#endif +-- +2.5.0 -From c86a74aaff9bc42b3cb04881b3aaf7f822edda04 Mon Sep 17 00:00:00 2001 + +From 8e7ef65d3047c27ecb78d86d353b0fbd531df145 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 -Subject: [PATCH 085/170] RaspiDAC3 support +Subject: [PATCH 080/181] RaspiDAC3 support Signed-off-by: Jan Grulich @@ -129017,11 +130218,14 @@ index 0000000..3cabf5b +MODULE_AUTHOR("Jan Grulich "); +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From 2d340e2fbbc9f4735b798601a43ae9f0f4cc5742 Mon Sep 17 00:00:00 2001 + +From 9a6628f8582ec6297e6774f301e671766445540e Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:02:34 +0100 -Subject: [PATCH 086/170] tpa6130a2: Add headphone switch control +Subject: [PATCH 081/181] tpa6130a2: Add headphone switch control Signed-off-by: Jan Grulich --- @@ -129049,7 +130253,7 @@ index 11d85c5..3caaa17 100644 static int tpa6130a2_i2c_read(int reg) { struct tpa6130a2_data *data; -@@ -189,7 +192,7 @@ static int tpa6130a2_power(u8 power) +@@ -189,7 +192,7 @@ exit: } static int tpa6130a2_get_volsw(struct snd_kcontrol *kcontrol, @@ -129111,11 +130315,14 @@ index 11d85c5..3caaa17 100644 }; /* +-- +2.5.0 -From 6fc9d40bec5dbcf3ae8b52ab6850ed0b18193c82 Mon Sep 17 00:00:00 2001 + +From 1fcf9322b351a24ecac83761ce5cee2da2a3b830 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Sep 2015 23:38:59 +0100 -Subject: [PATCH 087/170] irq-bcm2835: Fix building with 2708 +Subject: [PATCH 082/181] irq-bcm2835: Fix building with 2708 --- drivers/irqchip/irq-bcm2835.c | 3 ++- @@ -129142,11 +130349,14 @@ index 20deb28..c02bf8a 100644 } } init_FIQ(FIQ_START); +-- +2.5.0 -From 0e7ec1e61b149567d5af63169cd4d701c133356f Mon Sep 17 00:00:00 2001 + +From f4f27ef5051113bf26cdd880325769e1c78324ad Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 -Subject: [PATCH 088/170] rpi_display: add backlight driver and overlay +Subject: [PATCH 083/181] 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 @@ -129180,7 +130390,7 @@ index d8c2771..fb7ac49 100644 dtb-$(RPI_DT_OVERLAYS) += rpi-display-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += rpi-ft5406-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 44e33a4..b819293 100644 +index 268d400..d7f2979 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -462,6 +462,12 @@ Load: dtoverlay=raspidac3 @@ -129413,11 +130623,14 @@ index 525816d..b011489 100644 RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, +-- +2.5.0 -From 0459ca97c1f2753ce805ab58ff17847cb4c142e0 Mon Sep 17 00:00:00 2001 + +From 456de5e00e7b5c0a13d63522cc8d17672df11630 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Mon, 16 Nov 2015 14:05:35 +0000 -Subject: [PATCH 089/170] bcm2835-dma: Fix up convert to DMA pool +Subject: [PATCH 084/181] bcm2835-dma: Fix up convert to DMA pool --- drivers/dma/bcm2835-dma.c | 36 ++++++++++++++++++++++++++---------- @@ -129501,11 +130714,14 @@ index 0adc347..985019b 100644 } else { /* Next block is empty. */ control_block->next = 0; +-- +2.5.0 -From f6dd60426dc7970ef4e9e3d9e00d374f80a6abd2 Mon Sep 17 00:00:00 2001 + +From 9270672ce393024dc5658ad58294c53e88740412 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 11 Nov 2015 11:38:59 +0000 -Subject: [PATCH 090/170] scripts: Multi-platform support for mkknlimg and +Subject: [PATCH 085/181] scripts: Multi-platform support for mkknlimg and knlinfo The firmware uses tags in the kernel trailer to choose which dtb file @@ -129753,11 +130969,14 @@ index 3998d43..005f404 100755 - my $val = $configs->{$wanted} || 'n'; - return (($val eq 'y') || ($val eq '1')); -} +-- +2.5.0 -From 6d38553e5ce7fb70dd1f89665caf58064a7e97d7 Mon Sep 17 00:00:00 2001 + +From b3cb3d086f56f20a97a17309991d75e70ebee360 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 2 Mar 2015 13:01:12 -0800 -Subject: [PATCH 091/170] drm/vc4: Add suport for 3D rendering using the V3D +Subject: [PATCH 086/181] drm/vc4: Add suport for 3D rendering using the V3D engine. This is a squash of the out-of-tree development series. Since that @@ -130594,7 +131813,7 @@ index d5db9e0..3baf1fc 100644 ret = drm_dev_register(drm, 0); if (ret < 0) -@@ -200,8 +229,11 @@ static int vc4_drm_bind(struct device *dev) +@@ -200,8 +229,11 @@ unregister: drm_dev_unregister(drm); unbind_all: component_unbind_all(dev, drm); @@ -135128,7 +136347,7 @@ index 0000000..0aab9d7 +} diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h new file mode 100644 -index 0000000..499daae5 +index 0000000..499daae --- /dev/null +++ b/include/uapi/drm/vc4_drm.h @@ -0,0 +1,229 @@ @@ -135361,11 +136580,14 @@ index 0000000..499daae5 +}; + +#endif /* _UAPI_VC4_DRM_H_ */ +-- +2.5.0 -From aa579c7485e1bae681c50b223e89cd658dd0b2c1 Mon Sep 17 00:00:00 2001 + +From efa3b684a25d94b3f86cb2d681022ff330f439ab Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Oct 2015 11:32:14 -0700 -Subject: [PATCH 092/170] drm/vc4: Force HDMI to connected. +Subject: [PATCH 087/181] drm/vc4: Force HDMI to connected. For some reason on the downstream tree, the HPD GPIO isn't working. @@ -135387,11 +136609,14 @@ index da9a36d..d15c529 100644 if (vc4->hdmi->hpd_gpio) { if (gpio_get_value(vc4->hdmi->hpd_gpio)) return connector_status_connected; +-- +2.5.0 -From edb828d91374e8fa4f05d68be008c40d4f9a158d Mon Sep 17 00:00:00 2001 + +From 35515aa384ec1cee80116fc2ef6b70856a05c647 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:23:18 -0700 -Subject: [PATCH 093/170] drm/vc4: bo cache locking fixes. +Subject: [PATCH 088/181] drm/vc4: bo cache locking fixes. Signed-off-by: Eric Anholt --- @@ -135539,11 +136764,14 @@ index 8cc89d1..c079b82 100644 /* Sequence number for the last job queued in job_list. * Starts at 0 (no jobs emitted). +-- +2.5.0 -From eafd7a031a15fb0d51a86b89e42ccde4f23434b4 Mon Sep 17 00:00:00 2001 + +From f30a84d66e480c667ceba0c19a46b3a9962b5ff1 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:29:41 -0700 -Subject: [PATCH 094/170] drm/vc4: bo cache locking cleanup. +Subject: [PATCH 089/181] drm/vc4: bo cache locking cleanup. Signed-off-by: Eric Anholt --- @@ -135634,11 +136862,14 @@ index af0fde6..acd360c 100644 } static void vc4_bo_cache_time_timer(unsigned long data) +-- +2.5.0 -From 482f2b3e97e919ac0ebc55a6040747495563b9a7 Mon Sep 17 00:00:00 2001 + +From 371ebba08d185667b50d69955f9ac2585f9c95ea Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:32:24 -0700 -Subject: [PATCH 095/170] drm/vc4: Use job_lock to protect seqno_cb_list. +Subject: [PATCH 090/181] drm/vc4: Use job_lock to protect seqno_cb_list. We're (mostly) not supposed to be using struct_mutex in drivers these days. @@ -135691,11 +136922,14 @@ index 361390b..b1853b2 100644 return ret; } +-- +2.5.0 -From 4dc15a296586679d5b014011e44a093cf962123e Mon Sep 17 00:00:00 2001 + +From 350add0fa80e0785b7346f61daed0cd6bf9cf336 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:44:35 -0700 -Subject: [PATCH 096/170] drm/vc4: Drop struct_mutex around CL validation. +Subject: [PATCH 091/181] drm/vc4: Drop struct_mutex around CL validation. We were using it so that we could make sure that shader validation state didn't change while we were validating, but now shader @@ -135757,11 +136991,14 @@ index b1853b2..32f375a 100644 return ret; } +-- +2.5.0 -From f1924e632d16f98eee1fe1be636249b8cee4ee6e Mon Sep 17 00:00:00 2001 + +From a62491866699a407c531f69dd3c026e6507344cd Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:44:35 -0700 -Subject: [PATCH 097/170] drm/vc4: Drop struct_mutex around CL validation. +Subject: [PATCH 092/181] drm/vc4: Drop struct_mutex around CL validation. We were using it so that we could make sure that shader validation state didn't change while we were validating, but now shader @@ -135781,7 +137018,7 @@ diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c index 32f375a..55551ea 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c -@@ -439,10 +439,12 @@ vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec) +@@ -439,10 +439,12 @@ fail: } static void @@ -135834,11 +137071,14 @@ index 32f375a..55551ea 100644 return ret; } +-- +2.5.0 -From 0193a1e5b931c7363279282b4169c2152af1a621 Mon Sep 17 00:00:00 2001 + +From 889bc7b68050b482f3b277f87ac04e94ccc95923 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 20 Oct 2015 13:59:15 +0100 -Subject: [PATCH 098/170] drm/vc4: Add support for more display plane formats. +Subject: [PATCH 093/181] drm/vc4: Add support for more display plane formats. Signed-off-by: Eric Anholt --- @@ -135872,11 +137112,14 @@ index 65e5455..0f85eb5 100644 }; static const struct hvs_format *vc4_get_hvs_format(u32 drm_format) +-- +2.5.0 -From 8faa3b83201819d56f997a2b2ecaf8c690080852 Mon Sep 17 00:00:00 2001 + +From f5bac6b3b97a092d4a4abce8fe9d7a23e3c644d5 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 23 Oct 2015 12:31:56 +0100 -Subject: [PATCH 099/170] drm/vc4: No need to stop the stopped threads. +Subject: [PATCH 094/181] drm/vc4: No need to stop the stopped threads. This was leftover debug code from the hackdriver. We never submit unless the thread is already idle. @@ -135901,11 +137144,14 @@ index 55551ea..eeb0925 100644 V3D_WRITE(V3D_CTNCA(thread), start); barrier(); +-- +2.5.0 -From d102d0e145b58bccbea52e89bbe52dcefc044aaa Mon Sep 17 00:00:00 2001 + +From f21c0763ead9be1616274254ba9955998c3d8e68 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 23 Oct 2015 12:33:43 +0100 -Subject: [PATCH 100/170] drm/vc4: Remove extra barrier()s aroudn CTnCA/CTnEA +Subject: [PATCH 095/181] drm/vc4: Remove extra barrier()s aroudn CTnCA/CTnEA setup. The writel() that these expand to already does barriers. @@ -135937,11 +137183,14 @@ index eeb0925..0cea723 100644 } int +-- +2.5.0 -From 0f099b4b1354b0377376b91ae60c6c16d82683a7 Mon Sep 17 00:00:00 2001 + +From d705f6016f15a91b49188780a4a9d7802d304e0b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 23 Oct 2015 14:57:22 +0100 -Subject: [PATCH 101/170] drm/vc4: Fix a typo in a V3D debug register. +Subject: [PATCH 096/181] drm/vc4: Fix a typo in a V3D debug register. Signed-off-by: Eric Anholt --- @@ -135975,11 +137224,14 @@ index b9cb7cf..cf35f58 100644 REGDEF(V3D_FDBGO), REGDEF(V3D_FDBGB), REGDEF(V3D_FDBGR), +-- +2.5.0 -From 22182768add611b53e33c5dd2e8901acc3d08181 Mon Sep 17 00:00:00 2001 + +From 9b14b6803f4b0ce01854806a13ba3538ce2cd9c0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 2 Nov 2015 17:07:33 +0000 -Subject: [PATCH 102/170] drm/vc4: Enable VC4 modules, and increase CMA size +Subject: [PATCH 097/181] drm/vc4: Enable VC4 modules, and increase CMA size with overlay If using the overlay, be careful not to boot to GUI or run startx, @@ -135993,7 +137245,7 @@ or the Pi will almost hang, reporting stalls in kernel threads. create mode 100644 arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index b819293..f5302b2 100644 +index d7f2979..1fa98ce 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -601,6 +601,14 @@ Params: txd1_pin GPIO pin for TXD1 (14, 32 or 40 - default 14) @@ -136138,11 +137390,14 @@ index 146add9..d6aa058 100644 CONFIG_FB=y CONFIG_FB_BCM2708=y CONFIG_FB_UDL=m +-- +2.5.0 -From 88315025318218ac04fcc66614083bb1a51f662f Mon Sep 17 00:00:00 2001 + +From c81983aea8382da38ea594a640dec1f47537f2a7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Nov 2015 18:29:58 +0000 -Subject: [PATCH 103/170] squash: fixups +Subject: [PATCH 098/181] squash: fixups --- drivers/gpu/drm/vc4/Kconfig | 2 +- @@ -136188,11 +137443,14 @@ index c83287a..2082713 100644 drm_atomic_helper_commit_modeset_enables(dev, state); +-- +2.5.0 -From 3fc233b798ac8498b4e24b42ad67fb3499a30f07 Mon Sep 17 00:00:00 2001 + +From 8a5cf5290c3d0a3a2c136a1645a736cc963f33b1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Nov 2015 20:26:03 +0000 -Subject: [PATCH 104/170] squash: add missing vc4-kms-v3d-overlay.dtb to +Subject: [PATCH 099/181] squash: add missing vc4-kms-v3d-overlay.dtb to makefile --- @@ -136211,11 +137469,14 @@ index fb7ac49..fc09bfb 100644 dtb-$(RPI_DT_OVERLAYS) += vga666-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += w1-gpio-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += w1-gpio-pullup-overlay.dtb +-- +2.5.0 -From d9888c76bcee2a7c118ab8ba93a1204fb5ff4e44 Mon Sep 17 00:00:00 2001 + +From 9212e62fcee8b716eeb3cfda9c95e56a9b839bac Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 12 Oct 2015 11:23:34 -0700 -Subject: [PATCH 105/170] clk: bcm2835: Also build the driver for downstream +Subject: [PATCH 100/181] clk: bcm2835: Also build the driver for downstream kernels. Signed-off-by: Eric Anholt @@ -136236,11 +137497,14 @@ index 3fc9506..a1b4cbc 100644 obj-$(CONFIG_COMMON_CLK_IPROC) += clk-ns2.o obj-$(CONFIG_ARCH_BCM_CYGNUS) += clk-cygnus.o obj-$(CONFIG_ARCH_BCM_NSP) += clk-nsp.o +-- +2.5.0 -From 0dbc0fe760a54bbcff587657062df49dc0eaf2b9 Mon Sep 17 00:00:00 2001 + +From 945df921aad68bb106b754366d8251cbcfd402a1 Mon Sep 17 00:00:00 2001 From: Holger Steinhaus Date: Sat, 14 Nov 2015 18:37:43 +0100 -Subject: [PATCH 106/170] dts: Added overlay for gpio_ir_recv driver +Subject: [PATCH 101/181] dts: Added overlay for gpio_ir_recv driver --- arch/arm/boot/dts/overlays/Makefile | 1 + @@ -136262,7 +137526,7 @@ index fc09bfb..ebc3354 100644 dtb-$(RPI_DT_OVERLAYS) += hifiberry-amp-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += hifiberry-dac-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index f5302b2..409aee1 100644 +index 1fa98ce..b4578cc 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -196,6 +196,22 @@ Params: int_pin GPIO used for INT (default 25) @@ -136348,11 +137612,14 @@ index 0000000..a2d6bc7 + rc-map-name = <&gpio_ir>,"linux,rc-map-name"; // default rc map + }; +}; +-- +2.5.0 -From 938b09ce6c6736d0861c2c9eec3a7e739585b589 Mon Sep 17 00:00:00 2001 + +From a7ae8a5175cb8a8ee7132524ec1888762bd79272 Mon Sep 17 00:00:00 2001 From: Alistair Buxton Date: Sun, 1 Nov 2015 22:27:56 +0000 -Subject: [PATCH 107/170] Build i2c_gpio module and add a device tree overlay +Subject: [PATCH 102/181] Build i2c_gpio module and add a device tree overlay to configure it. --- @@ -136377,7 +137644,7 @@ index ebc3354..e15d55c 100644 dtb-$(RPI_DT_OVERLAYS) += iqaudio-dac-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += iqaudio-dacplus-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 409aee1..d278305 100644 +index b4578cc..9362443 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -287,9 +287,20 @@ Params: speed Display SPI bus speed @@ -136460,11 +137727,14 @@ index d6aa058..51dc019 100644 CONFIG_SPI=y CONFIG_SPI_BCM2835=m CONFIG_SPI_SPIDEV=y +-- +2.5.0 -From a4b5aa412585674d4a4f2ba7c0d818fd796f51c3 Mon Sep 17 00:00:00 2001 + +From f29303a45cafa1f0f3ab8852aae3e2bf61972753 Mon Sep 17 00:00:00 2001 From: mwilliams03 Date: Sun, 18 Oct 2015 17:07:24 -0700 -Subject: [PATCH 108/170] New overlay for PiScreen2r +Subject: [PATCH 103/181] New overlay for PiScreen2r --- arch/arm/boot/dts/overlays/Makefile | 1 + @@ -136486,7 +137756,7 @@ index e15d55c..8595b14 100644 dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += pwm-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index d278305..3116d1a 100644 +index 9362443..0a21248 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -425,6 +425,20 @@ Params: speed Display SPI bus speed @@ -136616,11 +137886,14 @@ index 0000000..7c018e0 + }; +}; + +-- +2.5.0 -From 1a4fac1ea6bb33a963b06406f6f44b527daa3a90 Mon Sep 17 00:00:00 2001 + +From ca96022c26315bd80bf66a85e7ca2794eb8393ef Mon Sep 17 00:00:00 2001 From: Ondrej Wisniewski Date: Fri, 6 Nov 2015 15:01:28 +0100 -Subject: [PATCH 109/170] dts: Added overlay for Adafruit PiTFT 2.8" capacitive +Subject: [PATCH 104/181] dts: Added overlay for Adafruit PiTFT 2.8" capacitive touch screen --- @@ -136643,7 +137916,7 @@ index 8595b14..7d747bc 100644 dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += pwm-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 3116d1a..950b6c5 100644 +index 0a21248..422a0d4 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -439,6 +439,28 @@ Params: speed Display SPI bus speed @@ -136769,11 +138042,14 @@ index 0000000..48920e9 + touch-swapxy = <&ft6236>,"touchscreen-swapped-x-y?"; + }; +}; +-- +2.5.0 -From 660ba9173ca14b48d7cd2f69ff45e67ebe4d947a Mon Sep 17 00:00:00 2001 + +From a09649ae76c49375c6a5383d6135b94ad17e320f Mon Sep 17 00:00:00 2001 From: Stuart MacLean Date: Fri, 2 Oct 2015 15:12:59 +0100 -Subject: [PATCH 110/170] Add support for the HiFiBerry DAC+ Pro. +Subject: [PATCH 105/181] Add support for the HiFiBerry DAC+ Pro. The HiFiBerry DAC+ and DAC+ Pro products both use the existing bcm sound driver with the DAC+ Pro having a special clock device driver representing the two high precision oscillators. @@ -136788,7 +138064,7 @@ An addition bug fix is included for the PCM512x codec where by the physical size create mode 100644 drivers/clk/clk-hifiberry-dacpro.c diff --git a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts -index deb9c625..f923a48 100644 +index deb9c62..f923a48 100644 --- a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts +++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts @@ -6,6 +6,16 @@ @@ -137307,7 +138583,7 @@ index 11e4f39..a6b651c 100644 ret = snd_soc_register_card(&snd_rpi_hifiberry_dacplus); diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c -index 047c489..090fe0ee 100644 +index 047c489..090fe0e 100644 --- a/sound/soc/codecs/pcm512x.c +++ b/sound/soc/codecs/pcm512x.c @@ -854,7 +854,8 @@ static int pcm512x_set_dividers(struct snd_soc_dai *dai, @@ -137320,11 +138596,14 @@ index 047c489..090fe0ee 100644 if (lrclk_div == 0) { dev_err(dev, "No LRCLK?\n"); return -EINVAL; +-- +2.5.0 -From 14b6c7013e62b3917ce73841dc8e379d011d37a5 Mon Sep 17 00:00:00 2001 + +From 57eb3eb134976cff7cb766db8a56c9f15f056677 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 5 Oct 2015 10:47:45 +0100 -Subject: [PATCH 111/170] BCM270X_DT: Add at86rf233 overlay +Subject: [PATCH 106/181] BCM270X_DT: Add at86rf233 overlay Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0. @@ -137349,7 +138628,7 @@ index 7d747bc..be9dead 100644 dtb-$(RPI_DT_OVERLAYS) += dht11-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += enc28j60-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 950b6c5..04e55ce 100644 +index 422a0d4..d0ef256 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -69,13 +69,14 @@ DT parameters: @@ -137458,11 +138737,14 @@ index 0000000..0460269 + trim = <&lowpan0>, "xtal-trim.0"; + }; +}; +-- +2.5.0 -From d33b3717e86cd6aa28c58d465a22e6c11a66bc13 Mon Sep 17 00:00:00 2001 + +From 43ee56116ee9233c9ad2838252ff2499f7db3d8b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 -Subject: [PATCH 112/170] mm: Remove the PFN busy warning +Subject: [PATCH 107/181] mm: Remove the PFN busy warning See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is expected sometimes when using CMA. However, that commit still spams @@ -137486,11 +138768,14 @@ index 9d666df..b682acc 100644 ret = -EBUSY; goto done; } +-- +2.5.0 -From a71d6ebfcbc401e520fa4a5aa185d027dfbe5ce1 Mon Sep 17 00:00:00 2001 + +From 6a81b9ddd3d2d3f8a9da194a160ccaba0ef93192 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 19 Nov 2014 12:06:38 -0800 -Subject: [PATCH 113/170] drm: Put an optional field in the driver struct for +Subject: [PATCH 108/181] drm: Put an optional field in the driver struct for GEM obj struct size. This allows a driver to derive from the CMA object without copying all @@ -137531,11 +138816,14 @@ index 0a271ca..54f5469 100644 const struct drm_ioctl_desc *ioctls; int num_ioctls; const struct file_operations *fops; +-- +2.5.0 -From 1c343ed1f86866d2625518774536bbef77f7a20a Mon Sep 17 00:00:00 2001 + +From a08b2f51277e2c266fad2d4f2402c57a3ec043db Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 30 Oct 2015 10:09:02 -0700 -Subject: [PATCH 114/170] drm/vc4: Add an interface for capturing the GPU state +Subject: [PATCH 109/181] drm/vc4: Add an interface for capturing the GPU state after a hang. This can be parsed with vc4-gpu-tools tools for trying to figure out @@ -137808,7 +139096,7 @@ index 0cea723..d90c664 100644 + vc4_free_hang_state(dev, vc4->hang_state); } diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h -index 499daae5..4a8d19f 100644 +index 499daae..4a8d19f 100644 --- a/include/uapi/drm/vc4_drm.h +++ b/include/uapi/drm/vc4_drm.h @@ -32,6 +32,7 @@ @@ -137875,11 +139163,14 @@ index 499daae5..4a8d19f 100644 +}; + #endif /* _UAPI_VC4_DRM_H_ */ +-- +2.5.0 -From 431be9af0aa88da94986effdff649330cfde1f5a Mon Sep 17 00:00:00 2001 + +From 377cbef6201b87f57c21814e264b9fc04fc6df26 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 4 Dec 2015 11:35:34 -0800 -Subject: [PATCH 115/170] drm/vc4: Update a bunch of code to match upstream +Subject: [PATCH 110/181] drm/vc4: Update a bunch of code to match upstream submission. This gets almost everything matching, except for the MSAA support and @@ -138431,7 +139722,7 @@ index e8192b4..22061ae 100644 .desc = DRIVER_DESC, .date = DRIVER_DATE, diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index 24845c1..53dfa8df 100644 +index 24845c1..53dfa8d 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -72,6 +72,9 @@ struct vc4_dev { @@ -138633,7 +139924,7 @@ index 2082713..f95f2df 100644 } } diff --git a/drivers/gpu/drm/vc4/vc4_packet.h b/drivers/gpu/drm/vc4/vc4_packet.h -index 9757bc8..cee38aad 100644 +index 9757bc8..cee38aa 100644 --- a/drivers/gpu/drm/vc4/vc4_packet.h +++ b/drivers/gpu/drm/vc4/vc4_packet.h @@ -27,60 +27,60 @@ @@ -139340,7 +140631,7 @@ index cf35f58..29a222f 100644 struct drm_device *drm = dev_get_drvdata(master); struct vc4_dev *vc4 = to_vc4_dev(drm); diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c -index ff3b62f..e44e35539 100644 +index ff3b62f..e44e355 100644 --- a/drivers/gpu/drm/vc4/vc4_validate.c +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -48,7 +48,6 @@ @@ -139798,11 +141089,14 @@ index 54f5469..987c25a 100644 const struct drm_ioctl_desc *ioctls; int num_ioctls; const struct file_operations *fops; +-- +2.5.0 -From 7d4ed9f40e9484ded3965b13fbb7914a1daf85d7 Mon Sep 17 00:00:00 2001 + +From ff6f0a965d679a085b81211dcc4ff64af72cf7cf Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 11 Dec 2015 19:45:03 -0800 -Subject: [PATCH 116/170] drm: Use the driver's gem_object_free function from +Subject: [PATCH 111/181] drm: Use the driver's gem_object_free function from CMA helpers. VC4 wraps the CMA objects in its own structures, so it needs to do its @@ -139862,11 +141156,14 @@ index 0f7b00b..e5df53b 100644 return ERR_PTR(ret); } +-- +2.5.0 -From 522e6f9cc4376fe49e8b41b40e7ddb98cf385a9e Mon Sep 17 00:00:00 2001 + +From 9ac5eb4f062ffc5077d5e022231d7f05c744a13d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 17 Jul 2015 13:15:50 -0700 -Subject: [PATCH 117/170] drm/vc4: Add support for MSAA rendering. +Subject: [PATCH 112/181] drm/vc4: Add support for MSAA rendering. For MSAA, you set a bit in the binner that halves the size of tiles in each direction, so you can pack 4 samples per pixel in the tile @@ -139885,7 +141182,7 @@ Signed-off-by: Eric Anholt 4 files changed, 258 insertions(+), 55 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_packet.h b/drivers/gpu/drm/vc4/vc4_packet.h -index cee38aad..0f31cc0 100644 +index cee38aa..0f31cc0 100644 --- a/drivers/gpu/drm/vc4/vc4_packet.h +++ b/drivers/gpu/drm/vc4/vc4_packet.h @@ -123,6 +123,11 @@ enum vc4_packet { @@ -140341,7 +141638,7 @@ index 3516354..8f2ec57 100644 return -EINVAL; } diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c -index e44e35539..2f22f19 100644 +index e44e355..2f22f19 100644 --- a/drivers/gpu/drm/vc4/vc4_validate.c +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -400,9 +400,8 @@ validate_tile_binning_config(VALIDATE_ARGS) @@ -140389,11 +141686,14 @@ index 4a8d19f..49cd992 100644 uint32_t clear_color[2]; uint32_t clear_z; uint8_t clear_s; +-- +2.5.0 -From 50a1843ffd2e6f408dcb6a64ca0a2ef3b062fd5a Mon Sep 17 00:00:00 2001 + +From ea9755a1fb4cd219b41fe7e42a5866a1394f4e35 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 8 Dec 2015 14:00:43 -0800 -Subject: [PATCH 118/170] drm/vc4: A few more non-functional changes to sync to +Subject: [PATCH 113/181] drm/vc4: A few more non-functional changes to sync to upstream. At this point all that's left is the force-enable of HDMI connector, @@ -140407,7 +141707,7 @@ Signed-off-by: Eric Anholt 2 files changed, 92 insertions(+), 92 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c -index 29a222f..4d103f7f 100644 +index 29a222f..4d103f7 100644 --- a/drivers/gpu/drm/vc4/vc4_v3d.c +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -109,7 +109,7 @@ static const struct { @@ -140736,11 +142036,14 @@ index 49cd992..eeb37e3 100644 }; #endif /* _UAPI_VC4_DRM_H_ */ +-- +2.5.0 -From 0a373a81664b9e9b8994512fb3d15ed296526e89 Mon Sep 17 00:00:00 2001 + +From bac734eadd3c4408fc8c4d1e9b152b9c8f4ae5d7 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 15 Dec 2015 23:46:32 +0000 -Subject: [PATCH 119/170] drm/vc4: Use "hpd-gpios" for HDMI GPIO, like what +Subject: [PATCH 114/181] drm/vc4: Use "hpd-gpios" for HDMI GPIO, like what landed upstream. Signed-off-by: Eric Anholt @@ -140761,11 +142064,14 @@ index cf5d5c9..da37483 100644 clocks = <&cprman BCM2835_PLLH_PIX>, <&cprman BCM2835_CLOCK_HSM>; clock-names = "pixel", "hdmi"; +-- +2.5.0 -From f8453aacbe60712c31c57580a126017b798bd339 Mon Sep 17 00:00:00 2001 + +From 778a220fc85916879ddf4cfe08132e946a6c4550 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 7 Dec 2015 12:35:01 -0800 -Subject: [PATCH 120/170] drm/vc4: Synchronize validation code for v2 +Subject: [PATCH 115/181] drm/vc4: Synchronize validation code for v2 submission upstream. Signed-off-by: Eric Anholt @@ -140777,7 +142083,7 @@ Signed-off-by: Eric Anholt 4 files changed, 135 insertions(+), 196 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index 53dfa8df..ed93fa78 100644 +index 53dfa8d..ed93fa7 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -189,17 +189,6 @@ to_vc4_encoder(struct drm_encoder *encoder) @@ -141381,11 +142687,14 @@ index 2f22f19..0fb5b99 100644 if (ret) return ret; } +-- +2.5.0 -From 280bea89916813978b81811c2769411d438eb52f Mon Sep 17 00:00:00 2001 + +From cba722c2963998efb459b5b35fb876d5b2664866 Mon Sep 17 00:00:00 2001 From: janluca Date: Sun, 27 Dec 2015 14:34:04 +0100 -Subject: [PATCH 121/170] MMC: Do not use mmc_debug if CONFIG_MMC_BCM2835 is +Subject: [PATCH 116/181] MMC: Do not use mmc_debug if CONFIG_MMC_BCM2835 is not set If CONFIG_MMC_BCM2835 was not set the compiling of the kernel failed @@ -141421,11 +142730,14 @@ index 87ae2e9..b79fe14 100644 +#endif } EXPORT_SYMBOL(mmc_fixup_device); +-- +2.5.0 -From d0390ae0ff774d8e7b5b4d5f38c33726354996bc Mon Sep 17 00:00:00 2001 + +From 27cf2fb0f8e2e53cb764741998f9f90b3c645960 Mon Sep 17 00:00:00 2001 From: Devon Fyson Date: Wed, 30 Dec 2015 16:40:47 -0500 -Subject: [PATCH 122/170] Extend clock timeout, fix modprobe baudrate +Subject: [PATCH 117/181] Extend clock timeout, fix modprobe baudrate parameter. Set the BSC_CLKT clock streching timeout to 35ms as per SMBus specs.\n- Increase priority of baudrate parameter passed to modprobe (in /etc/modprobe.d/*.conf or command line). Currently custom baudrates don't work because they are overridden by clock-frequency in the platform_device passed to the function. @@ -141532,11 +142844,14 @@ index 85f411c..b152639 100644 dev_info(&pdev->dev, "BSC%d Controller at 0x%08lx (irq %d) (baudrate %d)\n", pdev->id, (unsigned long)regs->start, irq, baudrate); +-- +2.5.0 -From 62dca1937fc3acfe4b6471607b7a4d58c34e73b7 Mon Sep 17 00:00:00 2001 + +From 94431f3b3e533e2e0d76bf0d8b1c7327afffaff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Thu, 31 Dec 2015 16:44:58 +0100 -Subject: [PATCH 123/170] bcm270x_dt: Add dwc2 and dwc-otg overlays +Subject: [PATCH 118/181] bcm270x_dt: Add dwc2 and dwc-otg overlays --- arch/arm/boot/dts/overlays/Makefile | 2 ++ @@ -141561,7 +142876,7 @@ index be9dead..aaa8976 100644 dtb-$(RPI_DT_OVERLAYS) += enc28j60-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += gpio-ir-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 04e55ce..c70c1e59 100644 +index d0ef256..4d3f974 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -198,6 +198,27 @@ Params: gpiopin GPIO connected to the sensor's DATA output. @@ -141653,11 +142968,14 @@ index 0000000..90c9811 + g-tx-fifo-size = <&usb>,"g-tx-fifo-size:0"; + }; +}; +-- +2.5.0 -From 162dd00041afb2995f90a928ea80aeaa0d141ce5 Mon Sep 17 00:00:00 2001 + +From 5878e13f1e5e7bde84719845c5e2fd555a2e776e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 4 Jan 2016 14:42:17 +0000 -Subject: [PATCH 124/170] BCM270X_DT: Add the sdtweak overlay, for tuning +Subject: [PATCH 119/181] BCM270X_DT: Add the sdtweak overlay, for tuning sdhost The sdhost overlay declares the sdhost interface and allows parameters @@ -141684,7 +143002,7 @@ index aaa8976..4d9d640 100644 dtb-$(RPI_DT_OVERLAYS) += smi-nand-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += smi-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index c70c1e59..00f03fc 100644 +index 4d3f974..1c6b000 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -635,6 +635,20 @@ Params: overclock_50 Clock (in MHz) to use when the MMC framework @@ -141735,11 +143053,14 @@ index 0000000..74c168d + debug = <&frag1>,"brcm,debug?"; + }; +}; +-- +2.5.0 -From b07c427a7732a0fabcf521085e0fd61b0ef9047c Mon Sep 17 00:00:00 2001 + +From a5fec20719036c4d9b709607c2d991c03bf6404d Mon Sep 17 00:00:00 2001 From: Andrew Litt Date: Mon, 11 Jan 2016 07:54:21 +0000 -Subject: [PATCH 125/170] bcm2835-mmc: Don't override bus width capabilities +Subject: [PATCH 120/181] bcm2835-mmc: Don't override bus width capabilities from devicetree Take out the force setting of the MMC_CAP_4_BIT_DATA host capability @@ -141762,11 +143083,14 @@ index 43aed6e..104f93e 100644 mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD; +-- +2.5.0 -From f74652d026105ecc4a87b581a9c1c89a6e504d2c Mon Sep 17 00:00:00 2001 + +From 0a0dbcae21f26404b039ef63f920ccb7c637fd3f Mon Sep 17 00:00:00 2001 From: Andrew Litt Date: Mon, 11 Jan 2016 07:55:54 +0000 -Subject: [PATCH 126/170] SDIO-overlay: add bus_width parameter +Subject: [PATCH 121/181] SDIO-overlay: add bus_width parameter Allow setting of the SDIO bus width capability of the bcm2835-mmc host. This is helpful when only a 1 bit wide bus is connected @@ -141778,7 +143102,7 @@ mode. 2 files changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 00f03fc..aa57078 100644 +index 1c6b000..34a1b7f 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -634,6 +634,8 @@ Params: overclock_50 Clock (in MHz) to use when the MMC framework @@ -141809,35 +143133,14 @@ index afc8742..7935e7a 100644 + bus_width = <&sdio_mmc>,"bus-width:0"; }; }; +-- +2.5.0 -From 232754cb0ecd1967a8b72d6bd05467843d65a441 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Fri, 8 Jan 2016 13:42:06 +0000 -Subject: [PATCH 127/170] FIXUP BCM270X_DT: "random" (HWRNG) dtparam default is - on ---- - arch/arm/boot/dts/overlays/README | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index aa57078..34a1b7f 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -110,7 +110,7 @@ Params: - (default "off") - - random Set to "on" to enable the hardware random -- number generator (default "off") -+ number generator (default "on") - - uart0 Set to "off" to disable uart0 (default "on") - - -From 320bdec200197f074541e3999fa4b87889c5eb18 Mon Sep 17 00:00:00 2001 +From d264604314c69b8a15ad15d998dba87cc13ec137 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:41:45 +0100 -Subject: [PATCH 128/170] bcm2835: extend allowed range of channels and +Subject: [PATCH 122/181] bcm2835: extend allowed range of channels and samplerates Allow everything the videocore accepts. @@ -141873,11 +143176,14 @@ index 8c86375..31e3131 100755 .buffer_bytes_max = 128 * 1024, .period_bytes_min = 1 * 1024, .period_bytes_max = 128 * 1024, +-- +2.5.0 -From 7e634c8f8fe70286e0b8b404494d3143aa7bc3fc Mon Sep 17 00:00:00 2001 + +From 690cd611b67c4982d34c270a6887e31bfc10e756 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:42:18 +0100 -Subject: [PATCH 129/170] bcm2835: restrict channels*rate to 8*960000 +Subject: [PATCH 123/181] bcm2835: restrict channels*rate to 8*960000 This is required at least for SPDIF. If the bitrate goes above, videocore will either resample the audio or corrupt it due to @@ -141956,11 +143262,14 @@ index 31e3131..b17ed32 100755 chip->alsa_stream[idx] = alsa_stream; chip->opened |= (1 << idx); +-- +2.5.0 -From dcead34f063fc8c37ebfcfc9ab6696060c336bad Mon Sep 17 00:00:00 2001 + +From e78f52b9cbc932cc63cabf9c676827c979178144 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:42:48 +0100 -Subject: [PATCH 130/170] rpi: update vc_vchi_audioserv_defs.h +Subject: [PATCH 124/181] rpi: update vc_vchi_audioserv_defs.h Add audioserv 3 extensions. The changes were taken from the paste linked here: @@ -142025,11 +143334,14 @@ index af3e6eb..5f4409f 100644 -#endif // _VC_AUDIO_DEFS_H_ +#endif // _VC_AUDIO_DEFS_H_ \ No newline at end of file +-- +2.5.0 -From 7c7d2db494fbf1fd0b014dab0bb4c5c740f90442 Mon Sep 17 00:00:00 2001 + +From 91e518f65dd3f3a114a76ba91e01d175e4538c0f Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:43:12 +0100 -Subject: [PATCH 131/170] bcm2835: implement channel map API +Subject: [PATCH 125/181] bcm2835: implement channel map API Report all layouts supported by the HDMI protocol to userspace. Make the videocore set the correct layout according to the @@ -142399,7 +143711,7 @@ index b17ed32..1067460 100755 /* in preparation of the stream, set the controls (volume level) of the stream */ diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c -index 3de3094..8ecd2d73 100755 +index 3de3094..8ecd2d7 100755 --- a/sound/arm/bcm2835-vchiq.c +++ b/sound/arm/bcm2835-vchiq.c @@ -570,6 +570,8 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, @@ -142455,11 +143767,14 @@ index 0f71c5d..997fb69 100755 int bcm2835_audio_open(bcm2835_alsa_stream_t * alsa_stream); int bcm2835_audio_close(bcm2835_alsa_stream_t * alsa_stream); int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, +-- +2.5.0 -From 2a64337156d0f84537e04338b2ebd89eb6ec1f09 Mon Sep 17 00:00:00 2001 + +From f7e8641a04d664a8684859ab117d272414b76540 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:43:35 +0100 -Subject: [PATCH 132/170] bcm2835: access controls under the audio mutex +Subject: [PATCH 126/181] bcm2835: access controls under the audio mutex I don't think the ALSA framework provides any kind of automatic synchronization within the control callbacks. We most likely need @@ -142697,11 +144012,14 @@ index 1067460..48da3bb 100755 audio_info(" .. OUT\n"); return 0; } +-- +2.5.0 -From 6e781f631f7e23f7d88256d020d83950c9bf213a Mon Sep 17 00:00:00 2001 + +From 8a4d7e3381dfed3d79887b5ede5f7fe6f0b2411d Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:44:03 +0100 -Subject: [PATCH 133/170] bcm2835: always use 2/4/8 channels for multichannel +Subject: [PATCH 127/181] bcm2835: always use 2/4/8 channels for multichannel layouts Pad the unused channels with NA. This means userspace needs to write @@ -142839,11 +144157,14 @@ index 5b8e6bd2..dec052b 100755 { .ca_index = 0x31, .speakers = { FRW, FLW, RR, RL, FC, LFE, FR, FL } }, }; +-- +2.5.0 -From aaa2a41f44a0fc141b9a983a5f9f30bb8b6dbc8b Mon Sep 17 00:00:00 2001 + +From 0d4d206ecfc2d611c63fcfebafdf987ef815441b Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:44:24 +0100 -Subject: [PATCH 134/170] bcm2835: only allow stereo if analogue jack is +Subject: [PATCH 128/181] bcm2835: only allow stereo if analogue jack is selected Sending more than 2 channels to videocore while outputting to analogue @@ -142904,11 +144225,14 @@ index dec052b..e930718 100755 memset(remap, 0, sizeof(remap)); for (x = 0; x < substream->runtime->channels; x++) { int sp = ucontrol->value.integer.value[x]; +-- +2.5.0 -From 2c967fa0f5b0d10c86c796098574ba09ffe66cd5 Mon Sep 17 00:00:00 2001 + +From 29027fb2bc30261b03e5d47b623325dcee03d5da Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:44:47 +0100 -Subject: [PATCH 135/170] bcm2835: interpolate audio delay +Subject: [PATCH 129/181] bcm2835: interpolate audio delay It appears the GPU only sends us a message all 10ms to update the playback progress. Other than this, the playback position @@ -142999,11 +144323,14 @@ index 997fb69..20ef108 100755 uint32_t enable_fifo_irq; irq_handler_t fifo_irq_handler; +-- +2.5.0 -From 205e27a7f94a5531764cc517ce43623361ca466c Mon Sep 17 00:00:00 2001 + +From 883e12a918bfdc9c2b7224277105f3d1ce0a5300 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 19 Jan 2016 17:16:38 +0000 -Subject: [PATCH 136/170] bcm2835-sdhost: Add workaround for odd behaviour on +Subject: [PATCH 130/181] bcm2835-sdhost: Add workaround for odd behaviour on some cards For reasons not understood, the sdhost driver fails when reading @@ -143139,11 +144466,14 @@ index da089985..309633c 100644 return blk_size; } +-- +2.5.0 -From c5d24cba808118647d01a1869cf1c46d0658d78b Mon Sep 17 00:00:00 2001 + +From 95db92b00ba5ac07ee2491de54ef53aa6ed30509 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 22 Jan 2016 16:03:24 +0000 -Subject: [PATCH 137/170] bcm2835-sdhost: Add debug_flags dtparam +Subject: [PATCH 131/181] bcm2835-sdhost: Add debug_flags dtparam Bit zero disables the single-read-sectors map: @@ -143266,11 +144596,14 @@ index 309633c..ef9b1e6 100644 if (host->allow_dma) { if (node) { host->dma_chan_tx = +-- +2.5.0 -From 1a451a35b70fa9ed32f23a4ba925e5b2c2c3af78 Mon Sep 17 00:00:00 2001 + +From 240f5cbf012ac9d8eaa0101d7023f7fff1dadf1d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 25 Jan 2016 09:12:06 +0000 -Subject: [PATCH 138/170] BCM270X_DT: Add sdio_overclock parameter to sdio +Subject: [PATCH 132/181] BCM270X_DT: Add sdio_overclock parameter to sdio overlay The sdio_overclock parameter is like the overclock_50 parameter, i.e. @@ -143340,11 +144673,14 @@ index 7935e7a..398bd81 100644 + sdio_overclock = <&sdio_mmc>,"brcm,overclock-50:0"; }; }; +-- +2.5.0 -From 49ff16d7af98e6191d6dd60ba75b711612e948ab Mon Sep 17 00:00:00 2001 + +From e1e5423958165e4cf9e805c9196caa1fd37a53a5 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Thu, 21 Jan 2016 18:10:16 +0100 -Subject: [PATCH 139/170] rtc: ds1307: add support for the DT property +Subject: [PATCH 133/181] rtc: ds1307: add support for the DT property 'wakeup-source' For RTC chips with no IRQ directly connected to the SoC, the RTC chip @@ -143422,7 +144758,7 @@ index 1cb13fee..28ca4bf 100644 ds1307->regs[0] |= DS1337_BIT_INTCN | bbsqi_bitpos[ds1307->type]; ds1307->regs[0] &= ~(DS1337_BIT_A2IE | DS1337_BIT_A1IE); -@@ -1144,6 +1161,14 @@ static int ds1307_probe(struct i2c_client *client, +@@ -1144,6 +1161,14 @@ read_rtc: return PTR_ERR(ds1307->rtc); } @@ -143437,11 +144773,14 @@ index 1cb13fee..28ca4bf 100644 if (want_irq) { err = devm_request_threaded_irq(&client->dev, client->irq, NULL, irq_handler, +-- +2.5.0 -From e382e888be3f59b0ba3645809ae686947313e0c1 Mon Sep 17 00:00:00 2001 + +From b8a8384aa7ff13db75ddfdf3a53e2f955c3adda2 Mon Sep 17 00:00:00 2001 From: vitalogy Date: Tue, 19 Jan 2016 07:02:02 +0100 -Subject: [PATCH 140/170] dt-overlay: add wittypi-overlay.dts +Subject: [PATCH 134/181] dt-overlay: add wittypi-overlay.dts --- arch/arm/boot/dts/overlays/wittypi-overlay.dts | 44 ++++++++++++++++++++++++++ @@ -143498,42 +144837,14 @@ index 0000000..be5987d + }; + +}; +-- +2.5.0 -From 6dcfc3daab7c1c459b36261163b4e1dc15a6e965 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Wed, 3 Feb 2016 16:12:54 +0000 -Subject: [PATCH 141/170] BCM270X_DT: Disable DMA for bcm2835-sdhost on Pi2 -This is an interim patch to verify that problems seen with -some cards can be worked around at the expense of an increased -CPU load by forcing PIO mode. - -Although this could have used the brcm,force-pio attribute, that -is a boolean (true if present, false if absent) and attributes -can't be deleted by overlays. Instead, make brcm,pio-limit -unfeasibly high instead to allow DMA to be re-enabled using the -pio_limit parameter of the sdhost or sdtweak overlays. ---- - arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -index 5206ba2..0b68db5 100644 ---- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -+++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -@@ -43,6 +43,7 @@ - pinctrl-names = "default"; - pinctrl-0 = <&sdhost_pins>; - bus-width = <4>; -+ brcm,pio-limit = <0x7fffffff>; - status = "okay"; - }; - - -From 7519a79f61a67792e238a118db58600fb5f60ec8 Mon Sep 17 00:00:00 2001 +From 2254593d4403b6afd6e13df0ffb23a2a0d8bc298 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 19 Jan 2016 16:28:05 +0000 -Subject: [PATCH 142/170] FIXUP i2c_bcm2708: Don't change module baudrate +Subject: [PATCH 135/181] FIXUP i2c_bcm2708: Don't change module baudrate parameter Overwriting the baudrate module parameter creates an apparent @@ -143631,11 +144942,14 @@ index b152639..c9b8e5c 100644 return 0; +-- +2.5.0 -From f2d36d57d7e17b9f44ff914824df5b150eb9e3bd Mon Sep 17 00:00:00 2001 + +From 9e58877d8b11820ade53790c92447940c57f7bed Mon Sep 17 00:00:00 2001 From: Digital Dreamtime Date: Thu, 4 Feb 2016 14:14:44 +0000 -Subject: [PATCH 143/170] Allow up to 24dB digital gain to be applied when +Subject: [PATCH 136/181] Allow up to 24dB digital gain to be applied when using IQAudIO DAC+ 24db_digital_gain DT param can be used to specify that PCM512x @@ -143737,11 +145051,14 @@ index 37038d4..124d7a9 100644 } ret = snd_soc_register_card(&snd_rpi_iqaudio_dac); +-- +2.5.0 -From 8a189f18de820c6facd00ba2db97ba7c4a75156f Mon Sep 17 00:00:00 2001 + +From 1e95436cb4b6a2f7faf018c9c3198a46976ecff1 Mon Sep 17 00:00:00 2001 From: Digital Dreamtime Date: Thu, 4 Feb 2016 20:04:00 +0000 -Subject: [PATCH 144/170] Limit PCM512x "Digital" gain to 0dB by default with +Subject: [PATCH 137/181] Limit PCM512x "Digital" gain to 0dB by default with HiFiBerry DAC+ 24db_digital_gain DT param can be used to specify that PCM512x @@ -143842,18 +145159,21 @@ index a6b651c..153dbcd 100644 } ret = snd_soc_register_card(&snd_rpi_hifiberry_dacplus); +-- +2.5.0 -From 14ba431031afa218c0db43a7c20fe54916f8d357 Mon Sep 17 00:00:00 2001 + +From aa67cf40d9efd655f51d8159ad81677f2351d5f4 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 8 Feb 2016 09:46:33 +0000 -Subject: [PATCH 145/170] BCM270X_DT: Adjust overlay README formatting +Subject: [PATCH 138/181] BCM270X_DT: Adjust overlay README formatting --- - arch/arm/boot/dts/overlays/README | 420 +++++++++++++++++++------------------- - 1 file changed, 210 insertions(+), 210 deletions(-) + arch/arm/boot/dts/overlays/README | 414 +++++++++++++++++++------------------- + 1 file changed, 207 insertions(+), 207 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 296184f..ec1ae91 100644 +index 296184f..f987565 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -83,58 +83,58 @@ Name: @@ -144369,12 +145689,8 @@ index 296184f..ec1ae91 100644 Name: pwm -@@ -550,12 +550,12 @@ Info: Configures a single PWM channel - Pins 12 and 13 might be better choices on an A+, B+ or Pi2. - 2) The onboard analogue audio output uses both PWM channels. - 3) So be careful mixing audio and PWM. -- 4) Currently the clock must have been enabled and configured -+ 4) Currently the clockmust have been enabled and configured +@@ -553,9 +553,9 @@ Info: Configures a single PWM channel + 4) Currently the clock must have been enabled and configured by other means. Load: dtoverlay=pwm,= -Params: pin Output pin (default 18) - see table @@ -144386,12 +145702,8 @@ index 296184f..ec1ae91 100644 Name: pwm-2chan -@@ -569,14 +569,14 @@ Info: Configures both PWM channels - Pins 12 and 13 might be better choices on an A+, B+ or Pi2. - 2) The onboard analogue audio output uses both PWM channels. - 3) So be careful mixing audio and PWM. -- 4) Currently the clock must have been enabled and configured -+ 4) Currently the clockmust have been enabled and configured +@@ -572,11 +572,11 @@ Info: Configures both PWM channels + 4) Currently the clock must have been enabled and configured by other means. Load: dtoverlay=pwm-2chan,= -Params: pin Output pin (default 18) - see table @@ -144552,15 +145864,6 @@ index 296184f..ec1ae91 100644 Name: vc4-kms-v3d -@@ -753,7 +753,7 @@ Params: - - Name: vga666 - Info: Overlay for the Fen Logic VGA666 board -- This uses GPIOs 2-21 (so no I2C), and activates the output 2-3 seconds -+ This uses GPIOs 2-21 (sono I2C), and activates the output 2-3 seconds - after the kernel has started. - Load: dtoverlay=vga666 - Params: @@ -763,22 +763,22 @@ Name: w1-gpio Info: Configures the w1-gpio Onewire interface module. Use this overlay if you *don't* need a GPIO to drive an external pullup. @@ -144591,53 +145894,14 @@ index 296184f..ec1ae91 100644 Troubleshooting +-- +2.5.0 -From d32795d2be55748552ddacd9b1e47efc61264a98 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Mon, 8 Feb 2016 12:53:44 +0000 -Subject: [PATCH 146/170] FIXUP: Overlay README - Restore spaces deleted in - error ---- - arch/arm/boot/dts/overlays/README | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index ec1ae91..f987565 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -550,7 +550,7 @@ Info: Configures a single PWM channel - Pins 12 and 13 might be better choices on an A+, B+ or Pi2. - 2) The onboard analogue audio output uses both PWM channels. - 3) So be careful mixing audio and PWM. -- 4) Currently the clockmust have been enabled and configured -+ 4) Currently the clock must have been enabled and configured - by other means. - Load: dtoverlay=pwm,= - Params: pin Output pin (default 18) - see table -@@ -569,7 +569,7 @@ Info: Configures both PWM channels - Pins 12 and 13 might be better choices on an A+, B+ or Pi2. - 2) The onboard analogue audio output uses both PWM channels. - 3) So be careful mixing audio and PWM. -- 4) Currently the clockmust have been enabled and configured -+ 4) Currently the clock must have been enabled and configured - by other means. - Load: dtoverlay=pwm-2chan,= - Params: pin Output pin (default 18) - see table -@@ -753,7 +753,7 @@ Params: - - Name: vga666 - Info: Overlay for the Fen Logic VGA666 board -- This uses GPIOs 2-21 (sono I2C), and activates the output 2-3 seconds -+ This uses GPIOs 2-21 (so no I2C), and activates the output 2-3 seconds - after the kernel has started. - Load: dtoverlay=vga666 - Params: - -From be4e718cccf6909072eeab1032b1d9fb6dd92b43 Mon Sep 17 00:00:00 2001 +From 4c6e299647335365360d1ec00890f9d3e67f5340 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 9 Feb 2016 09:52:13 +0000 -Subject: [PATCH 147/170] pinctrl-bcm2835: Fix cut-and-paste error in "pull" +Subject: [PATCH 139/181] pinctrl-bcm2835: Fix cut-and-paste error in "pull" parsing The DT bindings for pinctrl-bcm2835 allow both the function and pull @@ -144661,35 +145925,14 @@ index 640e3b0..32f779e 100644 if (err) goto out; err = bcm2835_pctl_dt_node_to_map_pull(pc, np, pin, +-- +2.5.0 -From 14e35b8cca5bf1f6223ebc6cc4d527645076a3a3 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Thu, 11 Feb 2016 17:30:49 +0000 -Subject: [PATCH 148/170] Revert "BCM270X_DT: Disable DMA for bcm2835-sdhost on - Pi2" -This reverts commit 9c1adcc07a40f762fd4ac580f07646784de135e1. ---- - arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -index 0b68db5..5206ba2 100644 ---- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -+++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -@@ -43,7 +43,6 @@ - pinctrl-names = "default"; - pinctrl-0 = <&sdhost_pins>; - bus-width = <4>; -- brcm,pio-limit = <0x7fffffff>; - status = "okay"; - }; - - -From 5a117bd925d13a305d94eeb28919dedeaa9be17d Mon Sep 17 00:00:00 2001 +From 66f6a5636b2de4fab9c649d6ba5c93a13c360317 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 11 Feb 2016 16:51:01 +0000 -Subject: [PATCH 149/170] bcm2835-sdhost: Major revision +Subject: [PATCH 140/181] bcm2835-sdhost: Major revision This is a significant revision of the bcm2835-sdhost driver. It improves on the original in a number of ways: @@ -146757,11 +148000,14 @@ index ef9b1e6..262180b 100644 static struct platform_driver bcm2835_sdhost_driver = { .probe = bcm2835_sdhost_probe, .remove = bcm2835_sdhost_remove, +-- +2.5.0 -From d15e041e838bd735a7ed3eaa5dbff785213baf6d Mon Sep 17 00:00:00 2001 + +From ceeb5a537186b03a44b4e66f4233035878a0d536 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 12 Feb 2016 15:38:00 +0000 -Subject: [PATCH 150/170] BCM270X_DT: Add dtparams for the SD interface +Subject: [PATCH 141/181] BCM270X_DT: Add dtparams for the SD interface Add new base dtparams sd_overclock, sd_force_pio, sd_pio_limit and sd_debug. @@ -146807,7 +148053,7 @@ index 0445b46..d033ee4 100644 }; }; diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dts b/arch/arm/boot/dts/bcm2708-rpi-cm.dts -index 87c1a54..8bcafb41 100755 +index 87c1a54..8bcafb4 100755 --- a/arch/arm/boot/dts/bcm2708-rpi-cm.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts @@ -97,6 +97,5 @@ @@ -147013,11 +148259,14 @@ index b0b208c..e4a4677 100644 + debug = <&frag0>,"brcm,debug?"; }; }; +-- +2.5.0 -From bc7400cadff6bf33451b124eac2e8bf80ebb0197 Mon Sep 17 00:00:00 2001 + +From eed221b464fbe35d992163b25faddd98c3893f39 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Feb 2016 14:50:25 +0000 -Subject: [PATCH 151/170] dcw_otg: trim xfer length when buffer larger than +Subject: [PATCH 142/181] dcw_otg: trim xfer length when buffer larger than allocated size is received --- @@ -147053,11 +148302,14 @@ index 8db3dfc..d672a76 100644 /* non DWORD-aligned buffer case handling. */ if (hc->align_buff && bytes_transferred && hc->ep_is_in) { dwc_memcpy(urb->buf + urb->actual_length, hc->qh->dw_align_buf, +-- +2.5.0 -From f395ff998f2bde846499b1a0ef84519989dc2d4e Mon Sep 17 00:00:00 2001 + +From 32d6f044dd584154414f9386ec607fb093e658de Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 15 Feb 2016 10:00:27 +0000 -Subject: [PATCH 152/170] bcm2835-sdhost: Restore ATOMIC flag to PIO sg mapping +Subject: [PATCH 143/181] bcm2835-sdhost: Restore ATOMIC flag to PIO sg mapping Allocation problems have been seen in a wireless driver, and this is the only change which might have been responsible. @@ -147088,101 +148340,14 @@ index 262180b..d66385c 100644 sg_miter_start(&host->sg_miter, data->sg, data->sg_len, flags); host->blocks = data->blocks; } +-- +2.5.0 -From d2943c4ee1c52cb2c9802be194ca90442e4fe34f Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 16 Feb 2016 08:47:56 +0000 -Subject: [PATCH 153/170] Revert "Add blk_pos parameter to mmc multi_io_quirk - callback" -This reverts commit aab95f9b10e8c3d32de2bf163b86f220c88214fe. - -The bcm2835-sdhost driver no longer needs this patch. ---- - drivers/mmc/card/block.c | 1 - - drivers/mmc/host/omap_hsmmc.c | 4 +--- - drivers/mmc/host/sh_mobile_sdhi.c | 4 +--- - drivers/mmc/host/tmio_mmc_pio.c | 4 +--- - include/linux/mmc/host.h | 4 +--- - 5 files changed, 4 insertions(+), 13 deletions(-) - -diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c -index b35f0c4..d848616 100644 ---- a/drivers/mmc/card/block.c -+++ b/drivers/mmc/card/block.c -@@ -1510,7 +1510,6 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, - brq->data.blocks = card->host->ops->multi_io_quirk(card, - (rq_data_dir(req) == READ) ? - MMC_DATA_READ : MMC_DATA_WRITE, -- blk_rq_pos(req), - brq->data.blocks); - } - -diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c -index 708d0fa..7fb0753 100644 ---- a/drivers/mmc/host/omap_hsmmc.c -+++ b/drivers/mmc/host/omap_hsmmc.c -@@ -1832,9 +1832,7 @@ static void omap_hsmmc_conf_bus_power(struct omap_hsmmc_host *host) - } - - static int omap_hsmmc_multi_io_quirk(struct mmc_card *card, -- unsigned int direction, -- u32 blk_pos, -- int blk_size) -+ unsigned int direction, int blk_size) - { - /* This controller can't do multiblock reads due to hw bugs */ - if (direction == MMC_DATA_READ) -diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c -index 4f1ccf3..354f4f3 100644 ---- a/drivers/mmc/host/sh_mobile_sdhi.c -+++ b/drivers/mmc/host/sh_mobile_sdhi.c -@@ -170,9 +170,7 @@ static int sh_mobile_sdhi_write16_hook(struct tmio_mmc_host *host, int addr) - } - - static int sh_mobile_sdhi_multi_io_quirk(struct mmc_card *card, -- unsigned int direction, -- u32 blk_pos, -- int blk_size) -+ unsigned int direction, int blk_size) - { - /* - * In Renesas controllers, when performing a -diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c -index 7b730d8..a10fde4 100644 ---- a/drivers/mmc/host/tmio_mmc_pio.c -+++ b/drivers/mmc/host/tmio_mmc_pio.c -@@ -1003,9 +1003,7 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc) - } - - static int tmio_multi_io_quirk(struct mmc_card *card, -- unsigned int direction, -- u32 blk_pos, -- int blk_size) -+ unsigned int direction, int blk_size) - { - struct tmio_mmc_host *host = mmc_priv(card->host); - -diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h -index 105b3e6..ad22ebb 100644 ---- a/include/linux/mmc/host.h -+++ b/include/linux/mmc/host.h -@@ -143,9 +143,7 @@ struct mmc_host_ops { - * I/O. Returns the number of supported blocks for the request. - */ - int (*multi_io_quirk)(struct mmc_card *card, -- unsigned int direction, -- u32 blk_pos, -- int blk_size); -+ unsigned int direction, int blk_size); - }; - - struct mmc_card; - -From ee83592659ae5dc5ceee63790a8cba57ebfa57b3 Mon Sep 17 00:00:00 2001 +From ab3dbb555f24942c1f8874b13faa49c69a6c53f2 Mon Sep 17 00:00:00 2001 From: Craig Roberts Date: Tue, 16 Feb 2016 10:03:42 +0000 -Subject: [PATCH 154/170] Updated smsc95xx driver to check for a valid MAC +Subject: [PATCH 144/181] Updated smsc95xx driver to check for a valid MAC address in eeprom before using smsc95xx.macaddr parameter passed on command line. @@ -147221,18 +148386,21 @@ index 3244a90..7483222 100755 eth_hw_addr_random(dev->net); netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); } +-- +2.5.0 -From 1c43ff69763f4537b76b3248850256da2bda211b Mon Sep 17 00:00:00 2001 + +From d2b1e50cfbc8734b3704c4ac3262f64a6d36e745 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Feb 2016 19:02:31 +0000 -Subject: [PATCH 155/170] dcw_otg: Make trimming messages less noisy +Subject: [PATCH 145/181] dcw_otg: Make trimming messages less noisy --- drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index d672a76..e6b38ac3 100644 +index d672a76..e6b38ac 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -738,7 +738,8 @@ static int update_urb_state_xfer_comp(dwc_hc_t * hc, @@ -147255,11 +148423,14 @@ index d672a76..e6b38ac3 100644 bytes_transferred = urb->length - urb->actual_length; } +-- +2.5.0 -From 7f9781f9875f2aa638d5afdaa9709fa1ef9bda8d Mon Sep 17 00:00:00 2001 + +From 6190bf96baebf2532fcaa052bd5ee46c69ab43b8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 18 Feb 2016 15:28:14 +0000 -Subject: [PATCH 156/170] BCM270X_DT: at86rf233 overlay - drop to 3MHz +Subject: [PATCH 146/181] BCM270X_DT: at86rf233 overlay - drop to 3MHz The consensus is that 6MHz is too fast, but that 3MHz is OK. @@ -147296,11 +148467,14 @@ index 0460269..eab4052 100644 xtal-trim = /bits/ 8 <0xf>; }; }; +-- +2.5.0 -From 5af831a3f879c89c8c0b39c8f88e7600bdc3a765 Mon Sep 17 00:00:00 2001 + +From bcf7c5fca7af4491e899ec9a05c4b3aa2b3de4e5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 19 Feb 2016 12:04:48 +0000 -Subject: [PATCH 157/170] bcm2835-sdhost: Downgrade log message status +Subject: [PATCH 147/181] bcm2835-sdhost: Downgrade log message status --- drivers/mmc/host/bcm2835-sdhost.c | 4 ++-- @@ -147321,11 +148495,14 @@ index d66385c..4f6cab5 100644 timer_base = ioremap_nocache(bus_to_phys + 0x7e003000, SZ_4K); if (!timer_base) pr_err("sdhost: failed to remap timer\n"); +-- +2.5.0 -From e08f6b3aad073d8130d2ec0f8398f55983c0eac8 Mon Sep 17 00:00:00 2001 + +From 0c65f02df13a580f12b25f869df8098e63080a54 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 15 Jan 2016 16:48:27 +0000 -Subject: [PATCH 158/170] config: Enable HCI over UARTs +Subject: [PATCH 148/181] config: Enable HCI over UARTs --- arch/arm/configs/bcm2709_defconfig | 3 +++ @@ -147359,11 +148536,14 @@ index 51dc019..4368f0d 100644 CONFIG_BT_HCIBCM203X=m CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBFUSB=m +-- +2.5.0 -From 20c4c47bca3674d746518b1cca1e066e46b52900 Mon Sep 17 00:00:00 2001 + +From ba6e2e6446726f833e8009db2cc26ff266865ded Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 -Subject: [PATCH 159/170] hci_h5: Don't send conf_req when ACTIVE +Subject: [PATCH 149/181] 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. @@ -147385,11 +148565,14 @@ index abee221..2825833 100644 } else if (memcmp(data, conf_rsp, 2) == 0) { if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 7); +-- +2.5.0 -From 00dba6ec2ac004fc17075febd4504646eb3dc543 Mon Sep 17 00:00:00 2001 + +From a16463cef1f9dd276e81e78177b757b8192bb197 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 -Subject: [PATCH 160/170] amba_pl011: Don't use DT aliases for numbering +Subject: [PATCH 150/181] 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 @@ -147417,11 +148600,14 @@ index 899a771..68b3353 100644 uap->old_cr = 0; uap->port.dev = dev; +-- +2.5.0 -From 95136c932ac4433a6a50d394817812f8eb2cc914 Mon Sep 17 00:00:00 2001 + +From a1ca24aefc34f0f5db32510b2f8c6c649706ea1d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 15 Dec 2015 15:35:57 -0800 -Subject: [PATCH 161/170] clk: bcm2835: Add bindings for the auxiliary +Subject: [PATCH 151/181] clk: bcm2835: Add bindings for the auxiliary peripheral clock gates. These will be used for enabling UART1, SPI1, and SPI2. @@ -147496,11 +148682,14 @@ index 0000000..d91156e +#define BCM2835_AUX_CLOCK_SPI1 1 +#define BCM2835_AUX_CLOCK_SPI2 2 +#define BCM2835_AUX_CLOCK_COUNT 3 +-- +2.5.0 -From 924276b92ff47f0e778a9405d00637be4ca88736 Mon Sep 17 00:00:00 2001 + +From 2bac90ddbe50b4b7094092758db625eef9e4a8d3 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 15 Dec 2015 15:35:58 -0800 -Subject: [PATCH 162/170] clk: bcm2835: Add a driver for the auxiliary +Subject: [PATCH 152/181] clk: bcm2835: Add a driver for the auxiliary peripheral clock gates. There are a pair of SPI masters and a mini UART that were last minute @@ -147518,7 +148707,7 @@ updated Makefile to preserve the rasoberry pi architectures create mode 100644 drivers/clk/bcm/clk-bcm2835-aux.c diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile -index a1b4cbc..84070d51 100644 +index a1b4cbc..84070d5 100644 --- a/drivers/clk/bcm/Makefile +++ b/drivers/clk/bcm/Makefile @@ -4,6 +4,7 @@ obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm281xx.o @@ -147620,11 +148809,14 @@ index 0000000..e4f89e2 +MODULE_AUTHOR("Eric Anholt "); +MODULE_DESCRIPTION("BCM2835 auxiliary peripheral clock driver"); +MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From 43477e669f736f6da34afbd8a96683b239b1fd1f Mon Sep 17 00:00:00 2001 + +From 854658aee5e5d75024210a7020a0cb4ce0eb8a27 Mon Sep 17 00:00:00 2001 From: Fraser Date: Tue, 23 Feb 2016 10:04:37 +1100 -Subject: [PATCH 163/170] Aux SPI 1&2 implementation +Subject: [PATCH 153/181] Aux SPI 1&2 implementation Adds aux spi 1 & 2 devices to compatible raspberry PIs. * Minor config of the driver build environment to ensure they get built @@ -148328,7 +149520,7 @@ index 4368f0d..1ca1695 100644 CONFIG_PPS=m CONFIG_PPS_CLIENT_LDISC=m diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile -index 84070d51..d60fd3f 100644 +index 84070d5..d60fd3f 100644 --- a/drivers/clk/bcm/Makefile +++ b/drivers/clk/bcm/Makefile @@ -4,7 +4,7 @@ obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm281xx.o @@ -148353,11 +149545,14 @@ index e842e86..c9d1558 100644 depends on GPIOLIB help This selects a driver for the Broadcom BCM2835 SPI aux master. +-- +2.5.0 -From 84c2e063885bb0ae3d5d2ad2e24e7a2bdb5729ae Mon Sep 17 00:00:00 2001 + +From 10e1cde4f9d179372a5171788b493119f979fe65 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Tue, 23 Feb 2016 17:28:23 +0100 -Subject: [PATCH 164/170] ASoC: bcm: add missing .owner fields in sound card +Subject: [PATCH 154/181] ASoC: bcm: add missing .owner fields in sound card drivers If snd_soc_card.owner is not set the kernel won't do usage refcounting @@ -148478,11 +149673,14 @@ index c6e45a0..9db678e 100644 .dai_link = snd_rpi_proto_dai, .num_links = ARRAY_SIZE(snd_rpi_proto_dai), }; +-- +2.5.0 -From 18674a7da1c3d50d9c957a8f88aaea2aa653d223 Mon Sep 17 00:00:00 2001 + +From c26dec8662e421abfef8374045c7207d9c96ab22 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 20 Jan 2016 17:50:09 +0000 -Subject: [PATCH 165/170] smsx95xx: Add option to disable the crimes against +Subject: [PATCH 155/181] smsx95xx: Add option to disable the crimes against truesize fix It may improve iperf numbers on Pi 1, but may generate dmesg warnings and possibly cause network issues @@ -148527,11 +149725,14 @@ index 7483222..a61bd08 usbnet_skb_return(dev, ax_skb); } +-- +2.5.0 -From 5e3c3e845f998f86c2f22017576cb19e5d7fe9bb Mon Sep 17 00:00:00 2001 + +From 3bf5a92557e3a68e6ddfd6684f9867b3020bc85d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 -Subject: [PATCH 166/170] bcm2835-virtgpio: Virtual GPIO driver +Subject: [PATCH 156/181] bcm2835-virtgpio: Virtual GPIO driver Add a virtual GPIO driver that uses the firmware mailbox interface to request that the VPU toggles LEDs. @@ -148557,7 +149758,7 @@ index 76b3a88..6d6b519 100644 CONFIG_GPIO_STMPE=y CONFIG_W1=m diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig -index b18bea0..a1f4ccee 100644 +index b18bea0..a1f4cce 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -132,6 +132,12 @@ config GPIO_BCM_KONA @@ -148783,22 +149984,25 @@ index b011489..c844968 100644 RPI_FIRMWARE_FRAMEBUFFER_RELEASE = 0x00048001, RPI_FIRMWARE_FRAMEBUFFER_TEST_PHYSICAL_WIDTH_HEIGHT = 0x00044003, RPI_FIRMWARE_FRAMEBUFFER_TEST_VIRTUAL_WIDTH_HEIGHT = 0x00044004, +-- +2.5.0 -From 6aa2c847f76f21c830544e8c79f9030a170ef475 Mon Sep 17 00:00:00 2001 + +From 50a5547704d6cdd13e0b7a9ed292649b19540850 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 21 Jan 2016 17:57:49 +0000 -Subject: [PATCH 167/170] BCM270X_DT: Add Pi3 support +Subject: [PATCH 157/181] BCM270X_DT: Add Pi3 support --- arch/arm/boot/dts/Makefile | 1 + - arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 174 ++++++++++++++++++++++++++++++++++ - arch/arm/boot/dts/bcm2710.dtsi | 102 ++++++++++++++++++++ - 3 files changed, 277 insertions(+) + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 192 ++++++++++++++++++++++++++++++++++ + arch/arm/boot/dts/bcm2710.dtsi | 102 ++++++++++++++++++ + 3 files changed, 295 insertions(+) create mode 100644 arch/arm/boot/dts/bcm2710-rpi-3-b.dts create mode 100644 arch/arm/boot/dts/bcm2710.dtsi diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index d583e67..fdc450f4 100644 +index d583e67..fdc450f 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -5,6 +5,7 @@ dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rpi-b-plus.dtb @@ -148811,10 +150015,10 @@ index d583e67..fdc450f4 100644 ifeq ($(CONFIG_ARCH_BCM2708),y) diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts new file mode 100644 -index 0000000..a6ecb51 +index 0000000..cc06089 --- /dev/null +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -@@ -0,0 +1,174 @@ +@@ -0,0 +1,192 @@ +/dts-v1/; + +#include "bcm2710.dtsi" @@ -148862,16 +150066,21 @@ index 0000000..a6ecb51 + }; + + bt_pins: bt_pins { -+ brcm,pins = <28 29 30 31 14 15 43>; -+ brcm,function = <6 6 6 6 2 2 4>; -+ // alt2:PCM alt5:UART1 alt0:GPCLK2 -+ brcm,pull = <0 0 0 0 0 2 0>; ++ brcm,pins = <28 29 30 31 43>; ++ brcm,function = <6 6 6 6 4>; /* alt2:PCM alt0:GPCLK2 */ ++ brcm,pull = <0 0 0 0 0>; ++ }; ++ ++ uart0_pins: uart0_pins { ++ brcm,pins = <32 33>; ++ brcm,function = <7>; /* alt3=UART0 */ ++ brcm,pull = <0 0>; + }; + + uart1_pins: uart1_pins { -+ brcm,pins = <32 33>; -+ brcm,function = <7>; /* alt3=UART0 */ -+ brcm,pull = <0>; ++ brcm,pins = <14 15>; ++ brcm,function = <2>; /* alt5=UART1 */ ++ brcm,pull = <0 0>; + }; +}; + @@ -148888,6 +150097,17 @@ index 0000000..a6ecb51 + non-removable; + bus-width = <4>; + status = "okay"; ++ brcm,overclock-50 = <0>; ++}; ++ ++&soc { ++ virtgpio: virtgpio { ++ compatible = "brcm,bcm2835-virtgpio"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ firmware = <&firmware>; ++ status = "okay"; ++ }; +}; + +&fb { @@ -148895,12 +150115,14 @@ index 0000000..a6ecb51 +}; + +&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins &bt_pins>; + status = "okay"; +}; + +&uart1 { + pinctrl-names = "default"; -+ pinctrl-0 = <&uart1_pins &bt_pins>; ++ pinctrl-0 = <&uart1_pins>; + status = "okay"; +}; + @@ -148956,7 +150178,7 @@ index 0000000..a6ecb51 + act_led: act { + label = "led0"; + linux,default-trigger = "mmc0"; -+ gpios = <&gpio 47 0>; ++ gpios = <&virtgpio 0 0>; + }; +}; + @@ -149097,96 +150319,14 @@ index 0000000..1a48686 + interrupt-parent = <&local_intc>; + interrupts = <8>; +}; +-- +2.5.0 -From 52015bd5f0bb4d64ca51c5f8539cf2552dfb8a42 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Thu, 21 Jan 2016 17:57:49 +0000 -Subject: [PATCH 168/170] FIXUP: BCM270X_DT: Update to latest Pi3 DTS ---- - arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 34 ++++++++++++++++++++++++++-------- - 1 file changed, 26 insertions(+), 8 deletions(-) - -diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -index a6ecb51..cc060898 100644 ---- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -+++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -@@ -45,16 +45,21 @@ - }; - - bt_pins: bt_pins { -- brcm,pins = <28 29 30 31 14 15 43>; -- brcm,function = <6 6 6 6 2 2 4>; -- // alt2:PCM alt5:UART1 alt0:GPCLK2 -- brcm,pull = <0 0 0 0 0 2 0>; -+ brcm,pins = <28 29 30 31 43>; -+ brcm,function = <6 6 6 6 4>; /* alt2:PCM alt0:GPCLK2 */ -+ brcm,pull = <0 0 0 0 0>; - }; - -- uart1_pins: uart1_pins { -+ uart0_pins: uart0_pins { - brcm,pins = <32 33>; - brcm,function = <7>; /* alt3=UART0 */ -- brcm,pull = <0>; -+ brcm,pull = <0 0>; -+ }; -+ -+ uart1_pins: uart1_pins { -+ brcm,pins = <14 15>; -+ brcm,function = <2>; /* alt5=UART1 */ -+ brcm,pull = <0 0>; - }; - }; - -@@ -71,6 +76,17 @@ - non-removable; - bus-width = <4>; - status = "okay"; -+ brcm,overclock-50 = <0>; -+}; -+ -+&soc { -+ virtgpio: virtgpio { -+ compatible = "brcm,bcm2835-virtgpio"; -+ gpio-controller; -+ #gpio-cells = <2>; -+ firmware = <&firmware>; -+ status = "okay"; -+ }; - }; - - &fb { -@@ -78,12 +94,14 @@ - }; - - &uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins &bt_pins>; - status = "okay"; - }; - - &uart1 { - pinctrl-names = "default"; -- pinctrl-0 = <&uart1_pins &bt_pins>; -+ pinctrl-0 = <&uart1_pins>; - status = "okay"; - }; - -@@ -139,7 +157,7 @@ - act_led: act { - label = "led0"; - linux,default-trigger = "mmc0"; -- gpios = <&gpio 47 0>; -+ gpios = <&virtgpio 0 0>; - }; - }; - - -From 310f5af54ca26b68795f0376c67b41e2bb18a0e0 Mon Sep 17 00:00:00 2001 +From 553f69bad0399c72288ce5e03e3d2ba486cb6394 Mon Sep 17 00:00:00 2001 From: Dave Stevenson <6by9@users.noreply.github.com> Date: Mon, 8 Feb 2016 23:49:41 +0000 -Subject: [PATCH 169/170] DT: Add overlays to configure I2C pins +Subject: [PATCH 158/181] DT: Add overlays to configure I2C pins Lifted from https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=120938&p=825883 @@ -149327,11 +150467,14 @@ index 0000000..e303b9c + pin_func = <&i2c1_pins>,"brcm,function:0"; + }; +}; +-- +2.5.0 -From c5cbb66686e7e289e8a7aff49a954f86893e628d Mon Sep 17 00:00:00 2001 + +From 8bfabcfcb4c8ccb858a0b5a1ad7dafec26359d93 Mon Sep 17 00:00:00 2001 From: Dhiraj Goel Date: Thu, 3 Mar 2016 21:10:50 -0800 -Subject: [PATCH 170/170] bcm2835-camera: fix a bug in computation of frame +Subject: [PATCH 159/181] bcm2835-camera: fix a bug in computation of frame timestamp Fixes #1318 @@ -149353,3 +150496,9595 @@ index e83334c..98a892e 100644 buf->vb.timestamp.tv_usec = dev->capture.kernel_start_ts.tv_usec + rem; +-- +2.5.0 + + +From 3befa2a46ca7643b203ac0c356b6c77c2168f9cb Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 2 Mar 2016 10:59:05 +0000 +Subject: [PATCH 160/181] BCM270X_DT: Add pi3-disable-bt overlay + +Disable Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15. To disable +the systemd service that initialises the modem so it doesn't use the UART: + + sudo systemctl disable hciuart + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 8 ++++ + .../boot/dts/overlays/pi3-disable-bt-overlay.dts | 48 ++++++++++++++++++++++ + 3 files changed, 57 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index f2bc3ce..2c2b2fa 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -39,6 +39,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can0-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += mcp2515-can1-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb ++dtb-$(RPI_DT_OVERLAYS) += pi3-disable-bt-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 7d7bbb8..4f0be23 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -496,6 +496,14 @@ Params: speed Display SPI bus speed + [ The pcf8563-rtc overlay has been deleted. See i2c-rtc. ] + + ++Name: pi3-disable-bt ++Info: Disable Pi3 Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15 ++ N.B. To disable the systemd service that initialises the modem so it ++ doesn't use the UART, use 'sudo systemctl disable hciuart'. ++Load: dtoverlay=pi3-disable-bt ++Params: ++ ++ + Name: piscreen + Info: PiScreen display by OzzMaker.com + Load: dtoverlay=piscreen,= +diff --git a/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts +new file mode 100644 +index 0000000..05403e2 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts +@@ -0,0 +1,48 @@ ++/dts-v1/; ++/plugin/; ++ ++/* Disable Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15. ++ To disable the systemd service that initialises the modem so it doesn't use ++ the UART: ++ ++ sudo systemctl disable hciuart ++*/ ++ ++/{ ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&uart1>; ++ __overlay__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&uart0>; ++ __overlay__ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins>; ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&gpio>; ++ __overlay__ { ++ uart0_pins: uart0_pins { ++ brcm,pins = <14 15>; ++ brcm,function = <4>; /* alt0 */ ++ brcm,pull = <0 2>; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target-path = "/aliases"; ++ __overlay__ { ++ serial0 = "/soc/uart@7e201000"; ++ serial1 = "/soc/uart@7e215040"; ++ }; ++ }; ++}; +-- +2.5.0 + + +From a154647b56e9db6a7a1ebfb0c2123ea561228c76 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 7 Mar 2016 09:53:03 +0000 +Subject: [PATCH 161/181] BCM270X_DT: Add pi3-miniuart-bt DT overlay + +Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore +UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum +usable baudrate. + +It is also necessary to edit /lib/systemd/system/hciuart.server and +replace ttyAMA0 with ttyS0. + +If cmdline.txt uses the alias serial0 to refer to the user-accessable port +then the firmware will replace with the appropriate port whether or not +this overlay is used. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 10 ++++ + .../boot/dts/overlays/pi3-miniuart-bt-overlay.dts | 61 ++++++++++++++++++++++ + 3 files changed, 72 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 2c2b2fa..687cc7c 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -40,6 +40,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can1-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += pi3-disable-bt-overlay.dtb ++dtb-$(RPI_DT_OVERLAYS) += pi3-miniuart-bt-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 4f0be23..6a7aa31 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -504,6 +504,16 @@ Load: dtoverlay=pi3-disable-bt + Params: + + ++Name: pi3-miniuart-bt ++Info: Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore ++ UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum ++ usable baudrate. ++ N.B. It is also necessary to edit /lib/systemd/system/hciuart.server ++ and replace ttyAMA0 with ttyS0. ++Load: dtoverlay=pi3-miniuart-bt ++Params: ++ ++ + Name: piscreen + Info: PiScreen display by OzzMaker.com + Load: dtoverlay=piscreen,= +diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +new file mode 100644 +index 0000000..ae1292a +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +@@ -0,0 +1,61 @@ ++/dts-v1/; ++/plugin/; ++ ++/* Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore ++ UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum ++ usable baudrate. ++ ++ It is also necessary to edit /lib/systemd/system/hciuart.server and ++ replace ttyAMA0 with ttyS0. ++ ++ If cmdline.txt uses the alias serial0 to refer to the user-accessable port ++ then the firmware will replace with the appropriate port whether or not ++ this overlay is used. ++*/ ++ ++/{ ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&uart0>; ++ __overlay__ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins>; ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&uart1>; ++ __overlay__ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_pins>; ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&gpio>; ++ __overlay__ { ++ uart0_pins: uart0_pins { ++ brcm,pins = <14 15>; ++ brcm,function = <4>; /* alt0 */ ++ brcm,pull = <0 2>; ++ }; ++ ++ uart1_pins: uart1_pins { ++ brcm,pins = <32 33>; ++ brcm,function = <2>; /* alt5=UART1 */ ++ brcm,pull = <0 0>; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target-path = "/aliases"; ++ __overlay__ { ++ serial0 = "/soc/uart@7e201000"; ++ serial1 = "/soc/uart@7e215040"; ++ }; ++ }; ++}; +-- +2.5.0 + + +From 5a0a0711e5c319d854b7b2f6f5301f3afb0bfa9e Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 7 Mar 2016 13:38:39 +0000 +Subject: [PATCH 162/181] Pi3 DT: Add dtparams for the SD interface + +Add new base dtparams sd_overclock, sd_force_pio, sd_pio_limit +and sd_debug. These were missed out of the initial Pi3 DTB. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +index cc06089..36972d8 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +@@ -188,5 +188,9 @@ + audio = <&audio>,"status"; + watchdog = <&watchdog>,"status"; + random = <&random>,"status"; ++ sd_overclock = <&sdhost>,"brcm,overclock-50:0"; ++ sd_force_pio = <&sdhost>,"brcm,force-pio?"; ++ sd_pio_limit = <&sdhost>,"brcm,pio-limit:0"; ++ sd_debug = <&sdhost>,"brcm,debug"; + }; + }; +-- +2.5.0 + + +From 9c4880b9e2e68e59190cf0d2cd3527a7a9d63379 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 7 Mar 2016 15:05:11 +0000 +Subject: [PATCH 163/181] vchiq_arm: Tweak the logging output + +Signed-off-by: Phil Elwell +--- + .../vc04_services/interface/vchiq_arm/vchiq_core.c | 31 +++++++++------------- + 1 file changed, 13 insertions(+), 18 deletions(-) + +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c +index 2c98da4..160db24 100644 +--- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c ++++ b/drivers/misc/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)); +- } + } + ++ 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++; + +@@ -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)); +- } + } + ++ 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)); + } + + 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)); + } + + switch (type) { +-- +2.5.0 + + +From 78ddf83b051548869ef5462693d25bd96a94d9e6 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 7 Mar 2016 16:46:39 +0000 +Subject: [PATCH 164/181] bcm2835-sdhost: Only claim one DMA channel + +With both MMC controllers enabled there are few DMA channels left. The +bcm2835-sdhost driver only uses DMA in one direction at a time, so it +doesn't need to claim two channels. + +See: https://github.com/raspberrypi/linux/issues/1327 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 5 +-- + drivers/mmc/host/bcm2835-sdhost.c | 70 ++++++++++++++++++++++++----------- + 2 files changed, 50 insertions(+), 25 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 4f65203..4f833a9 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -136,9 +136,8 @@ + reg = <0x7e202000 0x100>; + interrupts = <2 24>; + clocks = <&clk_core>; +- dmas = <&dma 13>, +- <&dma 13>; +- dma-names = "tx", "rx"; ++ dmas = <&dma 13>; ++ dma-names = "rx-tx"; + brcm,overclock-50 = <0>; + brcm,pio-limit = <1>; + status = "disabled"; +diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c +index 4f6cab5..4cc4272 100644 +--- a/drivers/mmc/host/bcm2835-sdhost.c ++++ b/drivers/mmc/host/bcm2835-sdhost.c +@@ -185,9 +185,10 @@ struct bcm2835_host { + unsigned int debug:1; /* Enable debug output */ + + /*DMA part*/ +- struct dma_chan *dma_chan_rx; /* DMA channel for reads */ +- struct dma_chan *dma_chan_tx; /* DMA channel for writes */ +- struct dma_chan *dma_chan; /* Channel in used */ ++ struct dma_chan *dma_chan_rxtx; /* DMA channel for reads and writes */ ++ struct dma_chan *dma_chan; /* Channel in use */ ++ struct dma_slave_config dma_cfg_rx; ++ struct dma_slave_config dma_cfg_tx; + struct dma_async_tx_descriptor *dma_desc; + u32 dma_dir; + u32 drain_words; +@@ -771,12 +772,11 @@ static void bcm2835_sdhost_prepare_dma(struct bcm2835_host *host, + log_event("PRD<", (u32)data, 0); + pr_debug("bcm2835_sdhost_prepare_dma()\n"); + ++ dma_chan = host->dma_chan_rxtx; + if (data->flags & MMC_DATA_READ) { +- dma_chan = host->dma_chan_rx; + dir_data = DMA_FROM_DEVICE; + dir_slave = DMA_DEV_TO_MEM; + } else { +- dma_chan = host->dma_chan_tx; + dir_data = DMA_TO_DEVICE; + dir_slave = DMA_MEM_TO_DEV; + } +@@ -813,6 +813,12 @@ static void bcm2835_sdhost_prepare_dma(struct bcm2835_host *host, + host->drain_words = len/4; + } + ++ /* The parameters have already been validated, so this will not fail */ ++ (void)dmaengine_slave_config(dma_chan, ++ (dir_data == DMA_FROM_DEVICE) ? ++ &host->dma_cfg_rx : ++ &host->dma_cfg_tx); ++ + len = dma_map_sg(dma_chan->device->dev, data->sg, data->sg_len, + dir_data); + +@@ -1805,28 +1811,46 @@ int bcm2835_sdhost_add_host(struct bcm2835_host *host) + spin_lock_init(&host->lock); + + if (host->allow_dma) { +- if (IS_ERR_OR_NULL(host->dma_chan_tx) || +- IS_ERR_OR_NULL(host->dma_chan_rx)) { +- pr_err("%s: unable to initialise DMA channels. " ++ if (IS_ERR_OR_NULL(host->dma_chan_rxtx)) { ++ pr_err("%s: unable to initialise DMA channel. " + "Falling back to PIO\n", + mmc_hostname(mmc)); + host->use_dma = false; + } else { +- host->use_dma = true; +- + cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; + cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; + cfg.slave_id = 13; /* DREQ channel */ + ++ /* Validate the slave configurations */ ++ + cfg.direction = DMA_MEM_TO_DEV; + cfg.src_addr = 0; + cfg.dst_addr = host->bus_addr + SDDATA; +- ret = dmaengine_slave_config(host->dma_chan_tx, &cfg); + +- cfg.direction = DMA_DEV_TO_MEM; +- cfg.src_addr = host->bus_addr + SDDATA; +- cfg.dst_addr = 0; +- ret = dmaengine_slave_config(host->dma_chan_rx, &cfg); ++ ret = dmaengine_slave_config(host->dma_chan_rxtx, &cfg); ++ ++ if (ret == 0) { ++ host->dma_cfg_tx = cfg; ++ ++ cfg.direction = DMA_DEV_TO_MEM; ++ cfg.src_addr = host->bus_addr + SDDATA; ++ cfg.dst_addr = 0; ++ ++ ret = dmaengine_slave_config(host->dma_chan_rxtx, &cfg); ++ } ++ ++ if (ret == 0) { ++ host->dma_cfg_rx = cfg; ++ ++ host->use_dma = true; ++ } else { ++ pr_err("%s: unable to configure DMA channel. " ++ "Falling back to PIO\n", ++ mmc_hostname(mmc)); ++ dma_release_channel(host->dma_chan_rxtx); ++ host->dma_chan_rxtx = NULL; ++ host->use_dma = false; ++ } + } + } else { + host->use_dma = false; +@@ -1948,19 +1972,21 @@ static int bcm2835_sdhost_probe(struct platform_device *pdev) + + if (host->allow_dma) { + if (node) { +- host->dma_chan_tx = +- dma_request_slave_channel(dev, "tx"); +- host->dma_chan_rx = +- dma_request_slave_channel(dev, "rx"); ++ host->dma_chan_rxtx = ++ dma_request_slave_channel(dev, "rx-tx"); ++ if (!host->dma_chan_rxtx) ++ host->dma_chan_rxtx = ++ dma_request_slave_channel(dev, "tx"); ++ if (!host->dma_chan_rxtx) ++ host->dma_chan_rxtx = ++ dma_request_slave_channel(dev, "rx"); + } else { + dma_cap_mask_t mask; + + dma_cap_zero(mask); + /* we don't care about the channel, any would work */ + dma_cap_set(DMA_SLAVE, mask); +- host->dma_chan_tx = +- dma_request_channel(mask, NULL, NULL); +- host->dma_chan_rx = ++ host->dma_chan_rxtx = + dma_request_channel(mask, NULL, NULL); + } + } +-- +2.5.0 + + +From 837343db652c927e0e8ca31f927d3d521194f349 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 8 Mar 2016 09:49:16 +0000 +Subject: [PATCH 165/181] bcm2835-mmc: Only claim one DMA channel + +With both MMC controllers enabled there are few DMA channels left. The +bcm2835-mmc driver only uses DMA in one direction at a time, so it +doesn't need to claim two channels. + +See: https://github.com/raspberrypi/linux/issues/1327 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 5 +-- + drivers/mmc/host/bcm2835-mmc.c | 69 +++++++++++++++++++++++++---------- + 2 files changed, 51 insertions(+), 23 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 4f833a9..e0be77a 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -232,9 +232,8 @@ + reg = <0x7e300000 0x100>; + interrupts = <2 30>; + clocks = <&clk_mmc>; +- dmas = <&dma 11>, +- <&dma 11>; +- dma-names = "tx", "rx"; ++ dmas = <&dma 11>; ++ dma-names = "rx-tx"; + brcm,overclock-50 = <0>; + status = "disabled"; + }; +diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c +index 104f93e..ceb3793 100644 +--- a/drivers/mmc/host/bcm2835-mmc.c ++++ b/drivers/mmc/host/bcm2835-mmc.c +@@ -108,8 +108,9 @@ struct bcm2835_host { + u32 shadow; + + /*DMA part*/ +- struct dma_chan *dma_chan_rx; /* DMA channel for reads */ +- struct dma_chan *dma_chan_tx; /* DMA channel for writes */ ++ struct dma_chan *dma_chan_rxtx; /* DMA channel for reads and writes */ ++ struct dma_slave_config dma_cfg_rx; ++ struct dma_slave_config dma_cfg_tx; + struct dma_async_tx_descriptor *tx_desc; /* descriptor */ + + bool have_dma; +@@ -342,7 +343,7 @@ static void bcm2835_mmc_dma_complete(void *param) + + if (host->data && !(host->data->flags & MMC_DATA_WRITE)) { + /* otherwise handled in SDHCI IRQ */ +- dma_chan = host->dma_chan_rx; ++ dma_chan = host->dma_chan_rxtx; + dir_data = DMA_FROM_DEVICE; + + dma_unmap_sg(dma_chan->device->dev, +@@ -493,16 +494,21 @@ static void bcm2835_mmc_transfer_dma(struct bcm2835_host *host) + if (host->blocks == 0) + return; + ++ dma_chan = host->dma_chan_rxtx; + if (host->data->flags & MMC_DATA_READ) { +- dma_chan = host->dma_chan_rx; + dir_data = DMA_FROM_DEVICE; + dir_slave = DMA_DEV_TO_MEM; + } else { +- dma_chan = host->dma_chan_tx; + dir_data = DMA_TO_DEVICE; + dir_slave = DMA_MEM_TO_DEV; + } + ++ /* The parameters have already been validated, so this will not fail */ ++ (void)dmaengine_slave_config(dma_chan, ++ (dir_data == DMA_FROM_DEVICE) ? ++ &host->dma_cfg_rx : ++ &host->dma_cfg_tx); ++ + BUG_ON(!dma_chan->device); + BUG_ON(!dma_chan->device->dev); + BUG_ON(!host->data->sg); +@@ -936,7 +942,7 @@ static void bcm2835_mmc_data_irq(struct bcm2835_host *host, u32 intmask) + if (host->data->flags & MMC_DATA_WRITE) { + /* IRQ handled here */ + +- dma_chan = host->dma_chan_tx; ++ dma_chan = host->dma_chan_rxtx; + dir_data = DMA_TO_DEVICE; + dma_unmap_sg(dma_chan->device->dev, + host->data->sg, host->data->sg_len, +@@ -1316,28 +1322,47 @@ static int bcm2835_mmc_add_host(struct bcm2835_host *host) + dev_info(dev, "Forcing PIO mode\n"); + host->have_dma = false; + #else +- if (IS_ERR_OR_NULL(host->dma_chan_tx) || +- IS_ERR_OR_NULL(host->dma_chan_rx)) { +- dev_err(dev, "%s: Unable to initialise DMA channels. Falling back to PIO\n", ++ if (IS_ERR_OR_NULL(host->dma_chan_rxtx)) { ++ dev_err(dev, "%s: Unable to initialise DMA channel. Falling back to PIO\n", + DRIVER_NAME); + host->have_dma = false; + } else { +- dev_info(dev, "DMA channels allocated"); +- host->have_dma = true; ++ dev_info(dev, "DMA channel allocated"); + + cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; + cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; + cfg.slave_id = 11; /* DREQ channel */ + ++ /* Validate the slave configurations */ ++ + cfg.direction = DMA_MEM_TO_DEV; + cfg.src_addr = 0; + cfg.dst_addr = host->bus_addr + SDHCI_BUFFER; +- ret = dmaengine_slave_config(host->dma_chan_tx, &cfg); + +- cfg.direction = DMA_DEV_TO_MEM; +- cfg.src_addr = host->bus_addr + SDHCI_BUFFER; +- cfg.dst_addr = 0; +- ret = dmaengine_slave_config(host->dma_chan_rx, &cfg); ++ ret = dmaengine_slave_config(host->dma_chan_rxtx, &cfg); ++ ++ if (ret == 0) { ++ host->dma_cfg_tx = cfg; ++ ++ cfg.direction = DMA_DEV_TO_MEM; ++ cfg.src_addr = host->bus_addr + SDHCI_BUFFER; ++ cfg.dst_addr = 0; ++ ++ ret = dmaengine_slave_config(host->dma_chan_rxtx, &cfg); ++ } ++ ++ if (ret == 0) { ++ host->dma_cfg_rx = cfg; ++ ++ host->use_dma = true; ++ } else { ++ pr_err("%s: unable to configure DMA channel. " ++ "Faling back to PIO\n", ++ mmc_hostname(mmc)); ++ dma_release_channel(host->dma_chan_rxtx); ++ host->dma_chan_rxtx = NULL; ++ host->use_dma = false; ++ } + } + #endif + mmc->max_segs = 128; +@@ -1416,16 +1441,20 @@ static int bcm2835_mmc_probe(struct platform_device *pdev) + + #ifndef FORCE_PIO + if (node) { +- host->dma_chan_tx = dma_request_slave_channel(dev, "tx"); +- host->dma_chan_rx = dma_request_slave_channel(dev, "rx"); ++ host->dma_chan_rxtx = dma_request_slave_channel(dev, "rx-tx"); ++ if (!host->dma_chan_rxtx) ++ host->dma_chan_rxtx = ++ dma_request_slave_channel(dev, "tx"); ++ if (!host->dma_chan_rxtx) ++ host->dma_chan_rxtx = ++ dma_request_slave_channel(dev, "rx"); + } else { + dma_cap_mask_t mask; + + dma_cap_zero(mask); + /* we don't care about the channel, any would work */ + dma_cap_set(DMA_SLAVE, mask); +- host->dma_chan_tx = dma_request_channel(mask, NULL, NULL); +- host->dma_chan_rx = dma_request_channel(mask, NULL, NULL); ++ host->dma_chan_rxtx = dma_request_channel(mask, NULL, NULL); + } + #endif + clk = devm_clk_get(dev, NULL); +-- +2.5.0 + + +From 13332385a60aa06411b18ba0fa52ea7f4d7d2202 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 8 Mar 2016 17:08:39 +0000 +Subject: [PATCH 166/181] config: rebuild with savedefconfig + +--- + arch/arm/configs/bcm2709_defconfig | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 6d6b519..116002b 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -593,7 +593,6 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y + CONFIG_SERIAL_OF_PLATFORM=y + CONFIG_TTY_PRINTK=y + CONFIG_HW_RANDOM=y +-CONFIG_HW_RANDOM_BCM2835=y + CONFIG_RAW_DRIVER=y + CONFIG_I2C=y + CONFIG_I2C_CHARDEV=m +@@ -1112,7 +1111,7 @@ CONFIG_EXTCON=m + CONFIG_EXTCON_ARIZONA=m + CONFIG_IIO=m + CONFIG_IIO_BUFFER=y +-CONFIG_IIO_BUFFER_CB=y ++CONFIG_IIO_BUFFER_CB=m + CONFIG_IIO_KFIFO_BUF=m + CONFIG_MCP320X=m + CONFIG_DHT11=m +-- +2.5.0 + + +From 4ec8d596e82793a7ac373d724b304b8357e21793 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 8 Mar 2016 17:06:33 +0000 +Subject: [PATCH 167/181] config: Add module for mcp3422 ADC + +--- + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 116002b..7793baf 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -1114,6 +1114,7 @@ CONFIG_IIO_BUFFER=y + CONFIG_IIO_BUFFER_CB=m + CONFIG_IIO_KFIFO_BUF=m + CONFIG_MCP320X=m ++CONFIG_MCP3422=m + CONFIG_DHT11=m + CONFIG_PWM_BCM2835=m + CONFIG_RASPBERRYPI_FIRMWARE=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 1ca1695..f09be87 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -1121,6 +1121,7 @@ CONFIG_IIO_BUFFER=y + CONFIG_IIO_BUFFER_CB=m + CONFIG_IIO_KFIFO_BUF=m + CONFIG_MCP320X=m ++CONFIG_MCP3422=m + CONFIG_DHT11=m + CONFIG_PWM_BCM2835=m + CONFIG_RASPBERRYPI_FIRMWARE=y +-- +2.5.0 + + +From 7311096092d6b2631afcf5002cdd67989106ddac Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 8 Mar 2016 16:18:57 +0000 +Subject: [PATCH 168/181] Pi3 DT: Add pull-ups on the UART RX lines + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 4 ++-- + arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +index 36972d8..5a0c45a 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +@@ -53,13 +53,13 @@ + uart0_pins: uart0_pins { + brcm,pins = <32 33>; + brcm,function = <7>; /* alt3=UART0 */ +- brcm,pull = <0 0>; ++ brcm,pull = <0 2>; + }; + + uart1_pins: uart1_pins { + brcm,pins = <14 15>; + brcm,function = <2>; /* alt5=UART1 */ +- brcm,pull = <0 0>; ++ brcm,pull = <0 2>; + }; + }; + +diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +index ae1292a..0b8f0ca 100644 +--- a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts ++++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +@@ -46,7 +46,7 @@ + uart1_pins: uart1_pins { + brcm,pins = <32 33>; + brcm,function = <2>; /* alt5=UART1 */ +- brcm,pull = <0 0>; ++ brcm,pull = <0 2>; + }; + }; + }; +-- +2.5.0 + + +From 6d667301362eb99e4dac9af349201a58cf8059aa Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 9 Mar 2016 17:25:59 +0000 +Subject: [PATCH 169/181] brcmfmac: Disable power management + +Disable wireless power saving in the brcmfmac WLAN driver. This is a +temporary measure until the connectivity loss resulting from power +saving is resolved. + +Signed-off-by: Phil Elwell +--- + drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +index deb5f78..90f65d9 100644 +--- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +@@ -2567,6 +2567,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 + */ ++ pr_info("power management disabled\n"); ++ enabled = false; + cfg->pwr_save = enabled; + if (!check_vif_up(ifp->vif)) { + +-- +2.5.0 + + +From 84e3a68609eda45904ae776a302617e094e2a45e Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 9 Mar 2016 21:28:52 +0000 +Subject: [PATCH 170/181] BCM270X_DT: rpi-display overlay - add swapxy param + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/README | 5 +---- + arch/arm/boot/dts/overlays/rpi-display-overlay.dts | 1 + + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 6a7aa31..6fa5b80 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -644,14 +644,11 @@ Name: rpi-display + Info: RPi-Display - 2.8" Touch Display by Watterott + Load: dtoverlay=rpi-display,= + Params: speed Display SPI bus speed +- + rotate Display rotation {0,90,180,270} +- + fps Delay between frame updates +- + debug Debug output level {0-7} +- + xohms Touchpanel sensitivity (X-plate resistance) ++ swapxy Swap x and y axis + + + Name: rpi-ft5406 +diff --git a/arch/arm/boot/dts/overlays/rpi-display-overlay.dts b/arch/arm/boot/dts/overlays/rpi-display-overlay.dts +index a8fa974..ccb296e 100644 +--- a/arch/arm/boot/dts/overlays/rpi-display-overlay.dts ++++ b/arch/arm/boot/dts/overlays/rpi-display-overlay.dts +@@ -78,5 +78,6 @@ + fps = <&rpidisplay>,"fps:0"; + debug = <&rpidisplay>,"debug:0"; + xohms = <&rpidisplay_ts>,"ti,x-plate-ohms;0"; ++ swapxy = <&rpidisplay_ts>,"ti,swap-xy?"; + }; + }; +-- +2.5.0 + + +From 7b5a45e254cd4a8d1ffac400c11ffdbf110e68ef Mon Sep 17 00:00:00 2001 +From: DigitalDreamtime +Date: Fri, 11 Mar 2016 11:44:35 +0000 +Subject: [PATCH 171/181] Remove I2S config from bt_pins. + +Remove I2S config from bt_pins. Causes issues with clock alignment when I2S is +used by an external DAC via GPIO header. +--- + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 6 +++--- + arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +index 5a0c45a..2cb7d43 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +@@ -45,9 +45,9 @@ + }; + + bt_pins: bt_pins { +- brcm,pins = <28 29 30 31 43>; +- brcm,function = <6 6 6 6 4>; /* alt2:PCM alt0:GPCLK2 */ +- brcm,pull = <0 0 0 0 0>; ++ brcm,pins = <43>; ++ brcm,function = <4>; /* alt0:GPCLK2 */ ++ brcm,pull = <0>; + }; + + uart0_pins: uart0_pins { +diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +index 0b8f0ca..f07afcb 100644 +--- a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts ++++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +@@ -29,7 +29,7 @@ + target = <&uart1>; + __overlay__ { + pinctrl-names = "default"; +- pinctrl-0 = <&uart1_pins>; ++ pinctrl-0 = <&uart1_pins &bt_pins>; + status = "okay"; + }; + }; +-- +2.5.0 + + +From bc6017a1c3dac44e3ce9b0d16490ced290df467c Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 10 Aug 2015 09:44:59 +0100 +Subject: [PATCH 172/181] Revert "scripts/dtc: Add overlay support" + +This reverts commit fa6d1755c2fdd9451077d8248e3804f0619f19b9. +--- + scripts/dtc/checks.c | 119 +-- + scripts/dtc/dtc-lexer.l | 5 - + scripts/dtc/dtc-lexer.lex.c_shipped | 490 +++++---- + scripts/dtc/dtc-parser.tab.c_shipped | 1896 +++++++++++++++------------------- + scripts/dtc/dtc-parser.tab.h_shipped | 107 +- + scripts/dtc/dtc-parser.y | 23 +- + scripts/dtc/dtc.c | 9 +- + scripts/dtc/dtc.h | 38 - + scripts/dtc/flattree.c | 141 +-- + scripts/dtc/version_gen.h | 2 +- + 10 files changed, 1145 insertions(+), 1685 deletions(-) + +diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c +index efd1bc6..e81a8c74 100644 +--- a/scripts/dtc/checks.c ++++ b/scripts/dtc/checks.c +@@ -458,91 +458,21 @@ static void fixup_phandle_references(struct check *c, struct node *dt, + struct node *node, struct property *prop) + { + struct marker *m = prop->val.markers; +- struct fixup *f, **fp; +- struct fixup_entry *fe, **fep; + struct node *refnode; + cell_t phandle; +- int has_phandle_refs; +- +- has_phandle_refs = 0; +- for_each_marker_of_type(m, REF_PHANDLE) { +- has_phandle_refs = 1; +- break; +- } +- +- if (!has_phandle_refs) +- return; + + for_each_marker_of_type(m, REF_PHANDLE) { + assert(m->offset + sizeof(cell_t) <= prop->val.len); + + refnode = get_node_by_ref(dt, m->ref); +- if (!refnode && !symbol_fixup_support) { ++ if (! refnode) { + FAIL(c, "Reference to non-existent node or label \"%s\"\n", +- m->ref); ++ m->ref); + continue; + } + +- if (!refnode) { +- /* allocate fixup entry */ +- fe = xmalloc(sizeof(*fe)); +- +- fe->node = node; +- fe->prop = prop; +- fe->offset = m->offset; +- fe->next = NULL; +- +- /* search for an already existing fixup */ +- for_each_fixup(dt, f) +- if (strcmp(f->ref, m->ref) == 0) +- break; +- +- /* no fixup found, add new */ +- if (f == NULL) { +- f = xmalloc(sizeof(*f)); +- f->ref = m->ref; +- f->entries = NULL; +- f->next = NULL; +- +- /* add it to the tree */ +- fp = &dt->fixups; +- while (*fp) +- fp = &(*fp)->next; +- *fp = f; +- } +- +- /* and now append fixup entry */ +- fep = &f->entries; +- while (*fep) +- fep = &(*fep)->next; +- *fep = fe; +- +- /* mark the entry as unresolved */ +- phandle = 0xdeadbeef; +- } else { +- phandle = get_node_phandle(dt, refnode); +- +- /* if it's a plugin, we need to record it */ +- if (symbol_fixup_support && dt->is_plugin) { +- +- /* allocate a new local fixup entry */ +- fe = xmalloc(sizeof(*fe)); +- +- fe->node = node; +- fe->prop = prop; +- fe->offset = m->offset; +- fe->next = NULL; +- +- /* append it to the local fixups */ +- fep = &dt->local_fixups; +- while (*fep) +- fep = &(*fep)->next; +- *fep = fe; +- } +- } +- +- *((cell_t *)(prop->val.val + m->offset)) = +- cpu_to_fdt32(phandle); ++ phandle = get_node_phandle(dt, refnode); ++ *((cell_t *)(prop->val.val + m->offset)) = cpu_to_fdt32(phandle); + } + } + ERROR(phandle_references, NULL, NULL, fixup_phandle_references, NULL, +@@ -722,45 +652,6 @@ static void check_obsolete_chosen_interrupt_controller(struct check *c, + } + TREE_WARNING(obsolete_chosen_interrupt_controller, NULL); + +-static void check_auto_label_phandles(struct check *c, struct node *dt, +- struct node *node) +-{ +- struct label *l; +- struct symbol *s, **sp; +- int has_label; +- +- if (!symbol_fixup_support) +- return; +- +- has_label = 0; +- for_each_label(node->labels, l) { +- has_label = 1; +- break; +- } +- +- if (!has_label) +- return; +- +- /* force allocation of a phandle for this node */ +- (void)get_node_phandle(dt, node); +- +- /* add the symbol */ +- for_each_label(node->labels, l) { +- +- s = xmalloc(sizeof(*s)); +- s->label = l; +- s->node = node; +- s->next = NULL; +- +- /* add it to the symbols list */ +- sp = &dt->symbols; +- while (*sp) +- sp = &((*sp)->next); +- *sp = s; +- } +-} +-NODE_WARNING(auto_label_phandles, NULL); +- + static struct check *check_table[] = { + &duplicate_node_names, &duplicate_property_names, + &node_name_chars, &node_name_format, &property_name_chars, +@@ -779,8 +670,6 @@ static struct check *check_table[] = { + &avoid_default_addr_size, + &obsolete_chosen_interrupt_controller, + +- &auto_label_phandles, +- + &always_fail, + }; + +diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l +index dd44ba2..0ee1caf 100644 +--- a/scripts/dtc/dtc-lexer.l ++++ b/scripts/dtc/dtc-lexer.l +@@ -113,11 +113,6 @@ static void lexical_error(const char *fmt, ...); + return DT_V1; + } + +-<*>"/plugin/" { +- DPRINT("Keyword: /plugin/\n"); +- return DT_PLUGIN; +- } +- + <*>"/memreserve/" { + DPRINT("Keyword: /memreserve/\n"); + BEGIN_DEFAULT(); +diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped +index 1518525..11cd78e 100644 +--- a/scripts/dtc/dtc-lexer.lex.c_shipped ++++ b/scripts/dtc/dtc-lexer.lex.c_shipped +@@ -9,7 +9,7 @@ + #define FLEX_SCANNER + #define YY_FLEX_MAJOR_VERSION 2 + #define YY_FLEX_MINOR_VERSION 5 +-#define YY_FLEX_SUBMINOR_VERSION 35 ++#define YY_FLEX_SUBMINOR_VERSION 39 + #if YY_FLEX_SUBMINOR_VERSION > 0 + #define FLEX_BETA + #endif +@@ -162,7 +162,12 @@ typedef unsigned int flex_uint32_t; + typedef struct yy_buffer_state *YY_BUFFER_STATE; + #endif + +-extern int yyleng; ++#ifndef YY_TYPEDEF_YY_SIZE_T ++#define YY_TYPEDEF_YY_SIZE_T ++typedef size_t yy_size_t; ++#endif ++ ++extern yy_size_t yyleng; + + extern FILE *yyin, *yyout; + +@@ -171,6 +176,7 @@ extern FILE *yyin, *yyout; + #define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) ++ #define YY_LINENO_REWIND_TO(ptr) + + /* Return all but the first "n" matched characters back to the input stream. */ + #define yyless(n) \ +@@ -188,11 +194,6 @@ extern FILE *yyin, *yyout; + + #define unput(c) yyunput( c, (yytext_ptr) ) + +-#ifndef YY_TYPEDEF_YY_SIZE_T +-#define YY_TYPEDEF_YY_SIZE_T +-typedef size_t yy_size_t; +-#endif +- + #ifndef YY_STRUCT_YY_BUFFER_STATE + #define YY_STRUCT_YY_BUFFER_STATE + struct yy_buffer_state +@@ -210,7 +211,7 @@ struct yy_buffer_state + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ +- int yy_n_chars; ++ yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to +@@ -280,8 +281,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + + /* yy_hold_char holds the character lost when yytext is formed. */ + static char yy_hold_char; +-static int yy_n_chars; /* number of characters read into yy_ch_buf */ +-int yyleng; ++static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ ++yy_size_t yyleng; + + /* Points to current character in buffer. */ + static char *yy_c_buf_p = (char *) 0; +@@ -309,7 +310,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); + + YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); + YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); +-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); ++YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); + + void *yyalloc (yy_size_t ); + void *yyrealloc (void *,yy_size_t ); +@@ -341,7 +342,7 @@ void yyfree (void * ); + + /* Begin user sect3 */ + +-#define yywrap(n) 1 ++#define yywrap() 1 + #define YY_SKIP_YYWRAP + + typedef unsigned char YY_CHAR; +@@ -372,8 +373,8 @@ static void yy_fatal_error (yyconst char msg[] ); + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +-#define YY_NUM_RULES 31 +-#define YY_END_OF_BUFFER 32 ++#define YY_NUM_RULES 30 ++#define YY_END_OF_BUFFER 31 + /* This struct is not used in this scanner, + but its presence is necessary. */ + struct yy_trans_info +@@ -381,26 +382,25 @@ struct yy_trans_info + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +-static yyconst flex_int16_t yy_accept[166] = ++static yyconst flex_int16_t yy_accept[159] = + { 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 32, 30, +- 19, 19, 30, 30, 30, 30, 30, 30, 30, 30, +- 30, 30, 30, 30, 30, 30, 16, 17, 17, 30, +- 17, 11, 11, 19, 27, 0, 3, 0, 28, 13, +- 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, +- 0, 22, 24, 26, 25, 23, 0, 10, 29, 0, +- 0, 0, 15, 15, 17, 17, 17, 11, 11, 11, +- 0, 13, 0, 12, 0, 0, 0, 21, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 17, 11, 11, +- 11, 0, 14, 20, 0, 0, 0, 0, 0, 0, +- +- 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 17, 7, 0, 0, 0, +- 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 4, 18, 0, 0, 5, 2, +- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 1, 0, 0, 0, 0, 6, 9, 0, +- 0, 0, 0, 8, 0 ++ 0, 0, 0, 0, 0, 0, 0, 0, 31, 29, ++ 18, 18, 29, 29, 29, 29, 29, 29, 29, 29, ++ 29, 29, 29, 29, 29, 29, 15, 16, 16, 29, ++ 16, 10, 10, 18, 26, 0, 3, 0, 27, 12, ++ 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, ++ 21, 23, 25, 24, 22, 0, 9, 28, 0, 0, ++ 0, 14, 14, 16, 16, 16, 10, 10, 10, 0, ++ 12, 0, 11, 0, 0, 0, 20, 0, 0, 0, ++ 0, 0, 0, 0, 0, 16, 10, 10, 10, 0, ++ 13, 19, 0, 0, 0, 0, 0, 0, 0, 0, ++ ++ 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 16, 6, 0, 0, 0, 0, 0, 0, 2, ++ 0, 0, 0, 0, 0, 0, 0, 0, 4, 17, ++ 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, ++ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, ++ 5, 8, 0, 0, 0, 0, 7, 0 + } ; + + static yyconst flex_int32_t yy_ec[256] = +@@ -416,9 +416,9 @@ static yyconst flex_int32_t yy_ec[256] = + 22, 22, 22, 22, 24, 22, 22, 25, 22, 22, + 1, 26, 27, 1, 22, 1, 21, 28, 29, 30, + +- 31, 21, 32, 22, 33, 22, 22, 34, 35, 36, +- 37, 38, 22, 39, 40, 41, 42, 43, 22, 25, +- 44, 22, 45, 46, 47, 1, 1, 1, 1, 1, ++ 31, 21, 22, 22, 32, 22, 22, 33, 34, 35, ++ 36, 37, 22, 38, 39, 40, 41, 42, 22, 25, ++ 43, 22, 44, 45, 46, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +@@ -435,165 +435,163 @@ static yyconst flex_int32_t yy_ec[256] = + 1, 1, 1, 1, 1 + } ; + +-static yyconst flex_int32_t yy_meta[48] = ++static yyconst flex_int32_t yy_meta[47] = + { 0, + 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, + 2, 2, 4, 5, 5, 5, 6, 1, 1, 1, + 7, 8, 8, 8, 8, 1, 1, 7, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, +- 8, 8, 8, 8, 3, 1, 4 ++ 8, 8, 8, 3, 1, 4 + } ; + +-static yyconst flex_int16_t yy_base[180] = ++static yyconst flex_int16_t yy_base[173] = + { 0, +- 0, 393, 35, 392, 66, 391, 38, 107, 397, 401, +- 55, 113, 377, 112, 111, 111, 114, 42, 376, 106, +- 377, 347, 126, 120, 0, 147, 401, 0, 124, 0, +- 137, 158, 170, 163, 401, 153, 401, 389, 401, 0, +- 378, 120, 401, 131, 380, 386, 355, 139, 351, 355, +- 351, 401, 401, 401, 401, 401, 367, 401, 401, 185, +- 350, 346, 401, 364, 0, 185, 347, 189, 356, 355, +- 0, 0, 330, 180, 366, 141, 372, 361, 332, 338, +- 331, 341, 334, 326, 205, 331, 337, 329, 401, 341, +- 167, 316, 401, 349, 348, 320, 328, 346, 180, 318, +- +- 324, 209, 324, 320, 322, 342, 338, 309, 306, 315, +- 305, 315, 312, 192, 342, 341, 401, 293, 306, 282, +- 268, 252, 255, 203, 285, 282, 272, 268, 252, 233, +- 232, 239, 208, 107, 401, 401, 238, 211, 401, 211, +- 212, 208, 228, 203, 215, 207, 233, 222, 212, 211, +- 203, 227, 401, 237, 225, 204, 185, 401, 401, 149, +- 128, 88, 42, 401, 401, 253, 259, 267, 271, 275, +- 281, 288, 292, 300, 308, 312, 318, 326, 334 ++ 0, 383, 34, 382, 65, 381, 37, 105, 387, 391, ++ 54, 111, 367, 110, 109, 109, 112, 41, 366, 104, ++ 367, 338, 124, 117, 0, 144, 391, 0, 121, 0, ++ 135, 155, 140, 179, 391, 160, 391, 379, 391, 0, ++ 368, 141, 391, 167, 370, 376, 346, 103, 342, 345, ++ 391, 391, 391, 391, 391, 358, 391, 391, 175, 342, ++ 338, 391, 355, 0, 185, 339, 184, 347, 346, 0, ++ 0, 322, 175, 357, 175, 363, 352, 324, 330, 323, ++ 332, 326, 201, 324, 329, 322, 391, 333, 181, 309, ++ 391, 341, 340, 313, 320, 338, 178, 311, 146, 317, ++ ++ 314, 315, 335, 331, 303, 300, 309, 299, 308, 188, ++ 336, 335, 391, 305, 320, 281, 283, 271, 203, 288, ++ 281, 271, 266, 264, 245, 242, 208, 104, 391, 391, ++ 244, 218, 204, 219, 206, 224, 201, 212, 204, 229, ++ 215, 208, 207, 200, 219, 391, 233, 221, 200, 181, ++ 391, 391, 149, 122, 86, 41, 391, 391, 245, 251, ++ 259, 263, 267, 273, 280, 284, 292, 300, 304, 310, ++ 318, 326 + } ; + +-static yyconst flex_int16_t yy_def[180] = ++static yyconst flex_int16_t yy_def[173] = + { 0, +- 165, 1, 1, 3, 165, 5, 1, 1, 165, 165, +- 165, 165, 165, 166, 167, 168, 165, 165, 165, 165, +- 169, 165, 165, 165, 170, 169, 165, 171, 172, 171, +- 171, 165, 165, 165, 165, 166, 165, 166, 165, 173, +- 165, 168, 165, 168, 174, 175, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 169, 165, 165, 165, +- 165, 165, 165, 169, 171, 172, 171, 165, 165, 165, +- 176, 173, 177, 168, 174, 174, 175, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 171, 165, 165, +- 176, 177, 165, 165, 165, 165, 165, 165, 165, 165, +- +- 165, 165, 165, 165, 171, 165, 165, 165, 165, 165, +- 165, 165, 165, 178, 165, 171, 165, 165, 165, 165, +- 165, 165, 165, 178, 165, 178, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 179, 165, 165, +- 165, 179, 165, 179, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 0, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165, 165 ++ 158, 1, 1, 3, 158, 5, 1, 1, 158, 158, ++ 158, 158, 158, 159, 160, 161, 158, 158, 158, 158, ++ 162, 158, 158, 158, 163, 162, 158, 164, 165, 164, ++ 164, 158, 158, 158, 158, 159, 158, 159, 158, 166, ++ 158, 161, 158, 161, 167, 168, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 162, 158, 158, 158, 158, ++ 158, 158, 162, 164, 165, 164, 158, 158, 158, 169, ++ 166, 170, 161, 167, 167, 168, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 164, 158, 158, 169, 170, ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ ++ 158, 164, 158, 158, 158, 158, 158, 158, 158, 171, ++ 158, 164, 158, 158, 158, 158, 158, 158, 171, 158, ++ 171, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 172, 158, 158, 158, 172, 158, 172, 158, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158, 0, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 158, 158 + } ; + +-static yyconst flex_int16_t yy_nxt[449] = ++static yyconst flex_int16_t yy_nxt[438] = + { 0, + 10, 11, 12, 11, 13, 14, 10, 15, 16, 10, + 10, 10, 17, 10, 10, 10, 10, 18, 19, 20, + 21, 21, 21, 21, 21, 10, 10, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, +- 21, 21, 21, 21, 10, 22, 10, 24, 25, 25, +- 25, 32, 33, 33, 164, 26, 34, 34, 34, 52, +- 53, 27, 26, 26, 26, 26, 10, 11, 12, 11, +- 13, 14, 28, 15, 16, 28, 28, 28, 24, 28, +- 28, 28, 10, 18, 19, 20, 29, 29, 29, 29, +- 29, 30, 10, 29, 29, 29, 29, 29, 29, 29, +- +- 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +- 10, 22, 10, 23, 34, 34, 34, 37, 39, 43, +- 32, 33, 33, 45, 55, 56, 46, 60, 43, 45, +- 65, 163, 46, 65, 65, 65, 44, 38, 60, 74, +- 58, 47, 141, 48, 142, 44, 49, 47, 50, 48, +- 76, 51, 62, 94, 50, 41, 44, 51, 37, 61, +- 64, 64, 64, 58, 34, 34, 34, 64, 162, 80, +- 67, 68, 68, 68, 64, 64, 64, 64, 38, 81, +- 69, 70, 71, 68, 68, 68, 60, 161, 43, 69, +- 70, 65, 69, 70, 65, 65, 65, 125, 85, 85, +- +- 85, 58, 68, 68, 68, 44, 102, 110, 125, 133, +- 102, 69, 70, 111, 114, 160, 159, 126, 85, 85, +- 85, 140, 140, 140, 140, 140, 140, 153, 126, 147, +- 147, 147, 153, 148, 147, 147, 147, 158, 148, 165, +- 157, 156, 155, 151, 150, 149, 146, 154, 145, 144, +- 143, 139, 154, 36, 36, 36, 36, 36, 36, 36, +- 36, 40, 138, 137, 136, 40, 40, 42, 42, 42, +- 42, 42, 42, 42, 42, 57, 57, 57, 57, 63, +- 135, 63, 65, 134, 165, 65, 133, 65, 65, 66, +- 132, 131, 66, 66, 66, 66, 72, 130, 72, 72, +- +- 75, 75, 75, 75, 75, 75, 75, 75, 77, 77, +- 77, 77, 77, 77, 77, 77, 91, 129, 91, 92, +- 128, 92, 92, 127, 92, 92, 124, 124, 124, 124, +- 124, 124, 124, 124, 152, 152, 152, 152, 152, 152, +- 152, 152, 60, 60, 123, 122, 121, 120, 119, 118, +- 117, 45, 116, 111, 115, 113, 112, 109, 108, 107, +- 46, 106, 93, 89, 105, 104, 103, 101, 100, 99, +- 98, 97, 96, 95, 78, 76, 93, 90, 89, 88, +- 58, 87, 86, 58, 84, 83, 82, 79, 78, 76, +- 73, 165, 59, 58, 54, 35, 165, 31, 23, 23, +- +- 9, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165 ++ 21, 21, 21, 10, 22, 10, 24, 25, 25, 25, ++ 32, 33, 33, 157, 26, 34, 34, 34, 51, 52, ++ 27, 26, 26, 26, 26, 10, 11, 12, 11, 13, ++ 14, 28, 15, 16, 28, 28, 28, 24, 28, 28, ++ 28, 10, 18, 19, 20, 29, 29, 29, 29, 29, ++ 30, 10, 29, 29, 29, 29, 29, 29, 29, 29, ++ ++ 29, 29, 29, 29, 29, 29, 29, 29, 10, 22, ++ 10, 23, 34, 34, 34, 37, 39, 43, 32, 33, ++ 33, 45, 54, 55, 46, 59, 45, 64, 156, 46, ++ 64, 64, 64, 79, 44, 38, 59, 57, 134, 47, ++ 135, 48, 80, 49, 47, 50, 48, 99, 61, 43, ++ 50, 110, 41, 67, 67, 67, 60, 63, 63, 63, ++ 57, 155, 68, 69, 63, 37, 44, 66, 67, 67, ++ 67, 63, 63, 63, 63, 73, 59, 68, 69, 70, ++ 34, 34, 34, 43, 75, 38, 154, 92, 83, 83, ++ 83, 64, 44, 120, 64, 64, 64, 67, 67, 67, ++ ++ 44, 57, 99, 68, 69, 107, 68, 69, 120, 127, ++ 108, 153, 152, 121, 83, 83, 83, 133, 133, 133, ++ 146, 133, 133, 133, 146, 140, 140, 140, 121, 141, ++ 140, 140, 140, 151, 141, 158, 150, 149, 148, 144, ++ 147, 143, 142, 139, 147, 36, 36, 36, 36, 36, ++ 36, 36, 36, 40, 138, 137, 136, 40, 40, 42, ++ 42, 42, 42, 42, 42, 42, 42, 56, 56, 56, ++ 56, 62, 132, 62, 64, 131, 130, 64, 129, 64, ++ 64, 65, 128, 158, 65, 65, 65, 65, 71, 127, ++ 71, 71, 74, 74, 74, 74, 74, 74, 74, 74, ++ ++ 76, 76, 76, 76, 76, 76, 76, 76, 89, 126, ++ 89, 90, 125, 90, 90, 124, 90, 90, 119, 119, ++ 119, 119, 119, 119, 119, 119, 145, 145, 145, 145, ++ 145, 145, 145, 145, 123, 122, 59, 59, 118, 117, ++ 116, 115, 114, 113, 45, 112, 108, 111, 109, 106, ++ 105, 104, 46, 103, 91, 87, 102, 101, 100, 98, ++ 97, 96, 95, 94, 93, 77, 75, 91, 88, 87, ++ 86, 57, 85, 84, 57, 82, 81, 78, 77, 75, ++ 72, 158, 58, 57, 53, 35, 158, 31, 23, 23, ++ 9, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158 + } ; + +-static yyconst flex_int16_t yy_chk[449] = ++static yyconst flex_int16_t yy_chk[438] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, +- 3, 7, 7, 7, 163, 3, 11, 11, 11, 18, +- 18, 3, 3, 3, 3, 3, 5, 5, 5, 5, ++ 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, ++ 7, 7, 7, 156, 3, 11, 11, 11, 18, 18, ++ 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, +- 5, 5, 5, 8, 12, 12, 12, 14, 15, 16, +- 8, 8, 8, 17, 20, 20, 17, 23, 42, 24, +- 29, 162, 24, 29, 29, 29, 16, 14, 31, 44, +- 29, 17, 134, 17, 134, 42, 17, 24, 17, 24, +- 76, 17, 24, 76, 24, 15, 44, 24, 36, 23, +- 26, 26, 26, 26, 34, 34, 34, 26, 161, 48, +- 31, 32, 32, 32, 26, 26, 26, 26, 36, 48, +- 32, 32, 32, 33, 33, 33, 60, 160, 74, 91, +- 91, 66, 33, 33, 66, 66, 66, 114, 60, 60, +- +- 60, 66, 68, 68, 68, 74, 85, 99, 124, 133, +- 102, 68, 68, 99, 102, 157, 156, 114, 85, 85, +- 85, 133, 133, 133, 140, 140, 140, 148, 124, 143, +- 143, 143, 152, 143, 147, 147, 147, 155, 147, 154, +- 151, 150, 149, 146, 145, 144, 142, 148, 141, 138, +- 137, 132, 152, 166, 166, 166, 166, 166, 166, 166, +- 166, 167, 131, 130, 129, 167, 167, 168, 168, 168, +- 168, 168, 168, 168, 168, 169, 169, 169, 169, 170, +- 128, 170, 171, 127, 126, 171, 125, 171, 171, 172, +- 123, 122, 172, 172, 172, 172, 173, 121, 173, 173, +- +- 174, 174, 174, 174, 174, 174, 174, 174, 175, 175, +- 175, 175, 175, 175, 175, 175, 176, 120, 176, 177, +- 119, 177, 177, 118, 177, 177, 178, 178, 178, 178, +- 178, 178, 178, 178, 179, 179, 179, 179, 179, 179, +- 179, 179, 116, 115, 113, 112, 111, 110, 109, 108, +- 107, 106, 105, 104, 103, 101, 100, 98, 97, 96, +- 95, 94, 92, 90, 88, 87, 86, 84, 83, 82, +- 81, 80, 79, 78, 77, 75, 73, 70, 69, 67, +- 64, 62, 61, 57, 51, 50, 49, 47, 46, 45, ++ 5, 8, 12, 12, 12, 14, 15, 16, 8, 8, ++ 8, 17, 20, 20, 17, 23, 24, 29, 155, 24, ++ 29, 29, 29, 48, 16, 14, 31, 29, 128, 17, ++ 128, 17, 48, 17, 24, 17, 24, 99, 24, 42, ++ 24, 99, 15, 33, 33, 33, 23, 26, 26, 26, ++ 26, 154, 33, 33, 26, 36, 42, 31, 32, 32, ++ 32, 26, 26, 26, 26, 44, 59, 32, 32, 32, ++ 34, 34, 34, 73, 75, 36, 153, 75, 59, 59, ++ 59, 65, 44, 110, 65, 65, 65, 67, 67, 67, ++ ++ 73, 65, 83, 89, 89, 97, 67, 67, 119, 127, ++ 97, 150, 149, 110, 83, 83, 83, 133, 133, 133, ++ 141, 127, 127, 127, 145, 136, 136, 136, 119, 136, ++ 140, 140, 140, 148, 140, 147, 144, 143, 142, 139, ++ 141, 138, 137, 135, 145, 159, 159, 159, 159, 159, ++ 159, 159, 159, 160, 134, 132, 131, 160, 160, 161, ++ 161, 161, 161, 161, 161, 161, 161, 162, 162, 162, ++ 162, 163, 126, 163, 164, 125, 124, 164, 123, 164, ++ 164, 165, 122, 121, 165, 165, 165, 165, 166, 120, ++ 166, 166, 167, 167, 167, 167, 167, 167, 167, 167, ++ ++ 168, 168, 168, 168, 168, 168, 168, 168, 169, 118, ++ 169, 170, 117, 170, 170, 116, 170, 170, 171, 171, ++ 171, 171, 171, 171, 171, 171, 172, 172, 172, 172, ++ 172, 172, 172, 172, 115, 114, 112, 111, 109, 108, ++ 107, 106, 105, 104, 103, 102, 101, 100, 98, 96, ++ 95, 94, 93, 92, 90, 88, 86, 85, 84, 82, ++ 81, 80, 79, 78, 77, 76, 74, 72, 69, 68, ++ 66, 63, 61, 60, 56, 50, 49, 47, 46, 45, + 41, 38, 22, 21, 19, 13, 9, 6, 4, 2, ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + +- 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165 ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158 + } ; + + static yy_state_type yy_last_accepting_state; +@@ -664,7 +662,7 @@ static int dts_version = 1; + static void push_input_file(const char *filename); + static bool pop_input_file(void); + static void lexical_error(const char *fmt, ...); +-#line 668 "dtc-lexer.lex.c" ++#line 666 "dtc-lexer.lex.c" + + #define INITIAL 0 + #define BYTESTRING 1 +@@ -706,7 +704,7 @@ FILE *yyget_out (void ); + + void yyset_out (FILE * out_str ); + +-int yyget_leng (void ); ++yy_size_t yyget_leng (void ); + + char *yyget_text (void ); + +@@ -855,10 +853,6 @@ YY_DECL + register char *yy_cp, *yy_bp; + register int yy_act; + +-#line 68 "dtc-lexer.l" +- +-#line 861 "dtc-lexer.lex.c" +- + if ( !(yy_init) ) + { + (yy_init) = 1; +@@ -885,6 +879,11 @@ YY_DECL + yy_load_buffer_state( ); + } + ++ { ++#line 68 "dtc-lexer.l" ++ ++#line 886 "dtc-lexer.lex.c" ++ + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); +@@ -902,7 +901,7 @@ YY_DECL + yy_match: + do + { +- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; ++ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; +@@ -911,13 +910,13 @@ yy_match: + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 166 ) ++ if ( yy_current_state >= 159 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } +- while ( yy_current_state != 165 ); ++ while ( yy_current_state != 158 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + +@@ -1008,31 +1007,23 @@ case 5: + YY_RULE_SETUP + #line 116 "dtc-lexer.l" + { +- DPRINT("Keyword: /plugin/\n"); +- return DT_PLUGIN; +- } +- YY_BREAK +-case 6: +-YY_RULE_SETUP +-#line 121 "dtc-lexer.l" +-{ + DPRINT("Keyword: /memreserve/\n"); + BEGIN_DEFAULT(); + return DT_MEMRESERVE; + } + YY_BREAK +-case 7: ++case 6: + YY_RULE_SETUP +-#line 127 "dtc-lexer.l" ++#line 122 "dtc-lexer.l" + { + DPRINT("Keyword: /bits/\n"); + BEGIN_DEFAULT(); + return DT_BITS; + } + YY_BREAK +-case 8: ++case 7: + YY_RULE_SETUP +-#line 133 "dtc-lexer.l" ++#line 128 "dtc-lexer.l" + { + DPRINT("Keyword: /delete-property/\n"); + DPRINT("\n"); +@@ -1040,9 +1031,9 @@ YY_RULE_SETUP + return DT_DEL_PROP; + } + YY_BREAK +-case 9: ++case 8: + YY_RULE_SETUP +-#line 140 "dtc-lexer.l" ++#line 135 "dtc-lexer.l" + { + DPRINT("Keyword: /delete-node/\n"); + DPRINT("\n"); +@@ -1050,9 +1041,9 @@ YY_RULE_SETUP + return DT_DEL_NODE; + } + YY_BREAK +-case 10: ++case 9: + YY_RULE_SETUP +-#line 147 "dtc-lexer.l" ++#line 142 "dtc-lexer.l" + { + DPRINT("Label: %s\n", yytext); + yylval.labelref = xstrdup(yytext); +@@ -1060,9 +1051,9 @@ YY_RULE_SETUP + return DT_LABEL; + } + YY_BREAK +-case 11: ++case 10: + YY_RULE_SETUP +-#line 154 "dtc-lexer.l" ++#line 149 "dtc-lexer.l" + { + char *e; + DPRINT("Integer Literal: '%s'\n", yytext); +@@ -1082,10 +1073,10 @@ YY_RULE_SETUP + return DT_LITERAL; + } + YY_BREAK +-case 12: +-/* rule 12 can match eol */ ++case 11: ++/* rule 11 can match eol */ + YY_RULE_SETUP +-#line 173 "dtc-lexer.l" ++#line 168 "dtc-lexer.l" + { + struct data d; + DPRINT("Character literal: %s\n", yytext); +@@ -1107,18 +1098,18 @@ YY_RULE_SETUP + return DT_CHAR_LITERAL; + } + YY_BREAK +-case 13: ++case 12: + YY_RULE_SETUP +-#line 194 "dtc-lexer.l" ++#line 189 "dtc-lexer.l" + { /* label reference */ + DPRINT("Ref: %s\n", yytext+1); + yylval.labelref = xstrdup(yytext+1); + return DT_REF; + } + YY_BREAK +-case 14: ++case 13: + YY_RULE_SETUP +-#line 200 "dtc-lexer.l" ++#line 195 "dtc-lexer.l" + { /* new-style path reference */ + yytext[yyleng-1] = '\0'; + DPRINT("Ref: %s\n", yytext+2); +@@ -1126,27 +1117,27 @@ YY_RULE_SETUP + return DT_REF; + } + YY_BREAK +-case 15: ++case 14: + YY_RULE_SETUP +-#line 207 "dtc-lexer.l" ++#line 202 "dtc-lexer.l" + { + yylval.byte = strtol(yytext, NULL, 16); + DPRINT("Byte: %02x\n", (int)yylval.byte); + return DT_BYTE; + } + YY_BREAK +-case 16: ++case 15: + YY_RULE_SETUP +-#line 213 "dtc-lexer.l" ++#line 208 "dtc-lexer.l" + { + DPRINT("/BYTESTRING\n"); + BEGIN_DEFAULT(); + return ']'; + } + YY_BREAK +-case 17: ++case 16: + YY_RULE_SETUP +-#line 219 "dtc-lexer.l" ++#line 214 "dtc-lexer.l" + { + DPRINT("PropNodeName: %s\n", yytext); + yylval.propnodename = xstrdup((yytext[0] == '\\') ? +@@ -1155,75 +1146,75 @@ YY_RULE_SETUP + return DT_PROPNODENAME; + } + YY_BREAK +-case 18: ++case 17: + YY_RULE_SETUP +-#line 227 "dtc-lexer.l" ++#line 222 "dtc-lexer.l" + { + DPRINT("Binary Include\n"); + return DT_INCBIN; + } + YY_BREAK +-case 19: +-/* rule 19 can match eol */ ++case 18: ++/* rule 18 can match eol */ + YY_RULE_SETUP +-#line 232 "dtc-lexer.l" ++#line 227 "dtc-lexer.l" + /* eat whitespace */ + YY_BREAK +-case 20: +-/* rule 20 can match eol */ ++case 19: ++/* rule 19 can match eol */ + YY_RULE_SETUP +-#line 233 "dtc-lexer.l" ++#line 228 "dtc-lexer.l" + /* eat C-style comments */ + YY_BREAK +-case 21: +-/* rule 21 can match eol */ ++case 20: ++/* rule 20 can match eol */ + YY_RULE_SETUP +-#line 234 "dtc-lexer.l" ++#line 229 "dtc-lexer.l" + /* eat C++-style comments */ + YY_BREAK +-case 22: ++case 21: + YY_RULE_SETUP +-#line 236 "dtc-lexer.l" ++#line 231 "dtc-lexer.l" + { return DT_LSHIFT; }; + YY_BREAK +-case 23: ++case 22: + YY_RULE_SETUP +-#line 237 "dtc-lexer.l" ++#line 232 "dtc-lexer.l" + { return DT_RSHIFT; }; + YY_BREAK +-case 24: ++case 23: + YY_RULE_SETUP +-#line 238 "dtc-lexer.l" ++#line 233 "dtc-lexer.l" + { return DT_LE; }; + YY_BREAK +-case 25: ++case 24: + YY_RULE_SETUP +-#line 239 "dtc-lexer.l" ++#line 234 "dtc-lexer.l" + { return DT_GE; }; + YY_BREAK +-case 26: ++case 25: + YY_RULE_SETUP +-#line 240 "dtc-lexer.l" ++#line 235 "dtc-lexer.l" + { return DT_EQ; }; + YY_BREAK +-case 27: ++case 26: + YY_RULE_SETUP +-#line 241 "dtc-lexer.l" ++#line 236 "dtc-lexer.l" + { return DT_NE; }; + YY_BREAK +-case 28: ++case 27: + YY_RULE_SETUP +-#line 242 "dtc-lexer.l" ++#line 237 "dtc-lexer.l" + { return DT_AND; }; + YY_BREAK +-case 29: ++case 28: + YY_RULE_SETUP +-#line 243 "dtc-lexer.l" ++#line 238 "dtc-lexer.l" + { return DT_OR; }; + YY_BREAK +-case 30: ++case 29: + YY_RULE_SETUP +-#line 245 "dtc-lexer.l" ++#line 240 "dtc-lexer.l" + { + DPRINT("Char: %c (\\x%02x)\n", yytext[0], + (unsigned)yytext[0]); +@@ -1239,12 +1230,12 @@ YY_RULE_SETUP + return yytext[0]; + } + YY_BREAK +-case 31: ++case 30: + YY_RULE_SETUP +-#line 260 "dtc-lexer.l" ++#line 255 "dtc-lexer.l" + ECHO; + YY_BREAK +-#line 1248 "dtc-lexer.lex.c" ++#line 1239 "dtc-lexer.lex.c" + + case YY_END_OF_BUFFER: + { +@@ -1374,6 +1365,7 @@ ECHO; + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ ++ } /* end of user's declarations */ + } /* end of yylex */ + + /* yy_get_next_buffer - try to read in a new buffer +@@ -1429,21 +1421,21 @@ static int yy_get_next_buffer (void) + + else + { +- int num_to_read = ++ yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ +- YY_BUFFER_STATE b = YY_CURRENT_BUFFER; ++ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { +- int new_size = b->yy_buf_size * 2; ++ yy_size_t new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; +@@ -1474,7 +1466,7 @@ static int yy_get_next_buffer (void) + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), +- (yy_n_chars), (size_t) num_to_read ); ++ (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } +@@ -1536,7 +1528,7 @@ static int yy_get_next_buffer (void) + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 166 ) ++ if ( yy_current_state >= 159 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +@@ -1564,13 +1556,13 @@ static int yy_get_next_buffer (void) + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 166 ) ++ if ( yy_current_state >= 159 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- yy_is_jam = (yy_current_state == 165); ++ yy_is_jam = (yy_current_state == 158); + +- return yy_is_jam ? 0 : yy_current_state; ++ return yy_is_jam ? 0 : yy_current_state; + } + + #ifndef YY_NO_INPUT +@@ -1597,7 +1589,7 @@ static int yy_get_next_buffer (void) + + else + { /* need more input */ +- int offset = (yy_c_buf_p) - (yytext_ptr); ++ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) +@@ -1871,7 +1863,7 @@ void yypop_buffer_state (void) + */ + static void yyensure_buffer_stack (void) + { +- int num_to_alloc; ++ yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + +@@ -1968,12 +1960,12 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) + * + * @return the newly allocated buffer state object. + */ +-YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) ++YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; +- int i; ++ yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; +@@ -2055,7 +2047,7 @@ FILE *yyget_out (void) + /** Get the length of the current token. + * + */ +-int yyget_leng (void) ++yy_size_t yyget_leng (void) + { + return yyleng; + } +@@ -2203,7 +2195,7 @@ void yyfree (void * ptr ) + + #define YYTABLES_NAME "yytables" + +-#line 260 "dtc-lexer.l" ++#line 254 "dtc-lexer.l" + + + +diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped +index 2c1784e..116458c 100644 +--- a/scripts/dtc/dtc-parser.tab.c_shipped ++++ b/scripts/dtc/dtc-parser.tab.c_shipped +@@ -1,19 +1,19 @@ +-/* A Bison parser, made by GNU Bison 2.5. */ ++/* A Bison parser, made by GNU Bison 3.0.2. */ + + /* Bison implementation for Yacc-like parsers in C +- +- Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. +- ++ ++ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. ++ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. +- ++ + 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. +- ++ + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +@@ -26,7 +26,7 @@ + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. +- ++ + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +@@ -44,7 +44,7 @@ + #define YYBISON 1 + + /* Bison version. */ +-#define YYBISON_VERSION "2.5" ++#define YYBISON_VERSION "3.0.2" + + /* Skeleton name. */ + #define YYSKELETON_NAME "yacc.c" +@@ -58,18 +58,13 @@ + /* Pull parsers. */ + #define YYPULL 1 + +-/* Using locations. */ +-#define YYLSP_NEEDED 1 + + + + /* Copy the first part of user declarations. */ +- +-/* Line 268 of yacc.c */ +-#line 20 "dtc-parser.y" ++#line 20 "dtc-parser.y" /* yacc.c:339 */ + + #include +-#include + + #include "dtc.h" + #include "srcpos.h" +@@ -85,14 +80,15 @@ extern void yyerror(char const *s); + extern struct boot_info *the_boot_info; + extern bool treesource_error; + ++#line 84 "dtc-parser.tab.c" /* yacc.c:339 */ + +-/* Line 268 of yacc.c */ +-#line 91 "dtc-parser.tab.c" +- +-/* Enabling traces. */ +-#ifndef YYDEBUG +-# define YYDEBUG 0 +-#endif ++# ifndef YY_NULLPTR ++# if defined __cplusplus && 201103L <= __cplusplus ++# define YY_NULLPTR nullptr ++# else ++# define YY_NULLPTR 0 ++# endif ++# endif + + /* Enabling verbose error messages. */ + #ifdef YYERROR_VERBOSE +@@ -102,51 +98,53 @@ extern bool treesource_error; + # define YYERROR_VERBOSE 0 + #endif + +-/* Enabling the token table. */ +-#ifndef YYTOKEN_TABLE +-# define YYTOKEN_TABLE 0 ++/* In a future release of Bison, this section will be replaced ++ by #include "dtc-parser.tab.h". */ ++#ifndef YY_YY_DTC_PARSER_TAB_H_INCLUDED ++# define YY_YY_DTC_PARSER_TAB_H_INCLUDED ++/* Debug traces. */ ++#ifndef YYDEBUG ++# define YYDEBUG 0 ++#endif ++#if YYDEBUG ++extern int yydebug; + #endif + +- +-/* Tokens. */ ++/* Token type. */ + #ifndef YYTOKENTYPE + # define YYTOKENTYPE +- /* Put the tokens into the symbol table, so that GDB and other debuggers +- know about them. */ +- enum yytokentype { +- DT_V1 = 258, +- DT_PLUGIN = 259, +- DT_MEMRESERVE = 260, +- DT_LSHIFT = 261, +- DT_RSHIFT = 262, +- DT_LE = 263, +- DT_GE = 264, +- DT_EQ = 265, +- DT_NE = 266, +- DT_AND = 267, +- DT_OR = 268, +- DT_BITS = 269, +- DT_DEL_PROP = 270, +- DT_DEL_NODE = 271, +- DT_PROPNODENAME = 272, +- DT_LITERAL = 273, +- DT_CHAR_LITERAL = 274, +- DT_BYTE = 275, +- DT_STRING = 276, +- DT_LABEL = 277, +- DT_REF = 278, +- DT_INCBIN = 279 +- }; ++ enum yytokentype ++ { ++ DT_V1 = 258, ++ DT_MEMRESERVE = 259, ++ DT_LSHIFT = 260, ++ DT_RSHIFT = 261, ++ DT_LE = 262, ++ DT_GE = 263, ++ DT_EQ = 264, ++ DT_NE = 265, ++ DT_AND = 266, ++ DT_OR = 267, ++ DT_BITS = 268, ++ DT_DEL_PROP = 269, ++ DT_DEL_NODE = 270, ++ DT_PROPNODENAME = 271, ++ DT_LITERAL = 272, ++ DT_CHAR_LITERAL = 273, ++ DT_BYTE = 274, ++ DT_STRING = 275, ++ DT_LABEL = 276, ++ DT_REF = 277, ++ DT_INCBIN = 278 ++ }; + #endif + +- +- ++/* Value type. */ + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +-typedef union YYSTYPE ++typedef union YYSTYPE YYSTYPE; ++union YYSTYPE + { +- +-/* Line 293 of yacc.c */ +-#line 39 "dtc-parser.y" ++#line 38 "dtc-parser.y" /* yacc.c:355 */ + + char *propnodename; + char *labelref; +@@ -164,37 +162,37 @@ typedef union YYSTYPE + struct node *nodelist; + struct reserve_info *re; + uint64_t integer; +- int is_plugin; + +- +- +-/* Line 293 of yacc.c */ +-#line 173 "dtc-parser.tab.c" +-} YYSTYPE; ++#line 167 "dtc-parser.tab.c" /* yacc.c:355 */ ++}; + # define YYSTYPE_IS_TRIVIAL 1 +-# define yystype YYSTYPE /* obsolescent; will be withdrawn */ + # define YYSTYPE_IS_DECLARED 1 + #endif + ++/* Location type. */ + #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +-typedef struct YYLTYPE ++typedef struct YYLTYPE YYLTYPE; ++struct YYLTYPE + { + int first_line; + int first_column; + int last_line; + int last_column; +-} YYLTYPE; +-# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ ++}; + # define YYLTYPE_IS_DECLARED 1 + # define YYLTYPE_IS_TRIVIAL 1 + #endif + + +-/* Copy the second part of user declarations. */ ++extern YYSTYPE yylval; ++extern YYLTYPE yylloc; ++int yyparse (void); + ++#endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED */ + +-/* Line 343 of yacc.c */ +-#line 198 "dtc-parser.tab.c" ++/* Copy the second part of user declarations. */ ++ ++#line 196 "dtc-parser.tab.c" /* yacc.c:358 */ + + #ifdef short + # undef short +@@ -208,11 +206,8 @@ typedef unsigned char yytype_uint8; + + #ifdef YYTYPE_INT8 + typedef YYTYPE_INT8 yytype_int8; +-#elif (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) +-typedef signed char yytype_int8; + #else +-typedef short int yytype_int8; ++typedef signed char yytype_int8; + #endif + + #ifdef YYTYPE_UINT16 +@@ -232,8 +227,7 @@ typedef short int yytype_int16; + # define YYSIZE_T __SIZE_TYPE__ + # elif defined size_t + # define YYSIZE_T size_t +-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) ++# elif ! defined YYSIZE_T + # include /* INFRINGES ON USER NAME SPACE */ + # define YYSIZE_T size_t + # else +@@ -247,38 +241,67 @@ typedef short int yytype_int16; + # if defined YYENABLE_NLS && YYENABLE_NLS + # if ENABLE_NLS + # include /* INFRINGES ON USER NAME SPACE */ +-# define YY_(msgid) dgettext ("bison-runtime", msgid) ++# define YY_(Msgid) dgettext ("bison-runtime", Msgid) + # endif + # endif + # ifndef YY_ +-# define YY_(msgid) msgid ++# define YY_(Msgid) Msgid ++# endif ++#endif ++ ++#ifndef YY_ATTRIBUTE ++# if (defined __GNUC__ \ ++ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ ++ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C ++# define YY_ATTRIBUTE(Spec) __attribute__(Spec) ++# else ++# define YY_ATTRIBUTE(Spec) /* empty */ ++# endif ++#endif ++ ++#ifndef YY_ATTRIBUTE_PURE ++# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) ++#endif ++ ++#ifndef YY_ATTRIBUTE_UNUSED ++# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) ++#endif ++ ++#if !defined _Noreturn \ ++ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) ++# if defined _MSC_VER && 1200 <= _MSC_VER ++# define _Noreturn __declspec (noreturn) ++# else ++# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) + # endif + #endif + + /* Suppress unused-variable warnings by "using" E. */ + #if ! defined lint || defined __GNUC__ +-# define YYUSE(e) ((void) (e)) ++# define YYUSE(E) ((void) (E)) + #else +-# define YYUSE(e) /* empty */ ++# define YYUSE(E) /* empty */ + #endif + +-/* Identity function, used to suppress warnings about constant conditions. */ +-#ifndef lint +-# define YYID(n) (n) +-#else +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) +-static int +-YYID (int yyi) ++#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ ++/* Suppress an incorrect diagnostic about yylval being uninitialized. */ ++# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ ++ _Pragma ("GCC diagnostic push") \ ++ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ ++ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") ++# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ ++ _Pragma ("GCC diagnostic pop") + #else +-static int +-YYID (yyi) +- int yyi; ++# define YY_INITIAL_VALUE(Value) Value + #endif +-{ +- return yyi; +-} ++#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN ++# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN ++# define YY_IGNORE_MAYBE_UNINITIALIZED_END + #endif ++#ifndef YY_INITIAL_VALUE ++# define YY_INITIAL_VALUE(Value) /* Nothing. */ ++#endif ++ + + #if ! defined yyoverflow || YYERROR_VERBOSE + +@@ -297,9 +320,9 @@ YYID (yyi) + # define alloca _alloca + # else + # define YYSTACK_ALLOC alloca +-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) ++# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS + # include /* INFRINGES ON USER NAME SPACE */ ++ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ + # ifndef EXIT_SUCCESS + # define EXIT_SUCCESS 0 + # endif +@@ -309,8 +332,8 @@ YYID (yyi) + # endif + + # ifdef YYSTACK_ALLOC +- /* Pacify GCC's `empty if-body' warning. */ +-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) ++ /* Pacify GCC's 'empty if-body' warning. */ ++# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) + # ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely +@@ -326,7 +349,7 @@ YYID (yyi) + # endif + # if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ +- && (defined YYFREE || defined free))) ++ && (defined YYFREE || defined free))) + # include /* INFRINGES ON USER NAME SPACE */ + # ifndef EXIT_SUCCESS + # define EXIT_SUCCESS 0 +@@ -334,15 +357,13 @@ YYID (yyi) + # endif + # ifndef YYMALLOC + # define YYMALLOC malloc +-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) ++# if ! defined malloc && ! defined EXIT_SUCCESS + void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ + # endif + # endif + # ifndef YYFREE + # define YYFREE free +-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) ++# if ! defined free && ! defined EXIT_SUCCESS + void free (void *); /* INFRINGES ON USER NAME SPACE */ + # endif + # endif +@@ -352,8 +373,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ + + #if (! defined yyoverflow \ + && (! defined __cplusplus \ +- || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ +- && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) ++ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ ++ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + + /* A type that is properly aligned for any stack member. */ + union yyalloc +@@ -379,35 +400,35 @@ union yyalloc + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ +- do \ +- { \ +- YYSIZE_T yynewbytes; \ +- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ +- Stack = &yyptr->Stack_alloc; \ +- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ +- yyptr += yynewbytes / sizeof (*yyptr); \ +- } \ +- while (YYID (0)) ++# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ ++ do \ ++ { \ ++ YYSIZE_T yynewbytes; \ ++ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ ++ Stack = &yyptr->Stack_alloc; \ ++ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ ++ yyptr += yynewbytes / sizeof (*yyptr); \ ++ } \ ++ while (0) + + #endif + + #if defined YYCOPY_NEEDED && YYCOPY_NEEDED +-/* Copy COUNT objects from FROM to TO. The source and destination do ++/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ + # ifndef YYCOPY + # if defined __GNUC__ && 1 < __GNUC__ +-# define YYCOPY(To, From, Count) \ +- __builtin_memcpy (To, From, (Count) * sizeof (*(From))) ++# define YYCOPY(Dst, Src, Count) \ ++ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) + # else +-# define YYCOPY(To, From, Count) \ +- do \ +- { \ +- YYSIZE_T yyi; \ +- for (yyi = 0; yyi < (Count); yyi++) \ +- (To)[yyi] = (From)[yyi]; \ +- } \ +- while (YYID (0)) ++# define YYCOPY(Dst, Src, Count) \ ++ do \ ++ { \ ++ YYSIZE_T yyi; \ ++ for (yyi = 0; yyi < (Count); yyi++) \ ++ (Dst)[yyi] = (Src)[yyi]; \ ++ } \ ++ while (0) + # endif + # endif + #endif /* !YYCOPY_NEEDED */ +@@ -418,37 +439,39 @@ union yyalloc + #define YYLAST 136 + + /* YYNTOKENS -- Number of terminals. */ +-#define YYNTOKENS 48 ++#define YYNTOKENS 47 + /* YYNNTS -- Number of nonterminals. */ +-#define YYNNTS 29 ++#define YYNNTS 28 + /* YYNRULES -- Number of rules. */ +-#define YYNRULES 82 +-/* YYNRULES -- Number of states. */ +-#define YYNSTATES 147 ++#define YYNRULES 80 ++/* YYNSTATES -- Number of states. */ ++#define YYNSTATES 144 + +-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ ++/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned ++ by yylex, with out-of-bounds checking. */ + #define YYUNDEFTOK 2 +-#define YYMAXUTOK 279 ++#define YYMAXUTOK 278 + +-#define YYTRANSLATE(YYX) \ ++#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ ++/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM ++ as returned by yylex, without out-of-bounds checking. */ + static const yytype_uint8 yytranslate[] = + { + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 47, 2, 2, 2, 45, 41, 2, +- 33, 35, 44, 42, 34, 43, 2, 26, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 38, 25, +- 36, 29, 30, 37, 2, 2, 2, 2, 2, 2, ++ 2, 2, 2, 46, 2, 2, 2, 44, 40, 2, ++ 32, 34, 43, 41, 33, 42, 2, 25, 2, 2, ++ 2, 2, 2, 2, 2, 2, 2, 2, 37, 24, ++ 35, 28, 29, 36, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 31, 2, 32, 40, 2, 2, 2, 2, 2, ++ 2, 30, 2, 31, 39, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 27, 39, 28, 46, 2, 2, 2, ++ 2, 2, 2, 26, 38, 27, 45, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +@@ -463,335 +486,292 @@ static const yytype_uint8 yytranslate[] = + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, +- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 ++ 15, 16, 17, 18, 19, 20, 21, 22, 23 + }; + + #if YYDEBUG +-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in +- YYRHS. */ +-static const yytype_uint16 yyprhs[] = +-{ +- 0, 0, 3, 9, 10, 13, 14, 17, 22, 25, +- 28, 32, 37, 41, 46, 52, 53, 56, 61, 64, +- 68, 71, 74, 78, 83, 86, 96, 102, 105, 106, +- 109, 112, 116, 118, 121, 124, 127, 129, 131, 135, +- 137, 139, 145, 147, 151, 153, 157, 159, 163, 165, +- 169, 171, 175, 177, 181, 185, 187, 191, 195, 199, +- 203, 207, 211, 213, 217, 221, 223, 227, 231, 235, +- 237, 239, 242, 245, 248, 249, 252, 255, 256, 259, +- 262, 265, 269 +-}; +- +-/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +-static const yytype_int8 yyrhs[] = +-{ +- 49, 0, -1, 3, 25, 50, 51, 53, -1, -1, +- 4, 25, -1, -1, 52, 51, -1, 5, 60, 60, +- 25, -1, 22, 52, -1, 26, 54, -1, 53, 26, +- 54, -1, 53, 22, 23, 54, -1, 53, 23, 54, +- -1, 53, 16, 23, 25, -1, 27, 55, 75, 28, +- 25, -1, -1, 55, 56, -1, 17, 29, 57, 25, +- -1, 17, 25, -1, 15, 17, 25, -1, 22, 56, +- -1, 58, 21, -1, 58, 59, 30, -1, 58, 31, +- 74, 32, -1, 58, 23, -1, 58, 24, 33, 21, +- 34, 60, 34, 60, 35, -1, 58, 24, 33, 21, +- 35, -1, 57, 22, -1, -1, 57, 34, -1, 58, +- 22, -1, 14, 18, 36, -1, 36, -1, 59, 60, +- -1, 59, 23, -1, 59, 22, -1, 18, -1, 19, +- -1, 33, 61, 35, -1, 62, -1, 63, -1, 63, +- 37, 61, 38, 62, -1, 64, -1, 63, 13, 64, +- -1, 65, -1, 64, 12, 65, -1, 66, -1, 65, +- 39, 66, -1, 67, -1, 66, 40, 67, -1, 68, +- -1, 67, 41, 68, -1, 69, -1, 68, 10, 69, +- -1, 68, 11, 69, -1, 70, -1, 69, 36, 70, +- -1, 69, 30, 70, -1, 69, 8, 70, -1, 69, +- 9, 70, -1, 70, 6, 71, -1, 70, 7, 71, +- -1, 71, -1, 71, 42, 72, -1, 71, 43, 72, +- -1, 72, -1, 72, 44, 73, -1, 72, 26, 73, +- -1, 72, 45, 73, -1, 73, -1, 60, -1, 43, +- 73, -1, 46, 73, -1, 47, 73, -1, -1, 74, +- 20, -1, 74, 22, -1, -1, 76, 75, -1, 76, +- 56, -1, 17, 54, -1, 16, 17, 25, -1, 22, +- 76, -1 +-}; +- +-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ ++ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ + static const yytype_uint16 yyrline[] = + { +- 0, 108, 108, 119, 122, 130, 133, 140, 144, 152, +- 156, 161, 172, 182, 197, 205, 208, 215, 219, 223, +- 227, 235, 239, 243, 247, 251, 267, 277, 285, 288, +- 292, 299, 315, 320, 339, 353, 360, 361, 362, 369, +- 373, 374, 378, 379, 383, 384, 388, 389, 393, 394, +- 398, 399, 403, 404, 405, 409, 410, 411, 412, 413, +- 417, 418, 419, 423, 424, 425, 429, 430, 431, 432, +- 436, 437, 438, 439, 444, 447, 451, 459, 462, 466, +- 474, 478, 482 ++ 0, 104, 104, 113, 116, 123, 127, 135, 139, 144, ++ 155, 165, 180, 188, 191, 198, 202, 206, 210, 218, ++ 222, 226, 230, 234, 250, 260, 268, 271, 275, 282, ++ 298, 303, 322, 336, 343, 344, 345, 352, 356, 357, ++ 361, 362, 366, 367, 371, 372, 376, 377, 381, 382, ++ 386, 387, 388, 392, 393, 394, 395, 396, 400, 401, ++ 402, 406, 407, 408, 412, 413, 414, 415, 419, 420, ++ 421, 422, 427, 430, 434, 442, 445, 449, 457, 461, ++ 465 + }; + #endif + +-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE ++#if YYDEBUG || YYERROR_VERBOSE || 0 + /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ + static const char *const yytname[] = + { +- "$end", "error", "$undefined", "DT_V1", "DT_PLUGIN", "DT_MEMRESERVE", +- "DT_LSHIFT", "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND", +- "DT_OR", "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME", +- "DT_LITERAL", "DT_CHAR_LITERAL", "DT_BYTE", "DT_STRING", "DT_LABEL", +- "DT_REF", "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['", +- "']'", "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'", +- "'+'", "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile", +- "plugindecl", "memreserves", "memreserve", "devicetree", "nodedef", +- "proplist", "propdef", "propdata", "propdataprefix", "arrayprefix", +- "integer_prim", "integer_expr", "integer_trinary", "integer_or", +- "integer_and", "integer_bitor", "integer_bitxor", "integer_bitand", +- "integer_eq", "integer_rela", "integer_shift", "integer_add", +- "integer_mul", "integer_unary", "bytestring", "subnodes", "subnode", 0 ++ "$end", "error", "$undefined", "DT_V1", "DT_MEMRESERVE", "DT_LSHIFT", ++ "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND", "DT_OR", ++ "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME", "DT_LITERAL", ++ "DT_CHAR_LITERAL", "DT_BYTE", "DT_STRING", "DT_LABEL", "DT_REF", ++ "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['", "']'", ++ "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'", "'+'", ++ "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile", ++ "memreserves", "memreserve", "devicetree", "nodedef", "proplist", ++ "propdef", "propdata", "propdataprefix", "arrayprefix", "integer_prim", ++ "integer_expr", "integer_trinary", "integer_or", "integer_and", ++ "integer_bitor", "integer_bitxor", "integer_bitand", "integer_eq", ++ "integer_rela", "integer_shift", "integer_add", "integer_mul", ++ "integer_unary", "bytestring", "subnodes", "subnode", YY_NULLPTR + }; + #endif + + # ifdef YYPRINT +-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to +- token YYLEX-NUM. */ ++/* YYTOKNUM[NUM] -- (External) token number corresponding to the ++ (internal) symbol number NUM (which must be that of a token). */ + static const yytype_uint16 yytoknum[] = + { + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, +- 275, 276, 277, 278, 279, 59, 47, 123, 125, 61, +- 62, 91, 93, 40, 44, 41, 60, 63, 58, 124, +- 94, 38, 43, 45, 42, 37, 126, 33 ++ 275, 276, 277, 278, 59, 47, 123, 125, 61, 62, ++ 91, 93, 40, 44, 41, 60, 63, 58, 124, 94, ++ 38, 43, 45, 42, 37, 126, 33 + }; + # endif + +-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +-static const yytype_uint8 yyr1[] = +-{ +- 0, 48, 49, 50, 50, 51, 51, 52, 52, 53, +- 53, 53, 53, 53, 54, 55, 55, 56, 56, 56, +- 56, 57, 57, 57, 57, 57, 57, 57, 58, 58, +- 58, 59, 59, 59, 59, 59, 60, 60, 60, 61, +- 62, 62, 63, 63, 64, 64, 65, 65, 66, 66, +- 67, 67, 68, 68, 68, 69, 69, 69, 69, 69, +- 70, 70, 70, 71, 71, 71, 72, 72, 72, 72, +- 73, 73, 73, 73, 74, 74, 74, 75, 75, 75, +- 76, 76, 76 +-}; ++#define YYPACT_NINF -81 + +-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +-static const yytype_uint8 yyr2[] = ++#define yypact_value_is_default(Yystate) \ ++ (!!((Yystate) == (-81))) ++ ++#define YYTABLE_NINF -1 ++ ++#define yytable_value_is_error(Yytable_value) \ ++ 0 ++ ++ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing ++ STATE-NUM. */ ++static const yytype_int8 yypact[] = + { +- 0, 2, 5, 0, 2, 0, 2, 4, 2, 2, +- 3, 4, 3, 4, 5, 0, 2, 4, 2, 3, +- 2, 2, 3, 4, 2, 9, 5, 2, 0, 2, +- 2, 3, 1, 2, 2, 2, 1, 1, 3, 1, +- 1, 5, 1, 3, 1, 3, 1, 3, 1, 3, +- 1, 3, 1, 3, 3, 1, 3, 3, 3, 3, +- 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, +- 1, 2, 2, 2, 0, 2, 2, 0, 2, 2, +- 2, 3, 2 ++ 16, -11, 21, 10, -81, 25, 10, 19, 10, -81, ++ -81, -9, 25, -81, 2, 51, -81, -9, -9, -9, ++ -81, 1, -81, -6, 50, 14, 28, 29, 36, 3, ++ 58, 44, -3, -81, 47, -81, -81, 65, 68, 2, ++ 2, -81, -81, -81, -81, -9, -9, -9, -9, -9, ++ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, ++ -9, -9, -9, -9, -81, 63, 69, 2, -81, -81, ++ 50, 57, 14, 28, 29, 36, 3, 3, 58, 58, ++ 58, 58, 44, 44, -3, -3, -81, -81, -81, 79, ++ 80, -8, 63, -81, 72, 63, -81, -81, -9, 76, ++ 77, -81, -81, -81, -81, -81, 78, -81, -81, -81, ++ -81, -81, 35, 4, -81, -81, -81, -81, 86, -81, ++ -81, -81, 73, -81, -81, 33, 71, 84, 39, -81, ++ -81, -81, -81, -81, 41, -81, -81, -81, 25, -81, ++ 74, 25, 75, -81 + }; + +-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. +- Performed when YYTABLE doesn't specify something else to do. Zero +- means the default is an error. */ ++ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. ++ Performed when YYTABLE does not specify something else to do. Zero ++ means the default is an error. */ + static const yytype_uint8 yydefact[] = + { +- 0, 0, 0, 3, 1, 0, 5, 4, 0, 0, +- 0, 5, 36, 37, 0, 0, 8, 0, 2, 6, +- 0, 0, 0, 70, 0, 39, 40, 42, 44, 46, +- 48, 50, 52, 55, 62, 65, 69, 0, 15, 9, +- 0, 0, 0, 0, 71, 72, 73, 38, 0, 0, ++ 0, 0, 0, 3, 1, 0, 0, 0, 3, 34, ++ 35, 0, 0, 6, 0, 2, 4, 0, 0, 0, ++ 68, 0, 37, 38, 40, 42, 44, 46, 48, 50, ++ 53, 60, 63, 67, 0, 13, 7, 0, 0, 0, ++ 0, 69, 70, 71, 36, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 7, 77, 0, +- 0, 12, 10, 43, 0, 45, 47, 49, 51, 53, +- 54, 58, 59, 57, 56, 60, 61, 63, 64, 67, +- 66, 68, 0, 0, 0, 0, 16, 0, 77, 13, +- 11, 0, 0, 0, 18, 28, 80, 20, 82, 0, +- 79, 78, 41, 19, 81, 0, 0, 14, 27, 17, +- 29, 0, 21, 30, 24, 0, 74, 32, 0, 0, +- 0, 0, 35, 34, 22, 33, 31, 0, 75, 76, +- 23, 0, 26, 0, 0, 0, 25 ++ 0, 0, 0, 0, 5, 75, 0, 0, 10, 8, ++ 41, 0, 43, 45, 47, 49, 51, 52, 56, 57, ++ 55, 54, 58, 59, 61, 62, 65, 64, 66, 0, ++ 0, 0, 0, 14, 0, 75, 11, 9, 0, 0, ++ 0, 16, 26, 78, 18, 80, 0, 77, 76, 39, ++ 17, 79, 0, 0, 12, 25, 15, 27, 0, 19, ++ 28, 22, 0, 72, 30, 0, 0, 0, 0, 33, ++ 32, 20, 31, 29, 0, 73, 74, 21, 0, 24, ++ 0, 0, 0, 23 + }; + +-/* YYDEFGOTO[NTERM-NUM]. */ +-static const yytype_int16 yydefgoto[] = ++ /* YYPGOTO[NTERM-NUM]. */ ++static const yytype_int8 yypgoto[] = + { +- -1, 2, 6, 10, 11, 18, 39, 68, 96, 115, +- 116, 128, 23, 24, 25, 26, 27, 28, 29, 30, +- 31, 32, 33, 34, 35, 36, 131, 97, 98 ++ -81, -81, 100, 104, -81, -38, -81, -80, -81, -81, ++ -81, -5, 66, 13, -81, 70, 67, 81, 64, 82, ++ 37, 27, 34, 38, -14, -81, 22, 24 + }; + +-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing +- STATE-NUM. */ +-#define YYPACT_NINF -84 +-static const yytype_int8 yypact[] = ++ /* YYDEFGOTO[NTERM-NUM]. */ ++static const yytype_int16 yydefgoto[] = + { +- 15, -12, 35, 42, -84, 27, 9, -84, 24, 9, +- 43, 9, -84, -84, -10, 24, -84, 60, 44, -84, +- -10, -10, -10, -84, 55, -84, -7, 52, 53, 51, +- 54, 10, 2, 38, 37, -4, -84, 68, -84, -84, +- 71, 73, 60, 60, -84, -84, -84, -84, -10, -10, +- -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, +- -10, -10, -10, -10, -10, -10, -10, -84, 56, 72, +- 60, -84, -84, 52, 61, 53, 51, 54, 10, 2, +- 2, 38, 38, 38, 38, 37, 37, -4, -4, -84, +- -84, -84, 81, 83, 34, 56, -84, 74, 56, -84, +- -84, -10, 76, 78, -84, -84, -84, -84, -84, 79, +- -84, -84, -84, -84, -84, -6, 3, -84, -84, -84, +- -84, 87, -84, -84, -84, 75, -84, -84, 32, 70, +- 86, 36, -84, -84, -84, -84, -84, 47, -84, -84, +- -84, 24, -84, 77, 24, 80, -84 ++ -1, 2, 7, 8, 15, 36, 65, 93, 112, 113, ++ 125, 20, 21, 22, 23, 24, 25, 26, 27, 28, ++ 29, 30, 31, 32, 33, 128, 94, 95 + }; + +-/* YYPGOTO[NTERM-NUM]. */ +-static const yytype_int8 yypgoto[] = ++ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If ++ positive, shift that token. If negative, reduce the rule whose ++ number is the opposite. If YYTABLE_NINF, syntax error. */ ++static const yytype_uint8 yytable[] = + { +- -84, -84, -84, 98, 101, -84, -41, -84, -83, -84, +- -84, -84, -8, 63, 12, -84, 66, 67, 65, 69, +- 82, 29, 18, 25, 26, -17, -84, 20, 28 ++ 12, 68, 69, 41, 42, 43, 45, 34, 9, 10, ++ 53, 54, 104, 3, 5, 107, 101, 118, 35, 1, ++ 102, 4, 61, 11, 119, 120, 121, 122, 35, 97, ++ 46, 6, 55, 17, 123, 44, 18, 19, 56, 124, ++ 62, 63, 9, 10, 14, 51, 52, 86, 87, 88, ++ 9, 10, 48, 103, 129, 130, 115, 11, 135, 116, ++ 136, 47, 131, 57, 58, 11, 37, 49, 117, 50, ++ 137, 64, 38, 39, 138, 139, 40, 89, 90, 91, ++ 78, 79, 80, 81, 92, 59, 60, 66, 76, 77, ++ 67, 82, 83, 96, 98, 99, 100, 84, 85, 106, ++ 110, 111, 114, 126, 134, 127, 133, 141, 16, 143, ++ 13, 109, 71, 74, 72, 70, 105, 108, 0, 0, ++ 132, 0, 0, 0, 0, 0, 0, 0, 0, 73, ++ 0, 0, 75, 140, 0, 0, 142 + }; + +-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If +- positive, shift that token. If negative, reduce the rule which +- number is the opposite. If YYTABLE_NINF, syntax error. */ +-#define YYTABLE_NINF -1 +-static const yytype_uint8 yytable[] = ++static const yytype_int16 yycheck[] = + { +- 15, 71, 72, 44, 45, 46, 48, 37, 12, 13, +- 56, 57, 107, 3, 8, 110, 118, 121, 1, 119, +- 54, 55, 64, 14, 122, 123, 124, 125, 120, 100, +- 49, 9, 58, 20, 126, 4, 21, 22, 59, 127, +- 65, 66, 12, 13, 60, 61, 5, 89, 90, 91, +- 12, 13, 7, 106, 132, 133, 138, 14, 139, 104, +- 40, 38, 134, 105, 50, 14, 41, 42, 140, 17, +- 43, 92, 93, 94, 81, 82, 83, 84, 95, 62, +- 63, 141, 142, 79, 80, 85, 86, 38, 87, 88, +- 47, 52, 51, 67, 69, 53, 70, 99, 102, 101, +- 103, 113, 109, 114, 117, 129, 136, 137, 130, 19, +- 16, 144, 74, 112, 73, 146, 76, 75, 111, 0, +- 135, 77, 0, 108, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 143, 0, 78, 145 ++ 5, 39, 40, 17, 18, 19, 12, 12, 17, 18, ++ 7, 8, 92, 24, 4, 95, 24, 13, 26, 3, ++ 28, 0, 25, 32, 20, 21, 22, 23, 26, 67, ++ 36, 21, 29, 42, 30, 34, 45, 46, 35, 35, ++ 43, 44, 17, 18, 25, 9, 10, 61, 62, 63, ++ 17, 18, 38, 91, 21, 22, 21, 32, 19, 24, ++ 21, 11, 29, 5, 6, 32, 15, 39, 33, 40, ++ 31, 24, 21, 22, 33, 34, 25, 14, 15, 16, ++ 53, 54, 55, 56, 21, 41, 42, 22, 51, 52, ++ 22, 57, 58, 24, 37, 16, 16, 59, 60, 27, ++ 24, 24, 24, 17, 20, 32, 35, 33, 8, 34, ++ 6, 98, 46, 49, 47, 45, 92, 95, -1, -1, ++ 125, -1, -1, -1, -1, -1, -1, -1, -1, 48, ++ -1, -1, 50, 138, -1, -1, 141 + }; + +-#define yypact_value_is_default(yystate) \ +- ((yystate) == (-84)) +- +-#define yytable_value_is_error(yytable_value) \ +- YYID (0) ++ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing ++ symbol of state STATE-NUM. */ ++static const yytype_uint8 yystos[] = ++{ ++ 0, 3, 48, 24, 0, 4, 21, 49, 50, 17, ++ 18, 32, 58, 50, 25, 51, 49, 42, 45, 46, ++ 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, ++ 68, 69, 70, 71, 58, 26, 52, 15, 21, 22, ++ 25, 71, 71, 71, 34, 12, 36, 11, 38, 39, ++ 40, 9, 10, 7, 8, 29, 35, 5, 6, 41, ++ 42, 25, 43, 44, 24, 53, 22, 22, 52, 52, ++ 62, 59, 63, 64, 65, 66, 67, 67, 68, 68, ++ 68, 68, 69, 69, 70, 70, 71, 71, 71, 14, ++ 15, 16, 21, 54, 73, 74, 24, 52, 37, 16, ++ 16, 24, 28, 52, 54, 74, 27, 54, 73, 60, ++ 24, 24, 55, 56, 24, 21, 24, 33, 13, 20, ++ 21, 22, 23, 30, 35, 57, 17, 32, 72, 21, ++ 22, 29, 58, 35, 20, 19, 21, 31, 33, 34, ++ 58, 33, 58, 34 ++}; + +-static const yytype_int16 yycheck[] = ++ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ ++static const yytype_uint8 yyr1[] = + { +- 8, 42, 43, 20, 21, 22, 13, 15, 18, 19, +- 8, 9, 95, 25, 5, 98, 22, 14, 3, 25, +- 10, 11, 26, 33, 21, 22, 23, 24, 34, 70, +- 37, 22, 30, 43, 31, 0, 46, 47, 36, 36, +- 44, 45, 18, 19, 6, 7, 4, 64, 65, 66, +- 18, 19, 25, 94, 22, 23, 20, 33, 22, 25, +- 16, 27, 30, 29, 12, 33, 22, 23, 32, 26, +- 26, 15, 16, 17, 56, 57, 58, 59, 22, 42, +- 43, 34, 35, 54, 55, 60, 61, 27, 62, 63, +- 35, 40, 39, 25, 23, 41, 23, 25, 17, 38, +- 17, 25, 28, 25, 25, 18, 36, 21, 33, 11, +- 9, 34, 49, 101, 48, 35, 51, 50, 98, -1, +- 128, 52, -1, 95, -1, -1, -1, -1, -1, -1, +- -1, -1, -1, 141, -1, 53, 144 ++ 0, 47, 48, 49, 49, 50, 50, 51, 51, 51, ++ 51, 51, 52, 53, 53, 54, 54, 54, 54, 55, ++ 55, 55, 55, 55, 55, 55, 56, 56, 56, 57, ++ 57, 57, 57, 57, 58, 58, 58, 59, 60, 60, ++ 61, 61, 62, 62, 63, 63, 64, 64, 65, 65, ++ 66, 66, 66, 67, 67, 67, 67, 67, 68, 68, ++ 68, 69, 69, 69, 70, 70, 70, 70, 71, 71, ++ 71, 71, 72, 72, 72, 73, 73, 73, 74, 74, ++ 74 + }; + +-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing +- symbol of state STATE-NUM. */ +-static const yytype_uint8 yystos[] = ++ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ ++static const yytype_uint8 yyr2[] = + { +- 0, 3, 49, 25, 0, 4, 50, 25, 5, 22, +- 51, 52, 18, 19, 33, 60, 52, 26, 53, 51, +- 43, 46, 47, 60, 61, 62, 63, 64, 65, 66, +- 67, 68, 69, 70, 71, 72, 73, 60, 27, 54, +- 16, 22, 23, 26, 73, 73, 73, 35, 13, 37, +- 12, 39, 40, 41, 10, 11, 8, 9, 30, 36, +- 6, 7, 42, 43, 26, 44, 45, 25, 55, 23, +- 23, 54, 54, 64, 61, 65, 66, 67, 68, 69, +- 69, 70, 70, 70, 70, 71, 71, 72, 72, 73, +- 73, 73, 15, 16, 17, 22, 56, 75, 76, 25, +- 54, 38, 17, 17, 25, 29, 54, 56, 76, 28, +- 56, 75, 62, 25, 25, 57, 58, 25, 22, 25, +- 34, 14, 21, 22, 23, 24, 31, 36, 59, 18, +- 33, 74, 22, 23, 30, 60, 36, 21, 20, 22, +- 32, 34, 35, 60, 34, 60, 35 ++ 0, 2, 4, 0, 2, 4, 2, 2, 3, 4, ++ 3, 4, 5, 0, 2, 4, 2, 3, 2, 2, ++ 3, 4, 2, 9, 5, 2, 0, 2, 2, 3, ++ 1, 2, 2, 2, 1, 1, 3, 1, 1, 5, ++ 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, ++ 1, 3, 3, 1, 3, 3, 3, 3, 3, 3, ++ 1, 3, 3, 1, 3, 3, 3, 1, 1, 2, ++ 2, 2, 0, 2, 2, 0, 2, 2, 2, 3, ++ 2 + }; + +-#define yyerrok (yyerrstatus = 0) +-#define yyclearin (yychar = YYEMPTY) +-#define YYEMPTY (-2) +-#define YYEOF 0 +- +-#define YYACCEPT goto yyacceptlab +-#define YYABORT goto yyabortlab +-#define YYERROR goto yyerrorlab +- +- +-/* Like YYERROR except do call yyerror. This remains here temporarily +- to ease the transition to the new meaning of YYERROR, for GCC. +- Once GCC version 2 has supplanted version 1, this can go. However, +- YYFAIL appears to be in use. Nevertheless, it is formally deprecated +- in Bison 2.4.2's NEWS entry, where a plan to phase it out is +- discussed. */ +- +-#define YYFAIL goto yyerrlab +-#if defined YYFAIL +- /* This is here to suppress warnings from the GCC cpp's +- -Wunused-macros. Normally we don't worry about that warning, but +- some users do, and we want to make it easy for users to remove +- YYFAIL uses, which will produce warnings from Bison 2.5. */ +-#endif ++ ++#define yyerrok (yyerrstatus = 0) ++#define yyclearin (yychar = YYEMPTY) ++#define YYEMPTY (-2) ++#define YYEOF 0 ++ ++#define YYACCEPT goto yyacceptlab ++#define YYABORT goto yyabortlab ++#define YYERROR goto yyerrorlab ++ + + #define YYRECOVERING() (!!yyerrstatus) + +-#define YYBACKUP(Token, Value) \ +-do \ +- if (yychar == YYEMPTY && yylen == 1) \ +- { \ +- yychar = (Token); \ +- yylval = (Value); \ +- YYPOPSTACK (1); \ +- goto yybackup; \ +- } \ +- else \ +- { \ ++#define YYBACKUP(Token, Value) \ ++do \ ++ if (yychar == YYEMPTY) \ ++ { \ ++ yychar = (Token); \ ++ yylval = (Value); \ ++ YYPOPSTACK (yylen); \ ++ yystate = *yyssp; \ ++ goto yybackup; \ ++ } \ ++ else \ ++ { \ + yyerror (YY_("syntax error: cannot back up")); \ +- YYERROR; \ +- } \ +-while (YYID (0)) +- ++ YYERROR; \ ++ } \ ++while (0) + +-#define YYTERROR 1 +-#define YYERRCODE 256 ++/* Error token number */ ++#define YYTERROR 1 ++#define YYERRCODE 256 + + + /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +-#define YYRHSLOC(Rhs, K) ((Rhs)[K]) + #ifndef YYLLOC_DEFAULT +-# define YYLLOC_DEFAULT(Current, Rhs, N) \ +- do \ +- if (YYID (N)) \ +- { \ +- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ +- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ +- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ +- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ +- } \ +- else \ +- { \ +- (Current).first_line = (Current).last_line = \ +- YYRHSLOC (Rhs, 0).last_line; \ +- (Current).first_column = (Current).last_column = \ +- YYRHSLOC (Rhs, 0).last_column; \ +- } \ +- while (YYID (0)) ++# define YYLLOC_DEFAULT(Current, Rhs, N) \ ++ do \ ++ if (N) \ ++ { \ ++ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ ++ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ ++ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ ++ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ ++ } \ ++ else \ ++ { \ ++ (Current).first_line = (Current).last_line = \ ++ YYRHSLOC (Rhs, 0).last_line; \ ++ (Current).first_column = (Current).last_column = \ ++ YYRHSLOC (Rhs, 0).last_column; \ ++ } \ ++ while (0) + #endif + ++#define YYRHSLOC(Rhs, K) ((Rhs)[K]) ++ ++ ++/* Enable debugging if requested. */ ++#if YYDEBUG ++ ++# ifndef YYFPRINTF ++# include /* INFRINGES ON USER NAME SPACE */ ++# define YYFPRINTF fprintf ++# endif ++ ++# define YYDPRINTF(Args) \ ++do { \ ++ if (yydebug) \ ++ YYFPRINTF Args; \ ++} while (0) ++ + + /* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know +@@ -799,82 +779,73 @@ while (YYID (0)) + + #ifndef YY_LOCATION_PRINT + # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +-# define YY_LOCATION_PRINT(File, Loc) \ +- fprintf (File, "%d.%d-%d.%d", \ +- (Loc).first_line, (Loc).first_column, \ +- (Loc).last_line, (Loc).last_column) +-# else +-# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +-# endif +-#endif +- + +-/* YYLEX -- calling `yylex' with the right arguments. */ ++/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ + +-#ifdef YYLEX_PARAM +-# define YYLEX yylex (YYLEX_PARAM) +-#else +-# define YYLEX yylex () +-#endif ++YY_ATTRIBUTE_UNUSED ++static unsigned ++yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) ++{ ++ unsigned res = 0; ++ int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; ++ if (0 <= yylocp->first_line) ++ { ++ res += YYFPRINTF (yyo, "%d", yylocp->first_line); ++ if (0 <= yylocp->first_column) ++ res += YYFPRINTF (yyo, ".%d", yylocp->first_column); ++ } ++ if (0 <= yylocp->last_line) ++ { ++ if (yylocp->first_line < yylocp->last_line) ++ { ++ res += YYFPRINTF (yyo, "-%d", yylocp->last_line); ++ if (0 <= end_col) ++ res += YYFPRINTF (yyo, ".%d", end_col); ++ } ++ else if (0 <= end_col && yylocp->first_column < end_col) ++ res += YYFPRINTF (yyo, "-%d", end_col); ++ } ++ return res; ++ } + +-/* Enable debugging if requested. */ +-#if YYDEBUG ++# define YY_LOCATION_PRINT(File, Loc) \ ++ yy_location_print_ (File, &(Loc)) + +-# ifndef YYFPRINTF +-# include /* INFRINGES ON USER NAME SPACE */ +-# define YYFPRINTF fprintf ++# else ++# define YY_LOCATION_PRINT(File, Loc) ((void) 0) + # endif ++#endif + +-# define YYDPRINTF(Args) \ +-do { \ +- if (yydebug) \ +- YYFPRINTF Args; \ +-} while (YYID (0)) + +-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +-do { \ +- if (yydebug) \ +- { \ +- YYFPRINTF (stderr, "%s ", Title); \ +- yy_symbol_print (stderr, \ +- Type, Value, Location); \ +- YYFPRINTF (stderr, "\n"); \ +- } \ +-} while (YYID (0)) ++# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ ++do { \ ++ if (yydebug) \ ++ { \ ++ YYFPRINTF (stderr, "%s ", Title); \ ++ yy_symbol_print (stderr, \ ++ Type, Value, Location); \ ++ YYFPRINTF (stderr, "\n"); \ ++ } \ ++} while (0) + + +-/*--------------------------------. +-| Print this symbol on YYOUTPUT. | +-`--------------------------------*/ ++/*----------------------------------------. ++| Print this symbol's value on YYOUTPUT. | ++`----------------------------------------*/ + +-/*ARGSUSED*/ +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) + static void + yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) +-#else +-static void +-yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) +- FILE *yyoutput; +- int yytype; +- YYSTYPE const * const yyvaluep; +- YYLTYPE const * const yylocationp; +-#endif + { ++ FILE *yyo = yyoutput; ++ YYUSE (yyo); ++ YYUSE (yylocationp); + if (!yyvaluep) + return; +- YYUSE (yylocationp); + # ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +-# else +- YYUSE (yyoutput); + # endif +- switch (yytype) +- { +- default: +- break; +- } ++ YYUSE (yytype); + } + + +@@ -882,23 +853,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) + | Print this symbol on YYOUTPUT. | + `--------------------------------*/ + +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) + static void + yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) +-#else +-static void +-yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) +- FILE *yyoutput; +- int yytype; +- YYSTYPE const * const yyvaluep; +- YYLTYPE const * const yylocationp; +-#endif + { +- if (yytype < YYNTOKENS) +- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); +- else +- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); ++ YYFPRINTF (yyoutput, "%s %s (", ++ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + + YY_LOCATION_PRINT (yyoutput, *yylocationp); + YYFPRINTF (yyoutput, ": "); +@@ -911,16 +870,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) + | TOP (included). | + `------------------------------------------------------------------*/ + +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) + static void + yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +-#else +-static void +-yy_stack_print (yybottom, yytop) +- yytype_int16 *yybottom; +- yytype_int16 *yytop; +-#endif + { + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) +@@ -931,50 +882,42 @@ yy_stack_print (yybottom, yytop) + YYFPRINTF (stderr, "\n"); + } + +-# define YY_STACK_PRINT(Bottom, Top) \ +-do { \ +- if (yydebug) \ +- yy_stack_print ((Bottom), (Top)); \ +-} while (YYID (0)) ++# define YY_STACK_PRINT(Bottom, Top) \ ++do { \ ++ if (yydebug) \ ++ yy_stack_print ((Bottom), (Top)); \ ++} while (0) + + + /*------------------------------------------------. + | Report that the YYRULE is going to be reduced. | + `------------------------------------------------*/ + +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) +-static void +-yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) +-#else + static void +-yy_reduce_print (yyvsp, yylsp, yyrule) +- YYSTYPE *yyvsp; +- YYLTYPE *yylsp; +- int yyrule; +-#endif ++yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) + { ++ unsigned long int yylno = yyrline[yyrule]; + int yynrhs = yyr2[yyrule]; + int yyi; +- unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", +- yyrule - 1, yylno); ++ yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); +- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], +- &(yyvsp[(yyi + 1) - (yynrhs)]) +- , &(yylsp[(yyi + 1) - (yynrhs)]) ); ++ yy_symbol_print (stderr, ++ yystos[yyssp[yyi + 1 - yynrhs]], ++ &(yyvsp[(yyi + 1) - (yynrhs)]) ++ , &(yylsp[(yyi + 1) - (yynrhs)]) ); + YYFPRINTF (stderr, "\n"); + } + } + +-# define YY_REDUCE_PRINT(Rule) \ +-do { \ +- if (yydebug) \ +- yy_reduce_print (yyvsp, yylsp, Rule); \ +-} while (YYID (0)) ++# define YY_REDUCE_PRINT(Rule) \ ++do { \ ++ if (yydebug) \ ++ yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \ ++} while (0) + + /* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +@@ -988,7 +931,7 @@ int yydebug; + + + /* YYINITDEPTH -- initial size of the parser's stacks. */ +-#ifndef YYINITDEPTH ++#ifndef YYINITDEPTH + # define YYINITDEPTH 200 + #endif + +@@ -1011,15 +954,8 @@ int yydebug; + # define yystrlen strlen + # else + /* Return the length of YYSTR. */ +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) + static YYSIZE_T + yystrlen (const char *yystr) +-#else +-static YYSIZE_T +-yystrlen (yystr) +- const char *yystr; +-#endif + { + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) +@@ -1035,16 +971,8 @@ yystrlen (yystr) + # else + /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) + static char * + yystpcpy (char *yydest, const char *yysrc) +-#else +-static char * +-yystpcpy (yydest, yysrc) +- char *yydest; +- const char *yysrc; +-#endif + { + char *yyd = yydest; + const char *yys = yysrc; +@@ -1074,27 +1002,27 @@ yytnamerr (char *yyres, const char *yystr) + char const *yyp = yystr; + + for (;;) +- switch (*++yyp) +- { +- case '\'': +- case ',': +- goto do_not_strip_quotes; +- +- case '\\': +- if (*++yyp != '\\') +- goto do_not_strip_quotes; +- /* Fall through. */ +- default: +- if (yyres) +- yyres[yyn] = *yyp; +- yyn++; +- break; +- +- case '"': +- if (yyres) +- yyres[yyn] = '\0'; +- return yyn; +- } ++ switch (*++yyp) ++ { ++ case '\'': ++ case ',': ++ goto do_not_strip_quotes; ++ ++ case '\\': ++ if (*++yyp != '\\') ++ goto do_not_strip_quotes; ++ /* Fall through. */ ++ default: ++ if (yyres) ++ yyres[yyn] = *yyp; ++ yyn++; ++ break; ++ ++ case '"': ++ if (yyres) ++ yyres[yyn] = '\0'; ++ return yyn; ++ } + do_not_strip_quotes: ; + } + +@@ -1117,12 +1045,11 @@ static int + yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) + { +- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); ++ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + YYSIZE_T yysize = yysize0; +- YYSIZE_T yysize1; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ +- const char *yyformat = 0; ++ const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per +@@ -1130,10 +1057,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + int yycount = 0; + + /* There are many possibilities here to consider: +- - Assume YYFAIL is not used. It's too flawed to consider. See +- +- for details. YYERROR is fine as it does not invoke this +- function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected +@@ -1182,11 +1105,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + break; + } + yyarg[yycount++] = yytname[yyx]; +- yysize1 = yysize + yytnamerr (0, yytname[yyx]); +- if (! (yysize <= yysize1 +- && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) +- return 2; +- yysize = yysize1; ++ { ++ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); ++ if (! (yysize <= yysize1 ++ && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) ++ return 2; ++ yysize = yysize1; ++ } + } + } + } +@@ -1206,10 +1131,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + # undef YYCASE_ + } + +- yysize1 = yysize + yystrlen (yyformat); +- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) +- return 2; +- yysize = yysize1; ++ { ++ YYSIZE_T yysize1 = yysize + yystrlen (yyformat); ++ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) ++ return 2; ++ yysize = yysize1; ++ } + + if (*yymsg_alloc < yysize) + { +@@ -1246,50 +1173,21 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + | Release the memory associated to this symbol. | + `-----------------------------------------------*/ + +-/*ARGSUSED*/ +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) + static void + yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) +-#else +-static void +-yydestruct (yymsg, yytype, yyvaluep, yylocationp) +- const char *yymsg; +- int yytype; +- YYSTYPE *yyvaluep; +- YYLTYPE *yylocationp; +-#endif + { + YYUSE (yyvaluep); + YYUSE (yylocationp); +- + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + +- switch (yytype) +- { +- +- default: +- break; +- } ++ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN ++ YYUSE (yytype); ++ YY_IGNORE_MAYBE_UNINITIALIZED_END + } + + +-/* Prevent warnings from -Wmissing-prototypes. */ +-#ifdef YYPARSE_PARAM +-#if defined __STDC__ || defined __cplusplus +-int yyparse (void *YYPARSE_PARAM); +-#else +-int yyparse (); +-#endif +-#else /* ! YYPARSE_PARAM */ +-#if defined __STDC__ || defined __cplusplus +-int yyparse (void); +-#else +-int yyparse (); +-#endif +-#endif /* ! YYPARSE_PARAM */ + + + /* The lookahead symbol. */ +@@ -1297,10 +1195,12 @@ int yychar; + + /* The semantic value of the lookahead symbol. */ + YYSTYPE yylval; +- + /* Location data for the lookahead symbol. */ +-YYLTYPE yylloc; +- ++YYLTYPE yylloc ++# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL ++ = { 1, 1, 1, 1 } ++# endif ++; + /* Number of syntax errors so far. */ + int yynerrs; + +@@ -1309,38 +1209,19 @@ int yynerrs; + | yyparse. | + `----------*/ + +-#ifdef YYPARSE_PARAM +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) +-int +-yyparse (void *YYPARSE_PARAM) +-#else +-int +-yyparse (YYPARSE_PARAM) +- void *YYPARSE_PARAM; +-#endif +-#else /* ! YYPARSE_PARAM */ +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) + int + yyparse (void) +-#else +-int +-yyparse () +- +-#endif +-#endif + { + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: +- `yyss': related to states. +- `yyvs': related to semantic values. +- `yyls': related to locations. ++ 'yyss': related to states. ++ 'yyvs': related to semantic values. ++ 'yyls': related to locations. + +- Refer to the stacks thru separate pointers, to allow yyoverflow ++ Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ +@@ -1366,7 +1247,7 @@ yyparse () + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ +- int yytoken; ++ int yytoken = 0; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; +@@ -1385,10 +1266,9 @@ yyparse () + Keep to zero when no symbol should be popped. */ + int yylen = 0; + +- yytoken = 0; +- yyss = yyssa; +- yyvs = yyvsa; +- yyls = yylsa; ++ yyssp = yyss = yyssa; ++ yyvsp = yyvs = yyvsa; ++ yylsp = yyls = yylsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); +@@ -1397,21 +1277,7 @@ yyparse () + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ +- +- /* Initialize stack pointers. +- Waste one element of value and location stack +- so that they stay on the same level as the state stack. +- The wasted elements are never initialized. */ +- yyssp = yyss; +- yyvsp = yyvs; +- yylsp = yyls; +- +-#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +- /* Initialize the default location before parsing starts. */ +- yylloc.first_line = yylloc.last_line = 1; +- yylloc.first_column = yylloc.last_column = 1; +-#endif +- ++ yylsp[0] = yylloc; + goto yysetstate; + + /*------------------------------------------------------------. +@@ -1432,26 +1298,26 @@ yyparse () + + #ifdef yyoverflow + { +- /* Give user a chance to reallocate the stack. Use copies of +- these so that the &'s don't force the real ones into +- memory. */ +- YYSTYPE *yyvs1 = yyvs; +- yytype_int16 *yyss1 = yyss; +- YYLTYPE *yyls1 = yyls; +- +- /* Each stack pointer address is followed by the size of the +- data in use in that stack, in bytes. This used to be a +- conditional around just the two extra args, but that might +- be undefined if yyoverflow is a macro. */ +- yyoverflow (YY_("memory exhausted"), +- &yyss1, yysize * sizeof (*yyssp), +- &yyvs1, yysize * sizeof (*yyvsp), +- &yyls1, yysize * sizeof (*yylsp), +- &yystacksize); +- +- yyls = yyls1; +- yyss = yyss1; +- yyvs = yyvs1; ++ /* Give user a chance to reallocate the stack. Use copies of ++ these so that the &'s don't force the real ones into ++ memory. */ ++ YYSTYPE *yyvs1 = yyvs; ++ yytype_int16 *yyss1 = yyss; ++ YYLTYPE *yyls1 = yyls; ++ ++ /* Each stack pointer address is followed by the size of the ++ data in use in that stack, in bytes. This used to be a ++ conditional around just the two extra args, but that might ++ be undefined if yyoverflow is a macro. */ ++ yyoverflow (YY_("memory exhausted"), ++ &yyss1, yysize * sizeof (*yyssp), ++ &yyvs1, yysize * sizeof (*yyvsp), ++ &yyls1, yysize * sizeof (*yylsp), ++ &yystacksize); ++ ++ yyls = yyls1; ++ yyss = yyss1; ++ yyvs = yyvs1; + } + #else /* no yyoverflow */ + # ifndef YYSTACK_RELOCATE +@@ -1459,23 +1325,23 @@ yyparse () + # else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) +- goto yyexhaustedlab; ++ goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) +- yystacksize = YYMAXDEPTH; ++ yystacksize = YYMAXDEPTH; + + { +- yytype_int16 *yyss1 = yyss; +- union yyalloc *yyptr = +- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); +- if (! yyptr) +- goto yyexhaustedlab; +- YYSTACK_RELOCATE (yyss_alloc, yyss); +- YYSTACK_RELOCATE (yyvs_alloc, yyvs); +- YYSTACK_RELOCATE (yyls_alloc, yyls); ++ yytype_int16 *yyss1 = yyss; ++ union yyalloc *yyptr = ++ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); ++ if (! yyptr) ++ goto yyexhaustedlab; ++ YYSTACK_RELOCATE (yyss_alloc, yyss); ++ YYSTACK_RELOCATE (yyvs_alloc, yyvs); ++ YYSTACK_RELOCATE (yyls_alloc, yyls); + # undef YYSTACK_RELOCATE +- if (yyss1 != yyssa) +- YYSTACK_FREE (yyss1); ++ if (yyss1 != yyssa) ++ YYSTACK_FREE (yyss1); + } + # endif + #endif /* no yyoverflow */ +@@ -1485,10 +1351,10 @@ yyparse () + yylsp = yyls + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", +- (unsigned long int) yystacksize)); ++ (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) +- YYABORT; ++ YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); +@@ -1517,7 +1383,7 @@ yybackup: + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); +- yychar = YYLEX; ++ yychar = yylex (); + } + + if (yychar <= YYEOF) +@@ -1557,7 +1423,9 @@ yybackup: + yychar = YYEMPTY; + + yystate = yyn; ++ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; ++ YY_IGNORE_MAYBE_UNINITIALIZED_END + *++yylsp = yylloc; + goto yynewstate; + +@@ -1580,7 +1448,7 @@ yyreduce: + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: +- `$$ = $1'. ++ '$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison +@@ -1595,322 +1463,273 @@ yyreduce: + switch (yyn) + { + case 2: +- +-/* Line 1806 of yacc.c */ +-#line 109 "dtc-parser.y" ++#line 105 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyvsp[(5) - (5)].node)->is_plugin = (yyvsp[(3) - (5)].is_plugin); +- (yyvsp[(5) - (5)].node)->is_root = 1; +- the_boot_info = build_boot_info((yyvsp[(4) - (5)].re), (yyvsp[(5) - (5)].node), +- guess_boot_cpuid((yyvsp[(5) - (5)].node))); ++ the_boot_info = build_boot_info((yyvsp[-1].re), (yyvsp[0].node), ++ guess_boot_cpuid((yyvsp[0].node))); + } ++#line 1472 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 3: +- +-/* Line 1806 of yacc.c */ +-#line 119 "dtc-parser.y" ++#line 113 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.is_plugin) = 0; ++ (yyval.re) = NULL; + } ++#line 1480 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 4: +- +-/* Line 1806 of yacc.c */ +-#line 123 "dtc-parser.y" ++#line 117 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.is_plugin) = 1; ++ (yyval.re) = chain_reserve_entry((yyvsp[-1].re), (yyvsp[0].re)); + } ++#line 1488 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 5: +- +-/* Line 1806 of yacc.c */ +-#line 130 "dtc-parser.y" ++#line 124 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.re) = NULL; ++ (yyval.re) = build_reserve_entry((yyvsp[-2].integer), (yyvsp[-1].integer)); + } ++#line 1496 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 6: +- +-/* Line 1806 of yacc.c */ +-#line 134 "dtc-parser.y" ++#line 128 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re)); ++ add_label(&(yyvsp[0].re)->labels, (yyvsp[-1].labelref)); ++ (yyval.re) = (yyvsp[0].re); + } ++#line 1505 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 7: +- +-/* Line 1806 of yacc.c */ +-#line 141 "dtc-parser.y" ++#line 136 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer)); ++ (yyval.node) = name_node((yyvsp[0].node), ""); + } ++#line 1513 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 8: +- +-/* Line 1806 of yacc.c */ +-#line 145 "dtc-parser.y" ++#line 140 "dtc-parser.y" /* yacc.c:1646 */ + { +- add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref)); +- (yyval.re) = (yyvsp[(2) - (2)].re); ++ (yyval.node) = merge_nodes((yyvsp[-2].node), (yyvsp[0].node)); + } ++#line 1521 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 9: +- +-/* Line 1806 of yacc.c */ +-#line 153 "dtc-parser.y" ++#line 145 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.node) = name_node((yyvsp[(2) - (2)].node), ""); ++ struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref)); ++ ++ add_label(&target->labels, (yyvsp[-2].labelref)); ++ if (target) ++ merge_nodes(target, (yyvsp[0].node)); ++ else ++ ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref)); ++ (yyval.node) = (yyvsp[-3].node); + } ++#line 1536 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 10: +- +-/* Line 1806 of yacc.c */ +-#line 157 "dtc-parser.y" ++#line 156 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); ++ struct node *target = get_node_by_ref((yyvsp[-2].node), (yyvsp[-1].labelref)); ++ ++ if (target) ++ merge_nodes(target, (yyvsp[0].node)); ++ else ++ ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref)); ++ (yyval.node) = (yyvsp[-2].node); + } ++#line 1550 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 11: +- +-/* Line 1806 of yacc.c */ +-#line 162 "dtc-parser.y" ++#line 166 "dtc-parser.y" /* yacc.c:1646 */ + { +- struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref)); ++ struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref)); + +- add_label(&target->labels, (yyvsp[(2) - (4)].labelref)); + if (target) +- merge_nodes(target, (yyvsp[(4) - (4)].node)); ++ delete_node(target); + else +- ERROR(&(yylsp[(3) - (4)]), "Label or path %s not found", (yyvsp[(3) - (4)].labelref)); +- (yyval.node) = (yyvsp[(1) - (4)].node); ++ ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref)); ++ ++ ++ (yyval.node) = (yyvsp[-3].node); + } ++#line 1566 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 12: +- +-/* Line 1806 of yacc.c */ +-#line 173 "dtc-parser.y" ++#line 181 "dtc-parser.y" /* yacc.c:1646 */ + { +- struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref)); +- +- if (target) +- merge_nodes(target, (yyvsp[(3) - (3)].node)); +- else +- ERROR(&(yylsp[(2) - (3)]), "Label or path %s not found", (yyvsp[(2) - (3)].labelref)); +- (yyval.node) = (yyvsp[(1) - (3)].node); ++ (yyval.node) = build_node((yyvsp[-3].proplist), (yyvsp[-2].nodelist)); + } ++#line 1574 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 13: +- +-/* Line 1806 of yacc.c */ +-#line 183 "dtc-parser.y" ++#line 188 "dtc-parser.y" /* yacc.c:1646 */ + { +- struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref)); +- +- if (target) +- delete_node(target); +- else +- ERROR(&(yylsp[(3) - (4)]), "Label or path %s not found", (yyvsp[(3) - (4)].labelref)); +- +- +- (yyval.node) = (yyvsp[(1) - (4)].node); ++ (yyval.proplist) = NULL; + } ++#line 1582 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 14: +- +-/* Line 1806 of yacc.c */ +-#line 198 "dtc-parser.y" ++#line 192 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist)); ++ (yyval.proplist) = chain_property((yyvsp[0].prop), (yyvsp[-1].proplist)); + } ++#line 1590 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 15: +- +-/* Line 1806 of yacc.c */ +-#line 205 "dtc-parser.y" ++#line 199 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.proplist) = NULL; ++ (yyval.prop) = build_property((yyvsp[-3].propnodename), (yyvsp[-1].data)); + } ++#line 1598 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 16: +- +-/* Line 1806 of yacc.c */ +-#line 209 "dtc-parser.y" ++#line 203 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist)); ++ (yyval.prop) = build_property((yyvsp[-1].propnodename), empty_data); + } ++#line 1606 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 17: +- +-/* Line 1806 of yacc.c */ +-#line 216 "dtc-parser.y" ++#line 207 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data)); ++ (yyval.prop) = build_property_delete((yyvsp[-1].propnodename)); + } ++#line 1614 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 18: +- +-/* Line 1806 of yacc.c */ +-#line 220 "dtc-parser.y" ++#line 211 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data); ++ add_label(&(yyvsp[0].prop)->labels, (yyvsp[-1].labelref)); ++ (yyval.prop) = (yyvsp[0].prop); + } ++#line 1623 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 19: +- +-/* Line 1806 of yacc.c */ +-#line 224 "dtc-parser.y" ++#line 219 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename)); ++ (yyval.data) = data_merge((yyvsp[-1].data), (yyvsp[0].data)); + } ++#line 1631 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 20: +- +-/* Line 1806 of yacc.c */ +-#line 228 "dtc-parser.y" ++#line 223 "dtc-parser.y" /* yacc.c:1646 */ + { +- add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref)); +- (yyval.prop) = (yyvsp[(2) - (2)].prop); ++ (yyval.data) = data_merge((yyvsp[-2].data), (yyvsp[-1].array).data); + } ++#line 1639 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 21: +- +-/* Line 1806 of yacc.c */ +-#line 236 "dtc-parser.y" ++#line 227 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data)); ++ (yyval.data) = data_merge((yyvsp[-3].data), (yyvsp[-1].data)); + } ++#line 1647 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 22: +- +-/* Line 1806 of yacc.c */ +-#line 240 "dtc-parser.y" ++#line 231 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = data_merge((yyvsp[(1) - (3)].data), (yyvsp[(2) - (3)].array).data); ++ (yyval.data) = data_add_marker((yyvsp[-1].data), REF_PATH, (yyvsp[0].labelref)); + } ++#line 1655 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 23: +- +-/* Line 1806 of yacc.c */ +-#line 244 "dtc-parser.y" ++#line 235 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data)); +- } +- break; +- +- case 24: +- +-/* Line 1806 of yacc.c */ +-#line 248 "dtc-parser.y" +- { +- (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref)); +- } +- break; +- +- case 25: +- +-/* Line 1806 of yacc.c */ +-#line 252 "dtc-parser.y" +- { +- FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL); ++ FILE *f = srcfile_relative_open((yyvsp[-5].data).val, NULL); + struct data d; + +- if ((yyvsp[(6) - (9)].integer) != 0) +- if (fseek(f, (yyvsp[(6) - (9)].integer), SEEK_SET) != 0) ++ if ((yyvsp[-3].integer) != 0) ++ if (fseek(f, (yyvsp[-3].integer), SEEK_SET) != 0) + die("Couldn't seek to offset %llu in \"%s\": %s", +- (unsigned long long)(yyvsp[(6) - (9)].integer), (yyvsp[(4) - (9)].data).val, ++ (unsigned long long)(yyvsp[-3].integer), (yyvsp[-5].data).val, + strerror(errno)); + +- d = data_copy_file(f, (yyvsp[(8) - (9)].integer)); ++ d = data_copy_file(f, (yyvsp[-1].integer)); + +- (yyval.data) = data_merge((yyvsp[(1) - (9)].data), d); ++ (yyval.data) = data_merge((yyvsp[-8].data), d); + fclose(f); + } ++#line 1675 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 26: +- +-/* Line 1806 of yacc.c */ +-#line 268 "dtc-parser.y" ++ case 24: ++#line 251 "dtc-parser.y" /* yacc.c:1646 */ + { +- FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL); ++ FILE *f = srcfile_relative_open((yyvsp[-1].data).val, NULL); + struct data d = empty_data; + + d = data_copy_file(f, -1); + +- (yyval.data) = data_merge((yyvsp[(1) - (5)].data), d); ++ (yyval.data) = data_merge((yyvsp[-4].data), d); + fclose(f); + } ++#line 1689 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 27: +- +-/* Line 1806 of yacc.c */ +-#line 278 "dtc-parser.y" ++ case 25: ++#line 261 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); ++ (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref)); + } ++#line 1697 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 28: +- +-/* Line 1806 of yacc.c */ +-#line 285 "dtc-parser.y" ++ case 26: ++#line 268 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = empty_data; + } ++#line 1705 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 29: +- +-/* Line 1806 of yacc.c */ +-#line 289 "dtc-parser.y" ++ case 27: ++#line 272 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = (yyvsp[(1) - (2)].data); ++ (yyval.data) = (yyvsp[-1].data); + } ++#line 1713 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 30: +- +-/* Line 1806 of yacc.c */ +-#line 293 "dtc-parser.y" ++ case 28: ++#line 276 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); ++ (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref)); + } ++#line 1721 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 31: +- +-/* Line 1806 of yacc.c */ +-#line 300 "dtc-parser.y" ++ case 29: ++#line 283 "dtc-parser.y" /* yacc.c:1646 */ + { + unsigned long long bits; + +- bits = (yyvsp[(2) - (3)].integer); ++ bits = (yyvsp[-1].integer); + + if ((bits != 8) && (bits != 16) && + (bits != 32) && (bits != 64)) { +- ERROR(&(yylsp[(2) - (3)]), "Array elements must be" ++ ERROR(&(yylsp[-1]), "Array elements must be" + " 8, 16, 32 or 64-bits"); + bits = 32; + } +@@ -1918,25 +1737,23 @@ yyreduce: + (yyval.array).data = empty_data; + (yyval.array).bits = bits; + } ++#line 1741 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 32: +- +-/* Line 1806 of yacc.c */ +-#line 316 "dtc-parser.y" ++ case 30: ++#line 299 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.array).data = empty_data; + (yyval.array).bits = 32; + } ++#line 1750 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 33: +- +-/* Line 1806 of yacc.c */ +-#line 321 "dtc-parser.y" ++ case 31: ++#line 304 "dtc-parser.y" /* yacc.c:1646 */ + { +- if ((yyvsp[(1) - (2)].array).bits < 64) { +- uint64_t mask = (1ULL << (yyvsp[(1) - (2)].array).bits) - 1; ++ if ((yyvsp[-1].array).bits < 64) { ++ uint64_t mask = (1ULL << (yyvsp[-1].array).bits) - 1; + /* + * Bits above mask must either be all zero + * (positive within range of mask) or all one +@@ -1945,293 +1762,258 @@ yyreduce: + * within the mask to one (i.e. | in the + * mask), all bits are one. + */ +- if (((yyvsp[(2) - (2)].integer) > mask) && (((yyvsp[(2) - (2)].integer) | mask) != -1ULL)) +- ERROR(&(yylsp[(2) - (2)]), "Value out of range for" +- " %d-bit array element", (yyvsp[(1) - (2)].array).bits); ++ if (((yyvsp[0].integer) > mask) && (((yyvsp[0].integer) | mask) != -1ULL)) ++ ERROR(&(yylsp[0]), "Value out of range for" ++ " %d-bit array element", (yyvsp[-1].array).bits); + } + +- (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, (yyvsp[(2) - (2)].integer), (yyvsp[(1) - (2)].array).bits); ++ (yyval.array).data = data_append_integer((yyvsp[-1].array).data, (yyvsp[0].integer), (yyvsp[-1].array).bits); + } ++#line 1773 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 34: +- +-/* Line 1806 of yacc.c */ +-#line 340 "dtc-parser.y" ++ case 32: ++#line 323 "dtc-parser.y" /* yacc.c:1646 */ + { +- uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits); ++ uint64_t val = ~0ULL >> (64 - (yyvsp[-1].array).bits); + +- if ((yyvsp[(1) - (2)].array).bits == 32) +- (yyvsp[(1) - (2)].array).data = data_add_marker((yyvsp[(1) - (2)].array).data, ++ if ((yyvsp[-1].array).bits == 32) ++ (yyvsp[-1].array).data = data_add_marker((yyvsp[-1].array).data, + REF_PHANDLE, +- (yyvsp[(2) - (2)].labelref)); ++ (yyvsp[0].labelref)); + else +- ERROR(&(yylsp[(2) - (2)]), "References are only allowed in " ++ ERROR(&(yylsp[0]), "References are only allowed in " + "arrays with 32-bit elements."); + +- (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, val, (yyvsp[(1) - (2)].array).bits); ++ (yyval.array).data = data_append_integer((yyvsp[-1].array).data, val, (yyvsp[-1].array).bits); + } ++#line 1791 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 35: +- +-/* Line 1806 of yacc.c */ +-#line 354 "dtc-parser.y" ++ case 33: ++#line 337 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.array).data = data_add_marker((yyvsp[(1) - (2)].array).data, LABEL, (yyvsp[(2) - (2)].labelref)); ++ (yyval.array).data = data_add_marker((yyvsp[-1].array).data, LABEL, (yyvsp[0].labelref)); + } ++#line 1799 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 38: +- +-/* Line 1806 of yacc.c */ +-#line 363 "dtc-parser.y" ++ case 36: ++#line 346 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.integer) = (yyvsp[(2) - (3)].integer); ++ (yyval.integer) = (yyvsp[-1].integer); + } ++#line 1807 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 41: ++ case 39: ++#line 357 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-4].integer) ? (yyvsp[-2].integer) : (yyvsp[0].integer); } ++#line 1813 "dtc-parser.tab.c" /* yacc.c:1646 */ ++ break; + +-/* Line 1806 of yacc.c */ +-#line 374 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); } ++ case 41: ++#line 362 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) || (yyvsp[0].integer); } ++#line 1819 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 43: +- +-/* Line 1806 of yacc.c */ +-#line 379 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); } ++#line 367 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) && (yyvsp[0].integer); } ++#line 1825 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 45: +- +-/* Line 1806 of yacc.c */ +-#line 384 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); } ++#line 372 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) | (yyvsp[0].integer); } ++#line 1831 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 47: +- +-/* Line 1806 of yacc.c */ +-#line 389 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); } ++#line 377 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) ^ (yyvsp[0].integer); } ++#line 1837 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 49: +- +-/* Line 1806 of yacc.c */ +-#line 394 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); } ++#line 382 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) & (yyvsp[0].integer); } ++#line 1843 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 51: +- +-/* Line 1806 of yacc.c */ +-#line 399 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); } ++#line 387 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) == (yyvsp[0].integer); } ++#line 1849 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 53: +- +-/* Line 1806 of yacc.c */ +-#line 404 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); } ++ case 52: ++#line 388 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) != (yyvsp[0].integer); } ++#line 1855 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 54: ++#line 393 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) < (yyvsp[0].integer); } ++#line 1861 "dtc-parser.tab.c" /* yacc.c:1646 */ ++ break; + +-/* Line 1806 of yacc.c */ +-#line 405 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); } ++ case 55: ++#line 394 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) > (yyvsp[0].integer); } ++#line 1867 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 56: +- +-/* Line 1806 of yacc.c */ +-#line 410 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); } ++#line 395 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) <= (yyvsp[0].integer); } ++#line 1873 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 57: +- +-/* Line 1806 of yacc.c */ +-#line 411 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); } ++#line 396 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) >= (yyvsp[0].integer); } ++#line 1879 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 58: +- +-/* Line 1806 of yacc.c */ +-#line 412 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); } ++#line 400 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) << (yyvsp[0].integer); } ++#line 1885 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 59: +- +-/* Line 1806 of yacc.c */ +-#line 413 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); } +- break; +- +- case 60: +- +-/* Line 1806 of yacc.c */ +-#line 417 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); } ++#line 401 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) >> (yyvsp[0].integer); } ++#line 1891 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 61: +- +-/* Line 1806 of yacc.c */ +-#line 418 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); } ++#line 406 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) + (yyvsp[0].integer); } ++#line 1897 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 63: +- +-/* Line 1806 of yacc.c */ +-#line 423 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); } ++ case 62: ++#line 407 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) - (yyvsp[0].integer); } ++#line 1903 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 64: ++#line 412 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) * (yyvsp[0].integer); } ++#line 1909 "dtc-parser.tab.c" /* yacc.c:1646 */ ++ break; + +-/* Line 1806 of yacc.c */ +-#line 424 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); } ++ case 65: ++#line 413 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) / (yyvsp[0].integer); } ++#line 1915 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 66: +- +-/* Line 1806 of yacc.c */ +-#line 429 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); } ++#line 414 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) % (yyvsp[0].integer); } ++#line 1921 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 67: +- +-/* Line 1806 of yacc.c */ +-#line 430 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); } ++ case 69: ++#line 420 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = -(yyvsp[0].integer); } ++#line 1927 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 68: +- +-/* Line 1806 of yacc.c */ +-#line 431 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); } ++ case 70: ++#line 421 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = ~(yyvsp[0].integer); } ++#line 1933 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 71: +- +-/* Line 1806 of yacc.c */ +-#line 437 "dtc-parser.y" +- { (yyval.integer) = -(yyvsp[(2) - (2)].integer); } ++#line 422 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = !(yyvsp[0].integer); } ++#line 1939 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 72: +- +-/* Line 1806 of yacc.c */ +-#line 438 "dtc-parser.y" +- { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); } ++#line 427 "dtc-parser.y" /* yacc.c:1646 */ ++ { ++ (yyval.data) = empty_data; ++ } ++#line 1947 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 73: +- +-/* Line 1806 of yacc.c */ +-#line 439 "dtc-parser.y" +- { (yyval.integer) = !(yyvsp[(2) - (2)].integer); } ++#line 431 "dtc-parser.y" /* yacc.c:1646 */ ++ { ++ (yyval.data) = data_append_byte((yyvsp[-1].data), (yyvsp[0].byte)); ++ } ++#line 1955 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 74: +- +-/* Line 1806 of yacc.c */ +-#line 444 "dtc-parser.y" ++#line 435 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = empty_data; ++ (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref)); + } ++#line 1963 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 75: +- +-/* Line 1806 of yacc.c */ +-#line 448 "dtc-parser.y" ++#line 442 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte)); ++ (yyval.nodelist) = NULL; + } ++#line 1971 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 76: +- +-/* Line 1806 of yacc.c */ +-#line 452 "dtc-parser.y" ++#line 446 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); ++ (yyval.nodelist) = chain_node((yyvsp[-1].node), (yyvsp[0].nodelist)); + } ++#line 1979 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 77: +- +-/* Line 1806 of yacc.c */ +-#line 459 "dtc-parser.y" ++#line 450 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.nodelist) = NULL; ++ ERROR(&(yylsp[0]), "Properties must precede subnodes"); ++ YYERROR; + } ++#line 1988 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 78: +- +-/* Line 1806 of yacc.c */ +-#line 463 "dtc-parser.y" ++#line 458 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist)); ++ (yyval.node) = name_node((yyvsp[0].node), (yyvsp[-1].propnodename)); + } ++#line 1996 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 79: +- +-/* Line 1806 of yacc.c */ +-#line 467 "dtc-parser.y" ++#line 462 "dtc-parser.y" /* yacc.c:1646 */ + { +- ERROR(&(yylsp[(2) - (2)]), "Properties must precede subnodes"); +- YYERROR; ++ (yyval.node) = name_node(build_node_delete(), (yyvsp[-1].propnodename)); + } ++#line 2004 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 80: +- +-/* Line 1806 of yacc.c */ +-#line 475 "dtc-parser.y" ++#line 466 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename)); ++ add_label(&(yyvsp[0].node)->labels, (yyvsp[-1].labelref)); ++ (yyval.node) = (yyvsp[0].node); + } ++#line 2013 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 81: + +-/* Line 1806 of yacc.c */ +-#line 479 "dtc-parser.y" +- { +- (yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename)); +- } +- break; +- +- case 82: +- +-/* Line 1806 of yacc.c */ +-#line 483 "dtc-parser.y" +- { +- add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref)); +- (yyval.node) = (yyvsp[(2) - (2)].node); +- } +- break; +- +- +- +-/* Line 1806 of yacc.c */ +-#line 2235 "dtc-parser.tab.c" ++#line 2017 "dtc-parser.tab.c" /* yacc.c:1646 */ + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires +@@ -2254,7 +2036,7 @@ yyreduce: + *++yyvsp = yyval; + *++yylsp = yyloc; + +- /* Now `shift' the result of the reduction. Determine what state ++ /* Now 'shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + +@@ -2269,9 +2051,9 @@ yyreduce: + goto yynewstate; + + +-/*------------------------------------. +-| yyerrlab -- here on detecting error | +-`------------------------------------*/ ++/*--------------------------------------. ++| yyerrlab -- here on detecting error. | ++`--------------------------------------*/ + yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ +@@ -2322,20 +2104,20 @@ yyerrlab: + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an +- error, discard it. */ ++ error, discard it. */ + + if (yychar <= YYEOF) +- { +- /* Return failure if at end of input. */ +- if (yychar == YYEOF) +- YYABORT; +- } ++ { ++ /* Return failure if at end of input. */ ++ if (yychar == YYEOF) ++ YYABORT; ++ } + else +- { +- yydestruct ("Error: discarding", +- yytoken, &yylval, &yylloc); +- yychar = YYEMPTY; +- } ++ { ++ yydestruct ("Error: discarding", ++ yytoken, &yylval, &yylloc); ++ yychar = YYEMPTY; ++ } + } + + /* Else will try to reuse lookahead token after shifting the error +@@ -2355,7 +2137,7 @@ yyerrorlab: + goto yyerrorlab; + + yyerror_range[1] = yylsp[1-yylen]; +- /* Do not reclaim the symbols of the rule which action triggered ++ /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; +@@ -2368,35 +2150,37 @@ yyerrorlab: + | yyerrlab1 -- common code for both syntax error and YYERROR. | + `-------------------------------------------------------------*/ + yyerrlab1: +- yyerrstatus = 3; /* Each real token shifted decrements this. */ ++ yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) +- { +- yyn += YYTERROR; +- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) +- { +- yyn = yytable[yyn]; +- if (0 < yyn) +- break; +- } +- } ++ { ++ yyn += YYTERROR; ++ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) ++ { ++ yyn = yytable[yyn]; ++ if (0 < yyn) ++ break; ++ } ++ } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) +- YYABORT; ++ YYABORT; + + yyerror_range[1] = *yylsp; + yydestruct ("Error: popping", +- yystos[yystate], yyvsp, yylsp); ++ yystos[yystate], yyvsp, yylsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + ++ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; ++ YY_IGNORE_MAYBE_UNINITIALIZED_END + + yyerror_range[2] = yylloc; + /* Using YYLLOC is tempting, but would change the location of +@@ -2425,7 +2209,7 @@ yyabortlab: + yyresult = 1; + goto yyreturn; + +-#if !defined(yyoverflow) || YYERROR_VERBOSE ++#if !defined yyoverflow || YYERROR_VERBOSE + /*-------------------------------------------------. + | yyexhaustedlab -- memory exhaustion comes here. | + `-------------------------------------------------*/ +@@ -2444,14 +2228,14 @@ yyreturn: + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc); + } +- /* Do not reclaim the symbols of the rule which action triggered ++ /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", +- yystos[*yyssp], yyvsp, yylsp); ++ yystos[*yyssp], yyvsp, yylsp); + YYPOPSTACK (1); + } + #ifndef yyoverflow +@@ -2462,18 +2246,12 @@ yyreturn: + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + #endif +- /* Make sure YYID is used. */ +- return YYID (yyresult); ++ return yyresult; + } +- +- +- +-/* Line 2067 of yacc.c */ +-#line 489 "dtc-parser.y" ++#line 472 "dtc-parser.y" /* yacc.c:1906 */ + + + void yyerror(char const *s) + { + ERROR(&yylloc, "%s", s); + } +- +diff --git a/scripts/dtc/dtc-parser.tab.h_shipped b/scripts/dtc/dtc-parser.tab.h_shipped +index 0b22bbb..30867c6 100644 +--- a/scripts/dtc/dtc-parser.tab.h_shipped ++++ b/scripts/dtc/dtc-parser.tab.h_shipped +@@ -1,19 +1,19 @@ +-/* A Bison parser, made by GNU Bison 2.5. */ ++/* A Bison parser, made by GNU Bison 3.0.2. */ + + /* Bison interface for Yacc-like parsers in C +- +- Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. +- ++ ++ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. ++ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. +- ++ + 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. +- ++ + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +@@ -26,50 +26,55 @@ + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. +- ++ + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + ++#ifndef YY_YY_DTC_PARSER_TAB_H_INCLUDED ++# define YY_YY_DTC_PARSER_TAB_H_INCLUDED ++/* Debug traces. */ ++#ifndef YYDEBUG ++# define YYDEBUG 0 ++#endif ++#if YYDEBUG ++extern int yydebug; ++#endif + +-/* Tokens. */ ++/* Token type. */ + #ifndef YYTOKENTYPE + # define YYTOKENTYPE +- /* Put the tokens into the symbol table, so that GDB and other debuggers +- know about them. */ +- enum yytokentype { +- DT_V1 = 258, +- DT_PLUGIN = 259, +- DT_MEMRESERVE = 260, +- DT_LSHIFT = 261, +- DT_RSHIFT = 262, +- DT_LE = 263, +- DT_GE = 264, +- DT_EQ = 265, +- DT_NE = 266, +- DT_AND = 267, +- DT_OR = 268, +- DT_BITS = 269, +- DT_DEL_PROP = 270, +- DT_DEL_NODE = 271, +- DT_PROPNODENAME = 272, +- DT_LITERAL = 273, +- DT_CHAR_LITERAL = 274, +- DT_BYTE = 275, +- DT_STRING = 276, +- DT_LABEL = 277, +- DT_REF = 278, +- DT_INCBIN = 279 +- }; ++ enum yytokentype ++ { ++ DT_V1 = 258, ++ DT_MEMRESERVE = 259, ++ DT_LSHIFT = 260, ++ DT_RSHIFT = 261, ++ DT_LE = 262, ++ DT_GE = 263, ++ DT_EQ = 264, ++ DT_NE = 265, ++ DT_AND = 266, ++ DT_OR = 267, ++ DT_BITS = 268, ++ DT_DEL_PROP = 269, ++ DT_DEL_NODE = 270, ++ DT_PROPNODENAME = 271, ++ DT_LITERAL = 272, ++ DT_CHAR_LITERAL = 273, ++ DT_BYTE = 274, ++ DT_STRING = 275, ++ DT_LABEL = 276, ++ DT_REF = 277, ++ DT_INCBIN = 278 ++ }; + #endif + +- +- ++/* Value type. */ + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +-typedef union YYSTYPE ++typedef union YYSTYPE YYSTYPE; ++union YYSTYPE + { +- +-/* Line 2068 of yacc.c */ +-#line 39 "dtc-parser.y" ++#line 38 "dtc-parser.y" /* yacc.c:1909 */ + + char *propnodename; + char *labelref; +@@ -87,32 +92,30 @@ typedef union YYSTYPE + struct node *nodelist; + struct reserve_info *re; + uint64_t integer; +- int is_plugin; +- +- + +-/* Line 2068 of yacc.c */ +-#line 96 "dtc-parser.tab.h" +-} YYSTYPE; ++#line 97 "dtc-parser.tab.h" /* yacc.c:1909 */ ++}; + # define YYSTYPE_IS_TRIVIAL 1 +-# define yystype YYSTYPE /* obsolescent; will be withdrawn */ + # define YYSTYPE_IS_DECLARED 1 + #endif + +-extern YYSTYPE yylval; +- ++/* Location type. */ + #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +-typedef struct YYLTYPE ++typedef struct YYLTYPE YYLTYPE; ++struct YYLTYPE + { + int first_line; + int first_column; + int last_line; + int last_column; +-} YYLTYPE; +-# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ ++}; + # define YYLTYPE_IS_DECLARED 1 + # define YYLTYPE_IS_TRIVIAL 1 + #endif + ++ ++extern YYSTYPE yylval; + extern YYLTYPE yylloc; ++int yyparse (void); + ++#endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED */ +diff --git a/scripts/dtc/dtc-parser.y b/scripts/dtc/dtc-parser.y +index 56b9c15..5a897e3 100644 +--- a/scripts/dtc/dtc-parser.y ++++ b/scripts/dtc/dtc-parser.y +@@ -19,7 +19,6 @@ + */ + %{ + #include +-#include + + #include "dtc.h" + #include "srcpos.h" +@@ -53,11 +52,9 @@ extern bool treesource_error; + struct node *nodelist; + struct reserve_info *re; + uint64_t integer; +- int is_plugin; + } + + %token DT_V1 +-%token DT_PLUGIN + %token DT_MEMRESERVE + %token DT_LSHIFT DT_RSHIFT DT_LE DT_GE DT_EQ DT_NE DT_AND DT_OR + %token DT_BITS +@@ -74,7 +71,6 @@ extern bool treesource_error; + + %type propdata + %type propdataprefix +-%type plugindecl + %type memreserve + %type memreserves + %type arrayprefix +@@ -105,23 +101,10 @@ extern bool treesource_error; + %% + + sourcefile: +- DT_V1 ';' plugindecl memreserves devicetree ++ DT_V1 ';' memreserves devicetree + { +- $5->is_plugin = $3; +- $5->is_root = 1; +- the_boot_info = build_boot_info($4, $5, +- guess_boot_cpuid($5)); +- } +- ; +- +-plugindecl: +- /* empty */ +- { +- $$ = 0; +- } +- | DT_PLUGIN ';' +- { +- $$ = 1; ++ the_boot_info = build_boot_info($3, $4, ++ guess_boot_cpuid($4)); + } + ; + +diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c +index 0cbb14c..8c4add6 100644 +--- a/scripts/dtc/dtc.c ++++ b/scripts/dtc/dtc.c +@@ -29,7 +29,6 @@ int reservenum; /* Number of memory reservation slots */ + int minsize; /* Minimum blob size */ + int padsize; /* Additional padding to blob */ + int phandle_format = PHANDLE_BOTH; /* Use linux,phandle or phandle properties */ +-int symbol_fixup_support = 0; + + static void fill_fullpaths(struct node *tree, const char *prefix) + { +@@ -52,7 +51,7 @@ static void fill_fullpaths(struct node *tree, const char *prefix) + #define FDT_VERSION(version) _FDT_VERSION(version) + #define _FDT_VERSION(version) #version + static const char usage_synopsis[] = "dtc [options] "; +-static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv@"; ++static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv"; + static struct option const usage_long_opts[] = { + {"quiet", no_argument, NULL, 'q'}, + {"in-format", a_argument, NULL, 'I'}, +@@ -70,7 +69,6 @@ static struct option const usage_long_opts[] = { + {"phandle", a_argument, NULL, 'H'}, + {"warning", a_argument, NULL, 'W'}, + {"error", a_argument, NULL, 'E'}, +- {"symbols", a_argument, NULL, '@'}, + {"help", no_argument, NULL, 'h'}, + {"version", no_argument, NULL, 'v'}, + {NULL, no_argument, NULL, 0x0}, +@@ -101,7 +99,6 @@ static const char * const usage_opts_help[] = { + "\t\tboth - Both \"linux,phandle\" and \"phandle\" properties", + "\n\tEnable/disable warnings (prefix with \"no-\")", + "\n\tEnable/disable errors (prefix with \"no-\")", +- "\n\tSymbols and Fixups support", + "\n\tPrint this help and exit", + "\n\tPrint version and exit", + NULL, +@@ -189,9 +186,7 @@ int main(int argc, char *argv[]) + case 'E': + parse_checks_option(false, true, optarg); + break; +- case '@': +- symbol_fixup_support = 1; +- break; ++ + case 'h': + usage(NULL); + default: +diff --git a/scripts/dtc/dtc.h b/scripts/dtc/dtc.h +index fe45748..56212c8 100644 +--- a/scripts/dtc/dtc.h ++++ b/scripts/dtc/dtc.h +@@ -54,7 +54,6 @@ extern int reservenum; /* Number of memory reservation slots */ + extern int minsize; /* Minimum blob size */ + extern int padsize; /* Additional padding to blob */ + extern int phandle_format; /* Use linux,phandle or phandle properties */ +-extern int symbol_fixup_support;/* enable symbols & fixup support */ + + #define PHANDLE_LEGACY 0x1 + #define PHANDLE_EPAPR 0x2 +@@ -133,25 +132,6 @@ struct label { + struct label *next; + }; + +-struct fixup_entry { +- int offset; +- struct node *node; +- struct property *prop; +- struct fixup_entry *next; +-}; +- +-struct fixup { +- char *ref; +- struct fixup_entry *entries; +- struct fixup *next; +-}; +- +-struct symbol { +- struct label *label; +- struct node *node; +- struct symbol *next; +-}; +- + struct property { + bool deleted; + char *name; +@@ -178,12 +158,6 @@ struct node { + int addr_cells, size_cells; + + struct label *labels; +- +- int is_root; +- int is_plugin; +- struct fixup *fixups; +- struct symbol *symbols; +- struct fixup_entry *local_fixups; + }; + + #define for_each_label_withdel(l0, l) \ +@@ -207,18 +181,6 @@ struct node { + for_each_child_withdel(n, c) \ + if (!(c)->deleted) + +-#define for_each_fixup(n, f) \ +- for ((f) = (n)->fixups; (f); (f) = (f)->next) +- +-#define for_each_fixup_entry(f, fe) \ +- for ((fe) = (f)->entries; (fe); (fe) = (fe)->next) +- +-#define for_each_symbol(n, s) \ +- for ((s) = (n)->symbols; (s); (s) = (s)->next) +- +-#define for_each_local_fixup_entry(n, fe) \ +- for ((fe) = (n)->local_fixups; (fe); (fe) = (fe)->next) +- + void add_label(struct label **labels, char *label); + void delete_labels(struct label **labels); + +diff --git a/scripts/dtc/flattree.c b/scripts/dtc/flattree.c +index f439b40..bd99fa2 100644 +--- a/scripts/dtc/flattree.c ++++ b/scripts/dtc/flattree.c +@@ -262,12 +262,6 @@ static void flatten_tree(struct node *tree, struct emitter *emit, + struct property *prop; + struct node *child; + bool seen_name_prop = false; +- struct symbol *sym; +- struct fixup *f; +- struct fixup_entry *fe; +- char *name, *s; +- const char *fullpath; +- int namesz, nameoff, vallen; + + if (tree->deleted) + return; +@@ -282,6 +276,8 @@ static void flatten_tree(struct node *tree, struct emitter *emit, + emit->align(etarget, sizeof(cell_t)); + + for_each_property(tree, prop) { ++ int nameoff; ++ + if (streq(prop->name, "name")) + seen_name_prop = true; + +@@ -314,139 +310,6 @@ static void flatten_tree(struct node *tree, struct emitter *emit, + flatten_tree(child, emit, etarget, strbuf, vi); + } + +- if (!symbol_fixup_support) +- goto no_symbols; +- +- /* add the symbol nodes (if any) */ +- if (tree->symbols) { +- +- emit->beginnode(etarget, NULL); +- emit->string(etarget, "__symbols__", 0); +- emit->align(etarget, sizeof(cell_t)); +- +- for_each_symbol(tree, sym) { +- +- vallen = strlen(sym->node->fullpath); +- +- nameoff = stringtable_insert(strbuf, sym->label->label); +- +- emit->property(etarget, NULL); +- emit->cell(etarget, vallen + 1); +- emit->cell(etarget, nameoff); +- +- if ((vi->flags & FTF_VARALIGN) && vallen >= 8) +- emit->align(etarget, 8); +- +- emit->string(etarget, sym->node->fullpath, +- strlen(sym->node->fullpath)); +- emit->align(etarget, sizeof(cell_t)); +- } +- +- emit->endnode(etarget, NULL); +- } +- +- /* add the fixup nodes */ +- if (tree->fixups) { +- +- /* emit the external fixups */ +- emit->beginnode(etarget, NULL); +- emit->string(etarget, "__fixups__", 0); +- emit->align(etarget, sizeof(cell_t)); +- +- for_each_fixup(tree, f) { +- +- namesz = 0; +- for_each_fixup_entry(f, fe) { +- fullpath = fe->node->fullpath; +- if (fullpath[0] == '\0') +- fullpath = "/"; +- namesz += strlen(fullpath) + 1; +- namesz += strlen(fe->prop->name) + 1; +- namesz += 32; /* space for : + '\0' */ +- } +- +- name = xmalloc(namesz); +- +- s = name; +- for_each_fixup_entry(f, fe) { +- fullpath = fe->node->fullpath; +- if (fullpath[0] == '\0') +- fullpath = "/"; +- snprintf(s, name + namesz - s, "%s:%s:%d", +- fullpath, +- fe->prop->name, fe->offset); +- s += strlen(s) + 1; +- } +- +- nameoff = stringtable_insert(strbuf, f->ref); +- vallen = s - name - 1; +- +- emit->property(etarget, NULL); +- emit->cell(etarget, vallen + 1); +- emit->cell(etarget, nameoff); +- +- if ((vi->flags & FTF_VARALIGN) && vallen >= 8) +- emit->align(etarget, 8); +- +- emit->string(etarget, name, vallen); +- emit->align(etarget, sizeof(cell_t)); +- +- free(name); +- } +- +- emit->endnode(etarget, tree->labels); +- } +- +- /* add the local fixup property */ +- if (tree->local_fixups) { +- +- /* emit the external fixups */ +- emit->beginnode(etarget, NULL); +- emit->string(etarget, "__local_fixups__", 0); +- emit->align(etarget, sizeof(cell_t)); +- +- namesz = 0; +- for_each_local_fixup_entry(tree, fe) { +- fullpath = fe->node->fullpath; +- if (fullpath[0] == '\0') +- fullpath = "/"; +- namesz += strlen(fullpath) + 1; +- namesz += strlen(fe->prop->name) + 1; +- namesz += 32; /* space for : + '\0' */ +- } +- +- name = xmalloc(namesz); +- +- s = name; +- for_each_local_fixup_entry(tree, fe) { +- fullpath = fe->node->fullpath; +- if (fullpath[0] == '\0') +- fullpath = "/"; +- snprintf(s, name + namesz - s, "%s:%s:%d", +- fullpath, fe->prop->name, +- fe->offset); +- s += strlen(s) + 1; +- } +- +- nameoff = stringtable_insert(strbuf, "fixup"); +- vallen = s - name - 1; +- +- emit->property(etarget, NULL); +- emit->cell(etarget, vallen + 1); +- emit->cell(etarget, nameoff); +- +- if ((vi->flags & FTF_VARALIGN) && vallen >= 8) +- emit->align(etarget, 8); +- +- emit->string(etarget, name, vallen); +- emit->align(etarget, sizeof(cell_t)); +- +- free(name); +- +- emit->endnode(etarget, tree->labels); +- } +- +-no_symbols: + emit->endnode(etarget, tree->labels); + } + +diff --git a/scripts/dtc/version_gen.h b/scripts/dtc/version_gen.h +index 86b7338..5b8c7d5 100644 +--- a/scripts/dtc/version_gen.h ++++ b/scripts/dtc/version_gen.h +@@ -1 +1 @@ +-#define DTC_VERSION "DTC 1.4.1-g9d3649bd-dirty" ++#define DTC_VERSION "DTC 1.4.1-g9d3649bd" +-- +2.5.0 + + +From fdba337a4b1b302e9c9a6ba478543cd628981fde Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 10 Aug 2015 09:49:15 +0100 +Subject: [PATCH 173/181] scripts/dtc: Update to upstream version 1.4.1 + +Includes the new localfixups format. + +Signed-off-by: Phil Elwell +--- + scripts/dtc/checks.c | 105 ++++- + scripts/dtc/dtc-lexer.l | 5 + + scripts/dtc/dtc-lexer.lex.c_shipped | 490 ++++++++++++------------ + scripts/dtc/dtc-parser.tab.c_shipped | 722 ++++++++++++++++++----------------- + scripts/dtc/dtc-parser.tab.h_shipped | 46 +-- + scripts/dtc/dtc-parser.y | 22 +- + scripts/dtc/dtc.c | 9 +- + scripts/dtc/dtc.h | 40 ++ + scripts/dtc/flattree.c | 202 ++++++++++ + scripts/dtc/version_gen.h | 2 +- + 10 files changed, 1021 insertions(+), 622 deletions(-) + +diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c +index e81a8c74..540a3ea 100644 +--- a/scripts/dtc/checks.c ++++ b/scripts/dtc/checks.c +@@ -458,6 +458,8 @@ static void fixup_phandle_references(struct check *c, struct node *dt, + struct node *node, struct property *prop) + { + struct marker *m = prop->val.markers; ++ struct fixup *f, **fp; ++ struct fixup_entry *fe, **fep; + struct node *refnode; + cell_t phandle; + +@@ -466,11 +468,69 @@ static void fixup_phandle_references(struct check *c, struct node *dt, + + refnode = get_node_by_ref(dt, m->ref); + if (! refnode) { +- FAIL(c, "Reference to non-existent node or label \"%s\"\n", +- m->ref); ++ if (!dt->is_plugin) { ++ FAIL(c, "Reference to non-existent node or label \"%s\"\n", ++ m->ref); ++ continue; ++ } ++ ++ /* allocate fixup entry */ ++ fe = xmalloc(sizeof(*fe)); ++ ++ fe->node = node; ++ fe->prop = prop; ++ fe->offset = m->offset; ++ fe->next = NULL; ++ ++ /* search for an already existing fixup */ ++ for_each_fixup(dt, f) ++ if (strcmp(f->ref, m->ref) == 0) ++ break; ++ ++ /* no fixup found, add new */ ++ if (f == NULL) { ++ f = xmalloc(sizeof(*f)); ++ f->ref = m->ref; ++ f->entries = NULL; ++ f->next = NULL; ++ ++ /* add it to the tree */ ++ fp = &dt->fixups; ++ while (*fp) ++ fp = &(*fp)->next; ++ *fp = f; ++ } ++ ++ /* and now append fixup entry */ ++ fep = &f->entries; ++ while (*fep) ++ fep = &(*fep)->next; ++ *fep = fe; ++ ++ /* mark the entry as unresolved */ ++ *((cell_t *)(prop->val.val + m->offset)) = ++ cpu_to_fdt32(0xdeadbeef); + continue; + } + ++ /* if it's a local reference, we need to record it */ ++ if (symbol_fixup_support) { ++ ++ /* allocate a new local fixup entry */ ++ fe = xmalloc(sizeof(*fe)); ++ ++ fe->node = node; ++ fe->prop = prop; ++ fe->offset = m->offset; ++ fe->next = NULL; ++ ++ /* append it to the local fixups */ ++ fep = &dt->local_fixups; ++ while (*fep) ++ fep = &(*fep)->next; ++ *fep = fe; ++ } ++ + phandle = get_node_phandle(dt, refnode); + *((cell_t *)(prop->val.val + m->offset)) = cpu_to_fdt32(phandle); + } +@@ -652,6 +712,45 @@ static void check_obsolete_chosen_interrupt_controller(struct check *c, + } + TREE_WARNING(obsolete_chosen_interrupt_controller, NULL); + ++static void check_auto_label_phandles(struct check *c, struct node *dt, ++ struct node *node) ++{ ++ struct label *l; ++ struct symbol *s, **sp; ++ int has_label; ++ ++ if (!symbol_fixup_support) ++ return; ++ ++ has_label = 0; ++ for_each_label(node->labels, l) { ++ has_label = 1; ++ break; ++ } ++ ++ if (!has_label) ++ return; ++ ++ /* force allocation of a phandle for this node */ ++ (void)get_node_phandle(dt, node); ++ ++ /* add the symbol */ ++ for_each_label(node->labels, l) { ++ ++ s = xmalloc(sizeof(*s)); ++ s->label = l; ++ s->node = node; ++ s->next = NULL; ++ ++ /* add it to the symbols list */ ++ sp = &dt->symbols; ++ while (*sp) ++ sp = &((*sp)->next); ++ *sp = s; ++ } ++} ++NODE_WARNING(auto_label_phandles, NULL); ++ + static struct check *check_table[] = { + &duplicate_node_names, &duplicate_property_names, + &node_name_chars, &node_name_format, &property_name_chars, +@@ -670,6 +769,8 @@ static struct check *check_table[] = { + &avoid_default_addr_size, + &obsolete_chosen_interrupt_controller, + ++ &auto_label_phandles, ++ + &always_fail, + }; + +diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l +index 0ee1caf..dd44ba2 100644 +--- a/scripts/dtc/dtc-lexer.l ++++ b/scripts/dtc/dtc-lexer.l +@@ -113,6 +113,11 @@ static void lexical_error(const char *fmt, ...); + return DT_V1; + } + ++<*>"/plugin/" { ++ DPRINT("Keyword: /plugin/\n"); ++ return DT_PLUGIN; ++ } ++ + <*>"/memreserve/" { + DPRINT("Keyword: /memreserve/\n"); + BEGIN_DEFAULT(); +diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped +index 11cd78e..1518525 100644 +--- a/scripts/dtc/dtc-lexer.lex.c_shipped ++++ b/scripts/dtc/dtc-lexer.lex.c_shipped +@@ -9,7 +9,7 @@ + #define FLEX_SCANNER + #define YY_FLEX_MAJOR_VERSION 2 + #define YY_FLEX_MINOR_VERSION 5 +-#define YY_FLEX_SUBMINOR_VERSION 39 ++#define YY_FLEX_SUBMINOR_VERSION 35 + #if YY_FLEX_SUBMINOR_VERSION > 0 + #define FLEX_BETA + #endif +@@ -162,12 +162,7 @@ typedef unsigned int flex_uint32_t; + typedef struct yy_buffer_state *YY_BUFFER_STATE; + #endif + +-#ifndef YY_TYPEDEF_YY_SIZE_T +-#define YY_TYPEDEF_YY_SIZE_T +-typedef size_t yy_size_t; +-#endif +- +-extern yy_size_t yyleng; ++extern int yyleng; + + extern FILE *yyin, *yyout; + +@@ -176,7 +171,6 @@ extern FILE *yyin, *yyout; + #define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) +- #define YY_LINENO_REWIND_TO(ptr) + + /* Return all but the first "n" matched characters back to the input stream. */ + #define yyless(n) \ +@@ -194,6 +188,11 @@ extern FILE *yyin, *yyout; + + #define unput(c) yyunput( c, (yytext_ptr) ) + ++#ifndef YY_TYPEDEF_YY_SIZE_T ++#define YY_TYPEDEF_YY_SIZE_T ++typedef size_t yy_size_t; ++#endif ++ + #ifndef YY_STRUCT_YY_BUFFER_STATE + #define YY_STRUCT_YY_BUFFER_STATE + struct yy_buffer_state +@@ -211,7 +210,7 @@ struct yy_buffer_state + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ +- yy_size_t yy_n_chars; ++ int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to +@@ -281,8 +280,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + + /* yy_hold_char holds the character lost when yytext is formed. */ + static char yy_hold_char; +-static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +-yy_size_t yyleng; ++static int yy_n_chars; /* number of characters read into yy_ch_buf */ ++int yyleng; + + /* Points to current character in buffer. */ + static char *yy_c_buf_p = (char *) 0; +@@ -310,7 +309,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); + + YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); + YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); +-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); ++YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); + + void *yyalloc (yy_size_t ); + void *yyrealloc (void *,yy_size_t ); +@@ -342,7 +341,7 @@ void yyfree (void * ); + + /* Begin user sect3 */ + +-#define yywrap() 1 ++#define yywrap(n) 1 + #define YY_SKIP_YYWRAP + + typedef unsigned char YY_CHAR; +@@ -373,8 +372,8 @@ static void yy_fatal_error (yyconst char msg[] ); + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +-#define YY_NUM_RULES 30 +-#define YY_END_OF_BUFFER 31 ++#define YY_NUM_RULES 31 ++#define YY_END_OF_BUFFER 32 + /* This struct is not used in this scanner, + but its presence is necessary. */ + struct yy_trans_info +@@ -382,25 +381,26 @@ struct yy_trans_info + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +-static yyconst flex_int16_t yy_accept[159] = ++static yyconst flex_int16_t yy_accept[166] = + { 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 31, 29, +- 18, 18, 29, 29, 29, 29, 29, 29, 29, 29, +- 29, 29, 29, 29, 29, 29, 15, 16, 16, 29, +- 16, 10, 10, 18, 26, 0, 3, 0, 27, 12, +- 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, +- 21, 23, 25, 24, 22, 0, 9, 28, 0, 0, +- 0, 14, 14, 16, 16, 16, 10, 10, 10, 0, +- 12, 0, 11, 0, 0, 0, 20, 0, 0, 0, +- 0, 0, 0, 0, 0, 16, 10, 10, 10, 0, +- 13, 19, 0, 0, 0, 0, 0, 0, 0, 0, +- +- 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 16, 6, 0, 0, 0, 0, 0, 0, 2, +- 0, 0, 0, 0, 0, 0, 0, 0, 4, 17, +- 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, +- 5, 8, 0, 0, 0, 0, 7, 0 ++ 0, 0, 0, 0, 0, 0, 0, 0, 32, 30, ++ 19, 19, 30, 30, 30, 30, 30, 30, 30, 30, ++ 30, 30, 30, 30, 30, 30, 16, 17, 17, 30, ++ 17, 11, 11, 19, 27, 0, 3, 0, 28, 13, ++ 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, ++ 0, 22, 24, 26, 25, 23, 0, 10, 29, 0, ++ 0, 0, 15, 15, 17, 17, 17, 11, 11, 11, ++ 0, 13, 0, 12, 0, 0, 0, 21, 0, 0, ++ 0, 0, 0, 0, 0, 0, 0, 17, 11, 11, ++ 11, 0, 14, 20, 0, 0, 0, 0, 0, 0, ++ ++ 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, ++ 0, 0, 0, 0, 0, 17, 7, 0, 0, 0, ++ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, ++ 0, 0, 0, 0, 4, 18, 0, 0, 5, 2, ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 0, 1, 0, 0, 0, 0, 6, 9, 0, ++ 0, 0, 0, 8, 0 + } ; + + static yyconst flex_int32_t yy_ec[256] = +@@ -416,9 +416,9 @@ static yyconst flex_int32_t yy_ec[256] = + 22, 22, 22, 22, 24, 22, 22, 25, 22, 22, + 1, 26, 27, 1, 22, 1, 21, 28, 29, 30, + +- 31, 21, 22, 22, 32, 22, 22, 33, 34, 35, +- 36, 37, 22, 38, 39, 40, 41, 42, 22, 25, +- 43, 22, 44, 45, 46, 1, 1, 1, 1, 1, ++ 31, 21, 32, 22, 33, 22, 22, 34, 35, 36, ++ 37, 38, 22, 39, 40, 41, 42, 43, 22, 25, ++ 44, 22, 45, 46, 47, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +@@ -435,163 +435,165 @@ static yyconst flex_int32_t yy_ec[256] = + 1, 1, 1, 1, 1 + } ; + +-static yyconst flex_int32_t yy_meta[47] = ++static yyconst flex_int32_t yy_meta[48] = + { 0, + 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, + 2, 2, 4, 5, 5, 5, 6, 1, 1, 1, + 7, 8, 8, 8, 8, 1, 1, 7, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, +- 8, 8, 8, 3, 1, 4 ++ 8, 8, 8, 8, 3, 1, 4 + } ; + +-static yyconst flex_int16_t yy_base[173] = ++static yyconst flex_int16_t yy_base[180] = + { 0, +- 0, 383, 34, 382, 65, 381, 37, 105, 387, 391, +- 54, 111, 367, 110, 109, 109, 112, 41, 366, 104, +- 367, 338, 124, 117, 0, 144, 391, 0, 121, 0, +- 135, 155, 140, 179, 391, 160, 391, 379, 391, 0, +- 368, 141, 391, 167, 370, 376, 346, 103, 342, 345, +- 391, 391, 391, 391, 391, 358, 391, 391, 175, 342, +- 338, 391, 355, 0, 185, 339, 184, 347, 346, 0, +- 0, 322, 175, 357, 175, 363, 352, 324, 330, 323, +- 332, 326, 201, 324, 329, 322, 391, 333, 181, 309, +- 391, 341, 340, 313, 320, 338, 178, 311, 146, 317, +- +- 314, 315, 335, 331, 303, 300, 309, 299, 308, 188, +- 336, 335, 391, 305, 320, 281, 283, 271, 203, 288, +- 281, 271, 266, 264, 245, 242, 208, 104, 391, 391, +- 244, 218, 204, 219, 206, 224, 201, 212, 204, 229, +- 215, 208, 207, 200, 219, 391, 233, 221, 200, 181, +- 391, 391, 149, 122, 86, 41, 391, 391, 245, 251, +- 259, 263, 267, 273, 280, 284, 292, 300, 304, 310, +- 318, 326 ++ 0, 393, 35, 392, 66, 391, 38, 107, 397, 401, ++ 55, 113, 377, 112, 111, 111, 114, 42, 376, 106, ++ 377, 347, 126, 120, 0, 147, 401, 0, 124, 0, ++ 137, 158, 170, 163, 401, 153, 401, 389, 401, 0, ++ 378, 120, 401, 131, 380, 386, 355, 139, 351, 355, ++ 351, 401, 401, 401, 401, 401, 367, 401, 401, 185, ++ 350, 346, 401, 364, 0, 185, 347, 189, 356, 355, ++ 0, 0, 330, 180, 366, 141, 372, 361, 332, 338, ++ 331, 341, 334, 326, 205, 331, 337, 329, 401, 341, ++ 167, 316, 401, 349, 348, 320, 328, 346, 180, 318, ++ ++ 324, 209, 324, 320, 322, 342, 338, 309, 306, 315, ++ 305, 315, 312, 192, 342, 341, 401, 293, 306, 282, ++ 268, 252, 255, 203, 285, 282, 272, 268, 252, 233, ++ 232, 239, 208, 107, 401, 401, 238, 211, 401, 211, ++ 212, 208, 228, 203, 215, 207, 233, 222, 212, 211, ++ 203, 227, 401, 237, 225, 204, 185, 401, 401, 149, ++ 128, 88, 42, 401, 401, 253, 259, 267, 271, 275, ++ 281, 288, 292, 300, 308, 312, 318, 326, 334 + } ; + +-static yyconst flex_int16_t yy_def[173] = ++static yyconst flex_int16_t yy_def[180] = + { 0, +- 158, 1, 1, 3, 158, 5, 1, 1, 158, 158, +- 158, 158, 158, 159, 160, 161, 158, 158, 158, 158, +- 162, 158, 158, 158, 163, 162, 158, 164, 165, 164, +- 164, 158, 158, 158, 158, 159, 158, 159, 158, 166, +- 158, 161, 158, 161, 167, 168, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 162, 158, 158, 158, 158, +- 158, 158, 162, 164, 165, 164, 158, 158, 158, 169, +- 166, 170, 161, 167, 167, 168, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 164, 158, 158, 169, 170, +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- +- 158, 164, 158, 158, 158, 158, 158, 158, 158, 171, +- 158, 164, 158, 158, 158, 158, 158, 158, 171, 158, +- 171, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 172, 158, 158, 158, 172, 158, 172, 158, 158, 158, +- 158, 158, 158, 158, 158, 158, 158, 0, 158, 158, +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 158, 158 ++ 165, 1, 1, 3, 165, 5, 1, 1, 165, 165, ++ 165, 165, 165, 166, 167, 168, 165, 165, 165, 165, ++ 169, 165, 165, 165, 170, 169, 165, 171, 172, 171, ++ 171, 165, 165, 165, 165, 166, 165, 166, 165, 173, ++ 165, 168, 165, 168, 174, 175, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 169, 165, 165, 165, ++ 165, 165, 165, 169, 171, 172, 171, 165, 165, 165, ++ 176, 173, 177, 168, 174, 174, 175, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 171, 165, 165, ++ 176, 177, 165, 165, 165, 165, 165, 165, 165, 165, ++ ++ 165, 165, 165, 165, 171, 165, 165, 165, 165, 165, ++ 165, 165, 165, 178, 165, 171, 165, 165, 165, 165, ++ 165, 165, 165, 178, 165, 178, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 179, 165, 165, ++ 165, 179, 165, 179, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 0, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165, 165 + } ; + +-static yyconst flex_int16_t yy_nxt[438] = ++static yyconst flex_int16_t yy_nxt[449] = + { 0, + 10, 11, 12, 11, 13, 14, 10, 15, 16, 10, + 10, 10, 17, 10, 10, 10, 10, 18, 19, 20, + 21, 21, 21, 21, 21, 10, 10, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, +- 21, 21, 21, 10, 22, 10, 24, 25, 25, 25, +- 32, 33, 33, 157, 26, 34, 34, 34, 51, 52, +- 27, 26, 26, 26, 26, 10, 11, 12, 11, 13, +- 14, 28, 15, 16, 28, 28, 28, 24, 28, 28, +- 28, 10, 18, 19, 20, 29, 29, 29, 29, 29, +- 30, 10, 29, 29, 29, 29, 29, 29, 29, 29, +- +- 29, 29, 29, 29, 29, 29, 29, 29, 10, 22, +- 10, 23, 34, 34, 34, 37, 39, 43, 32, 33, +- 33, 45, 54, 55, 46, 59, 45, 64, 156, 46, +- 64, 64, 64, 79, 44, 38, 59, 57, 134, 47, +- 135, 48, 80, 49, 47, 50, 48, 99, 61, 43, +- 50, 110, 41, 67, 67, 67, 60, 63, 63, 63, +- 57, 155, 68, 69, 63, 37, 44, 66, 67, 67, +- 67, 63, 63, 63, 63, 73, 59, 68, 69, 70, +- 34, 34, 34, 43, 75, 38, 154, 92, 83, 83, +- 83, 64, 44, 120, 64, 64, 64, 67, 67, 67, +- +- 44, 57, 99, 68, 69, 107, 68, 69, 120, 127, +- 108, 153, 152, 121, 83, 83, 83, 133, 133, 133, +- 146, 133, 133, 133, 146, 140, 140, 140, 121, 141, +- 140, 140, 140, 151, 141, 158, 150, 149, 148, 144, +- 147, 143, 142, 139, 147, 36, 36, 36, 36, 36, +- 36, 36, 36, 40, 138, 137, 136, 40, 40, 42, +- 42, 42, 42, 42, 42, 42, 42, 56, 56, 56, +- 56, 62, 132, 62, 64, 131, 130, 64, 129, 64, +- 64, 65, 128, 158, 65, 65, 65, 65, 71, 127, +- 71, 71, 74, 74, 74, 74, 74, 74, 74, 74, +- +- 76, 76, 76, 76, 76, 76, 76, 76, 89, 126, +- 89, 90, 125, 90, 90, 124, 90, 90, 119, 119, +- 119, 119, 119, 119, 119, 119, 145, 145, 145, 145, +- 145, 145, 145, 145, 123, 122, 59, 59, 118, 117, +- 116, 115, 114, 113, 45, 112, 108, 111, 109, 106, +- 105, 104, 46, 103, 91, 87, 102, 101, 100, 98, +- 97, 96, 95, 94, 93, 77, 75, 91, 88, 87, +- 86, 57, 85, 84, 57, 82, 81, 78, 77, 75, +- 72, 158, 58, 57, 53, 35, 158, 31, 23, 23, +- 9, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 158, 158 ++ 21, 21, 21, 21, 10, 22, 10, 24, 25, 25, ++ 25, 32, 33, 33, 164, 26, 34, 34, 34, 52, ++ 53, 27, 26, 26, 26, 26, 10, 11, 12, 11, ++ 13, 14, 28, 15, 16, 28, 28, 28, 24, 28, ++ 28, 28, 10, 18, 19, 20, 29, 29, 29, 29, ++ 29, 30, 10, 29, 29, 29, 29, 29, 29, 29, ++ ++ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, ++ 10, 22, 10, 23, 34, 34, 34, 37, 39, 43, ++ 32, 33, 33, 45, 55, 56, 46, 60, 43, 45, ++ 65, 163, 46, 65, 65, 65, 44, 38, 60, 74, ++ 58, 47, 141, 48, 142, 44, 49, 47, 50, 48, ++ 76, 51, 62, 94, 50, 41, 44, 51, 37, 61, ++ 64, 64, 64, 58, 34, 34, 34, 64, 162, 80, ++ 67, 68, 68, 68, 64, 64, 64, 64, 38, 81, ++ 69, 70, 71, 68, 68, 68, 60, 161, 43, 69, ++ 70, 65, 69, 70, 65, 65, 65, 125, 85, 85, ++ ++ 85, 58, 68, 68, 68, 44, 102, 110, 125, 133, ++ 102, 69, 70, 111, 114, 160, 159, 126, 85, 85, ++ 85, 140, 140, 140, 140, 140, 140, 153, 126, 147, ++ 147, 147, 153, 148, 147, 147, 147, 158, 148, 165, ++ 157, 156, 155, 151, 150, 149, 146, 154, 145, 144, ++ 143, 139, 154, 36, 36, 36, 36, 36, 36, 36, ++ 36, 40, 138, 137, 136, 40, 40, 42, 42, 42, ++ 42, 42, 42, 42, 42, 57, 57, 57, 57, 63, ++ 135, 63, 65, 134, 165, 65, 133, 65, 65, 66, ++ 132, 131, 66, 66, 66, 66, 72, 130, 72, 72, ++ ++ 75, 75, 75, 75, 75, 75, 75, 75, 77, 77, ++ 77, 77, 77, 77, 77, 77, 91, 129, 91, 92, ++ 128, 92, 92, 127, 92, 92, 124, 124, 124, 124, ++ 124, 124, 124, 124, 152, 152, 152, 152, 152, 152, ++ 152, 152, 60, 60, 123, 122, 121, 120, 119, 118, ++ 117, 45, 116, 111, 115, 113, 112, 109, 108, 107, ++ 46, 106, 93, 89, 105, 104, 103, 101, 100, 99, ++ 98, 97, 96, 95, 78, 76, 93, 90, 89, 88, ++ 58, 87, 86, 58, 84, 83, 82, 79, 78, 76, ++ 73, 165, 59, 58, 54, 35, 165, 31, 23, 23, ++ ++ 9, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165 + } ; + +-static yyconst flex_int16_t yy_chk[438] = ++static yyconst flex_int16_t yy_chk[449] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, +- 7, 7, 7, 156, 3, 11, 11, 11, 18, 18, +- 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, ++ 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, ++ 3, 7, 7, 7, 163, 3, 11, 11, 11, 18, ++ 18, 3, 3, 3, 3, 3, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, +- 5, 8, 12, 12, 12, 14, 15, 16, 8, 8, +- 8, 17, 20, 20, 17, 23, 24, 29, 155, 24, +- 29, 29, 29, 48, 16, 14, 31, 29, 128, 17, +- 128, 17, 48, 17, 24, 17, 24, 99, 24, 42, +- 24, 99, 15, 33, 33, 33, 23, 26, 26, 26, +- 26, 154, 33, 33, 26, 36, 42, 31, 32, 32, +- 32, 26, 26, 26, 26, 44, 59, 32, 32, 32, +- 34, 34, 34, 73, 75, 36, 153, 75, 59, 59, +- 59, 65, 44, 110, 65, 65, 65, 67, 67, 67, +- +- 73, 65, 83, 89, 89, 97, 67, 67, 119, 127, +- 97, 150, 149, 110, 83, 83, 83, 133, 133, 133, +- 141, 127, 127, 127, 145, 136, 136, 136, 119, 136, +- 140, 140, 140, 148, 140, 147, 144, 143, 142, 139, +- 141, 138, 137, 135, 145, 159, 159, 159, 159, 159, +- 159, 159, 159, 160, 134, 132, 131, 160, 160, 161, +- 161, 161, 161, 161, 161, 161, 161, 162, 162, 162, +- 162, 163, 126, 163, 164, 125, 124, 164, 123, 164, +- 164, 165, 122, 121, 165, 165, 165, 165, 166, 120, +- 166, 166, 167, 167, 167, 167, 167, 167, 167, 167, +- +- 168, 168, 168, 168, 168, 168, 168, 168, 169, 118, +- 169, 170, 117, 170, 170, 116, 170, 170, 171, 171, +- 171, 171, 171, 171, 171, 171, 172, 172, 172, 172, +- 172, 172, 172, 172, 115, 114, 112, 111, 109, 108, +- 107, 106, 105, 104, 103, 102, 101, 100, 98, 96, +- 95, 94, 93, 92, 90, 88, 86, 85, 84, 82, +- 81, 80, 79, 78, 77, 76, 74, 72, 69, 68, +- 66, 63, 61, 60, 56, 50, 49, 47, 46, 45, ++ 5, 5, 5, 8, 12, 12, 12, 14, 15, 16, ++ 8, 8, 8, 17, 20, 20, 17, 23, 42, 24, ++ 29, 162, 24, 29, 29, 29, 16, 14, 31, 44, ++ 29, 17, 134, 17, 134, 42, 17, 24, 17, 24, ++ 76, 17, 24, 76, 24, 15, 44, 24, 36, 23, ++ 26, 26, 26, 26, 34, 34, 34, 26, 161, 48, ++ 31, 32, 32, 32, 26, 26, 26, 26, 36, 48, ++ 32, 32, 32, 33, 33, 33, 60, 160, 74, 91, ++ 91, 66, 33, 33, 66, 66, 66, 114, 60, 60, ++ ++ 60, 66, 68, 68, 68, 74, 85, 99, 124, 133, ++ 102, 68, 68, 99, 102, 157, 156, 114, 85, 85, ++ 85, 133, 133, 133, 140, 140, 140, 148, 124, 143, ++ 143, 143, 152, 143, 147, 147, 147, 155, 147, 154, ++ 151, 150, 149, 146, 145, 144, 142, 148, 141, 138, ++ 137, 132, 152, 166, 166, 166, 166, 166, 166, 166, ++ 166, 167, 131, 130, 129, 167, 167, 168, 168, 168, ++ 168, 168, 168, 168, 168, 169, 169, 169, 169, 170, ++ 128, 170, 171, 127, 126, 171, 125, 171, 171, 172, ++ 123, 122, 172, 172, 172, 172, 173, 121, 173, 173, ++ ++ 174, 174, 174, 174, 174, 174, 174, 174, 175, 175, ++ 175, 175, 175, 175, 175, 175, 176, 120, 176, 177, ++ 119, 177, 177, 118, 177, 177, 178, 178, 178, 178, ++ 178, 178, 178, 178, 179, 179, 179, 179, 179, 179, ++ 179, 179, 116, 115, 113, 112, 111, 110, 109, 108, ++ 107, 106, 105, 104, 103, 101, 100, 98, 97, 96, ++ 95, 94, 92, 90, 88, 87, 86, 84, 83, 82, ++ 81, 80, 79, 78, 77, 75, 73, 70, 69, 67, ++ 64, 62, 61, 57, 51, 50, 49, 47, 46, 45, + 41, 38, 22, 21, 19, 13, 9, 6, 4, 2, +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 158, 158 ++ 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165 + } ; + + static yy_state_type yy_last_accepting_state; +@@ -662,7 +664,7 @@ static int dts_version = 1; + static void push_input_file(const char *filename); + static bool pop_input_file(void); + static void lexical_error(const char *fmt, ...); +-#line 666 "dtc-lexer.lex.c" ++#line 668 "dtc-lexer.lex.c" + + #define INITIAL 0 + #define BYTESTRING 1 +@@ -704,7 +706,7 @@ FILE *yyget_out (void ); + + void yyset_out (FILE * out_str ); + +-yy_size_t yyget_leng (void ); ++int yyget_leng (void ); + + char *yyget_text (void ); + +@@ -853,6 +855,10 @@ YY_DECL + register char *yy_cp, *yy_bp; + register int yy_act; + ++#line 68 "dtc-lexer.l" ++ ++#line 861 "dtc-lexer.lex.c" ++ + if ( !(yy_init) ) + { + (yy_init) = 1; +@@ -879,11 +885,6 @@ YY_DECL + yy_load_buffer_state( ); + } + +- { +-#line 68 "dtc-lexer.l" +- +-#line 886 "dtc-lexer.lex.c" +- + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); +@@ -901,7 +902,7 @@ YY_DECL + yy_match: + do + { +- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; ++ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; +@@ -910,13 +911,13 @@ yy_match: + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 159 ) ++ if ( yy_current_state >= 166 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } +- while ( yy_current_state != 158 ); ++ while ( yy_current_state != 165 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + +@@ -1007,23 +1008,31 @@ case 5: + YY_RULE_SETUP + #line 116 "dtc-lexer.l" + { ++ DPRINT("Keyword: /plugin/\n"); ++ return DT_PLUGIN; ++ } ++ YY_BREAK ++case 6: ++YY_RULE_SETUP ++#line 121 "dtc-lexer.l" ++{ + DPRINT("Keyword: /memreserve/\n"); + BEGIN_DEFAULT(); + return DT_MEMRESERVE; + } + YY_BREAK +-case 6: ++case 7: + YY_RULE_SETUP +-#line 122 "dtc-lexer.l" ++#line 127 "dtc-lexer.l" + { + DPRINT("Keyword: /bits/\n"); + BEGIN_DEFAULT(); + return DT_BITS; + } + YY_BREAK +-case 7: ++case 8: + YY_RULE_SETUP +-#line 128 "dtc-lexer.l" ++#line 133 "dtc-lexer.l" + { + DPRINT("Keyword: /delete-property/\n"); + DPRINT("\n"); +@@ -1031,9 +1040,9 @@ YY_RULE_SETUP + return DT_DEL_PROP; + } + YY_BREAK +-case 8: ++case 9: + YY_RULE_SETUP +-#line 135 "dtc-lexer.l" ++#line 140 "dtc-lexer.l" + { + DPRINT("Keyword: /delete-node/\n"); + DPRINT("\n"); +@@ -1041,9 +1050,9 @@ YY_RULE_SETUP + return DT_DEL_NODE; + } + YY_BREAK +-case 9: ++case 10: + YY_RULE_SETUP +-#line 142 "dtc-lexer.l" ++#line 147 "dtc-lexer.l" + { + DPRINT("Label: %s\n", yytext); + yylval.labelref = xstrdup(yytext); +@@ -1051,9 +1060,9 @@ YY_RULE_SETUP + return DT_LABEL; + } + YY_BREAK +-case 10: ++case 11: + YY_RULE_SETUP +-#line 149 "dtc-lexer.l" ++#line 154 "dtc-lexer.l" + { + char *e; + DPRINT("Integer Literal: '%s'\n", yytext); +@@ -1073,10 +1082,10 @@ YY_RULE_SETUP + return DT_LITERAL; + } + YY_BREAK +-case 11: +-/* rule 11 can match eol */ ++case 12: ++/* rule 12 can match eol */ + YY_RULE_SETUP +-#line 168 "dtc-lexer.l" ++#line 173 "dtc-lexer.l" + { + struct data d; + DPRINT("Character literal: %s\n", yytext); +@@ -1098,18 +1107,18 @@ YY_RULE_SETUP + return DT_CHAR_LITERAL; + } + YY_BREAK +-case 12: ++case 13: + YY_RULE_SETUP +-#line 189 "dtc-lexer.l" ++#line 194 "dtc-lexer.l" + { /* label reference */ + DPRINT("Ref: %s\n", yytext+1); + yylval.labelref = xstrdup(yytext+1); + return DT_REF; + } + YY_BREAK +-case 13: ++case 14: + YY_RULE_SETUP +-#line 195 "dtc-lexer.l" ++#line 200 "dtc-lexer.l" + { /* new-style path reference */ + yytext[yyleng-1] = '\0'; + DPRINT("Ref: %s\n", yytext+2); +@@ -1117,27 +1126,27 @@ YY_RULE_SETUP + return DT_REF; + } + YY_BREAK +-case 14: ++case 15: + YY_RULE_SETUP +-#line 202 "dtc-lexer.l" ++#line 207 "dtc-lexer.l" + { + yylval.byte = strtol(yytext, NULL, 16); + DPRINT("Byte: %02x\n", (int)yylval.byte); + return DT_BYTE; + } + YY_BREAK +-case 15: ++case 16: + YY_RULE_SETUP +-#line 208 "dtc-lexer.l" ++#line 213 "dtc-lexer.l" + { + DPRINT("/BYTESTRING\n"); + BEGIN_DEFAULT(); + return ']'; + } + YY_BREAK +-case 16: ++case 17: + YY_RULE_SETUP +-#line 214 "dtc-lexer.l" ++#line 219 "dtc-lexer.l" + { + DPRINT("PropNodeName: %s\n", yytext); + yylval.propnodename = xstrdup((yytext[0] == '\\') ? +@@ -1146,75 +1155,75 @@ YY_RULE_SETUP + return DT_PROPNODENAME; + } + YY_BREAK +-case 17: ++case 18: + YY_RULE_SETUP +-#line 222 "dtc-lexer.l" ++#line 227 "dtc-lexer.l" + { + DPRINT("Binary Include\n"); + return DT_INCBIN; + } + YY_BREAK +-case 18: +-/* rule 18 can match eol */ +-YY_RULE_SETUP +-#line 227 "dtc-lexer.l" +-/* eat whitespace */ +- YY_BREAK + case 19: + /* rule 19 can match eol */ + YY_RULE_SETUP +-#line 228 "dtc-lexer.l" +-/* eat C-style comments */ ++#line 232 "dtc-lexer.l" ++/* eat whitespace */ + YY_BREAK + case 20: + /* rule 20 can match eol */ + YY_RULE_SETUP +-#line 229 "dtc-lexer.l" +-/* eat C++-style comments */ ++#line 233 "dtc-lexer.l" ++/* eat C-style comments */ + YY_BREAK + case 21: ++/* rule 21 can match eol */ + YY_RULE_SETUP +-#line 231 "dtc-lexer.l" +-{ return DT_LSHIFT; }; ++#line 234 "dtc-lexer.l" ++/* eat C++-style comments */ + YY_BREAK + case 22: + YY_RULE_SETUP +-#line 232 "dtc-lexer.l" +-{ return DT_RSHIFT; }; ++#line 236 "dtc-lexer.l" ++{ return DT_LSHIFT; }; + YY_BREAK + case 23: + YY_RULE_SETUP +-#line 233 "dtc-lexer.l" +-{ return DT_LE; }; ++#line 237 "dtc-lexer.l" ++{ return DT_RSHIFT; }; + YY_BREAK + case 24: + YY_RULE_SETUP +-#line 234 "dtc-lexer.l" +-{ return DT_GE; }; ++#line 238 "dtc-lexer.l" ++{ return DT_LE; }; + YY_BREAK + case 25: + YY_RULE_SETUP +-#line 235 "dtc-lexer.l" +-{ return DT_EQ; }; ++#line 239 "dtc-lexer.l" ++{ return DT_GE; }; + YY_BREAK + case 26: + YY_RULE_SETUP +-#line 236 "dtc-lexer.l" +-{ return DT_NE; }; ++#line 240 "dtc-lexer.l" ++{ return DT_EQ; }; + YY_BREAK + case 27: + YY_RULE_SETUP +-#line 237 "dtc-lexer.l" +-{ return DT_AND; }; ++#line 241 "dtc-lexer.l" ++{ return DT_NE; }; + YY_BREAK + case 28: + YY_RULE_SETUP +-#line 238 "dtc-lexer.l" +-{ return DT_OR; }; ++#line 242 "dtc-lexer.l" ++{ return DT_AND; }; + YY_BREAK + case 29: + YY_RULE_SETUP +-#line 240 "dtc-lexer.l" ++#line 243 "dtc-lexer.l" ++{ return DT_OR; }; ++ YY_BREAK ++case 30: ++YY_RULE_SETUP ++#line 245 "dtc-lexer.l" + { + DPRINT("Char: %c (\\x%02x)\n", yytext[0], + (unsigned)yytext[0]); +@@ -1230,12 +1239,12 @@ YY_RULE_SETUP + return yytext[0]; + } + YY_BREAK +-case 30: ++case 31: + YY_RULE_SETUP +-#line 255 "dtc-lexer.l" ++#line 260 "dtc-lexer.l" + ECHO; + YY_BREAK +-#line 1239 "dtc-lexer.lex.c" ++#line 1248 "dtc-lexer.lex.c" + + case YY_END_OF_BUFFER: + { +@@ -1365,7 +1374,6 @@ ECHO; + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +- } /* end of user's declarations */ + } /* end of yylex */ + + /* yy_get_next_buffer - try to read in a new buffer +@@ -1421,21 +1429,21 @@ static int yy_get_next_buffer (void) + + else + { +- yy_size_t num_to_read = ++ int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ +- YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; ++ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { +- yy_size_t new_size = b->yy_buf_size * 2; ++ int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; +@@ -1466,7 +1474,7 @@ static int yy_get_next_buffer (void) + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), +- (yy_n_chars), num_to_read ); ++ (yy_n_chars), (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } +@@ -1528,7 +1536,7 @@ static int yy_get_next_buffer (void) + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 159 ) ++ if ( yy_current_state >= 166 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +@@ -1556,13 +1564,13 @@ static int yy_get_next_buffer (void) + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 159 ) ++ if ( yy_current_state >= 166 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- yy_is_jam = (yy_current_state == 158); ++ yy_is_jam = (yy_current_state == 165); + +- return yy_is_jam ? 0 : yy_current_state; ++ return yy_is_jam ? 0 : yy_current_state; + } + + #ifndef YY_NO_INPUT +@@ -1589,7 +1597,7 @@ static int yy_get_next_buffer (void) + + else + { /* need more input */ +- yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); ++ int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) +@@ -1863,7 +1871,7 @@ void yypop_buffer_state (void) + */ + static void yyensure_buffer_stack (void) + { +- yy_size_t num_to_alloc; ++ int num_to_alloc; + + if (!(yy_buffer_stack)) { + +@@ -1960,12 +1968,12 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) + * + * @return the newly allocated buffer state object. + */ +-YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) ++YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; +- yy_size_t i; ++ int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; +@@ -2047,7 +2055,7 @@ FILE *yyget_out (void) + /** Get the length of the current token. + * + */ +-yy_size_t yyget_leng (void) ++int yyget_leng (void) + { + return yyleng; + } +@@ -2195,7 +2203,7 @@ void yyfree (void * ptr ) + + #define YYTABLES_NAME "yytables" + +-#line 254 "dtc-lexer.l" ++#line 260 "dtc-lexer.l" + + + +diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped +index 116458c..844c462 100644 +--- a/scripts/dtc/dtc-parser.tab.c_shipped ++++ b/scripts/dtc/dtc-parser.tab.c_shipped +@@ -65,6 +65,7 @@ + #line 20 "dtc-parser.y" /* yacc.c:339 */ + + #include ++#include + + #include "dtc.h" + #include "srcpos.h" +@@ -80,7 +81,7 @@ extern void yyerror(char const *s); + extern struct boot_info *the_boot_info; + extern bool treesource_error; + +-#line 84 "dtc-parser.tab.c" /* yacc.c:339 */ ++#line 85 "dtc-parser.tab.c" /* yacc.c:339 */ + + # ifndef YY_NULLPTR + # if defined __cplusplus && 201103L <= __cplusplus +@@ -116,26 +117,27 @@ extern int yydebug; + enum yytokentype + { + DT_V1 = 258, +- DT_MEMRESERVE = 259, +- DT_LSHIFT = 260, +- DT_RSHIFT = 261, +- DT_LE = 262, +- DT_GE = 263, +- DT_EQ = 264, +- DT_NE = 265, +- DT_AND = 266, +- DT_OR = 267, +- DT_BITS = 268, +- DT_DEL_PROP = 269, +- DT_DEL_NODE = 270, +- DT_PROPNODENAME = 271, +- DT_LITERAL = 272, +- DT_CHAR_LITERAL = 273, +- DT_BYTE = 274, +- DT_STRING = 275, +- DT_LABEL = 276, +- DT_REF = 277, +- DT_INCBIN = 278 ++ DT_PLUGIN = 259, ++ DT_MEMRESERVE = 260, ++ DT_LSHIFT = 261, ++ DT_RSHIFT = 262, ++ DT_LE = 263, ++ DT_GE = 264, ++ DT_EQ = 265, ++ DT_NE = 266, ++ DT_AND = 267, ++ DT_OR = 268, ++ DT_BITS = 269, ++ DT_DEL_PROP = 270, ++ DT_DEL_NODE = 271, ++ DT_PROPNODENAME = 272, ++ DT_LITERAL = 273, ++ DT_CHAR_LITERAL = 274, ++ DT_BYTE = 275, ++ DT_STRING = 276, ++ DT_LABEL = 277, ++ DT_REF = 278, ++ DT_INCBIN = 279 + }; + #endif + +@@ -144,7 +146,7 @@ extern int yydebug; + typedef union YYSTYPE YYSTYPE; + union YYSTYPE + { +-#line 38 "dtc-parser.y" /* yacc.c:355 */ ++#line 39 "dtc-parser.y" /* yacc.c:355 */ + + char *propnodename; + char *labelref; +@@ -162,8 +164,9 @@ union YYSTYPE + struct node *nodelist; + struct reserve_info *re; + uint64_t integer; ++ bool is_plugin; + +-#line 167 "dtc-parser.tab.c" /* yacc.c:355 */ ++#line 170 "dtc-parser.tab.c" /* yacc.c:355 */ + }; + # define YYSTYPE_IS_TRIVIAL 1 + # define YYSTYPE_IS_DECLARED 1 +@@ -192,7 +195,7 @@ int yyparse (void); + + /* Copy the second part of user declarations. */ + +-#line 196 "dtc-parser.tab.c" /* yacc.c:358 */ ++#line 199 "dtc-parser.tab.c" /* yacc.c:358 */ + + #ifdef short + # undef short +@@ -439,18 +442,18 @@ union yyalloc + #define YYLAST 136 + + /* YYNTOKENS -- Number of terminals. */ +-#define YYNTOKENS 47 ++#define YYNTOKENS 48 + /* YYNNTS -- Number of nonterminals. */ +-#define YYNNTS 28 ++#define YYNNTS 29 + /* YYNRULES -- Number of rules. */ +-#define YYNRULES 80 ++#define YYNRULES 82 + /* YYNSTATES -- Number of states. */ +-#define YYNSTATES 144 ++#define YYNSTATES 147 + + /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ + #define YYUNDEFTOK 2 +-#define YYMAXUTOK 278 ++#define YYMAXUTOK 279 + + #define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) +@@ -462,16 +465,16 @@ static const yytype_uint8 yytranslate[] = + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 46, 2, 2, 2, 44, 40, 2, +- 32, 34, 43, 41, 33, 42, 2, 25, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 37, 24, +- 35, 28, 29, 36, 2, 2, 2, 2, 2, 2, ++ 2, 2, 2, 47, 2, 2, 2, 45, 41, 2, ++ 33, 35, 44, 42, 34, 43, 2, 26, 2, 2, ++ 2, 2, 2, 2, 2, 2, 2, 2, 38, 25, ++ 36, 29, 30, 37, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 30, 2, 31, 39, 2, 2, 2, 2, 2, ++ 2, 31, 2, 32, 40, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 26, 38, 27, 45, 2, 2, 2, ++ 2, 2, 2, 27, 39, 28, 46, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +@@ -486,22 +489,22 @@ static const yytype_uint8 yytranslate[] = + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, +- 15, 16, 17, 18, 19, 20, 21, 22, 23 ++ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 + }; + + #if YYDEBUG + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ + static const yytype_uint16 yyrline[] = + { +- 0, 104, 104, 113, 116, 123, 127, 135, 139, 144, +- 155, 165, 180, 188, 191, 198, 202, 206, 210, 218, +- 222, 226, 230, 234, 250, 260, 268, 271, 275, 282, +- 298, 303, 322, 336, 343, 344, 345, 352, 356, 357, +- 361, 362, 366, 367, 371, 372, 376, 377, 381, 382, +- 386, 387, 388, 392, 393, 394, 395, 396, 400, 401, +- 402, 406, 407, 408, 412, 413, 414, 415, 419, 420, +- 421, 422, 427, 430, 434, 442, 445, 449, 457, 461, +- 465 ++ 0, 108, 108, 118, 121, 129, 132, 139, 143, 151, ++ 155, 160, 171, 181, 196, 204, 207, 214, 218, 222, ++ 226, 234, 238, 242, 246, 250, 266, 276, 284, 287, ++ 291, 298, 314, 319, 338, 352, 359, 360, 361, 368, ++ 372, 373, 377, 378, 382, 383, 387, 388, 392, 393, ++ 397, 398, 402, 403, 404, 408, 409, 410, 411, 412, ++ 416, 417, 418, 422, 423, 424, 428, 429, 430, 431, ++ 435, 436, 437, 438, 443, 446, 450, 458, 461, 465, ++ 473, 477, 481 + }; + #endif + +@@ -510,19 +513,19 @@ static const yytype_uint16 yyrline[] = + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ + static const char *const yytname[] = + { +- "$end", "error", "$undefined", "DT_V1", "DT_MEMRESERVE", "DT_LSHIFT", +- "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND", "DT_OR", +- "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME", "DT_LITERAL", +- "DT_CHAR_LITERAL", "DT_BYTE", "DT_STRING", "DT_LABEL", "DT_REF", +- "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['", "']'", +- "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'", "'+'", +- "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile", +- "memreserves", "memreserve", "devicetree", "nodedef", "proplist", +- "propdef", "propdata", "propdataprefix", "arrayprefix", "integer_prim", +- "integer_expr", "integer_trinary", "integer_or", "integer_and", +- "integer_bitor", "integer_bitxor", "integer_bitand", "integer_eq", +- "integer_rela", "integer_shift", "integer_add", "integer_mul", +- "integer_unary", "bytestring", "subnodes", "subnode", YY_NULLPTR ++ "$end", "error", "$undefined", "DT_V1", "DT_PLUGIN", "DT_MEMRESERVE", ++ "DT_LSHIFT", "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND", ++ "DT_OR", "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME", ++ "DT_LITERAL", "DT_CHAR_LITERAL", "DT_BYTE", "DT_STRING", "DT_LABEL", ++ "DT_REF", "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['", ++ "']'", "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'", ++ "'+'", "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile", ++ "plugindecl", "memreserves", "memreserve", "devicetree", "nodedef", ++ "proplist", "propdef", "propdata", "propdataprefix", "arrayprefix", ++ "integer_prim", "integer_expr", "integer_trinary", "integer_or", ++ "integer_and", "integer_bitor", "integer_bitxor", "integer_bitand", ++ "integer_eq", "integer_rela", "integer_shift", "integer_add", ++ "integer_mul", "integer_unary", "bytestring", "subnodes", "subnode", YY_NULLPTR + }; + #endif + +@@ -533,16 +536,16 @@ static const yytype_uint16 yytoknum[] = + { + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, +- 275, 276, 277, 278, 59, 47, 123, 125, 61, 62, +- 91, 93, 40, 44, 41, 60, 63, 58, 124, 94, +- 38, 43, 45, 42, 37, 126, 33 ++ 275, 276, 277, 278, 279, 59, 47, 123, 125, 61, ++ 62, 91, 93, 40, 44, 41, 60, 63, 58, 124, ++ 94, 38, 43, 45, 42, 37, 126, 33 + }; + # endif + +-#define YYPACT_NINF -81 ++#define YYPACT_NINF -84 + + #define yypact_value_is_default(Yystate) \ +- (!!((Yystate) == (-81))) ++ (!!((Yystate) == (-84))) + + #define YYTABLE_NINF -1 + +@@ -553,21 +556,21 @@ static const yytype_uint16 yytoknum[] = + STATE-NUM. */ + static const yytype_int8 yypact[] = + { +- 16, -11, 21, 10, -81, 25, 10, 19, 10, -81, +- -81, -9, 25, -81, 2, 51, -81, -9, -9, -9, +- -81, 1, -81, -6, 50, 14, 28, 29, 36, 3, +- 58, 44, -3, -81, 47, -81, -81, 65, 68, 2, +- 2, -81, -81, -81, -81, -9, -9, -9, -9, -9, +- -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, +- -9, -9, -9, -9, -81, 63, 69, 2, -81, -81, +- 50, 57, 14, 28, 29, 36, 3, 3, 58, 58, +- 58, 58, 44, 44, -3, -3, -81, -81, -81, 79, +- 80, -8, 63, -81, 72, 63, -81, -81, -9, 76, +- 77, -81, -81, -81, -81, -81, 78, -81, -81, -81, +- -81, -81, 35, 4, -81, -81, -81, -81, 86, -81, +- -81, -81, 73, -81, -81, 33, 71, 84, 39, -81, +- -81, -81, -81, -81, 41, -81, -81, -81, 25, -81, +- 74, 25, 75, -81 ++ 15, -12, 35, 42, -84, 27, 9, -84, 24, 9, ++ 43, 9, -84, -84, -10, 24, -84, 60, 44, -84, ++ -10, -10, -10, -84, 55, -84, -7, 52, 53, 51, ++ 54, 10, 2, 38, 37, -4, -84, 68, -84, -84, ++ 71, 73, 60, 60, -84, -84, -84, -84, -10, -10, ++ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, ++ -10, -10, -10, -10, -10, -10, -10, -84, 56, 72, ++ 60, -84, -84, 52, 61, 53, 51, 54, 10, 2, ++ 2, 38, 38, 38, 38, 37, 37, -4, -4, -84, ++ -84, -84, 81, 83, 34, 56, -84, 74, 56, -84, ++ -84, -10, 76, 78, -84, -84, -84, -84, -84, 79, ++ -84, -84, -84, -84, -84, -6, 3, -84, -84, -84, ++ -84, 87, -84, -84, -84, 75, -84, -84, 32, 70, ++ 86, 36, -84, -84, -84, -84, -84, 47, -84, -84, ++ -84, 24, -84, 77, 24, 80, -84 + }; + + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. +@@ -575,37 +578,37 @@ static const yytype_int8 yypact[] = + means the default is an error. */ + static const yytype_uint8 yydefact[] = + { +- 0, 0, 0, 3, 1, 0, 0, 0, 3, 34, +- 35, 0, 0, 6, 0, 2, 4, 0, 0, 0, +- 68, 0, 37, 38, 40, 42, 44, 46, 48, 50, +- 53, 60, 63, 67, 0, 13, 7, 0, 0, 0, +- 0, 69, 70, 71, 36, 0, 0, 0, 0, 0, ++ 0, 0, 0, 3, 1, 0, 5, 4, 0, 0, ++ 0, 5, 36, 37, 0, 0, 8, 0, 2, 6, ++ 0, 0, 0, 70, 0, 39, 40, 42, 44, 46, ++ 48, 50, 52, 55, 62, 65, 69, 0, 15, 9, ++ 0, 0, 0, 0, 71, 72, 73, 38, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 5, 75, 0, 0, 10, 8, +- 41, 0, 43, 45, 47, 49, 51, 52, 56, 57, +- 55, 54, 58, 59, 61, 62, 65, 64, 66, 0, +- 0, 0, 0, 14, 0, 75, 11, 9, 0, 0, +- 0, 16, 26, 78, 18, 80, 0, 77, 76, 39, +- 17, 79, 0, 0, 12, 25, 15, 27, 0, 19, +- 28, 22, 0, 72, 30, 0, 0, 0, 0, 33, +- 32, 20, 31, 29, 0, 73, 74, 21, 0, 24, +- 0, 0, 0, 23 ++ 0, 0, 0, 0, 0, 0, 0, 7, 77, 0, ++ 0, 12, 10, 43, 0, 45, 47, 49, 51, 53, ++ 54, 58, 59, 57, 56, 60, 61, 63, 64, 67, ++ 66, 68, 0, 0, 0, 0, 16, 0, 77, 13, ++ 11, 0, 0, 0, 18, 28, 80, 20, 82, 0, ++ 79, 78, 41, 19, 81, 0, 0, 14, 27, 17, ++ 29, 0, 21, 30, 24, 0, 74, 32, 0, 0, ++ 0, 0, 35, 34, 22, 33, 31, 0, 75, 76, ++ 23, 0, 26, 0, 0, 0, 25 + }; + + /* YYPGOTO[NTERM-NUM]. */ + static const yytype_int8 yypgoto[] = + { +- -81, -81, 100, 104, -81, -38, -81, -80, -81, -81, +- -81, -5, 66, 13, -81, 70, 67, 81, 64, 82, +- 37, 27, 34, 38, -14, -81, 22, 24 ++ -84, -84, -84, 98, 101, -84, -41, -84, -83, -84, ++ -84, -84, -8, 63, 12, -84, 66, 67, 65, 69, ++ 82, 29, 18, 25, 26, -17, -84, 20, 28 + }; + + /* YYDEFGOTO[NTERM-NUM]. */ + static const yytype_int16 yydefgoto[] = + { +- -1, 2, 7, 8, 15, 36, 65, 93, 112, 113, +- 125, 20, 21, 22, 23, 24, 25, 26, 27, 28, +- 29, 30, 31, 32, 33, 128, 94, 95 ++ -1, 2, 6, 10, 11, 18, 39, 68, 96, 115, ++ 116, 128, 23, 24, 25, 26, 27, 28, 29, 30, ++ 31, 32, 33, 34, 35, 36, 131, 97, 98 + }; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If +@@ -613,87 +616,87 @@ static const yytype_int16 yydefgoto[] = + number is the opposite. If YYTABLE_NINF, syntax error. */ + static const yytype_uint8 yytable[] = + { +- 12, 68, 69, 41, 42, 43, 45, 34, 9, 10, +- 53, 54, 104, 3, 5, 107, 101, 118, 35, 1, +- 102, 4, 61, 11, 119, 120, 121, 122, 35, 97, +- 46, 6, 55, 17, 123, 44, 18, 19, 56, 124, +- 62, 63, 9, 10, 14, 51, 52, 86, 87, 88, +- 9, 10, 48, 103, 129, 130, 115, 11, 135, 116, +- 136, 47, 131, 57, 58, 11, 37, 49, 117, 50, +- 137, 64, 38, 39, 138, 139, 40, 89, 90, 91, +- 78, 79, 80, 81, 92, 59, 60, 66, 76, 77, +- 67, 82, 83, 96, 98, 99, 100, 84, 85, 106, +- 110, 111, 114, 126, 134, 127, 133, 141, 16, 143, +- 13, 109, 71, 74, 72, 70, 105, 108, 0, 0, +- 132, 0, 0, 0, 0, 0, 0, 0, 0, 73, +- 0, 0, 75, 140, 0, 0, 142 ++ 15, 71, 72, 44, 45, 46, 48, 37, 12, 13, ++ 56, 57, 107, 3, 8, 110, 118, 121, 1, 119, ++ 54, 55, 64, 14, 122, 123, 124, 125, 120, 100, ++ 49, 9, 58, 20, 126, 4, 21, 22, 59, 127, ++ 65, 66, 12, 13, 60, 61, 5, 89, 90, 91, ++ 12, 13, 7, 106, 132, 133, 138, 14, 139, 104, ++ 40, 38, 134, 105, 50, 14, 41, 42, 140, 17, ++ 43, 92, 93, 94, 81, 82, 83, 84, 95, 62, ++ 63, 141, 142, 79, 80, 85, 86, 38, 87, 88, ++ 47, 52, 51, 67, 69, 53, 70, 99, 102, 101, ++ 103, 113, 109, 114, 117, 129, 136, 137, 130, 19, ++ 16, 144, 74, 112, 73, 146, 76, 75, 111, 0, ++ 135, 77, 0, 108, 0, 0, 0, 0, 0, 0, ++ 0, 0, 0, 143, 0, 78, 145 + }; + + static const yytype_int16 yycheck[] = + { +- 5, 39, 40, 17, 18, 19, 12, 12, 17, 18, +- 7, 8, 92, 24, 4, 95, 24, 13, 26, 3, +- 28, 0, 25, 32, 20, 21, 22, 23, 26, 67, +- 36, 21, 29, 42, 30, 34, 45, 46, 35, 35, +- 43, 44, 17, 18, 25, 9, 10, 61, 62, 63, +- 17, 18, 38, 91, 21, 22, 21, 32, 19, 24, +- 21, 11, 29, 5, 6, 32, 15, 39, 33, 40, +- 31, 24, 21, 22, 33, 34, 25, 14, 15, 16, +- 53, 54, 55, 56, 21, 41, 42, 22, 51, 52, +- 22, 57, 58, 24, 37, 16, 16, 59, 60, 27, +- 24, 24, 24, 17, 20, 32, 35, 33, 8, 34, +- 6, 98, 46, 49, 47, 45, 92, 95, -1, -1, +- 125, -1, -1, -1, -1, -1, -1, -1, -1, 48, +- -1, -1, 50, 138, -1, -1, 141 ++ 8, 42, 43, 20, 21, 22, 13, 15, 18, 19, ++ 8, 9, 95, 25, 5, 98, 22, 14, 3, 25, ++ 10, 11, 26, 33, 21, 22, 23, 24, 34, 70, ++ 37, 22, 30, 43, 31, 0, 46, 47, 36, 36, ++ 44, 45, 18, 19, 6, 7, 4, 64, 65, 66, ++ 18, 19, 25, 94, 22, 23, 20, 33, 22, 25, ++ 16, 27, 30, 29, 12, 33, 22, 23, 32, 26, ++ 26, 15, 16, 17, 56, 57, 58, 59, 22, 42, ++ 43, 34, 35, 54, 55, 60, 61, 27, 62, 63, ++ 35, 40, 39, 25, 23, 41, 23, 25, 17, 38, ++ 17, 25, 28, 25, 25, 18, 36, 21, 33, 11, ++ 9, 34, 49, 101, 48, 35, 51, 50, 98, -1, ++ 128, 52, -1, 95, -1, -1, -1, -1, -1, -1, ++ -1, -1, -1, 141, -1, 53, 144 + }; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ + static const yytype_uint8 yystos[] = + { +- 0, 3, 48, 24, 0, 4, 21, 49, 50, 17, +- 18, 32, 58, 50, 25, 51, 49, 42, 45, 46, +- 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, +- 68, 69, 70, 71, 58, 26, 52, 15, 21, 22, +- 25, 71, 71, 71, 34, 12, 36, 11, 38, 39, +- 40, 9, 10, 7, 8, 29, 35, 5, 6, 41, +- 42, 25, 43, 44, 24, 53, 22, 22, 52, 52, +- 62, 59, 63, 64, 65, 66, 67, 67, 68, 68, +- 68, 68, 69, 69, 70, 70, 71, 71, 71, 14, +- 15, 16, 21, 54, 73, 74, 24, 52, 37, 16, +- 16, 24, 28, 52, 54, 74, 27, 54, 73, 60, +- 24, 24, 55, 56, 24, 21, 24, 33, 13, 20, +- 21, 22, 23, 30, 35, 57, 17, 32, 72, 21, +- 22, 29, 58, 35, 20, 19, 21, 31, 33, 34, +- 58, 33, 58, 34 ++ 0, 3, 49, 25, 0, 4, 50, 25, 5, 22, ++ 51, 52, 18, 19, 33, 60, 52, 26, 53, 51, ++ 43, 46, 47, 60, 61, 62, 63, 64, 65, 66, ++ 67, 68, 69, 70, 71, 72, 73, 60, 27, 54, ++ 16, 22, 23, 26, 73, 73, 73, 35, 13, 37, ++ 12, 39, 40, 41, 10, 11, 8, 9, 30, 36, ++ 6, 7, 42, 43, 26, 44, 45, 25, 55, 23, ++ 23, 54, 54, 64, 61, 65, 66, 67, 68, 69, ++ 69, 70, 70, 70, 70, 71, 71, 72, 72, 73, ++ 73, 73, 15, 16, 17, 22, 56, 75, 76, 25, ++ 54, 38, 17, 17, 25, 29, 54, 56, 76, 28, ++ 56, 75, 62, 25, 25, 57, 58, 25, 22, 25, ++ 34, 14, 21, 22, 23, 24, 31, 36, 59, 18, ++ 33, 74, 22, 23, 30, 60, 36, 21, 20, 22, ++ 32, 34, 35, 60, 34, 60, 35 + }; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ + static const yytype_uint8 yyr1[] = + { +- 0, 47, 48, 49, 49, 50, 50, 51, 51, 51, +- 51, 51, 52, 53, 53, 54, 54, 54, 54, 55, +- 55, 55, 55, 55, 55, 55, 56, 56, 56, 57, +- 57, 57, 57, 57, 58, 58, 58, 59, 60, 60, +- 61, 61, 62, 62, 63, 63, 64, 64, 65, 65, +- 66, 66, 66, 67, 67, 67, 67, 67, 68, 68, +- 68, 69, 69, 69, 70, 70, 70, 70, 71, 71, +- 71, 71, 72, 72, 72, 73, 73, 73, 74, 74, +- 74 ++ 0, 48, 49, 50, 50, 51, 51, 52, 52, 53, ++ 53, 53, 53, 53, 54, 55, 55, 56, 56, 56, ++ 56, 57, 57, 57, 57, 57, 57, 57, 58, 58, ++ 58, 59, 59, 59, 59, 59, 60, 60, 60, 61, ++ 62, 62, 63, 63, 64, 64, 65, 65, 66, 66, ++ 67, 67, 68, 68, 68, 69, 69, 69, 69, 69, ++ 70, 70, 70, 71, 71, 71, 72, 72, 72, 72, ++ 73, 73, 73, 73, 74, 74, 74, 75, 75, 75, ++ 76, 76, 76 + }; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ + static const yytype_uint8 yyr2[] = + { +- 0, 2, 4, 0, 2, 4, 2, 2, 3, 4, +- 3, 4, 5, 0, 2, 4, 2, 3, 2, 2, +- 3, 4, 2, 9, 5, 2, 0, 2, 2, 3, +- 1, 2, 2, 2, 1, 1, 3, 1, 1, 5, +- 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, +- 1, 3, 3, 1, 3, 3, 3, 3, 3, 3, +- 1, 3, 3, 1, 3, 3, 3, 1, 1, 2, +- 2, 2, 0, 2, 2, 0, 2, 2, 2, 3, +- 2 ++ 0, 2, 5, 0, 2, 0, 2, 4, 2, 2, ++ 3, 4, 3, 4, 5, 0, 2, 4, 2, 3, ++ 2, 2, 3, 4, 2, 9, 5, 2, 0, 2, ++ 2, 3, 1, 2, 2, 2, 1, 1, 3, 1, ++ 1, 5, 1, 3, 1, 3, 1, 3, 1, 3, ++ 1, 3, 1, 3, 3, 1, 3, 3, 3, 3, ++ 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, ++ 1, 2, 2, 2, 0, 2, 2, 0, 2, 2, ++ 2, 3, 2 + }; + + +@@ -1463,65 +1466,82 @@ yyreduce: + switch (yyn) + { + case 2: +-#line 105 "dtc-parser.y" /* yacc.c:1646 */ ++#line 109 "dtc-parser.y" /* yacc.c:1646 */ + { ++ (yyvsp[0].node)->is_plugin = (yyvsp[-2].is_plugin); + the_boot_info = build_boot_info((yyvsp[-1].re), (yyvsp[0].node), + guess_boot_cpuid((yyvsp[0].node))); + } +-#line 1472 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1476 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 3: +-#line 113 "dtc-parser.y" /* yacc.c:1646 */ ++#line 118 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.re) = NULL; ++ (yyval.is_plugin) = false; + } +-#line 1480 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1484 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 4: +-#line 117 "dtc-parser.y" /* yacc.c:1646 */ ++#line 122 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.re) = chain_reserve_entry((yyvsp[-1].re), (yyvsp[0].re)); ++ (yyval.is_plugin) = true; + } +-#line 1488 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1492 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 5: +-#line 124 "dtc-parser.y" /* yacc.c:1646 */ ++#line 129 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.re) = build_reserve_entry((yyvsp[-2].integer), (yyvsp[-1].integer)); ++ (yyval.re) = NULL; + } +-#line 1496 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1500 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 6: +-#line 128 "dtc-parser.y" /* yacc.c:1646 */ ++#line 133 "dtc-parser.y" /* yacc.c:1646 */ ++ { ++ (yyval.re) = chain_reserve_entry((yyvsp[-1].re), (yyvsp[0].re)); ++ } ++#line 1508 "dtc-parser.tab.c" /* yacc.c:1646 */ ++ break; ++ ++ case 7: ++#line 140 "dtc-parser.y" /* yacc.c:1646 */ ++ { ++ (yyval.re) = build_reserve_entry((yyvsp[-2].integer), (yyvsp[-1].integer)); ++ } ++#line 1516 "dtc-parser.tab.c" /* yacc.c:1646 */ ++ break; ++ ++ case 8: ++#line 144 "dtc-parser.y" /* yacc.c:1646 */ + { + add_label(&(yyvsp[0].re)->labels, (yyvsp[-1].labelref)); + (yyval.re) = (yyvsp[0].re); + } +-#line 1505 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1525 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 7: +-#line 136 "dtc-parser.y" /* yacc.c:1646 */ ++ case 9: ++#line 152 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.node) = name_node((yyvsp[0].node), ""); + } +-#line 1513 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1533 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 8: +-#line 140 "dtc-parser.y" /* yacc.c:1646 */ ++ case 10: ++#line 156 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.node) = merge_nodes((yyvsp[-2].node), (yyvsp[0].node)); + } +-#line 1521 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1541 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 9: +-#line 145 "dtc-parser.y" /* yacc.c:1646 */ ++ case 11: ++#line 161 "dtc-parser.y" /* yacc.c:1646 */ + { + struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref)); + +@@ -1532,11 +1552,11 @@ yyreduce: + ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref)); + (yyval.node) = (yyvsp[-3].node); + } +-#line 1536 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1556 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 10: +-#line 156 "dtc-parser.y" /* yacc.c:1646 */ ++ case 12: ++#line 172 "dtc-parser.y" /* yacc.c:1646 */ + { + struct node *target = get_node_by_ref((yyvsp[-2].node), (yyvsp[-1].labelref)); + +@@ -1546,11 +1566,11 @@ yyreduce: + ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref)); + (yyval.node) = (yyvsp[-2].node); + } +-#line 1550 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1570 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 11: +-#line 166 "dtc-parser.y" /* yacc.c:1646 */ ++ case 13: ++#line 182 "dtc-parser.y" /* yacc.c:1646 */ + { + struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref)); + +@@ -1562,100 +1582,100 @@ yyreduce: + + (yyval.node) = (yyvsp[-3].node); + } +-#line 1566 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1586 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 12: +-#line 181 "dtc-parser.y" /* yacc.c:1646 */ ++ case 14: ++#line 197 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.node) = build_node((yyvsp[-3].proplist), (yyvsp[-2].nodelist)); + } +-#line 1574 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1594 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 13: +-#line 188 "dtc-parser.y" /* yacc.c:1646 */ ++ case 15: ++#line 204 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.proplist) = NULL; + } +-#line 1582 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1602 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 14: +-#line 192 "dtc-parser.y" /* yacc.c:1646 */ ++ case 16: ++#line 208 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.proplist) = chain_property((yyvsp[0].prop), (yyvsp[-1].proplist)); + } +-#line 1590 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1610 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 15: +-#line 199 "dtc-parser.y" /* yacc.c:1646 */ ++ case 17: ++#line 215 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.prop) = build_property((yyvsp[-3].propnodename), (yyvsp[-1].data)); + } +-#line 1598 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1618 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 16: +-#line 203 "dtc-parser.y" /* yacc.c:1646 */ ++ case 18: ++#line 219 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.prop) = build_property((yyvsp[-1].propnodename), empty_data); + } +-#line 1606 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1626 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 17: +-#line 207 "dtc-parser.y" /* yacc.c:1646 */ ++ case 19: ++#line 223 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.prop) = build_property_delete((yyvsp[-1].propnodename)); + } +-#line 1614 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1634 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 18: +-#line 211 "dtc-parser.y" /* yacc.c:1646 */ ++ case 20: ++#line 227 "dtc-parser.y" /* yacc.c:1646 */ + { + add_label(&(yyvsp[0].prop)->labels, (yyvsp[-1].labelref)); + (yyval.prop) = (yyvsp[0].prop); + } +-#line 1623 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1643 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 19: +-#line 219 "dtc-parser.y" /* yacc.c:1646 */ ++ case 21: ++#line 235 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = data_merge((yyvsp[-1].data), (yyvsp[0].data)); + } +-#line 1631 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1651 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 20: +-#line 223 "dtc-parser.y" /* yacc.c:1646 */ ++ case 22: ++#line 239 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = data_merge((yyvsp[-2].data), (yyvsp[-1].array).data); + } +-#line 1639 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1659 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 21: +-#line 227 "dtc-parser.y" /* yacc.c:1646 */ ++ case 23: ++#line 243 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = data_merge((yyvsp[-3].data), (yyvsp[-1].data)); + } +-#line 1647 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1667 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 22: +-#line 231 "dtc-parser.y" /* yacc.c:1646 */ ++ case 24: ++#line 247 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = data_add_marker((yyvsp[-1].data), REF_PATH, (yyvsp[0].labelref)); + } +-#line 1655 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1675 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 23: +-#line 235 "dtc-parser.y" /* yacc.c:1646 */ ++ case 25: ++#line 251 "dtc-parser.y" /* yacc.c:1646 */ + { + FILE *f = srcfile_relative_open((yyvsp[-5].data).val, NULL); + struct data d; +@@ -1671,11 +1691,11 @@ yyreduce: + (yyval.data) = data_merge((yyvsp[-8].data), d); + fclose(f); + } +-#line 1675 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1695 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 24: +-#line 251 "dtc-parser.y" /* yacc.c:1646 */ ++ case 26: ++#line 267 "dtc-parser.y" /* yacc.c:1646 */ + { + FILE *f = srcfile_relative_open((yyvsp[-1].data).val, NULL); + struct data d = empty_data; +@@ -1685,43 +1705,43 @@ yyreduce: + (yyval.data) = data_merge((yyvsp[-4].data), d); + fclose(f); + } +-#line 1689 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1709 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 25: +-#line 261 "dtc-parser.y" /* yacc.c:1646 */ ++ case 27: ++#line 277 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref)); + } +-#line 1697 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1717 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 26: +-#line 268 "dtc-parser.y" /* yacc.c:1646 */ ++ case 28: ++#line 284 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = empty_data; + } +-#line 1705 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1725 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 27: +-#line 272 "dtc-parser.y" /* yacc.c:1646 */ ++ case 29: ++#line 288 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = (yyvsp[-1].data); + } +-#line 1713 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1733 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 28: +-#line 276 "dtc-parser.y" /* yacc.c:1646 */ ++ case 30: ++#line 292 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref)); + } +-#line 1721 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1741 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 29: +-#line 283 "dtc-parser.y" /* yacc.c:1646 */ ++ case 31: ++#line 299 "dtc-parser.y" /* yacc.c:1646 */ + { + unsigned long long bits; + +@@ -1737,20 +1757,20 @@ yyreduce: + (yyval.array).data = empty_data; + (yyval.array).bits = bits; + } +-#line 1741 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1761 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 30: +-#line 299 "dtc-parser.y" /* yacc.c:1646 */ ++ case 32: ++#line 315 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.array).data = empty_data; + (yyval.array).bits = 32; + } +-#line 1750 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1770 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 31: +-#line 304 "dtc-parser.y" /* yacc.c:1646 */ ++ case 33: ++#line 320 "dtc-parser.y" /* yacc.c:1646 */ + { + if ((yyvsp[-1].array).bits < 64) { + uint64_t mask = (1ULL << (yyvsp[-1].array).bits) - 1; +@@ -1769,11 +1789,11 @@ yyreduce: + + (yyval.array).data = data_append_integer((yyvsp[-1].array).data, (yyvsp[0].integer), (yyvsp[-1].array).bits); + } +-#line 1773 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1793 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 32: +-#line 323 "dtc-parser.y" /* yacc.c:1646 */ ++ case 34: ++#line 339 "dtc-parser.y" /* yacc.c:1646 */ + { + uint64_t val = ~0ULL >> (64 - (yyvsp[-1].array).bits); + +@@ -1787,233 +1807,233 @@ yyreduce: + + (yyval.array).data = data_append_integer((yyvsp[-1].array).data, val, (yyvsp[-1].array).bits); + } +-#line 1791 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1811 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 33: +-#line 337 "dtc-parser.y" /* yacc.c:1646 */ ++ case 35: ++#line 353 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.array).data = data_add_marker((yyvsp[-1].array).data, LABEL, (yyvsp[0].labelref)); + } +-#line 1799 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1819 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 36: +-#line 346 "dtc-parser.y" /* yacc.c:1646 */ ++ case 38: ++#line 362 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.integer) = (yyvsp[-1].integer); + } +-#line 1807 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1827 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 39: +-#line 357 "dtc-parser.y" /* yacc.c:1646 */ ++ case 41: ++#line 373 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-4].integer) ? (yyvsp[-2].integer) : (yyvsp[0].integer); } +-#line 1813 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1833 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 41: +-#line 362 "dtc-parser.y" /* yacc.c:1646 */ ++ case 43: ++#line 378 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) || (yyvsp[0].integer); } +-#line 1819 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1839 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 43: +-#line 367 "dtc-parser.y" /* yacc.c:1646 */ ++ case 45: ++#line 383 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) && (yyvsp[0].integer); } +-#line 1825 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1845 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 45: +-#line 372 "dtc-parser.y" /* yacc.c:1646 */ ++ case 47: ++#line 388 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) | (yyvsp[0].integer); } +-#line 1831 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1851 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 47: +-#line 377 "dtc-parser.y" /* yacc.c:1646 */ ++ case 49: ++#line 393 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) ^ (yyvsp[0].integer); } +-#line 1837 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1857 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 49: +-#line 382 "dtc-parser.y" /* yacc.c:1646 */ ++ case 51: ++#line 398 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) & (yyvsp[0].integer); } +-#line 1843 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1863 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 51: +-#line 387 "dtc-parser.y" /* yacc.c:1646 */ ++ case 53: ++#line 403 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) == (yyvsp[0].integer); } +-#line 1849 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1869 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 52: +-#line 388 "dtc-parser.y" /* yacc.c:1646 */ ++ case 54: ++#line 404 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) != (yyvsp[0].integer); } +-#line 1855 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1875 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 54: +-#line 393 "dtc-parser.y" /* yacc.c:1646 */ ++ case 56: ++#line 409 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) < (yyvsp[0].integer); } +-#line 1861 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1881 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 55: +-#line 394 "dtc-parser.y" /* yacc.c:1646 */ ++ case 57: ++#line 410 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) > (yyvsp[0].integer); } +-#line 1867 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1887 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 56: +-#line 395 "dtc-parser.y" /* yacc.c:1646 */ ++ case 58: ++#line 411 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) <= (yyvsp[0].integer); } +-#line 1873 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1893 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 57: +-#line 396 "dtc-parser.y" /* yacc.c:1646 */ ++ case 59: ++#line 412 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) >= (yyvsp[0].integer); } +-#line 1879 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1899 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 58: +-#line 400 "dtc-parser.y" /* yacc.c:1646 */ ++ case 60: ++#line 416 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) << (yyvsp[0].integer); } +-#line 1885 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1905 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 59: +-#line 401 "dtc-parser.y" /* yacc.c:1646 */ ++ case 61: ++#line 417 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) >> (yyvsp[0].integer); } +-#line 1891 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1911 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 61: +-#line 406 "dtc-parser.y" /* yacc.c:1646 */ ++ case 63: ++#line 422 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) + (yyvsp[0].integer); } +-#line 1897 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1917 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 62: +-#line 407 "dtc-parser.y" /* yacc.c:1646 */ ++ case 64: ++#line 423 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) - (yyvsp[0].integer); } +-#line 1903 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1923 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 64: +-#line 412 "dtc-parser.y" /* yacc.c:1646 */ ++ case 66: ++#line 428 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) * (yyvsp[0].integer); } +-#line 1909 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1929 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 65: +-#line 413 "dtc-parser.y" /* yacc.c:1646 */ ++ case 67: ++#line 429 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) / (yyvsp[0].integer); } +-#line 1915 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1935 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 66: +-#line 414 "dtc-parser.y" /* yacc.c:1646 */ ++ case 68: ++#line 430 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) % (yyvsp[0].integer); } +-#line 1921 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1941 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 69: +-#line 420 "dtc-parser.y" /* yacc.c:1646 */ ++ case 71: ++#line 436 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = -(yyvsp[0].integer); } +-#line 1927 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1947 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 70: +-#line 421 "dtc-parser.y" /* yacc.c:1646 */ ++ case 72: ++#line 437 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = ~(yyvsp[0].integer); } +-#line 1933 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1953 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 71: +-#line 422 "dtc-parser.y" /* yacc.c:1646 */ ++ case 73: ++#line 438 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = !(yyvsp[0].integer); } +-#line 1939 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1959 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 72: +-#line 427 "dtc-parser.y" /* yacc.c:1646 */ ++ case 74: ++#line 443 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = empty_data; + } +-#line 1947 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1967 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 73: +-#line 431 "dtc-parser.y" /* yacc.c:1646 */ ++ case 75: ++#line 447 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = data_append_byte((yyvsp[-1].data), (yyvsp[0].byte)); + } +-#line 1955 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1975 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 74: +-#line 435 "dtc-parser.y" /* yacc.c:1646 */ ++ case 76: ++#line 451 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref)); + } +-#line 1963 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1983 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 75: +-#line 442 "dtc-parser.y" /* yacc.c:1646 */ ++ case 77: ++#line 458 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.nodelist) = NULL; + } +-#line 1971 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1991 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 76: +-#line 446 "dtc-parser.y" /* yacc.c:1646 */ ++ case 78: ++#line 462 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.nodelist) = chain_node((yyvsp[-1].node), (yyvsp[0].nodelist)); + } +-#line 1979 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1999 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 77: +-#line 450 "dtc-parser.y" /* yacc.c:1646 */ ++ case 79: ++#line 466 "dtc-parser.y" /* yacc.c:1646 */ + { + ERROR(&(yylsp[0]), "Properties must precede subnodes"); + YYERROR; + } +-#line 1988 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 2008 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 78: +-#line 458 "dtc-parser.y" /* yacc.c:1646 */ ++ case 80: ++#line 474 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.node) = name_node((yyvsp[0].node), (yyvsp[-1].propnodename)); + } +-#line 1996 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 2016 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 79: +-#line 462 "dtc-parser.y" /* yacc.c:1646 */ ++ case 81: ++#line 478 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.node) = name_node(build_node_delete(), (yyvsp[-1].propnodename)); + } +-#line 2004 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 2024 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 80: +-#line 466 "dtc-parser.y" /* yacc.c:1646 */ ++ case 82: ++#line 482 "dtc-parser.y" /* yacc.c:1646 */ + { + add_label(&(yyvsp[0].node)->labels, (yyvsp[-1].labelref)); + (yyval.node) = (yyvsp[0].node); + } +-#line 2013 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 2033 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + +-#line 2017 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 2037 "dtc-parser.tab.c" /* yacc.c:1646 */ + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires +@@ -2248,7 +2268,7 @@ yyreturn: + #endif + return yyresult; + } +-#line 472 "dtc-parser.y" /* yacc.c:1906 */ ++#line 488 "dtc-parser.y" /* yacc.c:1906 */ + + + void yyerror(char const *s) +diff --git a/scripts/dtc/dtc-parser.tab.h_shipped b/scripts/dtc/dtc-parser.tab.h_shipped +index 30867c6..276d078 100644 +--- a/scripts/dtc/dtc-parser.tab.h_shipped ++++ b/scripts/dtc/dtc-parser.tab.h_shipped +@@ -46,26 +46,27 @@ extern int yydebug; + enum yytokentype + { + DT_V1 = 258, +- DT_MEMRESERVE = 259, +- DT_LSHIFT = 260, +- DT_RSHIFT = 261, +- DT_LE = 262, +- DT_GE = 263, +- DT_EQ = 264, +- DT_NE = 265, +- DT_AND = 266, +- DT_OR = 267, +- DT_BITS = 268, +- DT_DEL_PROP = 269, +- DT_DEL_NODE = 270, +- DT_PROPNODENAME = 271, +- DT_LITERAL = 272, +- DT_CHAR_LITERAL = 273, +- DT_BYTE = 274, +- DT_STRING = 275, +- DT_LABEL = 276, +- DT_REF = 277, +- DT_INCBIN = 278 ++ DT_PLUGIN = 259, ++ DT_MEMRESERVE = 260, ++ DT_LSHIFT = 261, ++ DT_RSHIFT = 262, ++ DT_LE = 263, ++ DT_GE = 264, ++ DT_EQ = 265, ++ DT_NE = 266, ++ DT_AND = 267, ++ DT_OR = 268, ++ DT_BITS = 269, ++ DT_DEL_PROP = 270, ++ DT_DEL_NODE = 271, ++ DT_PROPNODENAME = 272, ++ DT_LITERAL = 273, ++ DT_CHAR_LITERAL = 274, ++ DT_BYTE = 275, ++ DT_STRING = 276, ++ DT_LABEL = 277, ++ DT_REF = 278, ++ DT_INCBIN = 279 + }; + #endif + +@@ -74,7 +75,7 @@ extern int yydebug; + typedef union YYSTYPE YYSTYPE; + union YYSTYPE + { +-#line 38 "dtc-parser.y" /* yacc.c:1909 */ ++#line 39 "dtc-parser.y" /* yacc.c:1909 */ + + char *propnodename; + char *labelref; +@@ -92,8 +93,9 @@ union YYSTYPE + struct node *nodelist; + struct reserve_info *re; + uint64_t integer; ++ bool is_plugin; + +-#line 97 "dtc-parser.tab.h" /* yacc.c:1909 */ ++#line 99 "dtc-parser.tab.h" /* yacc.c:1909 */ + }; + # define YYSTYPE_IS_TRIVIAL 1 + # define YYSTYPE_IS_DECLARED 1 +diff --git a/scripts/dtc/dtc-parser.y b/scripts/dtc/dtc-parser.y +index 5a897e3..d23927d 100644 +--- a/scripts/dtc/dtc-parser.y ++++ b/scripts/dtc/dtc-parser.y +@@ -19,6 +19,7 @@ + */ + %{ + #include ++#include + + #include "dtc.h" + #include "srcpos.h" +@@ -52,9 +53,11 @@ extern bool treesource_error; + struct node *nodelist; + struct reserve_info *re; + uint64_t integer; ++ bool is_plugin; + } + + %token DT_V1 ++%token DT_PLUGIN + %token DT_MEMRESERVE + %token DT_LSHIFT DT_RSHIFT DT_LE DT_GE DT_EQ DT_NE DT_AND DT_OR + %token DT_BITS +@@ -71,6 +74,7 @@ extern bool treesource_error; + + %type propdata + %type propdataprefix ++%type plugindecl + %type memreserve + %type memreserves + %type arrayprefix +@@ -101,10 +105,22 @@ extern bool treesource_error; + %% + + sourcefile: +- DT_V1 ';' memreserves devicetree ++ DT_V1 ';' plugindecl memreserves devicetree + { +- the_boot_info = build_boot_info($3, $4, +- guess_boot_cpuid($4)); ++ $5->is_plugin = $3; ++ the_boot_info = build_boot_info($4, $5, ++ guess_boot_cpuid($5)); ++ } ++ ; ++ ++plugindecl: ++ /* empty */ ++ { ++ $$ = false; ++ } ++ | DT_PLUGIN ';' ++ { ++ $$ = true; + } + ; + +diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c +index 8c4add6..91e91e7 100644 +--- a/scripts/dtc/dtc.c ++++ b/scripts/dtc/dtc.c +@@ -29,6 +29,7 @@ int reservenum; /* Number of memory reservation slots */ + int minsize; /* Minimum blob size */ + int padsize; /* Additional padding to blob */ + int phandle_format = PHANDLE_BOTH; /* Use linux,phandle or phandle properties */ ++int symbol_fixup_support = 0; + + static void fill_fullpaths(struct node *tree, const char *prefix) + { +@@ -51,7 +52,7 @@ static void fill_fullpaths(struct node *tree, const char *prefix) + #define FDT_VERSION(version) _FDT_VERSION(version) + #define _FDT_VERSION(version) #version + static const char usage_synopsis[] = "dtc [options] "; +-static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv"; ++static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:@hv"; + static struct option const usage_long_opts[] = { + {"quiet", no_argument, NULL, 'q'}, + {"in-format", a_argument, NULL, 'I'}, +@@ -69,6 +70,7 @@ static struct option const usage_long_opts[] = { + {"phandle", a_argument, NULL, 'H'}, + {"warning", a_argument, NULL, 'W'}, + {"error", a_argument, NULL, 'E'}, ++ {"symbols", no_argument, NULL, '@'}, + {"help", no_argument, NULL, 'h'}, + {"version", no_argument, NULL, 'v'}, + {NULL, no_argument, NULL, 0x0}, +@@ -99,6 +101,7 @@ static const char * const usage_opts_help[] = { + "\t\tboth - Both \"linux,phandle\" and \"phandle\" properties", + "\n\tEnable/disable warnings (prefix with \"no-\")", + "\n\tEnable/disable errors (prefix with \"no-\")", ++ "\n\tEnable symbols/fixup support", + "\n\tPrint this help and exit", + "\n\tPrint version and exit", + NULL, +@@ -186,7 +189,9 @@ int main(int argc, char *argv[]) + case 'E': + parse_checks_option(false, true, optarg); + break; +- ++ case '@': ++ symbol_fixup_support = 1; ++ break; + case 'h': + usage(NULL); + default: +diff --git a/scripts/dtc/dtc.h b/scripts/dtc/dtc.h +index 56212c8..f163b22 100644 +--- a/scripts/dtc/dtc.h ++++ b/scripts/dtc/dtc.h +@@ -54,6 +54,7 @@ extern int reservenum; /* Number of memory reservation slots */ + extern int minsize; /* Minimum blob size */ + extern int padsize; /* Additional padding to blob */ + extern int phandle_format; /* Use linux,phandle or phandle properties */ ++extern int symbol_fixup_support;/* enable symbols & fixup support */ + + #define PHANDLE_LEGACY 0x1 + #define PHANDLE_EPAPR 0x2 +@@ -132,6 +133,26 @@ struct label { + struct label *next; + }; + ++struct fixup_entry { ++ int offset; ++ struct node *node; ++ struct property *prop; ++ struct fixup_entry *next; ++ bool local_fixup_generated; ++}; ++ ++struct fixup { ++ char *ref; ++ struct fixup_entry *entries; ++ struct fixup *next; ++}; ++ ++struct symbol { ++ struct label *label; ++ struct node *node; ++ struct symbol *next; ++}; ++ + struct property { + bool deleted; + char *name; +@@ -158,6 +179,13 @@ struct node { + int addr_cells, size_cells; + + struct label *labels; ++ ++ struct symbol *symbols; ++ struct fixup_entry *local_fixups; ++ bool emit_local_fixup_node; ++ ++ bool is_plugin; ++ struct fixup *fixups; + }; + + #define for_each_label_withdel(l0, l) \ +@@ -181,6 +209,18 @@ struct node { + for_each_child_withdel(n, c) \ + if (!(c)->deleted) + ++#define for_each_fixup(n, f) \ ++ for ((f) = (n)->fixups; (f); (f) = (f)->next) ++ ++#define for_each_fixup_entry(f, fe) \ ++ for ((fe) = (f)->entries; (fe); (fe) = (fe)->next) ++ ++#define for_each_symbol(n, s) \ ++ for ((s) = (n)->symbols; (s); (s) = (s)->next) ++ ++#define for_each_local_fixup_entry(n, fe) \ ++ for ((fe) = (n)->local_fixups; (fe); (fe) = (fe)->next) ++ + void add_label(struct label **labels, char *label); + void delete_labels(struct label **labels); + +diff --git a/scripts/dtc/flattree.c b/scripts/dtc/flattree.c +index bd99fa2..2385137 100644 +--- a/scripts/dtc/flattree.c ++++ b/scripts/dtc/flattree.c +@@ -255,6 +255,204 @@ static int stringtable_insert(struct data *d, const char *str) + return i; + } + ++static void emit_local_fixups(struct node *tree, struct emitter *emit, ++ void *etarget, struct data *strbuf, struct version_info *vi, ++ struct node *node) ++{ ++ struct fixup_entry *fe, *fen; ++ struct node *child; ++ int nameoff, count; ++ cell_t *buf; ++ struct data d; ++ ++ if (node->emit_local_fixup_node) { ++ ++ /* emit the external fixups (do not emit /) */ ++ if (node != tree) { ++ emit->beginnode(etarget, NULL); ++ emit->string(etarget, node->name, 0); ++ emit->align(etarget, sizeof(cell_t)); ++ } ++ ++ for_each_local_fixup_entry(tree, fe) { ++ if (fe->node != node || fe->local_fixup_generated) ++ continue; ++ ++ /* count the number of fixup entries */ ++ count = 0; ++ for_each_local_fixup_entry(tree, fen) { ++ if (fen->prop != fe->prop) ++ continue; ++ fen->local_fixup_generated = true; ++ count++; ++ } ++ ++ /* allocate buffer */ ++ buf = xmalloc(count * sizeof(cell_t)); ++ ++ /* collect all the offsets in buffer */ ++ count = 0; ++ for_each_local_fixup_entry(tree, fen) { ++ if (fen->prop != fe->prop) ++ continue; ++ fen->local_fixup_generated = true; ++ buf[count++] = cpu_to_fdt32(fen->offset); ++ } ++ d = empty_data; ++ d.len = count * sizeof(cell_t); ++ d.val = (char *)buf; ++ ++ nameoff = stringtable_insert(strbuf, fe->prop->name); ++ emit->property(etarget, fe->prop->labels); ++ emit->cell(etarget, count * sizeof(cell_t)); ++ emit->cell(etarget, nameoff); ++ ++ if ((vi->flags & FTF_VARALIGN) && ++ (count * sizeof(cell_t)) >= 8) ++ emit->align(etarget, 8); ++ ++ emit->data(etarget, d); ++ emit->align(etarget, sizeof(cell_t)); ++ ++ free(buf); ++ } ++ } ++ ++ for_each_child(node, child) ++ emit_local_fixups(tree, emit, etarget, strbuf, vi, child); ++ ++ if (node->emit_local_fixup_node && node != tree) ++ emit->endnode(etarget, tree->labels); ++} ++ ++static void emit_symbols_node(struct node *tree, struct emitter *emit, ++ void *etarget, struct data *strbuf, ++ struct version_info *vi) ++{ ++ struct symbol *sym; ++ int nameoff, vallen; ++ ++ /* do nothing if no symbols */ ++ if (!tree->symbols) ++ return; ++ ++ emit->beginnode(etarget, NULL); ++ emit->string(etarget, "__symbols__", 0); ++ emit->align(etarget, sizeof(cell_t)); ++ ++ for_each_symbol(tree, sym) { ++ ++ vallen = strlen(sym->node->fullpath); ++ ++ nameoff = stringtable_insert(strbuf, sym->label->label); ++ ++ emit->property(etarget, NULL); ++ emit->cell(etarget, vallen + 1); ++ emit->cell(etarget, nameoff); ++ ++ if ((vi->flags & FTF_VARALIGN) && vallen >= 8) ++ emit->align(etarget, 8); ++ ++ emit->string(etarget, sym->node->fullpath, ++ strlen(sym->node->fullpath)); ++ emit->align(etarget, sizeof(cell_t)); ++ } ++ ++ emit->endnode(etarget, NULL); ++} ++ ++static void emit_local_fixups_node(struct node *tree, struct emitter *emit, ++ void *etarget, struct data *strbuf, ++ struct version_info *vi) ++{ ++ struct fixup_entry *fe; ++ struct node *node; ++ ++ /* do nothing if no local fixups */ ++ if (!tree->local_fixups) ++ return; ++ ++ /* mark all nodes that need a local fixup generated (and parents) */ ++ for_each_local_fixup_entry(tree, fe) { ++ node = fe->node; ++ while (node != NULL && !node->emit_local_fixup_node) { ++ node->emit_local_fixup_node = true; ++ node = node->parent; ++ } ++ } ++ ++ /* emit the local fixups node now */ ++ emit->beginnode(etarget, NULL); ++ emit->string(etarget, "__local_fixups__", 0); ++ emit->align(etarget, sizeof(cell_t)); ++ ++ emit_local_fixups(tree, emit, etarget, strbuf, vi, tree); ++ ++ emit->endnode(etarget, tree->labels); ++} ++ ++static void emit_fixups_node(struct node *tree, struct emitter *emit, ++ void *etarget, struct data *strbuf, ++ struct version_info *vi) ++{ ++ struct fixup *f; ++ struct fixup_entry *fe; ++ char *name, *s; ++ const char *fullpath; ++ int namesz, nameoff, vallen; ++ ++ /* do nothing if no fixups */ ++ if (!tree->fixups) ++ return; ++ ++ /* emit the external fixups */ ++ emit->beginnode(etarget, NULL); ++ emit->string(etarget, "__fixups__", 0); ++ emit->align(etarget, sizeof(cell_t)); ++ ++ for_each_fixup(tree, f) { ++ ++ namesz = 0; ++ for_each_fixup_entry(f, fe) { ++ fullpath = fe->node->fullpath; ++ if (fullpath[0] == '\0') ++ fullpath = "/"; ++ namesz += strlen(fullpath) + 1; ++ namesz += strlen(fe->prop->name) + 1; ++ namesz += 32; /* space for : + '\0' */ ++ } ++ ++ name = xmalloc(namesz); ++ ++ s = name; ++ for_each_fixup_entry(f, fe) { ++ fullpath = fe->node->fullpath; ++ if (fullpath[0] == '\0') ++ fullpath = "/"; ++ snprintf(s, name + namesz - s, "%s:%s:%d", fullpath, ++ fe->prop->name, fe->offset); ++ s += strlen(s) + 1; ++ } ++ ++ nameoff = stringtable_insert(strbuf, f->ref); ++ vallen = s - name - 1; ++ ++ emit->property(etarget, NULL); ++ emit->cell(etarget, vallen + 1); ++ emit->cell(etarget, nameoff); ++ ++ if ((vi->flags & FTF_VARALIGN) && vallen >= 8) ++ emit->align(etarget, 8); ++ ++ emit->string(etarget, name, vallen); ++ emit->align(etarget, sizeof(cell_t)); ++ ++ free(name); ++ } ++ ++ emit->endnode(etarget, tree->labels); ++} ++ + static void flatten_tree(struct node *tree, struct emitter *emit, + void *etarget, struct data *strbuf, + struct version_info *vi) +@@ -310,6 +508,10 @@ static void flatten_tree(struct node *tree, struct emitter *emit, + flatten_tree(child, emit, etarget, strbuf, vi); + } + ++ emit_symbols_node(tree, emit, etarget, strbuf, vi); ++ emit_local_fixups_node(tree, emit, etarget, strbuf, vi); ++ emit_fixups_node(tree, emit, etarget, strbuf, vi); ++ + emit->endnode(etarget, tree->labels); + } + +diff --git a/scripts/dtc/version_gen.h b/scripts/dtc/version_gen.h +index 5b8c7d5..2595dfd 100644 +--- a/scripts/dtc/version_gen.h ++++ b/scripts/dtc/version_gen.h +@@ -1 +1 @@ +-#define DTC_VERSION "DTC 1.4.1-g9d3649bd" ++#define DTC_VERSION "DTC 1.4.1-g25efc119" +-- +2.5.0 + + +From c731598f90a484f5dc40cb0ade3eee18c7f0508b Mon Sep 17 00:00:00 2001 +From: Pantelis Antoniou +Date: Thu, 22 Oct 2015 23:30:04 +0300 +Subject: [PATCH 174/181] configfs: implement binary attributes + +ConfigFS lacked binary attributes up until now. This patch +introduces support for binary attributes in a somewhat similar +manner of sysfs binary attributes albeit with changes that +fit the configfs usage model. + +Problems that configfs binary attributes fix are everything that +requires a binary blob as part of the configuration of a resource, +such as bitstream loading for FPGAs, DTBs for dynamically created +devices etc. + +Look at Documentation/filesystems/configfs/configfs.txt for internals +and howto use them. + +This patch is against linux-next as of today that contains +Christoph's configfs rework. + +Signed-off-by: Pantelis Antoniou +[hch: folded a fix from Geert Uytterhoeven ] +[hch: a few tiny updates based on review feedback] +Signed-off-by: Christoph Hellwig +--- + Documentation/filesystems/configfs/configfs.txt | 57 +++++- + fs/configfs/configfs_internal.h | 14 +- + fs/configfs/dir.c | 18 +- + fs/configfs/file.c | 255 +++++++++++++++++++++++- + fs/configfs/inode.c | 2 +- + include/linux/configfs.h | 50 +++++ + 6 files changed, 374 insertions(+), 22 deletions(-) + +diff --git a/Documentation/filesystems/configfs/configfs.txt b/Documentation/filesystems/configfs/configfs.txt +index af68efd..e5fe521 100644 +--- a/Documentation/filesystems/configfs/configfs.txt ++++ b/Documentation/filesystems/configfs/configfs.txt +@@ -51,15 +51,27 @@ configfs tree is always there, whether mounted on /config or not. + An item is created via mkdir(2). The item's attributes will also + appear at this time. readdir(3) can determine what the attributes are, + read(2) can query their default values, and write(2) can store new +-values. Like sysfs, attributes should be ASCII text files, preferably +-with only one value per file. The same efficiency caveats from sysfs +-apply. Don't mix more than one attribute in one attribute file. +- +-Like sysfs, configfs expects write(2) to store the entire buffer at +-once. When writing to configfs attributes, userspace processes should +-first read the entire file, modify the portions they wish to change, and +-then write the entire buffer back. Attribute files have a maximum size +-of one page (PAGE_SIZE, 4096 on i386). ++values. Don't mix more than one attribute in one attribute file. ++ ++There are two types of configfs attributes: ++ ++* Normal attributes, which similar to sysfs attributes, are small ASCII text ++files, with a maximum size of one page (PAGE_SIZE, 4096 on i386). Preferably ++only one value per file should be used, and the same caveats from sysfs apply. ++Configfs expects write(2) to store the entire buffer at once. When writing to ++normal configfs attributes, userspace processes should first read the entire ++file, modify the portions they wish to change, and then write the entire ++buffer back. ++ ++* Binary attributes, which are somewhat similar to sysfs binary attributes, ++but with a few slight changes to semantics. The PAGE_SIZE limitation does not ++apply, but the whole binary item must fit in single kernel vmalloc'ed buffer. ++The write(2) calls from user space are buffered, and the attributes' ++write_bin_attribute method will be invoked on the final close, therefore it is ++imperative for user-space to check the return code of close(2) in order to ++verify that the operation finished successfully. ++To avoid a malicious user OOMing the kernel, there's a per-binary attribute ++maximum buffer value. + + When an item needs to be destroyed, remove it with rmdir(2). An + item cannot be destroyed if any other item has a link to it (via +@@ -171,6 +183,7 @@ among other things. For that, it needs a type. + struct configfs_item_operations *ct_item_ops; + struct configfs_group_operations *ct_group_ops; + struct configfs_attribute **ct_attrs; ++ struct configfs_bin_attribute **ct_bin_attrs; + }; + + The most basic function of a config_item_type is to define what +@@ -201,6 +214,32 @@ be called whenever userspace asks for a read(2) on the attribute. If an + attribute is writable and provides a ->store method, that method will be + be called whenever userspace asks for a write(2) on the attribute. + ++[struct configfs_bin_attribute] ++ ++ struct configfs_attribute { ++ struct configfs_attribute cb_attr; ++ void *cb_private; ++ size_t cb_max_size; ++ }; ++ ++The binary attribute is used when the one needs to use binary blob to ++appear as the contents of a file in the item's configfs directory. ++To do so add the binary attribute to the NULL-terminated array ++config_item_type->ct_bin_attrs, and the item appears in configfs, the ++attribute file will appear with the configfs_bin_attribute->cb_attr.ca_name ++filename. configfs_bin_attribute->cb_attr.ca_mode specifies the file ++permissions. ++The cb_private member is provided for use by the driver, while the ++cb_max_size member specifies the maximum amount of vmalloc buffer ++to be used. ++ ++If binary attribute is readable and the config_item provides a ++ct_item_ops->read_bin_attribute() method, that method will be called ++whenever userspace asks for a read(2) on the attribute. The converse ++will happen for write(2). The reads/writes are bufferred so only a ++single read/write will occur; the attributes' need not concern itself ++with it. ++ + [struct config_group] + + A config_item cannot live in a vacuum. The only way one can be created +diff --git a/fs/configfs/configfs_internal.h b/fs/configfs/configfs_internal.h +index b65d1ef..ccc31fa 100644 +--- a/fs/configfs/configfs_internal.h ++++ b/fs/configfs/configfs_internal.h +@@ -53,13 +53,14 @@ struct configfs_dirent { + #define CONFIGFS_ROOT 0x0001 + #define CONFIGFS_DIR 0x0002 + #define CONFIGFS_ITEM_ATTR 0x0004 ++#define CONFIGFS_ITEM_BIN_ATTR 0x0008 + #define CONFIGFS_ITEM_LINK 0x0020 + #define CONFIGFS_USET_DIR 0x0040 + #define CONFIGFS_USET_DEFAULT 0x0080 + #define CONFIGFS_USET_DROPPING 0x0100 + #define CONFIGFS_USET_IN_MKDIR 0x0200 + #define CONFIGFS_USET_CREATING 0x0400 +-#define CONFIGFS_NOT_PINNED (CONFIGFS_ITEM_ATTR) ++#define CONFIGFS_NOT_PINNED (CONFIGFS_ITEM_ATTR | CONFIGFS_ITEM_BIN_ATTR) + + extern struct mutex configfs_symlink_mutex; + extern spinlock_t configfs_dirent_lock; +@@ -72,6 +73,8 @@ extern struct inode * configfs_new_inode(umode_t mode, struct configfs_dirent *, + extern int configfs_create(struct dentry *, umode_t mode, void (*init)(struct inode *)); + + extern int configfs_create_file(struct config_item *, const struct configfs_attribute *); ++extern int configfs_create_bin_file(struct config_item *, ++ const struct configfs_bin_attribute *); + extern int configfs_make_dirent(struct configfs_dirent *, + struct dentry *, void *, umode_t, int); + extern int configfs_dirent_is_ready(struct configfs_dirent *); +@@ -88,7 +91,7 @@ extern void configfs_release_fs(void); + extern struct rw_semaphore configfs_rename_sem; + extern const struct file_operations configfs_dir_operations; + extern const struct file_operations configfs_file_operations; +-extern const struct file_operations bin_fops; ++extern const struct file_operations configfs_bin_file_operations; + extern const struct inode_operations configfs_dir_inode_operations; + extern const struct inode_operations configfs_root_inode_operations; + extern const struct inode_operations configfs_symlink_inode_operations; +@@ -119,6 +122,13 @@ static inline struct configfs_attribute * to_attr(struct dentry * dentry) + return ((struct configfs_attribute *) sd->s_element); + } + ++static inline struct configfs_bin_attribute *to_bin_attr(struct dentry *dentry) ++{ ++ struct configfs_attribute *attr = to_attr(dentry); ++ ++ return container_of(attr, struct configfs_bin_attribute, cb_attr); ++} ++ + static inline struct config_item *configfs_get_config_item(struct dentry *dentry) + { + struct config_item * item = NULL; +diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c +index a7a1b21..7ae97e8 100644 +--- a/fs/configfs/dir.c ++++ b/fs/configfs/dir.c +@@ -255,6 +255,12 @@ static void configfs_init_file(struct inode * inode) + inode->i_fop = &configfs_file_operations; + } + ++static void configfs_init_bin_file(struct inode *inode) ++{ ++ inode->i_size = 0; ++ inode->i_fop = &configfs_bin_file_operations; ++} ++ + static void init_symlink(struct inode * inode) + { + inode->i_op = &configfs_symlink_inode_operations; +@@ -423,7 +429,9 @@ static int configfs_attach_attr(struct configfs_dirent * sd, struct dentry * den + spin_unlock(&configfs_dirent_lock); + + error = configfs_create(dentry, (attr->ca_mode & S_IALLUGO) | S_IFREG, +- configfs_init_file); ++ (sd->s_type & CONFIGFS_ITEM_BIN_ATTR) ? ++ configfs_init_bin_file : ++ configfs_init_file); + if (error) { + configfs_put(sd); + return error; +@@ -583,6 +591,7 @@ static int populate_attrs(struct config_item *item) + { + struct config_item_type *t = item->ci_type; + struct configfs_attribute *attr; ++ struct configfs_bin_attribute *bin_attr; + int error = 0; + int i; + +@@ -594,6 +603,13 @@ static int populate_attrs(struct config_item *item) + break; + } + } ++ if (t->ct_bin_attrs) { ++ for (i = 0; (bin_attr = t->ct_bin_attrs[i]) != NULL; i++) { ++ error = configfs_create_bin_file(item, bin_attr); ++ if (error) ++ break; ++ } ++ } + + if (error) + detach_attrs(item); +diff --git a/fs/configfs/file.c b/fs/configfs/file.c +index d39099e..3687187 100644 +--- a/fs/configfs/file.c ++++ b/fs/configfs/file.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -48,6 +49,10 @@ struct configfs_buffer { + struct configfs_item_operations * ops; + struct mutex mutex; + int needs_read_fill; ++ bool read_in_progress; ++ bool write_in_progress; ++ char *bin_buffer; ++ int bin_buffer_size; + }; + + +@@ -123,6 +128,87 @@ out: + return retval; + } + ++/** ++ * configfs_read_bin_file - read a binary attribute. ++ * @file: file pointer. ++ * @buf: buffer to fill. ++ * @count: number of bytes to read. ++ * @ppos: starting offset in file. ++ * ++ * Userspace wants to read a binary attribute file. The attribute ++ * descriptor is in the file's ->d_fsdata. The target item is in the ++ * directory's ->d_fsdata. ++ * ++ * We check whether we need to refill the buffer. If so we will ++ * call the attributes' attr->read() twice. The first time we ++ * will pass a NULL as a buffer pointer, which the attributes' method ++ * will use to return the size of the buffer required. If no error ++ * occurs we will allocate the buffer using vmalloc and call ++ * attr->read() again passing that buffer as an argument. ++ * Then we just copy to user-space using simple_read_from_buffer. ++ */ ++ ++static ssize_t ++configfs_read_bin_file(struct file *file, char __user *buf, ++ size_t count, loff_t *ppos) ++{ ++ struct configfs_buffer *buffer = file->private_data; ++ struct dentry *dentry = file->f_path.dentry; ++ struct config_item *item = to_item(dentry->d_parent); ++ struct configfs_bin_attribute *bin_attr = to_bin_attr(dentry); ++ ssize_t retval = 0; ++ ssize_t len = min_t(size_t, count, PAGE_SIZE); ++ ++ mutex_lock(&buffer->mutex); ++ ++ /* we don't support switching read/write modes */ ++ if (buffer->write_in_progress) { ++ retval = -ETXTBSY; ++ goto out; ++ } ++ buffer->read_in_progress = 1; ++ ++ if (buffer->needs_read_fill) { ++ /* perform first read with buf == NULL to get extent */ ++ len = bin_attr->read(item, NULL, 0); ++ if (len <= 0) { ++ retval = len; ++ goto out; ++ } ++ ++ /* do not exceed the maximum value */ ++ if (bin_attr->cb_max_size && len > bin_attr->cb_max_size) { ++ retval = -EFBIG; ++ goto out; ++ } ++ ++ buffer->bin_buffer = vmalloc(len); ++ if (buffer->bin_buffer == NULL) { ++ retval = -ENOMEM; ++ goto out; ++ } ++ buffer->bin_buffer_size = len; ++ ++ /* perform second read to fill buffer */ ++ len = bin_attr->read(item, buffer->bin_buffer, len); ++ if (len < 0) { ++ retval = len; ++ vfree(buffer->bin_buffer); ++ buffer->bin_buffer_size = 0; ++ buffer->bin_buffer = NULL; ++ goto out; ++ } ++ ++ buffer->needs_read_fill = 0; ++ } ++ ++ retval = simple_read_from_buffer(buf, count, ppos, buffer->bin_buffer, ++ buffer->bin_buffer_size); ++out: ++ mutex_unlock(&buffer->mutex); ++ return retval; ++} ++ + + /** + * fill_write_buffer - copy buffer from userspace. +@@ -209,10 +295,80 @@ configfs_write_file(struct file *file, const char __user *buf, size_t count, lof + return len; + } + +-static int check_perm(struct inode * inode, struct file * file) ++/** ++ * configfs_write_bin_file - write a binary attribute. ++ * @file: file pointer ++ * @buf: data to write ++ * @count: number of bytes ++ * @ppos: starting offset ++ * ++ * Writing to a binary attribute file is similar to a normal read. ++ * We buffer the consecutive writes (binary attribute files do not ++ * support lseek) in a continuously growing buffer, but we don't ++ * commit until the close of the file. ++ */ ++ ++static ssize_t ++configfs_write_bin_file(struct file *file, const char __user *buf, ++ size_t count, loff_t *ppos) ++{ ++ struct configfs_buffer *buffer = file->private_data; ++ struct dentry *dentry = file->f_path.dentry; ++ struct configfs_bin_attribute *bin_attr = to_bin_attr(dentry); ++ void *tbuf = NULL; ++ ssize_t len; ++ ++ mutex_lock(&buffer->mutex); ++ ++ /* we don't support switching read/write modes */ ++ if (buffer->read_in_progress) { ++ len = -ETXTBSY; ++ goto out; ++ } ++ buffer->write_in_progress = 1; ++ ++ /* buffer grows? */ ++ if (*ppos + count > buffer->bin_buffer_size) { ++ ++ if (bin_attr->cb_max_size && ++ *ppos + count > bin_attr->cb_max_size) { ++ len = -EFBIG; ++ } ++ ++ tbuf = vmalloc(*ppos + count); ++ if (tbuf == NULL) { ++ len = -ENOMEM; ++ goto out; ++ } ++ ++ /* copy old contents */ ++ if (buffer->bin_buffer) { ++ memcpy(tbuf, buffer->bin_buffer, ++ buffer->bin_buffer_size); ++ vfree(buffer->bin_buffer); ++ } ++ ++ /* clear the new area */ ++ memset(tbuf + buffer->bin_buffer_size, 0, ++ *ppos + count - buffer->bin_buffer_size); ++ buffer->bin_buffer = tbuf; ++ buffer->bin_buffer_size = *ppos + count; ++ } ++ ++ len = simple_write_to_buffer(buffer->bin_buffer, ++ buffer->bin_buffer_size, ppos, buf, count); ++ if (len > 0) ++ *ppos += len; ++out: ++ mutex_unlock(&buffer->mutex); ++ return len; ++} ++ ++static int check_perm(struct inode * inode, struct file * file, int type) + { + struct config_item *item = configfs_get_config_item(file->f_path.dentry->d_parent); + struct configfs_attribute * attr = to_attr(file->f_path.dentry); ++ struct configfs_bin_attribute *bin_attr = NULL; + struct configfs_buffer * buffer; + struct configfs_item_operations * ops = NULL; + int error = 0; +@@ -220,6 +376,9 @@ static int check_perm(struct inode * inode, struct file * file) + if (!item || !attr) + goto Einval; + ++ if (type & CONFIGFS_ITEM_BIN_ATTR) ++ bin_attr = to_bin_attr(file->f_path.dentry); ++ + /* Grab the module reference for this attribute if we have one */ + if (!try_module_get(attr->ca_owner)) { + error = -ENODEV; +@@ -236,9 +395,14 @@ static int check_perm(struct inode * inode, struct file * file) + * and we must have a store method. + */ + if (file->f_mode & FMODE_WRITE) { +- if (!(inode->i_mode & S_IWUGO) || !attr->store) ++ if (!(inode->i_mode & S_IWUGO)) ++ goto Eaccess; ++ ++ if ((type & CONFIGFS_ITEM_ATTR) && !attr->store) + goto Eaccess; + ++ if ((type & CONFIGFS_ITEM_BIN_ATTR) && !bin_attr->write) ++ goto Eaccess; + } + + /* File needs read support. +@@ -246,7 +410,13 @@ static int check_perm(struct inode * inode, struct file * file) + * must be a show method for it. + */ + if (file->f_mode & FMODE_READ) { +- if (!(inode->i_mode & S_IRUGO) || !attr->show) ++ if (!(inode->i_mode & S_IRUGO)) ++ goto Eaccess; ++ ++ if ((type & CONFIGFS_ITEM_ATTR) && !attr->show) ++ goto Eaccess; ++ ++ if ((type & CONFIGFS_ITEM_BIN_ATTR) && !bin_attr->read) + goto Eaccess; + } + +@@ -260,6 +430,8 @@ static int check_perm(struct inode * inode, struct file * file) + } + mutex_init(&buffer->mutex); + buffer->needs_read_fill = 1; ++ buffer->read_in_progress = 0; ++ buffer->write_in_progress = 0; + buffer->ops = ops; + file->private_data = buffer; + goto Done; +@@ -277,12 +449,7 @@ static int check_perm(struct inode * inode, struct file * file) + return error; + } + +-static int configfs_open_file(struct inode * inode, struct file * filp) +-{ +- return check_perm(inode,filp); +-} +- +-static int configfs_release(struct inode * inode, struct file * filp) ++static int configfs_release(struct inode *inode, struct file *filp) + { + struct config_item * item = to_item(filp->f_path.dentry->d_parent); + struct configfs_attribute * attr = to_attr(filp->f_path.dentry); +@@ -303,6 +470,47 @@ static int configfs_release(struct inode * inode, struct file * filp) + return 0; + } + ++static int configfs_open_file(struct inode *inode, struct file *filp) ++{ ++ return check_perm(inode, filp, CONFIGFS_ITEM_ATTR); ++} ++ ++static int configfs_open_bin_file(struct inode *inode, struct file *filp) ++{ ++ return check_perm(inode, filp, CONFIGFS_ITEM_BIN_ATTR); ++} ++ ++static int configfs_release_bin_file(struct inode *inode, struct file *filp) ++{ ++ struct configfs_buffer *buffer = filp->private_data; ++ struct dentry *dentry = filp->f_path.dentry; ++ struct config_item *item = to_item(dentry->d_parent); ++ struct configfs_bin_attribute *bin_attr = to_bin_attr(dentry); ++ ssize_t len = 0; ++ int ret; ++ ++ buffer->read_in_progress = 0; ++ ++ if (buffer->write_in_progress) { ++ buffer->write_in_progress = 0; ++ ++ len = bin_attr->write(item, buffer->bin_buffer, ++ buffer->bin_buffer_size); ++ ++ /* vfree on NULL is safe */ ++ vfree(buffer->bin_buffer); ++ buffer->bin_buffer = NULL; ++ buffer->bin_buffer_size = 0; ++ buffer->needs_read_fill = 1; ++ } ++ ++ ret = configfs_release(inode, filp); ++ if (len < 0) ++ return len; ++ return ret; ++} ++ ++ + const struct file_operations configfs_file_operations = { + .read = configfs_read_file, + .write = configfs_write_file, +@@ -311,6 +519,14 @@ const struct file_operations configfs_file_operations = { + .release = configfs_release, + }; + ++const struct file_operations configfs_bin_file_operations = { ++ .read = configfs_read_bin_file, ++ .write = configfs_write_bin_file, ++ .llseek = NULL, /* bin file is not seekable */ ++ .open = configfs_open_bin_file, ++ .release = configfs_release_bin_file, ++}; ++ + /** + * configfs_create_file - create an attribute file for an item. + * @item: item we're creating for. +@@ -332,3 +548,24 @@ int configfs_create_file(struct config_item * item, const struct configfs_attrib + return error; + } + ++/** ++ * configfs_create_bin_file - create a binary attribute file for an item. ++ * @item: item we're creating for. ++ * @attr: atrribute descriptor. ++ */ ++ ++int configfs_create_bin_file(struct config_item *item, ++ const struct configfs_bin_attribute *bin_attr) ++{ ++ struct dentry *dir = item->ci_dentry; ++ struct configfs_dirent *parent_sd = dir->d_fsdata; ++ umode_t mode = (bin_attr->cb_attr.ca_mode & S_IALLUGO) | S_IFREG; ++ int error = 0; ++ ++ mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_NORMAL); ++ error = configfs_make_dirent(parent_sd, NULL, (void *) bin_attr, mode, ++ CONFIGFS_ITEM_BIN_ATTR); ++ mutex_unlock(&dir->d_inode->i_mutex); ++ ++ return error; ++} +diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c +index eae8757..0cc810e 100644 +--- a/fs/configfs/inode.c ++++ b/fs/configfs/inode.c +@@ -218,7 +218,7 @@ const unsigned char * configfs_get_name(struct configfs_dirent *sd) + if (sd->s_type & (CONFIGFS_DIR | CONFIGFS_ITEM_LINK)) + return sd->s_dentry->d_name.name; + +- if (sd->s_type & CONFIGFS_ITEM_ATTR) { ++ if (sd->s_type & (CONFIGFS_ITEM_ATTR | CONFIGFS_ITEM_BIN_ATTR)) { + attr = sd->s_element; + return attr->ca_name; + } +diff --git a/include/linux/configfs.h b/include/linux/configfs.h +index 758a029..f7300d0 100644 +--- a/include/linux/configfs.h ++++ b/include/linux/configfs.h +@@ -51,6 +51,7 @@ struct module; + struct configfs_item_operations; + struct configfs_group_operations; + struct configfs_attribute; ++struct configfs_bin_attribute; + struct configfs_subsystem; + + struct config_item { +@@ -84,6 +85,7 @@ struct config_item_type { + struct configfs_item_operations *ct_item_ops; + struct configfs_group_operations *ct_group_ops; + struct configfs_attribute **ct_attrs; ++ struct configfs_bin_attribute **ct_bin_attrs; + }; + + /** +@@ -154,6 +156,54 @@ static struct configfs_attribute _pfx##attr_##_name = { \ + .store = _pfx##_name##_store, \ + } + ++struct file; ++struct vm_area_struct; ++ ++struct configfs_bin_attribute { ++ struct configfs_attribute cb_attr; /* std. attribute */ ++ void *cb_private; /* for user */ ++ size_t cb_max_size; /* max core size */ ++ ssize_t (*read)(struct config_item *, void *, size_t); ++ ssize_t (*write)(struct config_item *, const void *, size_t); ++}; ++ ++#define CONFIGFS_BIN_ATTR(_pfx, _name, _priv, _maxsz) \ ++static struct configfs_bin_attribute _pfx##attr_##_name = { \ ++ .cb_attr = { \ ++ .ca_name = __stringify(_name), \ ++ .ca_mode = S_IRUGO | S_IWUSR, \ ++ .ca_owner = THIS_MODULE, \ ++ }, \ ++ .cb_private = _priv, \ ++ .cb_max_size = _maxsz, \ ++ .read = _pfx##_name##_read, \ ++ .write = _pfx##_name##_write, \ ++} ++ ++#define CONFIGFS_BIN_ATTR_RO(_pfx, _name, _priv, _maxsz) \ ++static struct configfs_attribute _pfx##attr_##_name = { \ ++ .cb_attr = { \ ++ .ca_name = __stringify(_name), \ ++ .ca_mode = S_IRUGO, \ ++ .ca_owner = THIS_MODULE, \ ++ }, \ ++ .cb_private = _priv, \ ++ .cb_max_size = _maxsz, \ ++ .read = _pfx##_name##_read, \ ++} ++ ++#define CONFIGFS_BIN_ATTR_WO(_pfx, _name, _priv, _maxsz) \ ++static struct configfs_attribute _pfx##attr_##_name = { \ ++ .cb_attr = { \ ++ .ca_name = __stringify(_name), \ ++ .ca_mode = S_IWUSR, \ ++ .ca_owner = THIS_MODULE, \ ++ }, \ ++ .cb_private = _priv, \ ++ .cb_max_size = _maxsz, \ ++ .write = _pfx##_name##_write, \ ++} ++ + /* + * If allow_link() exists, the item can symlink(2) out to other + * items. If the item is a group, it may support mkdir(2). +-- +2.5.0 + + +From 8fcd978e0a8d736f1c397a61e571ff6885148561 Mon Sep 17 00:00:00 2001 +From: Pantelis Antoniou +Date: Wed, 3 Dec 2014 13:23:28 +0200 +Subject: [PATCH 175/181] 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. + +Original commit message: + +Add a runtime interface to using configfs for generic device tree overlay +usage. With it its possible to use device tree overlays without having +to use a per-platform overlay manager. + +Please see Documentation/devicetree/configfs-overlays.txt for more info. + +Changes since v2: +- Removed ifdef CONFIG_OF_OVERLAY (since for now it's required) +- Created a documentation entry +- Slight rewording in Kconfig + +Changes since v1: +- of_resolve() -> of_resolve_phandles(). + +Originally-signed-off-by: Pantelis Antoniou +Signed-off-by: Phil Elwell +--- + Documentation/devicetree/configfs-overlays.txt | 31 +++ + drivers/of/Kconfig | 7 + + drivers/of/Makefile | 1 + + drivers/of/configfs.c | 314 +++++++++++++++++++++++++ + 4 files changed, 353 insertions(+) + create mode 100644 Documentation/devicetree/configfs-overlays.txt + create mode 100644 drivers/of/configfs.c + +diff --git a/Documentation/devicetree/configfs-overlays.txt b/Documentation/devicetree/configfs-overlays.txt +new file mode 100644 +index 0000000..5fa43e0 +--- /dev/null ++++ b/Documentation/devicetree/configfs-overlays.txt +@@ -0,0 +1,31 @@ ++Howto use the configfs overlay interface. ++ ++A device-tree configfs entry is created in /config/device-tree/overlays ++and and it is manipulated using standard file system I/O. ++Note that this is a debug level interface, for use by developers and ++not necessarily something accessed by normal users due to the ++security implications of having direct access to the kernel's device tree. ++ ++* To create an overlay you mkdir the directory: ++ ++ # mkdir /config/device-tree/overlays/foo ++ ++* Either you echo the overlay firmware file to the path property file. ++ ++ # echo foo.dtbo >/config/device-tree/overlays/foo/path ++ ++* Or you cat the contents of the overlay to the dtbo file ++ ++ # cat foo.dtbo >/config/device-tree/overlays/foo/dtbo ++ ++The overlay file will be applied, and devices will be created/destroyed ++as required. ++ ++To remove it simply rmdir the directory. ++ ++ # rmdir /config/device-tree/overlays/foo ++ ++The rationalle of the dual interface (firmware & direct copy) is that each is ++better suited to different use patterns. The firmware interface is what's ++intended to be used by hardware managers in the kernel, while the copy interface ++make sense for developers (since it avoids problems with namespaces). +diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig +index e2a4841..7e5e6c4 100644 +--- a/drivers/of/Kconfig ++++ b/drivers/of/Kconfig +@@ -112,4 +112,11 @@ config OF_OVERLAY + While this option is selected automatically when needed, you can + enable it manually to improve device tree unit test coverage. + ++config OF_CONFIGFS ++ bool "Device Tree Overlay ConfigFS interface" ++ select CONFIGFS_FS ++ select OF_OVERLAY ++ help ++ Enable a simple user-space driven DT overlay interface. ++ + endif # OF +diff --git a/drivers/of/Makefile b/drivers/of/Makefile +index 156c072..46c8f57 100644 +--- a/drivers/of/Makefile ++++ b/drivers/of/Makefile +@@ -1,4 +1,5 @@ + obj-y = base.o device.o platform.o ++obj-$(CONFIG_OF_CONFIGFS) += configfs.o + obj-$(CONFIG_OF_DYNAMIC) += dynamic.o + obj-$(CONFIG_OF_FLATTREE) += fdt.o + obj-$(CONFIG_OF_EARLY_FLATTREE) += fdt_address.o +diff --git a/drivers/of/configfs.c b/drivers/of/configfs.c +new file mode 100644 +index 0000000..7b66deb +--- /dev/null ++++ b/drivers/of/configfs.c +@@ -0,0 +1,314 @@ ++/* ++ * Configfs entries for device-tree ++ * ++ * Copyright (C) 2013 - Pantelis Antoniou ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version ++ * 2 of the License, or (at your option) any later version. ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "of_private.h" ++ ++struct cfs_overlay_item { ++ struct config_item item; ++ ++ char path[PATH_MAX]; ++ ++ const struct firmware *fw; ++ struct device_node *overlay; ++ int ov_id; ++ ++ void *dtbo; ++ int dtbo_size; ++}; ++ ++static int create_overlay(struct cfs_overlay_item *overlay, void *blob) ++{ ++ int err; ++ ++ /* unflatten the tree */ ++ of_fdt_unflatten_tree(blob, &overlay->overlay); ++ if (overlay->overlay == NULL) { ++ pr_err("%s: failed to unflatten tree\n", __func__); ++ err = -EINVAL; ++ goto out_err; ++ } ++ pr_debug("%s: unflattened OK\n", __func__); ++ ++ /* mark it as detached */ ++ of_node_set_flag(overlay->overlay, OF_DETACHED); ++ ++ /* perform resolution */ ++ err = of_resolve_phandles(overlay->overlay); ++ if (err != 0) { ++ pr_err("%s: Failed to resolve tree\n", __func__); ++ goto out_err; ++ } ++ pr_debug("%s: resolved OK\n", __func__); ++ ++ err = of_overlay_create(overlay->overlay); ++ if (err < 0) { ++ pr_err("%s: Failed to create overlay (err=%d)\n", ++ __func__, err); ++ goto out_err; ++ } ++ overlay->ov_id = err; ++ ++out_err: ++ return err; ++} ++ ++static inline struct cfs_overlay_item *to_cfs_overlay_item( ++ struct config_item *item) ++{ ++ return item ? container_of(item, struct cfs_overlay_item, item) : NULL; ++} ++ ++static ssize_t cfs_overlay_item_path_show(struct config_item *item, ++ char *page) ++{ ++ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item); ++ return sprintf(page, "%s\n", overlay->path); ++} ++ ++static ssize_t cfs_overlay_item_path_store(struct config_item *item, ++ const char *page, size_t count) ++{ ++ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item); ++ const char *p = page; ++ char *s; ++ int err; ++ ++ /* if it's set do not allow changes */ ++ if (overlay->path[0] != '\0' || overlay->dtbo_size > 0) ++ return -EPERM; ++ ++ /* copy to path buffer (and make sure it's always zero terminated */ ++ count = snprintf(overlay->path, sizeof(overlay->path) - 1, "%s", p); ++ overlay->path[sizeof(overlay->path) - 1] = '\0'; ++ ++ /* strip trailing newlines */ ++ s = overlay->path + strlen(overlay->path); ++ while (s > overlay->path && *--s == '\n') ++ *s = '\0'; ++ ++ pr_debug("%s: path is '%s'\n", __func__, overlay->path); ++ ++ err = request_firmware(&overlay->fw, overlay->path, NULL); ++ if (err != 0) ++ goto out_err; ++ ++ err = create_overlay(overlay, (void *)overlay->fw->data); ++ if (err != 0) ++ goto out_err; ++ ++ return count; ++ ++out_err: ++ ++ release_firmware(overlay->fw); ++ overlay->fw = NULL; ++ ++ overlay->path[0] = '\0'; ++ return err; ++} ++ ++static ssize_t cfs_overlay_item_status_show(struct config_item *item, ++ char *page) ++{ ++ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item); ++ ++ return sprintf(page, "%s\n", ++ overlay->ov_id >= 0 ? "applied" : "unapplied"); ++} ++ ++CONFIGFS_ATTR(cfs_overlay_item_, path); ++CONFIGFS_ATTR_RO(cfs_overlay_item_, status); ++ ++static struct configfs_attribute *cfs_overlay_attrs[] = { ++ &cfs_overlay_item_attr_path, ++ &cfs_overlay_item_attr_status, ++ NULL, ++}; ++ ++ssize_t cfs_overlay_item_dtbo_read(struct config_item *item, ++ void *buf, size_t max_count) ++{ ++ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item); ++ ++ pr_debug("%s: buf=%p max_count=%u\n", __func__, ++ buf, max_count); ++ ++ if (overlay->dtbo == NULL) ++ return 0; ++ ++ /* copy if buffer provided */ ++ if (buf != NULL) { ++ /* the buffer must be large enough */ ++ if (overlay->dtbo_size > max_count) ++ return -ENOSPC; ++ ++ memcpy(buf, overlay->dtbo, overlay->dtbo_size); ++ } ++ ++ return overlay->dtbo_size; ++} ++ ++ssize_t cfs_overlay_item_dtbo_write(struct config_item *item, ++ const void *buf, size_t count) ++{ ++ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item); ++ int err; ++ ++ /* if it's set do not allow changes */ ++ if (overlay->path[0] != '\0' || overlay->dtbo_size > 0) ++ return -EPERM; ++ ++ /* copy the contents */ ++ overlay->dtbo = kmemdup(buf, count, GFP_KERNEL); ++ if (overlay->dtbo == NULL) ++ return -ENOMEM; ++ ++ overlay->dtbo_size = count; ++ ++ err = create_overlay(overlay, overlay->dtbo); ++ if (err != 0) ++ goto out_err; ++ ++ return count; ++ ++out_err: ++ kfree(overlay->dtbo); ++ overlay->dtbo = NULL; ++ overlay->dtbo_size = 0; ++ ++ return err; ++} ++ ++CONFIGFS_BIN_ATTR(cfs_overlay_item_, dtbo, NULL, SZ_1M); ++ ++static struct configfs_bin_attribute *cfs_overlay_bin_attrs[] = { ++ &cfs_overlay_item_attr_dtbo, ++ NULL, ++}; ++ ++static void cfs_overlay_release(struct config_item *item) ++{ ++ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item); ++ ++ if (overlay->ov_id >= 0) ++ of_overlay_destroy(overlay->ov_id); ++ if (overlay->fw) ++ release_firmware(overlay->fw); ++ /* kfree with NULL is safe */ ++ kfree(overlay->dtbo); ++ kfree(overlay); ++} ++ ++static struct configfs_item_operations cfs_overlay_item_ops = { ++ .release = cfs_overlay_release, ++}; ++ ++static struct config_item_type cfs_overlay_type = { ++ .ct_item_ops = &cfs_overlay_item_ops, ++ .ct_attrs = cfs_overlay_attrs, ++ .ct_bin_attrs = cfs_overlay_bin_attrs, ++ .ct_owner = THIS_MODULE, ++}; ++ ++static struct config_item *cfs_overlay_group_make_item( ++ struct config_group *group, const char *name) ++{ ++ struct cfs_overlay_item *overlay; ++ ++ overlay = kzalloc(sizeof(*overlay), GFP_KERNEL); ++ if (!overlay) ++ return ERR_PTR(-ENOMEM); ++ overlay->ov_id = -1; ++ ++ config_item_init_type_name(&overlay->item, name, &cfs_overlay_type); ++ return &overlay->item; ++} ++ ++static void cfs_overlay_group_drop_item(struct config_group *group, ++ struct config_item *item) ++{ ++ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item); ++ ++ config_item_put(&overlay->item); ++} ++ ++static struct configfs_group_operations overlays_ops = { ++ .make_item = cfs_overlay_group_make_item, ++ .drop_item = cfs_overlay_group_drop_item, ++}; ++ ++static struct config_item_type overlays_type = { ++ .ct_group_ops = &overlays_ops, ++ .ct_owner = THIS_MODULE, ++}; ++ ++static struct configfs_group_operations of_cfs_ops = { ++ /* empty - we don't allow anything to be created */ ++}; ++ ++static struct config_item_type of_cfs_type = { ++ .ct_group_ops = &of_cfs_ops, ++ .ct_owner = THIS_MODULE, ++}; ++ ++struct config_group of_cfs_overlay_group; ++ ++struct config_group *of_cfs_def_groups[] = { ++ &of_cfs_overlay_group, ++ NULL ++}; ++ ++static struct configfs_subsystem of_cfs_subsys = { ++ .su_group = { ++ .cg_item = { ++ .ci_namebuf = "device-tree", ++ .ci_type = &of_cfs_type, ++ }, ++ .default_groups = of_cfs_def_groups, ++ }, ++ .su_mutex = __MUTEX_INITIALIZER(of_cfs_subsys.su_mutex), ++}; ++ ++static int __init of_cfs_init(void) ++{ ++ int ret; ++ ++ pr_info("%s\n", __func__); ++ ++ config_group_init(&of_cfs_subsys.su_group); ++ config_group_init_type_name(&of_cfs_overlay_group, "overlays", ++ &overlays_type); ++ ++ ret = configfs_register_subsystem(&of_cfs_subsys); ++ if (ret != 0) { ++ pr_err("%s: failed to register subsys\n", __func__); ++ goto out; ++ } ++ pr_info("%s: OK\n", __func__); ++out: ++ return ret; ++} ++late_initcall(of_cfs_init); +-- +2.5.0 + + +From 5a1bb771e1720a2650342b234ec18931cbcf34ef Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 13 Mar 2015 12:43:36 +0000 +Subject: [PATCH 176/181] Protect __release_resource against resources without + parents + +Without this patch, removing a device tree overlay can crash here. + +Signed-off-by: Phil Elwell +--- + kernel/resource.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/kernel/resource.c b/kernel/resource.c +index 249b1eb..eb973a53 100644 +--- a/kernel/resource.c ++++ b/kernel/resource.c +@@ -237,6 +237,12 @@ static int __release_resource(struct resource *old) + { + struct resource *tmp, **p; + ++ if (!old->parent) { ++ WARN(old->sibling, "sibling but no parent"); ++ if (old->sibling) ++ return -EINVAL; ++ return 0; ++ } + p = &old->parent->child; + for (;;) { + tmp = *p; +-- +2.5.0 + + +From ad6c79879fc15268a42dcd62911ba7950690e75a Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 13 Mar 2015 20:00:21 +0000 +Subject: [PATCH 177/181] BCM270X_DT: Add a .dtbo target, use for overlays + +Change the filenames and extensions to keep the pre-DDT style of +overlay (-overlay.dtb) distinct from new ones that use a +different style of local fixups (.dtbo), and to match other +platforms. + +The RPi firmware uses the DDTK trailer atom to choose which type of +overlay to use for each kernel. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/.gitignore | 2 +- + arch/arm/boot/dts/overlays/Makefile | 135 +++++++++++++++++------------------- + scripts/Makefile.lib | 10 +++ + 3 files changed, 76 insertions(+), 71 deletions(-) + +diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore +index 3c79f85..eaaeb17 100644 +--- a/arch/arm/boot/.gitignore ++++ b/arch/arm/boot/.gitignore +@@ -3,4 +3,4 @@ zImage + xipImage + bootpImage + uImage +-*.dtb ++*.dtb* +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 687cc7c..d81fa09 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -12,78 +12,73 @@ ifeq ($(CONFIG_ARCH_BCM2835),y) + RPI_DT_OVERLAYS=y + endif + +-dtb-$(RPI_DT_OVERLAYS) += ads7846-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += at86rf233-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += dwc2-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += dwc-otg-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += dht11-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += enc28j60-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += gpio-ir-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += gpio-poweroff-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += hifiberry-amp-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += hifiberry-dac-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += hifiberry-dacplus-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += hifiberry-digi-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += hy28a-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += hy28b-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += i2c-rtc-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += i2c-gpio-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += i2c0-bcm2708-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += i2c1-bcm2708-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += i2s-mmap-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += iqaudio-dac-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += iqaudio-dacplus-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += lirc-rpi-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += mcp2515-can0-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += mcp2515-can1-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += pi3-disable-bt-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += pi3-miniuart-bt-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += pitft28-resistive-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += pwm-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += pwm-2chan-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += raspidac3-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += rpi-backlight-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += rpi-dac-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += rpi-display-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += rpi-ft5406-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += rpi-proto-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += rpi-sense-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += sdhost-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += sdio-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += sdtweak-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += smi-dev-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += smi-nand-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += smi-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += spi1-1cs-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += spi1-2cs-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += spi1-3cs-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += spi2-1cs-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += spi2-2cs-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += spi2-3cs-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += spi-gpio35-39-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += tinylcd35-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += uart1-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += vc4-kms-v3d-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += vga666-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += w1-gpio-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += w1-gpio-pullup-overlay.dtb ++dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += dwc2.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += dwc-otg.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += dht11.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += enc28j60.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += gpio-ir.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += gpio-poweroff.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += hifiberry-amp.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += hifiberry-dac.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += hifiberry-dacplus.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += hifiberry-digi.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += hy28a.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += hy28b.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += i2c-rtc.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += i2c-gpio.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += i2c0-bcm2708.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += i2c1-bcm2708.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += i2s-mmap.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dac.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dacplus.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += lirc-rpi.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can0.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can1.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += mmc.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += mz61581.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += pi3-disable-bt.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += pi3-miniuart-bt.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += piscreen.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += piscreen2r.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += pitft28-capacitive.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += pitft28-resistive.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += pps-gpio.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += pwm.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += pwm-2chan.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += raspidac3.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += rpi-backlight.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += rpi-dac.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += rpi-display.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += rpi-ft5406.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += rpi-proto.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += rpi-sense.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += sdhost.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += sdio.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += sdtweak.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += smi-dev.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += smi-nand.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += smi.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi1-1cs.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi1-2cs.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi1-3cs.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi2-1cs.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi2-2cs.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi2-3cs.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi-gpio35-39.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += tinylcd35.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += uart1.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += vc4-kms-v3d.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += vga666.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += w1-gpio.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += w1-gpio-pullup.dtbo + + targets += dtbs dtbs_install +-targets += $(dtb-y) ++targets += $(dtbo-y) + + endif + +-always := $(dtb-y) +-clean-files := *.dtb +- +-# Enable fixups to support overlays on BCM2708 platforms +-ifeq ($(RPI_DT_OVERLAYS),y) +- DTC_FLAGS ?= -@ +-endif ++always := $(dtbo-y) ++clean-files := *.dtbo +diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib +index 79e8661..7209d622 100644 +--- a/scripts/Makefile.lib ++++ b/scripts/Makefile.lib +@@ -292,6 +292,16 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ + $(obj)/%.dtb: $(src)/%.dts FORCE + $(call if_changed_dep,dtc) + ++quiet_cmd_dtco = DTCO $@ ++cmd_dtco = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ ++ $(objtree)/scripts/dtc/dtc -@ -O dtb -o $@ -b 0 \ ++ -i $(dir $<) $(DTC_FLAGS) \ ++ -d $(depfile).dtc.tmp $(dtc-tmp) ; \ ++ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) ++ ++$(obj)/%.dtbo: $(src)/%-overlay.dts FORCE ++ $(call if_changed_dep,dtco) ++ + dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) + + # Bzip2 +-- +2.5.0 + + +From 8796451eac76c5af336741713c9b38da6945ba84 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 29 May 2015 11:18:58 +0100 +Subject: [PATCH 178/181] scripts/knlinfo: Decode DDTK atom + +Show the DDTK atom as being a boolean. + +Signed-off-by: Phil Elwell +--- + scripts/knlinfo | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/scripts/knlinfo b/scripts/knlinfo +index b9ef124..263ec93 100755 +--- a/scripts/knlinfo ++++ b/scripts/knlinfo +@@ -16,6 +16,7 @@ my $trailer_magic = 'RPTL'; + + my %atom_formats = + ( ++ 'DDTK' => \&format_bool, + 'DTOK' => \&format_bool, + 'KVer' => \&format_string, + '270X' => \&format_bool, +@@ -148,7 +149,7 @@ sub format_atom + sub format_bool + { + my ($data) = @_; +- return unpack('V', $data) ? 'true' : 'false'; ++ return unpack('V', $data) ? 'y' : 'n'; + } + + sub format_int +-- +2.5.0 + + +From b52a154f8d805a5a712f5bb95c8ffff21637907f Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 29 May 2015 11:48:59 +0100 +Subject: [PATCH 179/181] Enable Dynamic Device Tree for bcmrpi_defconfig and + bcm2709_defconfig + +Signed-off-by: Phil Elwell +--- + arch/arm/configs/bcm2709_defconfig | 2 +- + arch/arm/configs/bcmrpi_defconfig | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 7793baf..0fff5a3 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -403,6 +403,7 @@ CONFIG_MTD=m + CONFIG_MTD_BLOCK=m + CONFIG_MTD_NAND=m + CONFIG_MTD_UBI=m ++CONFIG_OF_CONFIGFS=y + CONFIG_ZRAM=m + CONFIG_ZRAM_LZ4_COMPRESS=y + CONFIG_BLK_DEV_LOOP=y +@@ -1161,7 +1162,6 @@ CONFIG_NTFS_FS=m + CONFIG_NTFS_RW=y + CONFIG_TMPFS=y + CONFIG_TMPFS_POSIX_ACL=y +-CONFIG_CONFIGFS_FS=y + CONFIG_ECRYPT_FS=m + CONFIG_HFS_FS=m + CONFIG_HFSPLUS_FS=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index f09be87..2db41e6 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -396,6 +396,7 @@ CONFIG_MTD=m + CONFIG_MTD_BLOCK=m + CONFIG_MTD_NAND=m + CONFIG_MTD_UBI=m ++CONFIG_OF_OVERLAY=y + CONFIG_ZRAM=m + CONFIG_ZRAM_LZ4_COMPRESS=y + CONFIG_BLK_DEV_LOOP=y +-- +2.5.0 + + +From b8430f4f0266adc5e47eedd6075cc9c642857bb2 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Sun, 13 Mar 2016 16:14:44 +0000 +Subject: [PATCH 180/181] SQUASH: Add CONFIG_OF_CONFIGFS to bcmrpi_defconfig + +Signed-off-by: Phil Elwell +--- + arch/arm/configs/bcmrpi_defconfig | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 2db41e6..74149cf 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -396,7 +396,7 @@ CONFIG_MTD=m + CONFIG_MTD_BLOCK=m + CONFIG_MTD_NAND=m + CONFIG_MTD_UBI=m +-CONFIG_OF_OVERLAY=y ++CONFIG_OF_CONFIGFS=y + CONFIG_ZRAM=m + CONFIG_ZRAM_LZ4_COMPRESS=y + CONFIG_BLK_DEV_LOOP=y +@@ -1169,7 +1169,6 @@ CONFIG_NTFS_FS=m + CONFIG_NTFS_RW=y + CONFIG_TMPFS=y + CONFIG_TMPFS_POSIX_ACL=y +-CONFIG_CONFIGFS_FS=y + CONFIG_ECRYPT_FS=m + CONFIG_HFS_FS=m + CONFIG_HFSPLUS_FS=m +-- +2.5.0 + + +From 9453a7778a3b6d0ecc1878d451a22616e1248d4b Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 14 Mar 2016 16:56:54 +0000 +Subject: [PATCH 181/181] dts, kbuild: dtbs_install installs .dtbo files too + +Signed-off-by: Phil Elwell +--- + scripts/Makefile.dtbinst | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst +index 1c15717..43647b3 100644 +--- a/scripts/Makefile.dtbinst ++++ b/scripts/Makefile.dtbinst +@@ -29,6 +29,7 @@ ifeq ("$(dtbinst-root)", "$(obj)") + endif + + dtbinst-files := $(dtb-y) ++dtboinst-files := $(dtbo-y) + dtbinst-dirs := $(dts-dirs) + + # Helper targets for Installing DTBs into the boot directory +@@ -37,15 +38,18 @@ quiet_cmd_dtb_install = INSTALL $< + + install-dir = $(patsubst $(dtbinst-root)%,$(INSTALL_DTBS_PATH)%,$(obj)) + +-$(dtbinst-files) $(dtbinst-dirs): | __dtbs_install_prep ++$(dtbinst-files) $(dtboinst-files) $(dtbinst-dirs): | __dtbs_install_prep + + $(dtbinst-files): %.dtb: $(obj)/%.dtb + $(call cmd,dtb_install,$(install-dir)) + ++$(dtboinst-files): %.dtbo: $(obj)/%.dtbo ++ $(call cmd,dtb_install,$(install-dir)) ++ + $(dtbinst-dirs): + $(Q)$(MAKE) $(dtbinst)=$(obj)/$@ + +-PHONY += $(dtbinst-files) $(dtbinst-dirs) +-__dtbs_install: $(dtbinst-files) $(dtbinst-dirs) ++PHONY += $(dtbinst-files) $(dtboinst-files) $(dtbinst-dirs) ++__dtbs_install: $(dtbinst-files) $(dtboinst-files) $(dtbinst-dirs) + + .PHONY: $(PHONY) +-- +2.5.0 + diff --git a/projects/RPi2/linux/linux.arm.conf b/projects/RPi2/linux/linux.arm.conf index 4079f35992..49dbbc2bee 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.4.2 Kernel Configuration +# Linux/arm 4.4.5 Kernel Configuration # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -1006,12 +1006,15 @@ CONFIG_OF=y # CONFIG_OF_UNITTEST is not set CONFIG_OF_FLATTREE=y CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_DYNAMIC=y CONFIG_OF_ADDRESS=y CONFIG_OF_IRQ=y CONFIG_OF_NET=y CONFIG_OF_MDIO=y CONFIG_OF_RESERVED_MEM=y -# CONFIG_OF_OVERLAY is not set +CONFIG_OF_RESOLVE=y +CONFIG_OF_OVERLAY=y +CONFIG_OF_CONFIGFS=y CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y # CONFIG_PARPORT is not set CONFIG_BLK_DEV=y @@ -1163,6 +1166,7 @@ CONFIG_MACVLAN=m # CONFIG_IPVLAN is not set # CONFIG_VXLAN is not set CONFIG_NETCONSOLE=y +# CONFIG_NETCONSOLE_DYNAMIC is not set CONFIG_NETPOLL=y CONFIG_NET_POLL_CONTROLLER=y CONFIG_TUN=y @@ -1819,7 +1823,15 @@ CONFIG_POWER_SUPPLY=y # CONFIG_CHARGER_SMB347 is not set # CONFIG_BATTERY_GAUGE_LTC2941 is not set # CONFIG_CHARGER_RT9455 is not set -# CONFIG_POWER_RESET is not set +CONFIG_POWER_RESET=y +# CONFIG_POWER_RESET_BRCMSTB is not set +CONFIG_POWER_RESET_GPIO=y +CONFIG_POWER_RESET_GPIO_RESTART=y +# CONFIG_POWER_RESET_LTC2952 is not set +CONFIG_POWER_RESET_RESTART=y +# CONFIG_POWER_RESET_VERSATILE is not set +# CONFIG_POWER_RESET_SYSCON is not set +# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set # CONFIG_POWER_AVS is not set CONFIG_HWMON=y # CONFIG_HWMON_VID is not set @@ -3384,6 +3396,7 @@ CONFIG_XFS_FS=m # CONFIG_XFS_WARN is not set # CONFIG_XFS_DEBUG is not set # CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set CONFIG_BTRFS_FS=m # CONFIG_BTRFS_FS_POSIX_ACL is not set # CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set @@ -3446,7 +3459,7 @@ CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y CONFIG_TMPFS_XATTR=y # CONFIG_HUGETLB_PAGE is not set -# CONFIG_CONFIGFS_FS is not set +CONFIG_CONFIGFS_FS=y CONFIG_MISC_FILESYSTEMS=y # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set @@ -3574,6 +3587,7 @@ CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_MAC_ROMANIAN is not set # CONFIG_NLS_MAC_TURKISH is not set CONFIG_NLS_UTF8=y +# CONFIG_DLM is not set # # Kernel hacking @@ -3718,7 +3732,6 @@ CONFIG_HAVE_ARCH_KGDB=y # CONFIG_DEBUG_LL is not set CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" # CONFIG_DEBUG_UART_8250 is not set -# CONFIG_DEBUG_UART_BCM63XX is not set CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" # CONFIG_PID_IN_CONTEXTIDR is not set # CONFIG_DEBUG_SET_MODULE_RONX is not set diff --git a/projects/RPi2/patches/linux/linux-01-RPi_support.patch b/projects/RPi2/patches/linux/linux-01-RPi_support.patch index 863e39ebca..78bac143a2 100644 --- a/projects/RPi2/patches/linux/linux-01-RPi_support.patch +++ b/projects/RPi2/patches/linux/linux-01-RPi_support.patch @@ -1,7 +1,1057 @@ -From b6cc28abbbf710379772d3da9227ce66926c46a3 Mon Sep 17 00:00:00 2001 +From 9453a7778a3b6d0ecc1878d451a22616e1248d4b Mon Sep 17 00:00:00 2001 +From: Lukas Rusak +Date: Tue, 15 Mar 2016 01:29:57 -0700 +Subject: [PATCH 000/181] *** SUBJECT HERE *** +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +*** BLURB HERE *** + +Alistair Buxton (1): + Build i2c_gpio module and add a device tree overlay to configure it. + +Andrew Litt (2): + bcm2835-mmc: Don't override bus width capabilities from devicetree + SDIO-overlay: add bus_width parameter + +Aron Szabo (1): + lirc: added support for RaspberryPi GPIO + +Craig Roberts (1): + Updated smsc95xx driver to check for a valid MAC address in eeprom + before using smsc95xx.macaddr parameter passed on command line. + +Daniel Matuschek (5): + 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 additional mclk_div divider, it is now possible to control + the behaviour. This allows using 256xfs PLL frequency on all sample + rates up to 96kHz. It should allow lower jitter and better signal + quality. The behavior has to be controlled by the sound card driver, + because some sample frequency share the same setting. e.g. 192kHz + and 96kHz use 24.576MHz master clock. The only difference is the + MCLK divider. + ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the + patched WM8804 driver. + ASoC: wm8804: Set idle_bias_off to false Idle bias has been change to + remove warning on driver startup + Added support for HiFiBerry DAC+ + Added driver for HiFiBerry Amp amplifier add-on board + +Dave Stevenson (1): + DT: Add overlays to configure I2C pins + +Devon Fyson (1): + Extend clock timeout, fix modprobe baudrate parameter. + +Dhiraj Goel (1): + bcm2835-camera: fix a bug in computation of frame timestamp + +Digital Dreamtime (2): + Allow up to 24dB digital gain to be applied when using IQAudIO DAC+ + Limit PCM512x "Digital" gain to 0dB by default with HiFiBerry DAC+ + +DigitalDreamtime (1): + Remove I2S config from bt_pins. + +Eric Anholt (23): + drm/vc4: Add suport for 3D rendering using the V3D engine. + drm/vc4: Force HDMI to connected. + drm/vc4: bo cache locking fixes. + drm/vc4: bo cache locking cleanup. + drm/vc4: Use job_lock to protect seqno_cb_list. + drm/vc4: Drop struct_mutex around CL validation. + drm/vc4: Drop struct_mutex around CL validation. + drm/vc4: Add support for more display plane formats. + drm/vc4: No need to stop the stopped threads. + drm/vc4: Remove extra barrier()s aroudn CTnCA/CTnEA setup. + drm/vc4: Fix a typo in a V3D debug register. + clk: bcm2835: Also build the driver for downstream kernels. + mm: Remove the PFN busy warning + drm: Put an optional field in the driver struct for GEM obj struct + size. + drm/vc4: Add an interface for capturing the GPU state after a hang. + drm/vc4: Update a bunch of code to match upstream submission. + drm: Use the driver's gem_object_free function from CMA helpers. + drm/vc4: Add support for MSAA rendering. + drm/vc4: A few more non-functional changes to sync to upstream. + drm/vc4: Use "hpd-gpios" for HDMI GPIO, like what landed upstream. + drm/vc4: Synchronize validation code for v2 submission upstream. + clk: bcm2835: Add bindings for the auxiliary peripheral clock gates. + clk: bcm2835: Add a driver for the auxiliary peripheral clock gates. + +Florian Meier (4): + dmaengine: Add support for BCM2708 + ASoC: Add support for PCM5102A codec + ASoC: Add support for HifiBerry DAC + ASoC: Add support for Rpi-DAC + +Fraser (1): + Aux SPI 1&2 implementation + +Gordon Garrity (1): + Add IQaudIO Sound Card support for Raspberry Pi + +Gordon Hollingworth (1): + rpi-ft5406: Add touchscreen driver for pi LCD display + +Harm Hanemaaijer (1): + Speed up console framebuffer imageblit function + +Holger Steinhaus (1): + dts: Added overlay for gpio_ir_recv driver + +Jan Grulich (2): + RaspiDAC3 support + tpa6130a2: Add headphone switch control + +Luke Wren (3): + Add /dev/gpiomem device for rootless user GPIO access + Add SMI driver + Add SMI NAND driver + +Matthias Reichl (10): + bcm2835-i2s: get base address for DMA from devicetree + bcm2835-i2s: add 24bit support, update bclk_ratio to more correct + values + bcm2835-i2s: setup clock only if CPU is clock master + bcm2835-i2s: Eliminate debugfs directory error + bcm2835-i2s: Register PCM device + bcm2835-i2s: Enable MMAP support via a DT property + bcm2835-dma: Fix dreq not set for slave transfers + bcm2835-dma: Limit cyclic transfers on lite channels to 32k + bcm2835-dma: Fix up convert to DMA pool + ASoC: bcm: add missing .owner fields in sound card drivers + +Michael Lange (1): + rtc: ds1307: add support for the DT property 'wakeup-source' + +Noralf Trønnes (13): + irqchip: bcm2835: Add FIQ support + irqchip: irq-bcm2835: Add 2836 FIQ support + ARM: bcm2835: Set Serial number and Revision + dmaengine: bcm2835: Add slave dma support + dmaengine: bcm2835: set residue_granularity field + dmaengine: bcm2835: Load driver early and support legacy API + bcm2835: Add support for uart1 + firmware: bcm2835: Add missing property tags + char: broadcom: Add vcio module + firmware: bcm2835: Support ARCH_BCM270x + bcm2835: Match with BCM2708 Device Trees + bcm2835: bcm2835_defconfig + bcm270x_dt: Add dwc2 and dwc-otg overlays + +Ondrej Wisniewski (1): + dts: Added overlay for Adafruit PiTFT 2.8" capacitive touch screen + +P33M (1): + rpi_display: add backlight driver and overlay + +Pantelis Antoniou (2): + configfs: implement binary attributes + OF: DT-Overlay configfs interface + +Phil Elwell (51): + irq-bcm2836: Prevent spurious interrupts, and trap them early + serial: 8250: Don't crash when nr_uarts is 0 + pinctrl-bcm2835: Fix interrupt handling for GPIOs 28-31 and 46-53 + pinctrl-bcm2835: Only request the interrupts listed in the DTB + spi-bcm2835: Support pin groups other than 7-11 + Adding bcm2835-sdhost driver, and an overlay to enable it + scripts: Add mkknlimg and knlinfo scripts from tools repo + fdt: Add support for the CONFIG_CMDLINE_EXTEND option + BCM270x_DT: Add pwr_led, and the required "input" trigger + enc28j60: Add device tree compatible string and an overlay + Improve __copy_to_user and __copy_from_user performance + gpio-poweroff: Allow it to work on Raspberry Pi + spidev: Add "spidev" compatible string to silence warning + scripts/dtc: Add overlay support + mfd: Add Raspberry Pi Sense HAT core driver + scripts: Multi-platform support for mkknlimg and knlinfo + drm/vc4: Enable VC4 modules, and increase CMA size with overlay + BCM270X_DT: Add at86rf233 overlay + BCM270X_DT: Add the sdtweak overlay, for tuning sdhost + bcm2835-sdhost: Add workaround for odd behaviour on some cards + bcm2835-sdhost: Add debug_flags dtparam + BCM270X_DT: Add sdio_overclock parameter to sdio overlay + FIXUP i2c_bcm2708: Don't change module baudrate parameter + BCM270X_DT: Adjust overlay README formatting + pinctrl-bcm2835: Fix cut-and-paste error in "pull" parsing + bcm2835-sdhost: Major revision + BCM270X_DT: Add dtparams for the SD interface + bcm2835-sdhost: Restore ATOMIC flag to PIO sg mapping + BCM270X_DT: at86rf233 overlay - drop to 3MHz + bcm2835-sdhost: Downgrade log message status + config: Enable HCI over UARTs + hci_h5: Don't send conf_req when ACTIVE + amba_pl011: Don't use DT aliases for numbering + BCM270X_DT: Add Pi3 support + BCM270X_DT: Add pi3-disable-bt overlay + BCM270X_DT: Add pi3-miniuart-bt DT overlay + Pi3 DT: Add dtparams for the SD interface + vchiq_arm: Tweak the logging output + bcm2835-sdhost: Only claim one DMA channel + bcm2835-mmc: Only claim one DMA channel + Pi3 DT: Add pull-ups on the UART RX lines + brcmfmac: Disable power management + BCM270X_DT: rpi-display overlay - add swapxy param + Revert "scripts/dtc: Add overlay support" + scripts/dtc: Update to upstream version 1.4.1 + Protect __release_resource against resources without parents + BCM270X_DT: Add a .dtbo target, use for overlays + scripts/knlinfo: Decode DDTK atom + Enable Dynamic Device Tree for bcmrpi_defconfig and bcm2709_defconfig + SQUASH: Add CONFIG_OF_CONFIGFS to bcmrpi_defconfig + dts, kbuild: dtbs_install installs .dtbo files too + +Robert Tiemann (1): + BCM2835_DT: Fix I2S register map + +Ryan Coe (1): + Update ds1307 driver for device-tree support + +Siarhei Siamashka (1): + fbdev: add FBIOCOPYAREA ioctl + +Steve Glendinning (1): + smsx95xx: fix crimes against truesize + +Stuart MacLean (1): + Add support for the HiFiBerry DAC+ Pro. + +Tim Gover (1): + vcsm: VideoCore shared memory service for BCM2835 + +Vincent Sanders (1): + bcm2835: add v4l2 camera device + +Waldemar Brodkorb (1): + Add driver for rpi-proto + +gellert (1): + MMC: added alternative MMC driver + +janluca (1): + MMC: Do not use mmc_debug if CONFIG_MMC_BCM2835 is not set + +mwilliams03 (1): + New overlay for PiScreen2r + +notro (2): + pinctrl-bcm2835: Set base to 0 give expected gpio numbering + BCM2708: Add core Device Tree support + +popcornmix (27): + smsc95xx: Disable turbo mode by default + vmstat: Workaround for issue where dirty page count goes negative + Main bcm2708/bcm2709 linux port + squash: include ARCH_BCM2708 / ARCH_BCM2709 + Add dwc_otg driver + bcm2708 framebuffer driver + cma: Add vc_cma driver to enable use of CMA + bcm2708: alsa sound driver + bcm2708 vchiq driver + vc_mem: Add vc_mem driver + Add cpufreq driver + Added hwmon/thermal driver for reporting core temperature. Thanks + Dorian + Add Chris Boot's i2c driver + Allow mac address to be set in smsc95xx + enabling the realtime clock 1-wire chip DS1307 and 1-wire on GPIO4 (as + a module) + config: Enable CONFIG_MEMCG, but leave it disabled (due to memory + cost). Enable with cgroup_enable=memory. + hid: Reduce default mouse polling interval to 60Hz + config: Add default configs + irq-bcm2835: Fix building with 2708 + squash: fixups + squash: add missing vc4-kms-v3d-overlay.dtb to makefile + dcw_otg: trim xfer length when buffer larger than allocated size is + received + dcw_otg: Make trimming messages less noisy + smsx95xx: Add option to disable the crimes against truesize fix + bcm2835-virtgpio: Virtual GPIO driver + config: rebuild with savedefconfig + config: Add module for mcp3422 ADC + +vitalogy (1): + dt-overlay: add wittypi-overlay.dts + +wm4 (8): + bcm2835: extend allowed range of channels and samplerates + bcm2835: restrict channels*rate to 8*960000 + rpi: update vc_vchi_audioserv_defs.h + bcm2835: implement channel map API + bcm2835: access controls under the audio mutex + bcm2835: always use 2/4/8 channels for multichannel layouts + bcm2835: only allow stereo if analogue jack is selected + bcm2835: interpolate audio delay + + .../bindings/clock/brcm,bcm2835-aux-clock.txt | 31 + + .../devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 +- + .../bindings/misc/brcm,bcm2835-smi-dev.txt | 17 + + .../devicetree/bindings/misc/brcm,bcm2835-smi.txt | 48 + + .../bindings/mtd/brcm,bcm2835-smi-nand.txt | 42 + + .../devicetree/bindings/sound/brcm,bcm2835-i2s.txt | 4 +- + Documentation/devicetree/configfs-overlays.txt | 31 + + Documentation/filesystems/configfs/configfs.txt | 57 +- + Documentation/video4linux/bcm2835-v4l2.txt | 60 + + arch/arm/Kconfig | 49 + + arch/arm/Kconfig.debug | 8 + + arch/arm/Makefile | 2 + + arch/arm/boot/.gitignore | 2 +- + arch/arm/boot/dts/Makefile | 31 + + arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 149 + + arch/arm/boot/dts/bcm2708-rpi-b.dts | 139 + + arch/arm/boot/dts/bcm2708-rpi-cm.dts | 101 + + arch/arm/boot/dts/bcm2708-rpi-cm.dtsi | 53 + + arch/arm/boot/dts/bcm2708.dtsi | 40 + + arch/arm/boot/dts/bcm2708_common.dtsi | 379 ++ + arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 149 + + arch/arm/boot/dts/bcm2709.dtsi | 102 + + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 196 + + arch/arm/boot/dts/bcm2710.dtsi | 102 + + arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 132 +- + arch/arm/boot/dts/bcm2835-rpi-b.dts | 115 +- + arch/arm/boot/dts/bcm2835-rpi-cm.dts | 93 + + arch/arm/boot/dts/bcm2835-rpi-cm.dtsi | 30 + + arch/arm/boot/dts/bcm2835.dtsi | 195 +- + arch/arm/boot/dts/overlays/Makefile | 84 + + arch/arm/boot/dts/overlays/README | 943 +++ + arch/arm/boot/dts/overlays/ads7846-overlay.dts | 83 + + arch/arm/boot/dts/overlays/at86rf233-overlay.dts | 54 + + .../dts/overlays/bmp085_i2c-sensor-overlay.dts | 23 + + arch/arm/boot/dts/overlays/dht11-overlay.dts | 39 + + arch/arm/boot/dts/overlays/dwc-otg-overlay.dts | 20 + + arch/arm/boot/dts/overlays/dwc2-overlay.dts | 29 + + arch/arm/boot/dts/overlays/enc28j60-overlay.dts | 50 + + arch/arm/boot/dts/overlays/gpio-ir-overlay.dts | 45 + + .../boot/dts/overlays/gpio-poweroff-overlay.dts | 34 + + .../boot/dts/overlays/hifiberry-amp-overlay.dts | 39 + + .../boot/dts/overlays/hifiberry-dac-overlay.dts | 34 + + .../dts/overlays/hifiberry-dacplus-overlay.dts | 54 + + .../boot/dts/overlays/hifiberry-digi-overlay.dts | 39 + + arch/arm/boot/dts/overlays/hy28a-overlay.dts | 87 + + arch/arm/boot/dts/overlays/hy28b-overlay.dts | 142 + + arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts | 28 + + arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts | 55 + + .../arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts | 36 + + .../arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts | 37 + + arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts | 13 + + arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts | 39 + + .../boot/dts/overlays/iqaudio-dacplus-overlay.dts | 43 + + arch/arm/boot/dts/overlays/lirc-rpi-overlay.dts | 57 + + .../arm/boot/dts/overlays/mcp2515-can0-overlay.dts | 69 + + .../arm/boot/dts/overlays/mcp2515-can1-overlay.dts | 69 + + arch/arm/boot/dts/overlays/mmc-overlay.dts | 38 + + arch/arm/boot/dts/overlays/mz61581-overlay.dts | 111 + + .../boot/dts/overlays/pi3-disable-bt-overlay.dts | 48 + + .../boot/dts/overlays/pi3-miniuart-bt-overlay.dts | 61 + + arch/arm/boot/dts/overlays/piscreen-overlay.dts | 96 + + arch/arm/boot/dts/overlays/piscreen2r-overlay.dts | 100 + + .../dts/overlays/pitft28-capacitive-overlay.dts | 88 + + .../dts/overlays/pitft28-resistive-overlay.dts | 115 + + arch/arm/boot/dts/overlays/pps-gpio-overlay.dts | 34 + + arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts | 46 + + arch/arm/boot/dts/overlays/pwm-overlay.dts | 42 + + arch/arm/boot/dts/overlays/raspidac3-overlay.dts | 45 + + .../boot/dts/overlays/rpi-backlight-overlay.dts | 21 + + arch/arm/boot/dts/overlays/rpi-dac-overlay.dts | 34 + + arch/arm/boot/dts/overlays/rpi-display-overlay.dts | 83 + + arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts | 17 + + arch/arm/boot/dts/overlays/rpi-proto-overlay.dts | 39 + + arch/arm/boot/dts/overlays/rpi-sense-overlay.dts | 47 + + arch/arm/boot/dts/overlays/sdhost-overlay.dts | 32 + + arch/arm/boot/dts/overlays/sdio-overlay.dts | 36 + + arch/arm/boot/dts/overlays/sdtweak-overlay.dts | 23 + + arch/arm/boot/dts/overlays/smi-dev-overlay.dts | 18 + + arch/arm/boot/dts/overlays/smi-nand-overlay.dts | 69 + + arch/arm/boot/dts/overlays/smi-overlay.dts | 37 + + .../boot/dts/overlays/spi-gpio35-39-overlay.dts | 31 + + arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts | 57 + + arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts | 69 + + arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts | 81 + + arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts | 57 + + arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts | 69 + + arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts | 81 + + arch/arm/boot/dts/overlays/tinylcd35-overlay.dts | 216 + + arch/arm/boot/dts/overlays/uart1-overlay.dts | 38 + + arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 95 + + arch/arm/boot/dts/overlays/vga666-overlay.dts | 30 + + arch/arm/boot/dts/overlays/w1-gpio-overlay.dts | 39 + + .../boot/dts/overlays/w1-gpio-pullup-overlay.dts | 41 + + arch/arm/boot/dts/overlays/wittypi-overlay.dts | 44 + + arch/arm/configs/bcm2709_defconfig | 1263 ++++ + arch/arm/configs/bcm2835_defconfig | 1166 +++- + arch/arm/configs/bcmrpi_defconfig | 1273 ++++ + arch/arm/include/asm/irqflags.h | 16 +- + arch/arm/include/asm/string.h | 5 + + arch/arm/include/asm/uaccess.h | 3 + + arch/arm/kernel/fiqasm.S | 4 + + arch/arm/kernel/head.S | 8 + + arch/arm/kernel/process.c | 10 + + arch/arm/lib/Makefile | 15 +- + arch/arm/lib/arm-mem.h | 159 + + arch/arm/lib/copy_from_user.S | 4 +- + arch/arm/lib/exports_rpi.c | 37 + + arch/arm/lib/memcmp_rpi.S | 285 + + arch/arm/lib/memcpy_rpi.S | 61 + + arch/arm/lib/memcpymove.h | 506 ++ + arch/arm/lib/memmove_rpi.S | 61 + + arch/arm/lib/memset_rpi.S | 123 + + arch/arm/lib/uaccess_with_memcpy.c | 112 +- + arch/arm/mach-bcm/Kconfig | 1 + + arch/arm/mach-bcm/board_bcm2835.c | 34 + + arch/arm/mach-bcm2708/Kconfig | 23 + + arch/arm/mach-bcm2708/Makefile | 5 + + arch/arm/mach-bcm2708/Makefile.boot | 3 + + arch/arm/mach-bcm2708/bcm2708.c | 231 + + arch/arm/mach-bcm2708/include/mach/debug-macro.S | 22 + + arch/arm/mach-bcm2708/include/mach/io.h | 27 + + arch/arm/mach-bcm2708/include/mach/memory.h | 57 + + arch/arm/mach-bcm2708/include/mach/platform.h | 114 + + arch/arm/mach-bcm2708/include/mach/system.h | 37 + + arch/arm/mach-bcm2708/include/mach/uncompress.h | 84 + + arch/arm/mach-bcm2708/include/mach/vmalloc.h | 20 + + arch/arm/mach-bcm2709/Kconfig | 16 + + arch/arm/mach-bcm2709/Makefile | 5 + + arch/arm/mach-bcm2709/Makefile.boot | 3 + + arch/arm/mach-bcm2709/bcm2709.c | 380 ++ + arch/arm/mach-bcm2709/include/mach/debug-macro.S | 22 + + arch/arm/mach-bcm2709/include/mach/entry-macro.S | 123 + + arch/arm/mach-bcm2709/include/mach/io.h | 27 + + arch/arm/mach-bcm2709/include/mach/memory.h | 57 + + arch/arm/mach-bcm2709/include/mach/platform.h | 190 + + arch/arm/mach-bcm2709/include/mach/system.h | 37 + + arch/arm/mach-bcm2709/include/mach/uncompress.h | 84 + + arch/arm/mach-bcm2709/include/mach/vmalloc.h | 20 + + arch/arm/mm/Kconfig | 2 +- + arch/arm/mm/proc-v6.S | 15 +- + arch/arm/mm/proc-v7.S | 1 + + arch/arm/tools/mach-types | 2 + + drivers/bluetooth/hci_h5.c | 3 +- + drivers/char/Kconfig | 2 + + drivers/char/Makefile | 1 + + drivers/char/broadcom/Kconfig | 57 + + drivers/char/broadcom/Makefile | 7 + + drivers/char/broadcom/bcm2835-gpiomem.c | 260 + + drivers/char/broadcom/bcm2835_smi_dev.c | 402 ++ + drivers/char/broadcom/vc_cma/Makefile | 14 + + drivers/char/broadcom/vc_cma/vc_cma.c | 1193 ++++ + drivers/char/broadcom/vc_mem.c | 422 ++ + drivers/char/broadcom/vc_sm/Makefile | 20 + + drivers/char/broadcom/vc_sm/vc_sm_defs.h | 181 + + drivers/char/broadcom/vc_sm/vc_sm_knl.h | 55 + + drivers/char/broadcom/vc_sm/vc_vchi_sm.c | 492 ++ + drivers/char/broadcom/vc_sm/vc_vchi_sm.h | 82 + + drivers/char/broadcom/vc_sm/vmcs_sm.c | 3211 +++++++++ + drivers/char/broadcom/vcio.c | 175 + + drivers/char/hw_random/Kconfig | 2 +- + drivers/clk/Makefile | 1 + + drivers/clk/bcm/Makefile | 3 +- + drivers/clk/bcm/clk-bcm2835-aux.c | 85 + + drivers/clk/clk-hifiberry-dacpro.c | 160 + + drivers/clocksource/Makefile | 2 +- + drivers/cpufreq/Kconfig.arm | 9 + + drivers/cpufreq/Makefile | 1 + + drivers/cpufreq/bcm2835-cpufreq.c | 213 + + drivers/dma/Kconfig | 6 +- + drivers/dma/Makefile | 1 + + drivers/dma/bcm2708-dmaengine.c | 281 + + drivers/dma/bcm2835-dma.c | 261 +- + drivers/firmware/raspberrypi.c | 41 +- + drivers/gpio/Kconfig | 6 + + drivers/gpio/Makefile | 1 + + drivers/gpio/gpio-bcm-virt.c | 180 + + drivers/gpu/drm/drm_fb_cma_helper.c | 6 +- + drivers/gpu/drm/drm_gem_cma_helper.c | 14 +- + drivers/gpu/drm/vc4/Kconfig | 2 +- + drivers/gpu/drm/vc4/Makefile | 11 +- + drivers/gpu/drm/vc4/vc4_bo.c | 534 +- + drivers/gpu/drm/vc4/vc4_crtc.c | 99 +- + drivers/gpu/drm/vc4/vc4_debugfs.c | 3 + + drivers/gpu/drm/vc4/vc4_drv.c | 46 +- + drivers/gpu/drm/vc4/vc4_drv.h | 319 +- + drivers/gpu/drm/vc4/vc4_gem.c | 867 +++ + drivers/gpu/drm/vc4/vc4_hdmi.c | 2 + + drivers/gpu/drm/vc4/vc4_irq.c | 210 + + drivers/gpu/drm/vc4/vc4_kms.c | 149 +- + drivers/gpu/drm/vc4/vc4_packet.h | 399 ++ + drivers/gpu/drm/vc4/vc4_plane.c | 56 + + drivers/gpu/drm/vc4/vc4_qpu_defines.h | 264 + + drivers/gpu/drm/vc4/vc4_regs.h | 2 +- + drivers/gpu/drm/vc4/vc4_render_cl.c | 634 ++ + drivers/gpu/drm/vc4/vc4_trace.h | 63 + + drivers/gpu/drm/vc4/vc4_trace_points.c | 14 + + drivers/gpu/drm/vc4/vc4_v3d.c | 270 + + drivers/gpu/drm/vc4/vc4_validate.c | 900 +++ + drivers/gpu/drm/vc4/vc4_validate_shaders.c | 513 ++ + drivers/hid/usbhid/hid-core.c | 10 +- + drivers/i2c/busses/Kconfig | 21 +- + drivers/i2c/busses/Makefile | 2 + + drivers/i2c/busses/i2c-bcm2708.c | 508 ++ + drivers/input/joystick/Kconfig | 8 + + drivers/input/joystick/Makefile | 1 + + drivers/input/joystick/rpisense-js.c | 153 + + drivers/input/touchscreen/Kconfig | 7 + + drivers/input/touchscreen/Makefile | 1 + + drivers/input/touchscreen/rpi-ft5406.c | 246 + + drivers/irqchip/Makefile | 3 + + drivers/irqchip/irq-bcm2835.c | 90 +- + drivers/irqchip/irq-bcm2836.c | 3 +- + drivers/leds/leds-gpio.c | 18 +- + drivers/leds/trigger/Kconfig | 7 + + drivers/leds/trigger/Makefile | 1 + + drivers/leds/trigger/ledtrig-input.c | 54 + + drivers/mailbox/Kconfig | 2 +- + drivers/mailbox/bcm2835-mailbox.c | 18 +- + drivers/media/platform/Kconfig | 2 + + drivers/media/platform/Makefile | 2 + + drivers/media/platform/bcm2835/Kconfig | 25 + + drivers/media/platform/bcm2835/Makefile | 5 + + drivers/media/platform/bcm2835/bcm2835-camera.c | 1843 +++++ + drivers/media/platform/bcm2835/bcm2835-camera.h | 126 + + drivers/media/platform/bcm2835/controls.c | 1324 ++++ + drivers/media/platform/bcm2835/mmal-common.h | 53 + + drivers/media/platform/bcm2835/mmal-encodings.h | 127 + + drivers/media/platform/bcm2835/mmal-msg-common.h | 50 + + drivers/media/platform/bcm2835/mmal-msg-format.h | 81 + + drivers/media/platform/bcm2835/mmal-msg-port.h | 107 + + drivers/media/platform/bcm2835/mmal-msg.h | 404 ++ + drivers/media/platform/bcm2835/mmal-parameters.h | 656 ++ + drivers/media/platform/bcm2835/mmal-vchiq.c | 1916 ++++++ + drivers/media/platform/bcm2835/mmal-vchiq.h | 178 + + drivers/mfd/Kconfig | 8 + + drivers/mfd/Makefile | 2 + + drivers/mfd/rpisense-core.c | 157 + + drivers/misc/Kconfig | 9 + + drivers/misc/Makefile | 2 + + drivers/misc/bcm2835_smi.c | 985 +++ + drivers/misc/vc04_services/Kconfig | 9 + + drivers/misc/vc04_services/Makefile | 14 + + .../interface/vchi/connections/connection.h | 328 + + .../interface/vchi/message_drivers/message.h | 204 + + drivers/misc/vc04_services/interface/vchi/vchi.h | 378 ++ + .../misc/vc04_services/interface/vchi/vchi_cfg.h | 224 + + .../interface/vchi/vchi_cfg_internal.h | 71 + + .../vc04_services/interface/vchi/vchi_common.h | 175 + + .../misc/vc04_services/interface/vchi/vchi_mh.h | 42 + + .../misc/vc04_services/interface/vchiq_arm/vchiq.h | 40 + + .../vc04_services/interface/vchiq_arm/vchiq_2835.h | 42 + + .../interface/vchiq_arm/vchiq_2835_arm.c | 586 ++ + .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 2903 ++++++++ + .../vc04_services/interface/vchiq_arm/vchiq_arm.h | 220 + + .../interface/vchiq_arm/vchiq_build_info.h | 37 + + .../vc04_services/interface/vchiq_arm/vchiq_cfg.h | 69 + + .../interface/vchiq_arm/vchiq_connected.c | 120 + + .../interface/vchiq_arm/vchiq_connected.h | 50 + + .../vc04_services/interface/vchiq_arm/vchiq_core.c | 3929 +++++++++++ + .../vc04_services/interface/vchiq_arm/vchiq_core.h | 712 ++ + .../interface/vchiq_arm/vchiq_debugfs.c | 383 ++ + .../interface/vchiq_arm/vchiq_debugfs.h | 52 + + .../interface/vchiq_arm/vchiq_genversion | 87 + + .../vc04_services/interface/vchiq_arm/vchiq_if.h | 189 + + .../interface/vchiq_arm/vchiq_ioctl.h | 131 + + .../interface/vchiq_arm/vchiq_kern_lib.c | 458 ++ + .../interface/vchiq_arm/vchiq_killable.h | 69 + + .../interface/vchiq_arm/vchiq_memdrv.h | 71 + + .../interface/vchiq_arm/vchiq_pagelist.h | 58 + + .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 860 +++ + .../vc04_services/interface/vchiq_arm/vchiq_util.c | 156 + + .../vc04_services/interface/vchiq_arm/vchiq_util.h | 82 + + .../interface/vchiq_arm/vchiq_version.c | 59 + + drivers/mmc/core/quirks.c | 10 + + drivers/mmc/host/Kconfig | 39 + + drivers/mmc/host/Makefile | 2 + + drivers/mmc/host/bcm2835-mmc.c | 1571 +++++ + drivers/mmc/host/bcm2835-sdhost.c | 2079 ++++++ + drivers/mtd/nand/Kconfig | 7 + + drivers/mtd/nand/Makefile | 1 + + drivers/mtd/nand/bcm2835_smi_nand.c | 268 + + drivers/net/ethernet/microchip/enc28j60.c | 7 + + drivers/net/usb/smsc95xx.c | 70 +- + drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 2 + + drivers/of/Kconfig | 7 + + drivers/of/Makefile | 1 + + drivers/of/configfs.c | 314 + + drivers/of/fdt.c | 29 +- + drivers/pinctrl/Makefile | 1 + + drivers/pinctrl/bcm/pinctrl-bcm2835.c | 57 +- + drivers/power/reset/gpio-poweroff.c | 4 +- + drivers/pwm/Kconfig | 2 +- + drivers/rtc/rtc-ds1307.c | 37 +- + drivers/spi/Kconfig | 4 +- + drivers/spi/spi-bcm2835.c | 45 +- + drivers/spi/spidev.c | 1 + + drivers/staging/media/lirc/Kconfig | 6 + + drivers/staging/media/lirc/Makefile | 1 + + drivers/staging/media/lirc/lirc_rpi.c | 730 ++ + drivers/thermal/Kconfig | 7 + + drivers/thermal/Makefile | 1 + + drivers/thermal/bcm2835-thermal.c | 141 + + drivers/tty/serial/8250/8250_core.c | 2 + + drivers/tty/serial/amba-pl011.c | 5 + + drivers/usb/Makefile | 1 + + drivers/usb/core/generic.c | 1 + + drivers/usb/core/hub.c | 2 +- + drivers/usb/core/message.c | 79 + + drivers/usb/core/otg_whitelist.h | 114 +- + drivers/usb/gadget/file_storage.c | 3676 ++++++++++ + drivers/usb/host/Kconfig | 13 + + drivers/usb/host/Makefile | 2 + + drivers/usb/host/dwc_common_port/Makefile | 58 + + drivers/usb/host/dwc_common_port/Makefile.fbsd | 17 + + drivers/usb/host/dwc_common_port/Makefile.linux | 49 + + drivers/usb/host/dwc_common_port/changes.txt | 174 + + drivers/usb/host/dwc_common_port/doc/doxygen.cfg | 270 + + drivers/usb/host/dwc_common_port/dwc_cc.c | 532 ++ + drivers/usb/host/dwc_common_port/dwc_cc.h | 224 + + drivers/usb/host/dwc_common_port/dwc_common_fbsd.c | 1308 ++++ + .../usb/host/dwc_common_port/dwc_common_linux.c | 1433 ++++ + drivers/usb/host/dwc_common_port/dwc_common_nbsd.c | 1275 ++++ + drivers/usb/host/dwc_common_port/dwc_crypto.c | 308 + + drivers/usb/host/dwc_common_port/dwc_crypto.h | 111 + + drivers/usb/host/dwc_common_port/dwc_dh.c | 291 + + drivers/usb/host/dwc_common_port/dwc_dh.h | 106 + + drivers/usb/host/dwc_common_port/dwc_list.h | 594 ++ + drivers/usb/host/dwc_common_port/dwc_mem.c | 245 + + drivers/usb/host/dwc_common_port/dwc_modpow.c | 636 ++ + drivers/usb/host/dwc_common_port/dwc_modpow.h | 34 + + drivers/usb/host/dwc_common_port/dwc_notifier.c | 319 + + drivers/usb/host/dwc_common_port/dwc_notifier.h | 122 + + drivers/usb/host/dwc_common_port/dwc_os.h | 1276 ++++ + drivers/usb/host/dwc_common_port/usb.h | 946 +++ + drivers/usb/host/dwc_otg/Makefile | 82 + + drivers/usb/host/dwc_otg/doc/doxygen.cfg | 224 + + drivers/usb/host/dwc_otg/dummy_audio.c | 1575 +++++ + drivers/usb/host/dwc_otg/dwc_cfi_common.h | 142 + + drivers/usb/host/dwc_otg/dwc_otg_adp.c | 854 +++ + drivers/usb/host/dwc_otg/dwc_otg_adp.h | 80 + + drivers/usb/host/dwc_otg/dwc_otg_attr.c | 1210 ++++ + drivers/usb/host/dwc_otg/dwc_otg_attr.h | 89 + + drivers/usb/host/dwc_otg/dwc_otg_cfi.c | 1876 +++++ + drivers/usb/host/dwc_otg/dwc_otg_cfi.h | 320 + + drivers/usb/host/dwc_otg/dwc_otg_cil.c | 7141 ++++++++++++++++++++ + drivers/usb/host/dwc_otg/dwc_otg_cil.h | 1464 ++++ + drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c | 1594 +++++ + drivers/usb/host/dwc_otg/dwc_otg_core_if.h | 705 ++ + drivers/usb/host/dwc_otg/dwc_otg_dbg.h | 117 + + drivers/usb/host/dwc_otg/dwc_otg_driver.c | 1757 +++++ + drivers/usb/host/dwc_otg/dwc_otg_driver.h | 86 + + drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c | 1355 ++++ + drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h | 370 + + drivers/usb/host/dwc_otg/dwc_otg_fiq_stub.S | 80 + + drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 4257 ++++++++++++ + drivers/usb/host/dwc_otg/dwc_otg_hcd.h | 862 +++ + drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c | 1132 ++++ + drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h | 417 ++ + drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 2727 ++++++++ + drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 1005 +++ + drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c | 957 +++ + drivers/usb/host/dwc_otg/dwc_otg_os_dep.h | 188 + + drivers/usb/host/dwc_otg/dwc_otg_pcd.c | 2712 ++++++++ + drivers/usb/host/dwc_otg/dwc_otg_pcd.h | 266 + + drivers/usb/host/dwc_otg/dwc_otg_pcd_if.h | 360 + + drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c | 5147 ++++++++++++++ + drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c | 1280 ++++ + drivers/usb/host/dwc_otg/dwc_otg_regs.h | 2550 +++++++ + drivers/usb/host/dwc_otg/test/Makefile | 16 + + drivers/usb/host/dwc_otg/test/dwc_otg_test.pm | 337 + + drivers/usb/host/dwc_otg/test/test_mod_param.pl | 133 + + drivers/usb/host/dwc_otg/test/test_sysfs.pl | 193 + + drivers/video/backlight/Kconfig | 6 + + drivers/video/backlight/Makefile | 1 + + drivers/video/backlight/rpi_backlight.c | 119 + + drivers/video/fbdev/Kconfig | 27 + + drivers/video/fbdev/Makefile | 2 + + drivers/video/fbdev/bcm2708_fb.c | 847 +++ + drivers/video/fbdev/core/cfbimgblt.c | 152 +- + drivers/video/fbdev/core/fbmem.c | 30 + + drivers/video/fbdev/rpisense-fb.c | 293 + + drivers/video/logo/logo_linux_clut224.ppm | 2483 +++---- + drivers/w1/masters/w1-gpio.c | 69 +- + drivers/w1/w1.h | 6 + + drivers/w1/w1_int.c | 14 + + drivers/w1/w1_io.c | 18 +- + drivers/watchdog/Kconfig | 2 +- + fs/configfs/configfs_internal.h | 14 +- + fs/configfs/dir.c | 18 +- + fs/configfs/file.c | 255 +- + fs/configfs/inode.c | 2 +- + include/drm/drmP.h | 7 + + include/dt-bindings/clock/bcm2835-aux.h | 17 + + include/linux/broadcom/bcm2835_smi.h | 391 ++ + include/linux/broadcom/vc_cma.h | 36 + + include/linux/broadcom/vc_mem.h | 35 + + include/linux/broadcom/vmcs_sm_ioctl.h | 248 + + include/linux/configfs.h | 50 + + include/linux/leds.h | 3 + + include/linux/mfd/rpisense/core.h | 47 + + include/linux/mfd/rpisense/framebuffer.h | 32 + + include/linux/mfd/rpisense/joystick.h | 35 + + include/linux/mmc/host.h | 1 + + include/linux/platform_data/bcm2708.h | 23 + + include/linux/platform_data/dma-bcm2708.h | 143 + + include/linux/vmstat.h | 4 + + include/linux/w1-gpio.h | 1 + + include/soc/bcm2835/raspberrypi-firmware.h | 10 + + include/uapi/drm/vc4_drm.h | 279 + + include/uapi/linux/fb.h | 5 + + kernel/cgroup.c | 23 +- + kernel/resource.c | 6 + + mm/page_alloc.c | 2 - + scripts/Makefile.dtbinst | 10 +- + scripts/Makefile.lib | 10 + + scripts/dtc/checks.c | 105 +- + scripts/dtc/dtc-lexer.l | 5 + + scripts/dtc/dtc-lexer.lex.c_shipped | 490 +- + scripts/dtc/dtc-parser.tab.c_shipped | 722 +- + scripts/dtc/dtc-parser.tab.h_shipped | 46 +- + scripts/dtc/dtc-parser.y | 22 +- + scripts/dtc/dtc.c | 9 +- + scripts/dtc/dtc.h | 40 + + scripts/dtc/flattree.c | 202 + + scripts/dtc/version_gen.h | 2 +- + scripts/knlinfo | 171 + + scripts/mkknlimg | 264 + + sound/arm/Kconfig | 8 + + sound/arm/Makefile | 5 + + sound/arm/bcm2835-ctl.c | 662 ++ + sound/arm/bcm2835-pcm.c | 626 ++ + sound/arm/bcm2835-vchiq.c | 915 +++ + sound/arm/bcm2835.c | 511 ++ + sound/arm/bcm2835.h | 172 + + sound/arm/vc_vchi_audioserv_defs.h | 125 + + sound/soc/bcm/Kconfig | 59 +- + sound/soc/bcm/Makefile | 18 + + sound/soc/bcm/bcm2835-i2s.c | 90 +- + sound/soc/bcm/hifiberry_amp.c | 128 + + sound/soc/bcm/hifiberry_dac.c | 123 + + sound/soc/bcm/hifiberry_dacplus.c | 352 + + sound/soc/bcm/hifiberry_digi.c | 224 + + sound/soc/bcm/iqaudio-dac.c | 141 + + sound/soc/bcm/raspidac3.c | 192 + + sound/soc/bcm/rpi-dac.c | 119 + + sound/soc/bcm/rpi-proto.c | 154 + + sound/soc/codecs/Kconfig | 18 + + sound/soc/codecs/Makefile | 6 + + sound/soc/codecs/pcm1794a.c | 69 + + sound/soc/codecs/pcm5102a.c | 70 + + sound/soc/codecs/pcm512x.c | 3 +- + sound/soc/codecs/tas5713.c | 369 + + sound/soc/codecs/tas5713.h | 210 + + sound/soc/codecs/tpa6130a2.c | 29 +- + sound/soc/codecs/wm8804.c | 5 +- + 455 files changed, 124739 insertions(+), 2662 deletions(-) + create mode 100644 Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt + create mode 100644 Documentation/devicetree/bindings/misc/brcm,bcm2835-smi-dev.txt + create mode 100644 Documentation/devicetree/bindings/misc/brcm,bcm2835-smi.txt + create mode 100644 Documentation/devicetree/bindings/mtd/brcm,bcm2835-smi-nand.txt + create mode 100644 Documentation/devicetree/configfs-overlays.txt + create mode 100644 Documentation/video4linux/bcm2835-v4l2.txt + create mode 100644 arch/arm/boot/dts/bcm2708-rpi-b-plus.dts + create mode 100644 arch/arm/boot/dts/bcm2708-rpi-b.dts + create mode 100755 arch/arm/boot/dts/bcm2708-rpi-cm.dts + create mode 100644 arch/arm/boot/dts/bcm2708-rpi-cm.dtsi + create mode 100644 arch/arm/boot/dts/bcm2708.dtsi + create mode 100644 arch/arm/boot/dts/bcm2708_common.dtsi + create mode 100644 arch/arm/boot/dts/bcm2709-rpi-2-b.dts + create mode 100644 arch/arm/boot/dts/bcm2709.dtsi + create mode 100644 arch/arm/boot/dts/bcm2710-rpi-3-b.dts + create mode 100644 arch/arm/boot/dts/bcm2710.dtsi + create mode 100644 arch/arm/boot/dts/bcm2835-rpi-cm.dts + create mode 100644 arch/arm/boot/dts/bcm2835-rpi-cm.dtsi + create mode 100644 arch/arm/boot/dts/overlays/Makefile + create mode 100644 arch/arm/boot/dts/overlays/README + create mode 100644 arch/arm/boot/dts/overlays/ads7846-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/at86rf233-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/bmp085_i2c-sensor-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/dht11-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/dwc-otg-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/dwc2-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/enc28j60-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/gpio-ir-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/gpio-poweroff-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/hifiberry-digi-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/hy28a-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/hy28b-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/i2c-gpio-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/lirc-rpi-overlay.dts + create mode 100755 arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/mmc-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/mz61581-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/piscreen-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/piscreen2r-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/pps-gpio-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/pwm-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/raspidac3-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/rpi-backlight-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/rpi-dac-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/rpi-display-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/rpi-proto-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/rpi-sense-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/sdhost-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/sdio-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/sdtweak-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/smi-dev-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/smi-nand-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/smi-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/spi-gpio35-39-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/tinylcd35-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/uart1-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/vga666-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/w1-gpio-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/w1-gpio-pullup-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/wittypi-overlay.dts + create mode 100644 arch/arm/configs/bcm2709_defconfig + create mode 100644 arch/arm/configs/bcmrpi_defconfig + create mode 100644 arch/arm/lib/arm-mem.h + create mode 100644 arch/arm/lib/exports_rpi.c + create mode 100644 arch/arm/lib/memcmp_rpi.S + create mode 100644 arch/arm/lib/memcpy_rpi.S + create mode 100644 arch/arm/lib/memcpymove.h + create mode 100644 arch/arm/lib/memmove_rpi.S + create mode 100644 arch/arm/lib/memset_rpi.S + create mode 100644 arch/arm/mach-bcm2708/Kconfig + create mode 100644 arch/arm/mach-bcm2708/Makefile + create mode 100644 arch/arm/mach-bcm2708/Makefile.boot + create mode 100644 arch/arm/mach-bcm2708/bcm2708.c + create mode 100644 arch/arm/mach-bcm2708/include/mach/debug-macro.S + create mode 100644 arch/arm/mach-bcm2708/include/mach/io.h + create mode 100644 arch/arm/mach-bcm2708/include/mach/memory.h + create mode 100644 arch/arm/mach-bcm2708/include/mach/platform.h + create mode 100644 arch/arm/mach-bcm2708/include/mach/system.h + create mode 100644 arch/arm/mach-bcm2708/include/mach/uncompress.h + create mode 100644 arch/arm/mach-bcm2708/include/mach/vmalloc.h + create mode 100644 arch/arm/mach-bcm2709/Kconfig + create mode 100644 arch/arm/mach-bcm2709/Makefile + create mode 100644 arch/arm/mach-bcm2709/Makefile.boot + create mode 100644 arch/arm/mach-bcm2709/bcm2709.c + create mode 100644 arch/arm/mach-bcm2709/include/mach/debug-macro.S + create mode 100644 arch/arm/mach-bcm2709/include/mach/entry-macro.S + create mode 100644 arch/arm/mach-bcm2709/include/mach/io.h + create mode 100644 arch/arm/mach-bcm2709/include/mach/memory.h + create mode 100644 arch/arm/mach-bcm2709/include/mach/platform.h + create mode 100644 arch/arm/mach-bcm2709/include/mach/system.h + create mode 100644 arch/arm/mach-bcm2709/include/mach/uncompress.h + create mode 100644 arch/arm/mach-bcm2709/include/mach/vmalloc.h + create mode 100644 drivers/char/broadcom/Kconfig + create mode 100644 drivers/char/broadcom/Makefile + create mode 100644 drivers/char/broadcom/bcm2835-gpiomem.c + create mode 100644 drivers/char/broadcom/bcm2835_smi_dev.c + create mode 100644 drivers/char/broadcom/vc_cma/Makefile + create mode 100644 drivers/char/broadcom/vc_cma/vc_cma.c + create mode 100644 drivers/char/broadcom/vc_mem.c + create mode 100644 drivers/char/broadcom/vc_sm/Makefile + create mode 100644 drivers/char/broadcom/vc_sm/vc_sm_defs.h + create mode 100644 drivers/char/broadcom/vc_sm/vc_sm_knl.h + create mode 100644 drivers/char/broadcom/vc_sm/vc_vchi_sm.c + create mode 100644 drivers/char/broadcom/vc_sm/vc_vchi_sm.h + create mode 100644 drivers/char/broadcom/vc_sm/vmcs_sm.c + create mode 100644 drivers/char/broadcom/vcio.c + create mode 100644 drivers/clk/bcm/clk-bcm2835-aux.c + create mode 100644 drivers/clk/clk-hifiberry-dacpro.c + create mode 100644 drivers/cpufreq/bcm2835-cpufreq.c + create mode 100644 drivers/dma/bcm2708-dmaengine.c + create mode 100644 drivers/gpio/gpio-bcm-virt.c + create mode 100644 drivers/gpu/drm/vc4/vc4_gem.c + create mode 100644 drivers/gpu/drm/vc4/vc4_irq.c + create mode 100644 drivers/gpu/drm/vc4/vc4_packet.h + create mode 100644 drivers/gpu/drm/vc4/vc4_qpu_defines.h + create mode 100644 drivers/gpu/drm/vc4/vc4_render_cl.c + create mode 100644 drivers/gpu/drm/vc4/vc4_trace.h + create mode 100644 drivers/gpu/drm/vc4/vc4_trace_points.c + create mode 100644 drivers/gpu/drm/vc4/vc4_v3d.c + create mode 100644 drivers/gpu/drm/vc4/vc4_validate.c + create mode 100644 drivers/gpu/drm/vc4/vc4_validate_shaders.c + create mode 100644 drivers/i2c/busses/i2c-bcm2708.c + create mode 100644 drivers/input/joystick/rpisense-js.c + create mode 100644 drivers/input/touchscreen/rpi-ft5406.c + create mode 100644 drivers/leds/trigger/ledtrig-input.c + create mode 100644 drivers/media/platform/bcm2835/Kconfig + create mode 100644 drivers/media/platform/bcm2835/Makefile + create mode 100644 drivers/media/platform/bcm2835/bcm2835-camera.c + create mode 100644 drivers/media/platform/bcm2835/bcm2835-camera.h + create mode 100644 drivers/media/platform/bcm2835/controls.c + create mode 100644 drivers/media/platform/bcm2835/mmal-common.h + create mode 100644 drivers/media/platform/bcm2835/mmal-encodings.h + create mode 100644 drivers/media/platform/bcm2835/mmal-msg-common.h + create mode 100644 drivers/media/platform/bcm2835/mmal-msg-format.h + create mode 100644 drivers/media/platform/bcm2835/mmal-msg-port.h + create mode 100644 drivers/media/platform/bcm2835/mmal-msg.h + create mode 100644 drivers/media/platform/bcm2835/mmal-parameters.h + create mode 100644 drivers/media/platform/bcm2835/mmal-vchiq.c + create mode 100644 drivers/media/platform/bcm2835/mmal-vchiq.h + create mode 100644 drivers/mfd/rpisense-core.c + create mode 100644 drivers/misc/bcm2835_smi.c + create mode 100644 drivers/misc/vc04_services/Kconfig + create mode 100644 drivers/misc/vc04_services/Makefile + create mode 100644 drivers/misc/vc04_services/interface/vchi/connections/connection.h + create mode 100644 drivers/misc/vc04_services/interface/vchi/message_drivers/message.h + create mode 100644 drivers/misc/vc04_services/interface/vchi/vchi.h + create mode 100644 drivers/misc/vc04_services/interface/vchi/vchi_cfg.h + create mode 100644 drivers/misc/vc04_services/interface/vchi/vchi_cfg_internal.h + create mode 100644 drivers/misc/vc04_services/interface/vchi/vchi_common.h + create mode 100644 drivers/misc/vc04_services/interface/vchi/vchi_mh.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_build_info.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_cfg.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.c + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_debugfs.c + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_debugfs.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_genversion + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_if.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_ioctl.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_killable.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_memdrv.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_pagelist.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.c + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.h + create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_version.c + create mode 100644 drivers/mmc/host/bcm2835-mmc.c + create mode 100644 drivers/mmc/host/bcm2835-sdhost.c + create mode 100644 drivers/mtd/nand/bcm2835_smi_nand.c + create mode 100644 drivers/of/configfs.c + create mode 100644 drivers/staging/media/lirc/lirc_rpi.c + create mode 100644 drivers/thermal/bcm2835-thermal.c + create mode 100644 drivers/usb/gadget/file_storage.c + create mode 100644 drivers/usb/host/dwc_common_port/Makefile + create mode 100644 drivers/usb/host/dwc_common_port/Makefile.fbsd + create mode 100644 drivers/usb/host/dwc_common_port/Makefile.linux + create mode 100644 drivers/usb/host/dwc_common_port/changes.txt + create mode 100644 drivers/usb/host/dwc_common_port/doc/doxygen.cfg + create mode 100644 drivers/usb/host/dwc_common_port/dwc_cc.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_cc.h + create mode 100644 drivers/usb/host/dwc_common_port/dwc_common_fbsd.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_common_linux.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_common_nbsd.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_crypto.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_crypto.h + create mode 100644 drivers/usb/host/dwc_common_port/dwc_dh.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_dh.h + create mode 100644 drivers/usb/host/dwc_common_port/dwc_list.h + create mode 100644 drivers/usb/host/dwc_common_port/dwc_mem.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_modpow.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_modpow.h + create mode 100644 drivers/usb/host/dwc_common_port/dwc_notifier.c + create mode 100644 drivers/usb/host/dwc_common_port/dwc_notifier.h + create mode 100644 drivers/usb/host/dwc_common_port/dwc_os.h + create mode 100644 drivers/usb/host/dwc_common_port/usb.h + create mode 100644 drivers/usb/host/dwc_otg/Makefile + create mode 100644 drivers/usb/host/dwc_otg/doc/doxygen.cfg + create mode 100644 drivers/usb/host/dwc_otg/dummy_audio.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_cfi_common.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_adp.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_adp.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_attr.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_attr.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_cfi.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_cfi.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_cil.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_cil.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_core_if.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_dbg.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_driver.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_driver.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_fiq_stub.S + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_hcd.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_hcd.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_os_dep.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_pcd.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_pcd.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_pcd_if.h + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c + create mode 100644 drivers/usb/host/dwc_otg/dwc_otg_regs.h + create mode 100644 drivers/usb/host/dwc_otg/test/Makefile + create mode 100644 drivers/usb/host/dwc_otg/test/dwc_otg_test.pm + create mode 100644 drivers/usb/host/dwc_otg/test/test_mod_param.pl + create mode 100644 drivers/usb/host/dwc_otg/test/test_sysfs.pl + create mode 100644 drivers/video/backlight/rpi_backlight.c + create mode 100644 drivers/video/fbdev/bcm2708_fb.c + create mode 100644 drivers/video/fbdev/rpisense-fb.c + create mode 100644 include/dt-bindings/clock/bcm2835-aux.h + create mode 100644 include/linux/broadcom/bcm2835_smi.h + create mode 100644 include/linux/broadcom/vc_cma.h + create mode 100644 include/linux/broadcom/vc_mem.h + create mode 100644 include/linux/broadcom/vmcs_sm_ioctl.h + create mode 100644 include/linux/mfd/rpisense/core.h + create mode 100644 include/linux/mfd/rpisense/framebuffer.h + create mode 100644 include/linux/mfd/rpisense/joystick.h + create mode 100644 include/linux/platform_data/bcm2708.h + create mode 100644 include/linux/platform_data/dma-bcm2708.h + create mode 100644 include/uapi/drm/vc4_drm.h + create mode 100755 scripts/knlinfo + create mode 100755 scripts/mkknlimg + create mode 100755 sound/arm/bcm2835-ctl.c + create mode 100755 sound/arm/bcm2835-pcm.c + create mode 100755 sound/arm/bcm2835-vchiq.c + create mode 100644 sound/arm/bcm2835.c + create mode 100755 sound/arm/bcm2835.h + create mode 100644 sound/arm/vc_vchi_audioserv_defs.h + create mode 100644 sound/soc/bcm/hifiberry_amp.c + create mode 100644 sound/soc/bcm/hifiberry_dac.c + create mode 100644 sound/soc/bcm/hifiberry_dacplus.c + create mode 100644 sound/soc/bcm/hifiberry_digi.c + create mode 100644 sound/soc/bcm/iqaudio-dac.c + create mode 100644 sound/soc/bcm/raspidac3.c + create mode 100644 sound/soc/bcm/rpi-dac.c + create mode 100644 sound/soc/bcm/rpi-proto.c + create mode 100644 sound/soc/codecs/pcm1794a.c + create mode 100644 sound/soc/codecs/pcm5102a.c + create mode 100644 sound/soc/codecs/tas5713.c + create mode 100644 sound/soc/codecs/tas5713.h + +-- +2.5.0 + +From 7ca7dc6a38d1df30b98d042af1328e1febd7f1cd Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 -Subject: [PATCH 001/170] smsx95xx: fix crimes against truesize +Subject: [PATCH 001/181] 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. @@ -35,11 +1085,14 @@ index 66b3ab9..b544181 usbnet_skb_return(dev, ax_skb); } +-- +2.5.0 -From 37e24d2f0af32632a17692076dddcf176d1af1f7 Mon Sep 17 00:00:00 2001 + +From b00627adba1a54fbc9250d6d8815fb8a95fdbfed Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 17 Apr 2015 16:58:45 +0100 -Subject: [PATCH 002/170] smsc95xx: Disable turbo mode by default +Subject: [PATCH 002/181] smsc95xx: Disable turbo mode by default --- drivers/net/usb/smsc95xx.c | 2 +- @@ -58,11 +1111,14 @@ index b544181..9c0da18 100755 module_param(turbo_mode, bool, 0644); MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction"); +-- +2.5.0 -From d5cb475205138f9df1fdbb74d8810ab1928696ea Mon Sep 17 00:00:00 2001 + +From 31da329495a05de10159b81216b38bc57500b2b7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Jun 2014 13:42:01 +0100 -Subject: [PATCH 003/170] vmstat: Workaround for issue where dirty page count +Subject: [PATCH 003/181] vmstat: Workaround for issue where dirty page count goes negative See: @@ -88,11 +1144,14 @@ index 3e5d907..2539068 100644 } static inline void __inc_zone_page_state(struct page *page, +-- +2.5.0 -From 249a499b1d4b6f8a57b3377d4f505841e99f60c8 Mon Sep 17 00:00:00 2001 + +From c56b66b3b8f33f699b3c4b5b2806fa8b190aec9b Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 -Subject: [PATCH 004/170] BCM2835_DT: Fix I2S register map +Subject: [PATCH 004/181] BCM2835_DT: Fix I2S register map --- Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 ++-- @@ -145,11 +1204,14 @@ index aef64de..864a3ef 100644 dmas = <&dma 2>, <&dma 3>; +-- +2.5.0 -From c24657505a2aac71d0409b0ef703fc21ecab4b2e Mon Sep 17 00:00:00 2001 + +From e4b2247659fd211ca744ad26c0b851d230a65171 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 -Subject: [PATCH 005/170] irq-bcm2836: Prevent spurious interrupts, and trap +Subject: [PATCH 005/181] irq-bcm2836: Prevent spurious interrupts, and trap them early The old arch-specific IRQ macros included a dsb to ensure the @@ -179,11 +1241,14 @@ index f687082..4cd8ebe 100644 u32 hwirq = ffs(stat) - 1; handle_IRQ(irq_linear_revmap(intc.domain, hwirq), regs); +-- +2.5.0 -From 229bcf2e73ce37e8a18d68773471024c848d84bd Mon Sep 17 00:00:00 2001 + +From 1640c389480be51d78127909965aa01eba6fce69 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 006/170] irqchip: bcm2835: Add FIQ support +Subject: [PATCH 006/181] irqchip: bcm2835: Add FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -201,7 +1266,7 @@ Acked-by: Stephen Warren 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig -index 8c53c55..c943747b 100644 +index 8c53c55..c943747 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig @@ -128,6 +128,7 @@ config ARCH_BCM2835 @@ -311,11 +1376,14 @@ index bf9cc5f..3f601f9 100644 return 0; } +-- +2.5.0 -From 6780f0a5c6af19f2b9850e961a0f81fbfdfa48fe Mon Sep 17 00:00:00 2001 + +From 937729fda083614abb4d069a271e3f3cf54853ef 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 007/170] irqchip: irq-bcm2835: Add 2836 FIQ support +Subject: [PATCH 007/181] irqchip: irq-bcm2835: Add 2836 FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -410,11 +1478,14 @@ index 3f601f9..20deb28 100644 /* Make a duplicate irq range which is used to enable FIQ */ for (b = 0; b < NR_BANKS; b++) { for (i = 0; i < bank_irqs[b]; i++) { +-- +2.5.0 -From 4b9529b98c01569dff06f4e67ba28a47318e5ea5 Mon Sep 17 00:00:00 2001 + +From 9b24083716198addfb64bfefe38e18878394b826 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 30 Jun 2015 14:12:42 +0100 -Subject: [PATCH 008/170] serial: 8250: Don't crash when nr_uarts is 0 +Subject: [PATCH 008/181] serial: 8250: Don't crash when nr_uarts is 0 --- drivers/tty/serial/8250/8250_core.c | 2 ++ @@ -433,11 +1504,14 @@ index 3912646..b51a59c 100644 for (i = 0; i < nr_uarts; i++) { struct uart_8250_port *up = &serial8250_ports[i]; +-- +2.5.0 -From 5fd6ab82b1027504faa66cf4fc8b999fafaacd12 Mon Sep 17 00:00:00 2001 + +From 0723b442ea663b8da24cf64641dc95fd9bf4cd49 Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 009/170] pinctrl-bcm2835: Set base to 0 give expected gpio +Subject: [PATCH 009/181] pinctrl-bcm2835: Set base to 0 give expected gpio numbering Signed-off-by: Noralf Tronnes @@ -458,11 +1532,14 @@ index 2e6ca69..62cc363 100644 .ngpio = BCM2835_NUM_GPIOS, .can_sleep = false, }; +-- +2.5.0 -From 4254ef2647e89061427836443eac60351b3306a7 Mon Sep 17 00:00:00 2001 + +From d4e883dc20d8a40ac78d9a15860c893036e6d171 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 24 Feb 2015 13:40:50 +0000 -Subject: [PATCH 010/170] pinctrl-bcm2835: Fix interrupt handling for GPIOs +Subject: [PATCH 010/181] pinctrl-bcm2835: Fix interrupt handling for GPIOs 28-31 and 46-53 Contrary to the documentation, the BCM2835 GPIO controller actually has @@ -607,11 +1684,14 @@ index 62cc363..ab345f4 100644 .of_match_table = bcm2835_pinctrl_match, }, }; +-- +2.5.0 -From 93b12e64d0e2a8a65189dedd667e00b0a0fab60a Mon Sep 17 00:00:00 2001 + +From 89460aa2bad6d630b45b5d47bbb5156604b57903 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 26 Feb 2015 09:58:22 +0000 -Subject: [PATCH 011/170] pinctrl-bcm2835: Only request the interrupts listed +Subject: [PATCH 011/181] pinctrl-bcm2835: Only request the interrupts listed in the DTB Although the GPIO controller can generate three interrupts (four counting @@ -637,11 +1717,14 @@ index ab345f4..640e3b0 100644 pc->irq_data[i].pc = pc; pc->irq_data[i].irqgroup = i; +-- +2.5.0 -From bb8ff388ad26721eebb7249afb6f6f57bc196de4 Mon Sep 17 00:00:00 2001 + +From 743e250a18d926f14d2167010214e9b01b2e80c4 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 -Subject: [PATCH 012/170] spi-bcm2835: Support pin groups other than 7-11 +Subject: [PATCH 012/181] 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 @@ -721,11 +1804,14 @@ index cf04960..a2b1f45 100644 /* and set up the "mode" and level */ dev_info(&spi->dev, "setting up native-CS%i as GPIO %i\n", +-- +2.5.0 -From bfcfed788d152e828747ea889a88f8b179217ddb Mon Sep 17 00:00:00 2001 + +From da9e187499d174087bafacaa41e8ff2f206d0d4b 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 013/170] ARM: bcm2835: Set Serial number and Revision +Subject: [PATCH 013/181] ARM: bcm2835: Set Serial number and Revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -750,7 +1836,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 9 insertions(+) diff --git a/arch/arm/mach-bcm/board_bcm2835.c b/arch/arm/mach-bcm/board_bcm2835.c -index 0f7b9ea..1e6f1cf9 100644 +index 0f7b9ea..1e6f1cf 100644 --- a/arch/arm/mach-bcm/board_bcm2835.c +++ b/arch/arm/mach-bcm/board_bcm2835.c @@ -17,12 +17,16 @@ @@ -782,11 +1868,14 @@ index 0f7b9ea..1e6f1cf9 100644 } static const char * const bcm2835_compat[] = { +-- +2.5.0 -From fb968a02c00e2722df2dcfec6f54b7524ff5a155 Mon Sep 17 00:00:00 2001 + +From 7a3e53c30d9126c7e76e18b3b985ed9a78a44de2 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 16:44:05 +0200 -Subject: [PATCH 014/170] bcm2835-i2s: get base address for DMA from devicetree +Subject: [PATCH 014/181] bcm2835-i2s: get base address for DMA from devicetree Code copied from spi-bcm2835. Get physical address from devicetree instead of using hardcoded constant. @@ -850,11 +1939,14 @@ index 8c435be..0bc4f47 100644 /* Set the bus width */ dev->dma_data[SNDRV_PCM_STREAM_PLAYBACK].addr_width = +-- +2.5.0 -From abbe565abfe075b76e01b9671c6fc4cf42cc0328 Mon Sep 17 00:00:00 2001 + +From f570ab28e8023f14cb2a107fb9277c9a91830cd3 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:21:16 +0200 -Subject: [PATCH 015/170] bcm2835-i2s: add 24bit support, update bclk_ratio to +Subject: [PATCH 015/181] bcm2835-i2s: add 24bit support, update bclk_ratio to more correct values Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -932,11 +2024,14 @@ index 0bc4f47..cf60390 100644 | SNDRV_PCM_FMTBIT_S32_LE }, .ops = &bcm2835_i2s_dai_ops, +-- +2.5.0 -From b2cc62cd13099d6d2f21b9927df248aa3bdd8d5b Mon Sep 17 00:00:00 2001 + +From 7e568e18bc527d50370cb1cceb0cc2420d8b6c3e Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:25:51 +0200 -Subject: [PATCH 016/170] bcm2835-i2s: setup clock only if CPU is clock master +Subject: [PATCH 016/181] bcm2835-i2s: setup clock only if CPU is clock master Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -990,11 +2085,14 @@ index cf60390..4ac4e92 100644 /* Setup the frame format */ format = BCM2835_I2S_CHEN; +-- +2.5.0 -From 71b2c93cd332be280b9ca7f293e463f30d5fb108 Mon Sep 17 00:00:00 2001 + +From 217512b6b8889048f0e3df7ddc31c7f08e6f0f44 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:49:51 +0200 -Subject: [PATCH 017/170] bcm2835-i2s: Eliminate debugfs directory error +Subject: [PATCH 017/181] bcm2835-i2s: Eliminate debugfs directory error Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -1029,11 +2127,14 @@ index 4ac4e92..aab3df9 100644 }, }; +-- +2.5.0 -From fae43fcaa20df1d39c09c98372100bb1dedd6090 Mon Sep 17 00:00:00 2001 + +From 337b88c4bfce56ae5a30a7d579034e6bb7295780 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:35:20 +0200 -Subject: [PATCH 018/170] bcm2835-i2s: Register PCM device +Subject: [PATCH 018/181] bcm2835-i2s: Register PCM device Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -1095,11 +2196,14 @@ index aab3df9..0e5c787 100644 if (ret) { dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); return ret; +-- +2.5.0 -From c9e2eeee4889f965a29744718bbff2de409ac649 Mon Sep 17 00:00:00 2001 + +From 0edf24e2f7a56aaf31d6fdd7bf8263f845acf4f9 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 15:55:21 +0200 -Subject: [PATCH 019/170] bcm2835-i2s: Enable MMAP support via a DT property +Subject: [PATCH 019/181] bcm2835-i2s: Enable MMAP support via a DT property Code ported from bcm2708-i2s driver in Raspberry Pi tree. @@ -1142,11 +2246,14 @@ index 0e5c787..04c1d13 100644 /* Request both ioareas */ for (i = 0; i <= 1; i++) { void __iomem *base; +-- +2.5.0 -From dc5b926436bccc4efbb1695ec3696b5db6746d3b Mon Sep 17 00:00:00 2001 + +From 325c1787d61e5d28128dee5b5b5d17d4121bb487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Thu, 9 Apr 2015 12:34:11 +0200 -Subject: [PATCH 020/170] dmaengine: bcm2835: Add slave dma support +Subject: [PATCH 020/181] dmaengine: bcm2835: Add slave dma support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1465,11 +2572,14 @@ index 996c4b0..b278c66 100644 MODULE_AUTHOR("Florian Meier "); +MODULE_AUTHOR("Gellert Weisz "); MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From 9c6955f3fbfbb46242c63b4640886b9a0d87910a Mon Sep 17 00:00:00 2001 + +From fce46e603440b8b6318fc3fd21b449bd128370d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 3 Oct 2015 15:58:59 +0200 -Subject: [PATCH 021/170] dmaengine: bcm2835: set residue_granularity field +Subject: [PATCH 021/181] dmaengine: bcm2835: set residue_granularity field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1497,11 +2607,14 @@ index b278c66..696fb30 100644 od->ddev.dev = &pdev->dev; INIT_LIST_HEAD(&od->ddev.channels); spin_lock_init(&od->lock); +-- +2.5.0 -From 8da7ee8d9b714dbbac842fb5ae0471b52e0393ec Mon Sep 17 00:00:00 2001 + +From cc9bc526ee726da07e7258a7aafacd46265b3079 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 022/170] dmaengine: bcm2835: Load driver early and support +Subject: [PATCH 022/181] dmaengine: bcm2835: Load driver early and support legacy API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -1600,11 +2713,14 @@ index 696fb30..5db0a95 100644 MODULE_ALIAS("platform:bcm2835-dma"); MODULE_DESCRIPTION("BCM2835 DMA engine driver"); +-- +2.5.0 -From 0f3a30eb7ad7e709fdc6447c70bc3f1d5704eb63 Mon Sep 17 00:00:00 2001 + +From 844fedc0f8399362bbefab438943c45e22333c7c Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sat, 10 Oct 2015 12:29:18 +0200 -Subject: [PATCH 023/170] bcm2835-dma: Fix dreq not set for slave transfers +Subject: [PATCH 023/181] bcm2835-dma: Fix dreq not set for slave transfers Set dreq to slave_id if it is not set like in bcm2708-dmaengine. --- @@ -1624,11 +2740,14 @@ index 5db0a95..fe1fd60 100644 return 0; } +-- +2.5.0 -From 305370f7caaecafbabb77b630380dbc0c436bb4c Mon Sep 17 00:00:00 2001 + +From 6f06bca1f5f18b4464eaa1f64ab13dd824c6cc71 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 11 Oct 2015 12:28:30 +0200 -Subject: [PATCH 024/170] bcm2835-dma: Limit cyclic transfers on lite channels +Subject: [PATCH 024/181] bcm2835-dma: Limit cyclic transfers on lite channels to 32k Transfers larger than 32k cause repeated clicking with I2S soundcards. @@ -1664,11 +2783,14 @@ index fe1fd60..0adc347 100644 else max_size = MAX_NORMAL_TRANSFER; period_len = min(period_len, max_size); +-- +2.5.0 -From d801c33b7e2fb0d02ac11b95ea92b7d692286ffc Mon Sep 17 00:00:00 2001 + +From 1da5de7245640e71973241ac02e2d0d520d8fc96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 15 Aug 2015 20:50:02 +0200 -Subject: [PATCH 025/170] bcm2835: Add support for uart1 +Subject: [PATCH 025/181] bcm2835: Add support for uart1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1682,7 +2804,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 25 insertions(+) diff --git a/arch/arm/mach-bcm/board_bcm2835.c b/arch/arm/mach-bcm/board_bcm2835.c -index 1e6f1cf9..ea36eec 100644 +index 1e6f1cf..ea36eec 100644 --- a/arch/arm/mach-bcm/board_bcm2835.c +++ b/arch/arm/mach-bcm/board_bcm2835.c @@ -22,6 +22,29 @@ @@ -1724,11 +2846,14 @@ index 1e6f1cf9..ea36eec 100644 } static const char * const bcm2835_compat[] = { +-- +2.5.0 -From 5e90e32b539720ad8c6c8d7ec462378685924f22 Mon Sep 17 00:00:00 2001 + +From cbdf6010751ec8faaa7c5704948deaa85bce2670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:21:20 +0200 -Subject: [PATCH 026/170] firmware: bcm2835: Add missing property tags +Subject: [PATCH 026/181] firmware: bcm2835: Add missing property tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1789,11 +2914,14 @@ index c07d74a..525816d 100644 RPI_FIRMWARE_GET_COMMAND_LINE = 0x00050001, RPI_FIRMWARE_GET_DMA_CHANNELS = 0x00060001, +-- +2.5.0 -From 894f124497e95c9af506af2ed7335857f2e71358 Mon Sep 17 00:00:00 2001 + +From 47acd4ef63a230a9f050a5045a3ca47d73db5978 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 027/170] Main bcm2708/bcm2709 linux port +Subject: [PATCH 027/181] Main bcm2708/bcm2709 linux port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2693,7 +3821,7 @@ index 0000000..502c617 +#define VMALLOC_END (0xe8000000) diff --git a/arch/arm/mach-bcm2709/Kconfig b/arch/arm/mach-bcm2709/Kconfig new file mode 100644 -index 0000000..643b4b98 +index 0000000..643b4b9 --- /dev/null +++ b/arch/arm/mach-bcm2709/Kconfig @@ -0,0 +1,16 @@ @@ -4307,11 +5435,14 @@ index 8673ffe..ad22ebb 100644 mmc_pm_flag_t pm_caps; /* supported pm features */ +-- +2.5.0 -From 74b2c26348d94949561979a9a3ad61adcac74398 Mon Sep 17 00:00:00 2001 + +From 0d8d26615a7222ee0ce532a00249190651751e3a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 11 Nov 2015 21:01:15 +0000 -Subject: [PATCH 028/170] squash: include ARCH_BCM2708 / ARCH_BCM2709 +Subject: [PATCH 028/181] squash: include ARCH_BCM2708 / ARCH_BCM2709 --- drivers/char/hw_random/Kconfig | 2 +- @@ -4400,7 +5531,7 @@ index cfb4b44..d9c6c21 100644 MODULE_AUTHOR("Lubomir Rintel "); MODULE_DESCRIPTION("BCM2835 mailbox IPC driver"); diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile -index 738cb492..4fd086f 100644 +index 738cb49..4fd086f 100644 --- a/drivers/pinctrl/Makefile +++ b/drivers/pinctrl/Makefile @@ -40,6 +40,7 @@ obj-$(CONFIG_PINCTRL_TB10X) += pinctrl-tb10x.o @@ -4462,11 +5593,14 @@ index 6a834e1..c5070ae 100644 select SND_SOC_GENERIC_DMAENGINE_PCM select REGMAP_MMIO help +-- +2.5.0 -From a03df8d0f93365689c718f3d1fb62695e9fffe31 Mon Sep 17 00:00:00 2001 + +From c4642bcc9c8838d91f43801f2c749be422bb1998 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 029/170] Add dwc_otg driver +Subject: [PATCH 029/181] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -5107,7 +6241,7 @@ index 8dd26e1..eef4847 100644 + mov pc, r8 +ENDPROC(__FIQ_Branch) diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile -index d5c57f1e..0e15a22 100644 +index d5c57f1..0e15a22 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile @@ -7,6 +7,7 @@ @@ -5147,7 +6281,7 @@ diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 8e641b5..de3ed7d 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c -@@ -1909,6 +1909,85 @@ int usb_set_configuration(struct usb_device *dev, int configuration) +@@ -1909,6 +1909,85 @@ free_interfaces: if (cp->string == NULL && !(dev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS)) cp->string = usb_cache_string(dev, cp->desc.iConfiguration); @@ -5392,7 +6526,7 @@ index a95b0c9..17b605f 100644 diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c new file mode 100644 -index 0000000..a896d73f +index 0000000..a896d73 --- /dev/null +++ b/drivers/usb/gadget/file_storage.c @@ -0,0 +1,3676 @@ @@ -13230,7 +14364,7 @@ index 0000000..4664684 +#endif /* DWC_LIBMODULE */ diff --git a/drivers/usb/host/dwc_common_port/dwc_common_nbsd.c b/drivers/usb/host/dwc_common_port/dwc_common_nbsd.c new file mode 100644 -index 0000000..49b07e17 +index 0000000..49b07e1 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_common_nbsd.c @@ -0,0 +1,1275 @@ @@ -25757,7 +26891,7 @@ index 0000000..bbb3d32 +#endif //DWC_UTE_CFI diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cfi.h b/drivers/usb/host/dwc_otg/dwc_otg_cfi.h new file mode 100644 -index 0000000..55fd337a +index 0000000..55fd337 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cfi.h @@ -0,0 +1,320 @@ @@ -55748,7 +56882,7 @@ index 0000000..c8d2e0e +#endif /* DWC_HOST_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c new file mode 100644 -index 0000000..c8590b52 +index 0000000..c8590b5 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c @@ -0,0 +1,5147 @@ @@ -65444,11 +66578,14 @@ index 0000000..cdc9963 + +test_main(); +0; +-- +2.5.0 -From 845f985818d3d9ba162ab1102da78b0e39eaedba Mon Sep 17 00:00:00 2001 + +From be1767ce9178c9dd3af56ce65e0bdd303a99418d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 -Subject: [PATCH 030/170] bcm2708 framebuffer driver +Subject: [PATCH 030/181] bcm2708 framebuffer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -66420,7 +67557,7 @@ index 0000000..a20539a +MODULE_PARM_DESC(fbdepth, "Bit depth of ARM Framebuffer"); +MODULE_PARM_DESC(fbswap, "Swap order of red and blue in 24 and 32 bit modes"); diff --git a/drivers/video/logo/logo_linux_clut224.ppm b/drivers/video/logo/logo_linux_clut224.ppm -index 3c14e43..7626beb6a 100644 +index 3c14e43..7626beb 100644 --- a/drivers/video/logo/logo_linux_clut224.ppm +++ b/drivers/video/logo/logo_linux_clut224.ppm @@ -1,1604 +1,883 @@ @@ -68909,11 +70046,14 @@ index 3c14e43..7626beb6a 100644 +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 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 +-- +2.5.0 -From a35139d316b78606bfdeb0f10656ba6f1729c83f Mon Sep 17 00:00:00 2001 + +From d15083a3f5ab99fe6cbbb2a6d33d99bddcadf35c Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 031/170] dmaengine: Add support for BCM2708 +Subject: [PATCH 031/181] dmaengine: Add support for BCM2708 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -69532,97 +70672,14 @@ index 0000000..99cc7fd +#endif /* CONFIG_DMA_BCM2708 */ + +#endif /* _PLAT_BCM2708_DMA_H */ +-- +2.5.0 -From 462591cf98f15614620667e93b7f8bc0da6e86da Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Fri, 17 Apr 2015 19:30:22 +0100 -Subject: [PATCH 032/170] Add blk_pos parameter to mmc multi_io_quirk callback ---- - drivers/mmc/card/block.c | 1 + - drivers/mmc/host/omap_hsmmc.c | 4 +++- - drivers/mmc/host/sh_mobile_sdhi.c | 4 +++- - drivers/mmc/host/tmio_mmc_pio.c | 4 +++- - include/linux/mmc/host.h | 4 +++- - 5 files changed, 13 insertions(+), 4 deletions(-) - -diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c -index d848616..b35f0c4 100644 ---- a/drivers/mmc/card/block.c -+++ b/drivers/mmc/card/block.c -@@ -1510,6 +1510,7 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, - brq->data.blocks = card->host->ops->multi_io_quirk(card, - (rq_data_dir(req) == READ) ? - MMC_DATA_READ : MMC_DATA_WRITE, -+ blk_rq_pos(req), - brq->data.blocks); - } - -diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c -index 7fb0753..708d0fa 100644 ---- a/drivers/mmc/host/omap_hsmmc.c -+++ b/drivers/mmc/host/omap_hsmmc.c -@@ -1832,7 +1832,9 @@ static void omap_hsmmc_conf_bus_power(struct omap_hsmmc_host *host) - } - - static int omap_hsmmc_multi_io_quirk(struct mmc_card *card, -- unsigned int direction, int blk_size) -+ unsigned int direction, -+ u32 blk_pos, -+ int blk_size) - { - /* This controller can't do multiblock reads due to hw bugs */ - if (direction == MMC_DATA_READ) -diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c -index 354f4f3..4f1ccf3 100644 ---- a/drivers/mmc/host/sh_mobile_sdhi.c -+++ b/drivers/mmc/host/sh_mobile_sdhi.c -@@ -170,7 +170,9 @@ static int sh_mobile_sdhi_write16_hook(struct tmio_mmc_host *host, int addr) - } - - static int sh_mobile_sdhi_multi_io_quirk(struct mmc_card *card, -- unsigned int direction, int blk_size) -+ unsigned int direction, -+ u32 blk_pos, -+ int blk_size) - { - /* - * In Renesas controllers, when performing a -diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c -index a10fde4..7b730d8 100644 ---- a/drivers/mmc/host/tmio_mmc_pio.c -+++ b/drivers/mmc/host/tmio_mmc_pio.c -@@ -1003,7 +1003,9 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc) - } - - static int tmio_multi_io_quirk(struct mmc_card *card, -- unsigned int direction, int blk_size) -+ unsigned int direction, -+ u32 blk_pos, -+ int blk_size) - { - struct tmio_mmc_host *host = mmc_priv(card->host); - -diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h -index ad22ebb..105b3e6 100644 ---- a/include/linux/mmc/host.h -+++ b/include/linux/mmc/host.h -@@ -143,7 +143,9 @@ struct mmc_host_ops { - * I/O. Returns the number of supported blocks for the request. - */ - int (*multi_io_quirk)(struct mmc_card *card, -- unsigned int direction, int blk_size); -+ unsigned int direction, -+ u32 blk_pos, -+ int blk_size); - }; - - struct mmc_card; - -From 3d0ca77d187abbbde572f4a73b1f864ffb8b5d8a Mon Sep 17 00:00:00 2001 +From 5f894aedb0398b3c5733e3fa9f0fa4fe87c48bc8 Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 033/170] MMC: added alternative MMC driver +Subject: [PATCH 032/181] MMC: added alternative MMC driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -71319,11 +72376,14 @@ index 0000000..43aed6e +MODULE_DESCRIPTION("BCM2835 SDHCI driver"); +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Gellert Weisz"); +-- +2.5.0 -From 756bf8b8f081be45e16d4d58d3fbe2ca073df298 Mon Sep 17 00:00:00 2001 + +From 98a9634da0d669b8b8cb674a3a6cd2b9f796b226 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 -Subject: [PATCH 034/170] Adding bcm2835-sdhost driver, and an overlay to +Subject: [PATCH 033/181] Adding bcm2835-sdhost driver, and an overlay to enable it BCM2835 has two SD card interfaces. This driver uses the other one. @@ -73349,11 +74409,14 @@ index 0000000..da089985 +MODULE_DESCRIPTION("BCM2835 SDHost driver"); +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); +-- +2.5.0 -From 8dbb0430386b772f636f474ed45496076d135428 Mon Sep 17 00:00:00 2001 + +From df10df3386271557f47256ff8f51cfd397914b80 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:31:47 +0100 -Subject: [PATCH 035/170] cma: Add vc_cma driver to enable use of CMA +Subject: [PATCH 034/181] 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 @@ -74695,11 +75758,14 @@ index 0000000..be2819d +#endif + +#endif /* VC_CMA_H */ +-- +2.5.0 -From 1e8eb30b259278ea7ab9d14c66d2fab5f580f73c Mon Sep 17 00:00:00 2001 + +From 4172b5cd7e85a51efb8c188813c0dfb8a7c88029 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 26 Mar 2012 22:15:50 +0100 -Subject: [PATCH 036/170] bcm2708: alsa sound driver +Subject: [PATCH 035/181] bcm2708: alsa sound driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -77396,11 +78462,14 @@ index 0000000..af3e6eb +} VC_AUDIO_MSG_T; + +#endif // _VC_AUDIO_DEFS_H_ +-- +2.5.0 -From 20c0f57db9cca65943519bd404b3e346958f4544 Mon Sep 17 00:00:00 2001 + +From 2b30868551a9ff0aae3299e82f9c288be7d72fd4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 2 Jul 2013 23:42:01 +0100 -Subject: [PATCH 037/170] bcm2708 vchiq driver +Subject: [PATCH 036/181] bcm2708 vchiq driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -78658,7 +79727,7 @@ index 0000000..1b17e98 +/****************************** End of file **********************************/ diff --git a/drivers/misc/vc04_services/interface/vchi/vchi_cfg.h b/drivers/misc/vc04_services/interface/vchi/vchi_cfg.h new file mode 100644 -index 0000000..26bc2d38 +index 0000000..26bc2d3 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/vchi_cfg.h @@ -0,0 +1,224 @@ @@ -90704,11 +91773,14 @@ index 0000000..b6bfa21 +{ + return vchiq_build_time; +} +-- +2.5.0 -From 2cabfc660c80dd79f24a8323b3913b5060ebf750 Mon Sep 17 00:00:00 2001 + +From 741ebbd46de0d68d46b1aeeae58785c33f9d7c16 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 16:07:06 +0100 -Subject: [PATCH 038/170] vc_mem: Add vc_mem driver +Subject: [PATCH 037/181] vc_mem: Add vc_mem driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -91712,11 +92784,14 @@ index 0000000..20a4753 +#endif + +#endif /* _VC_MEM_H */ +-- +2.5.0 -From 01574b9e0f1086399e7f796cc1dc8fcadabf4a46 Mon Sep 17 00:00:00 2001 + +From 544b532a3aebd7a268c7b9bf56866a1f9240339d Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 039/170] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 038/181] vcsm: VideoCore shared memory service for BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -96131,11 +97206,14 @@ index 0000000..334f36d +/* ---- Function Prototypes ---------------------------------------------- */ + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ +-- +2.5.0 -From 832077a0f61e44a9259b153f60eb233fa723c2a9 Mon Sep 17 00:00:00 2001 + +From 32c916a358c5ec7b80c8337d89fdccd65d213d2e Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 -Subject: [PATCH 040/170] Add /dev/gpiomem device for rootless user GPIO access +Subject: [PATCH 039/181] Add /dev/gpiomem device for rootless user GPIO access Signed-off-by: Luke Wren @@ -96445,11 +97523,14 @@ index 0000000..911f5b7 +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); +-- +2.5.0 -From 6609b15c34f26f34b4b49e7726693a1de321078c Mon Sep 17 00:00:00 2001 + +From 1968cf3fe7e697bd606f7589c96a11684c306aad Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 -Subject: [PATCH 041/170] Add SMI driver +Subject: [PATCH 040/181] Add SMI driver Signed-off-by: Luke Wren --- @@ -98399,11 +99480,14 @@ index 0000000..ee3a75e +#endif /* BCM2835_SMI_IMPLEMENTATION */ + +#endif /* BCM2835_SMI_H */ +-- +2.5.0 -From f4d44b2c447c401791645627e88d0ef9830c1239 Mon Sep 17 00:00:00 2001 + +From b143b93a4c13998f4f396545a19cb26b5151f3ef Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 -Subject: [PATCH 042/170] Add SMI NAND driver +Subject: [PATCH 041/181] Add SMI NAND driver Signed-off-by: Luke Wren --- @@ -98483,7 +99567,7 @@ index 2896640..56ff00b 100644 tristate diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile -index 2c7f014b..30e22f0 100644 +index 2c7f014..30e22f0 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -14,6 +14,7 @@ obj-$(CONFIG_MTD_NAND_DENALI) += denali.o @@ -98768,11 +99852,14 @@ index 0000000..b747326 +MODULE_DESCRIPTION + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); +-- +2.5.0 -From 2faad8f6644fa53418c5a7b80da8d5400b72df3f Mon Sep 17 00:00:00 2001 + +From 98e8d0052c9d94199f9b2a557c6014e3e862e325 Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 043/170] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 042/181] 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 @@ -99620,11 +100707,14 @@ index 0000000..fb69624 + bcm2708_gpio_pull_t value); + +#endif +-- +2.5.0 -From 3c7ea37319a4974cbf6b89a84c109a53f4d6b408 Mon Sep 17 00:00:00 2001 + +From b8bf5c8200b17a92ca80502e7e5d5feab3a2d180 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 044/170] Add cpufreq driver +Subject: [PATCH 043/181] Add cpufreq driver Signed-off-by: popcornmix --- @@ -99885,11 +100975,14 @@ index 0000000..3eb9e93 + +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); +-- +2.5.0 -From 776e87ffc8b137ea465e7b0076e56cd71d9c56d1 Mon Sep 17 00:00:00 2001 + +From 9fd68c24df6a09c061b14d360323988820f082d8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 045/170] Added hwmon/thermal driver for reporting core +Subject: [PATCH 044/181] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -100086,11 +101179,14 @@ index 0000000..08d8dc7 +MODULE_AUTHOR("Noralf Trønnes"); +MODULE_DESCRIPTION("Thermal driver for bcm2835 chip"); +MODULE_LICENSE("GPL"); +-- +2.5.0 -From 72181304010d3aa74cd2b98db592554a541ce4c2 Mon Sep 17 00:00:00 2001 + +From 14fb9c7c71cc37c1cd51c5331df954adad6a2b96 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 -Subject: [PATCH 046/170] Add Chris Boot's i2c driver +Subject: [PATCH 045/181] Add Chris Boot's i2c driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -100729,11 +101825,14 @@ index 0000000..85f411c +MODULE_AUTHOR("Chris Boot "); +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); +-- +2.5.0 -From abcf04d54ccb3d0897b1f7a95ddf9d9ccf63dc76 Mon Sep 17 00:00:00 2001 + +From c294afc3e5cf2a23490bb8dc9d22c47c41c04aa2 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 047/170] char: broadcom: Add vcio module +Subject: [PATCH 046/181] char: broadcom: Add vcio module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -100958,11 +102057,14 @@ index 0000000..c19bc20 +MODULE_AUTHOR("Noralf Trønnes"); +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); +-- +2.5.0 -From a205e934b63b6bf3f5f74bc39974ec6ff09df596 Mon Sep 17 00:00:00 2001 + +From fcbd747993df68ce377203f763f8879b3142c039 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 048/170] firmware: bcm2835: Support ARCH_BCM270x +Subject: [PATCH 047/181] firmware: bcm2835: Support ARCH_BCM270x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -101067,11 +102169,14 @@ index dd506cd3..b980d53 100644 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); +-- +2.5.0 -From 4d74ee3d433df319ae3fc36bd16fd96b4bbff865 Mon Sep 17 00:00:00 2001 + +From 72a20d812e360332a6cf062a9674c740f55248d2 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 30 Jan 2013 12:45:18 +0000 -Subject: [PATCH 049/170] bcm2835: add v4l2 camera device +Subject: [PATCH 048/181] bcm2835: add v4l2 camera device - Supports raw YUV capture, preview, JPEG and H264. - Uses videobuf2 for data transfer, using dma_buf. @@ -104831,7 +105936,7 @@ index 0000000..f9f903f +} diff --git a/drivers/media/platform/bcm2835/mmal-common.h b/drivers/media/platform/bcm2835/mmal-common.h new file mode 100644 -index 0000000..840fd139 +index 0000000..840fd13 --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-common.h @@ -0,0 +1,53 @@ @@ -108455,11 +109560,14 @@ index 0000000..9d1d11e + struct mmal_buffer *buf); + +#endif /* MMAL_VCHIQ_H */ +-- +2.5.0 -From 03435989bbadbd333a810644c8246dd7eb0bad07 Mon Sep 17 00:00:00 2001 + +From d29ba33e497f0d3c992ceb9fa98c758201cc9195 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 -Subject: [PATCH 050/170] scripts: Add mkknlimg and knlinfo scripts from tools +Subject: [PATCH 049/181] scripts: Add mkknlimg and knlinfo scripts from tools repo The Raspberry Pi firmware looks for a trailer on the kernel image to @@ -108923,11 +110031,14 @@ index 0000000..3998d43 + my $val = $configs->{$wanted} || 'n'; + return (($val eq 'y') || ($val eq '1')); +} +-- +2.5.0 -From a251bf4a37d8fd468bc3ff853bcebe8ee452a31e Mon Sep 17 00:00:00 2001 + +From 67f1cc9ee84ebca32e00846102be832bdb2ee6d9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 5 Dec 2014 17:26:26 +0000 -Subject: [PATCH 051/170] fdt: Add support for the CONFIG_CMDLINE_EXTEND option +Subject: [PATCH 050/181] fdt: Add support for the CONFIG_CMDLINE_EXTEND option --- drivers/of/fdt.c | 29 ++++++++++++++++++++++++----- @@ -108981,11 +110092,14 @@ index 655f79d..fdc4501 100644 #endif /* CONFIG_CMDLINE */ pr_debug("Command line is: %s\n", (char*)data); +-- +2.5.0 -From 0112c4ce9db6cdc53af67dc7634966c3594de7ff Mon Sep 17 00:00:00 2001 + +From d23531bc7abf658556614ce6f6602a5a73313b67 Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 052/170] BCM2708: Add core Device Tree support +Subject: [PATCH 051/181] BCM2708: Add core Device Tree support Add the bare minimum needed to boot BCM2708 from a Device Tree. @@ -110319,7 +111433,7 @@ index 0000000..a8cfd7c +}; diff --git a/arch/arm/boot/dts/bcm2835-rpi-cm.dts b/arch/arm/boot/dts/bcm2835-rpi-cm.dts new file mode 100644 -index 0000000..c6e6860a +index 0000000..c6e6860 --- /dev/null +++ b/arch/arm/boot/dts/bcm2835-rpi-cm.dts @@ -0,0 +1,93 @@ @@ -110529,7 +111643,7 @@ index 0000000..d8c2771 +endif diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README new file mode 100644 -index 0000000..44e33a4 +index 0000000..268d400 --- /dev/null +++ b/arch/arm/boot/dts/overlays/README @@ -0,0 +1,648 @@ @@ -110644,7 +111758,7 @@ index 0000000..44e33a4 + (default "off") + + random Set to "on" to enable the hardware random -+ number generator (default "off") ++ number generator (default "on") + + uart0 Set to "off" to disable uart0 (default "on") + @@ -111487,7 +112601,7 @@ index 0000000..2c81448 +}; diff --git a/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts new file mode 100644 -index 0000000..5e7633ae +index 0000000..5e7633a --- /dev/null +++ b/arch/arm/boot/dts/overlays/hifiberry-dac-overlay.dts @@ -0,0 +1,34 @@ @@ -111527,7 +112641,7 @@ index 0000000..5e7633ae +}; diff --git a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts new file mode 100644 -index 0000000..deb9c625 +index 0000000..deb9c62 --- /dev/null +++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts @@ -0,0 +1,39 @@ @@ -112817,7 +113931,7 @@ index 0000000..1bd8054 +}; diff --git a/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts b/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts new file mode 100644 -index 0000000..7fc6ac99 +index 0000000..7fc6ac9 --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-dac-overlay.dts @@ -0,0 +1,34 @@ @@ -113710,11 +114824,14 @@ index 0000000..66a98f6 + pullup = <&w1>,"rpi,parasitic-power:0"; + }; +}; +-- +2.5.0 -From 23eabf2220f0f748df3e88a35e55a82c53242b4a Mon Sep 17 00:00:00 2001 + +From 2ed3dc300f5c00646f32245928164c51b88c4692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 15 Aug 2015 20:47:07 +0200 -Subject: [PATCH 053/170] bcm2835: Match with BCM2708 Device Trees +Subject: [PATCH 052/181] bcm2835: Match with BCM2708 Device Trees MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -114231,11 +115348,14 @@ index 864a3ef..3256bff 100644 +&watchdog { + status = "okay"; +}; +-- +2.5.0 -From f978fb3b816681159b6cc97104954dea31488add Mon Sep 17 00:00:00 2001 + +From 18cc1e2bbcbe55e4dcb9e168111b4462463532ac Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 054/170] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 053/181] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -114312,7 +115432,7 @@ index 0705d88..771992a 100644 case FBIOBLANK: ret = do_fb_ioctl(info, cmd, arg); diff --git a/include/uapi/linux/fb.h b/include/uapi/linux/fb.h -index fb795c3..fa72af0c 100644 +index fb795c3..fa72af0 100644 --- a/include/uapi/linux/fb.h +++ b/include/uapi/linux/fb.h @@ -34,6 +34,11 @@ @@ -114327,11 +115447,14 @@ index fb795c3..fa72af0c 100644 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ +-- +2.5.0 -From 53bcd6e5a43a353508c7aff48abcdcaae1b35ca8 Mon Sep 17 00:00:00 2001 + +From 6ec61d0def25509df1c2ee6eb8f9d53744759a78 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 058/170] Speed up console framebuffer imageblit function +Subject: [PATCH 054/181] 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 @@ -114539,11 +115662,14 @@ index a2bb276..436494f 100644 slow_imageblit(image, p, dst1, fgcolor, bgcolor, start_index, pitch_index); } else +-- +2.5.0 -From 6c0a9150827dc58fac38c8e787c050626325842e Mon Sep 17 00:00:00 2001 + +From 5596c599c153a7c17e80aa790c1e33f8e44e8e66 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 059/170] Allow mac address to be set in smsc95xx +Subject: [PATCH 055/181] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -114633,11 +115759,14 @@ index 9c0da18..3244a90 100755 /* try reading mac address from EEPROM */ if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN, dev->net->dev_addr) == 0) { +-- +2.5.0 -From e172d31b8402f13aed5679cd7023f0c0935aab05 Mon Sep 17 00:00:00 2001 + +From b562c49577aeda9b7ccb12952f2b108cf1a4ae8f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 060/170] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 056/181] 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 @@ -114886,11 +116015,14 @@ index d58594a..feae942 100644 void (*enable_external_pullup)(int enable); unsigned int ext_pullup_enable_pin; unsigned int pullup_duration; +-- +2.5.0 -From d0f48fe7aab3e4036fd55b491a9be94ea24f377d Mon Sep 17 00:00:00 2001 + +From 8e3b423f2df18bd2a86457914091794470e4b366 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Dec 2013 22:16:19 +0000 -Subject: [PATCH 062/170] config: Enable CONFIG_MEMCG, but leave it disabled +Subject: [PATCH 057/181] config: Enable CONFIG_MEMCG, but leave it disabled (due to memory cost). Enable with cgroup_enable=memory. --- @@ -114938,11 +116070,14 @@ index fb1ecfd..888d308 100644 /** * css_tryget_online_from_dir - get corresponding css from a cgroup dentry * @dentry: directory dentry of interest +-- +2.5.0 -From 8d35b3a72d3580ad6f5bc5835bfe13b00cce6086 Mon Sep 17 00:00:00 2001 + +From f7857273bd55b5365f425ac1fd467a8124ece30f Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:59:51 +0100 -Subject: [PATCH 063/170] ASoC: Add support for PCM5102A codec +Subject: [PATCH 058/181] ASoC: Add support for PCM5102A codec Some definitions to support the PCM5102A codec by Texas Instruments. @@ -115074,11 +116209,14 @@ index 0000000..7c6598e +MODULE_DESCRIPTION("ASoC PCM5102A codec driver"); +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From 9ced0e86593de2214ff8a81f71c802d7e7301b05 Mon Sep 17 00:00:00 2001 + +From 5a0dcbcbea3c0659e634cebb7acb0e4de785cdc6 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 064/170] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 059/181] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -115247,11 +116385,14 @@ index 0000000..3ab0f47 +MODULE_AUTHOR("Florian Meier "); +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From f16a654f57b024d44fe58d62b660e01de6a7811a Mon Sep 17 00:00:00 2001 + +From cd2fe7df671e672a24df8f3b00c902f7b87d36af Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:21:34 +0100 -Subject: [PATCH 065/170] ASoC: Add support for Rpi-DAC +Subject: [PATCH 060/181] ASoC: Add support for Rpi-DAC --- sound/soc/bcm/Kconfig | 7 +++ @@ -115537,11 +116678,14 @@ index 0000000..afe1b41 +MODULE_DESCRIPTION("ASoC PCM1794A codec driver"); +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From dbdeca565b0850da182d3bd0b3ed41f667ca8a45 Mon Sep 17 00:00:00 2001 + +From 1dc98aeabdedcbf0c466da3500603b52013651dc Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 066/170] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 061/181] 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 @@ -115580,11 +116724,14 @@ index 8d91470..5795fb1 100644 #define WM8804_RATES (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_64000 | \ +-- +2.5.0 -From 0c2e64d3eda229c2f52ce6ed9d0b1c1572dd9b19 Mon Sep 17 00:00:00 2001 + +From 22e44c2b091c516200133019218f6ff52a7fd00a Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 067/170] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 062/181] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -115870,11 +117017,14 @@ index 0000000..80732b8 +MODULE_AUTHOR("Daniel Matuschek "); +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From f2789622ff7c1297e28f38bb198f5fd24b4602ef Mon Sep 17 00:00:00 2001 + +From 9633f3d849f5bd66a860199b8282f5364da39eb6 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:36:35 +0100 -Subject: [PATCH 068/170] ASoC: wm8804: Set idle_bias_off to false Idle bias +Subject: [PATCH 063/181] ASoC: wm8804: Set idle_bias_off to false Idle bias has been change to remove warning on driver startup Signed-off-by: Daniel Matuschek @@ -115895,11 +117045,14 @@ index 5795fb1..c846716 100644 .dapm_widgets = wm8804_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(wm8804_dapm_widgets), +-- +2.5.0 -From 80fa31f923b4967bc86be20c5af780ef284fc972 Mon Sep 17 00:00:00 2001 + +From 2ffbee31800ab35e78cfcfa1e6962492ba51860a Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 069/170] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 064/181] Add IQaudIO Sound Card support for Raspberry Pi Set a limit of 0dB on Digital Volume Control @@ -116081,11 +117234,14 @@ index 0000000..37038d4 +MODULE_AUTHOR("Florian Meier "); +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From b15f112ddaf2cd20a8f999ac823ddb51d7d513b9 Mon Sep 17 00:00:00 2001 + +From 736deadfa1c085de7b3dc01e8c789aa29ef316c9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 070/170] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 065/181] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -116120,11 +117276,14 @@ index 5dd426f..9ae0cd5 100644 ret = -ENOMEM; if (usb_endpoint_dir_in(endpoint)) { +-- +2.5.0 -From debd3d30b1127328b5a1e444bd1550cb45c50362 Mon Sep 17 00:00:00 2001 + +From 00aa756b22a6c915e95c28cd1d3966fb1e61cf33 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 071/170] Added support for HiFiBerry DAC+ +Subject: [PATCH 066/181] 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. @@ -116318,11 +117477,14 @@ index 0000000..11e4f39 +MODULE_AUTHOR("Daniel Matuschek "); +MODULE_DESCRIPTION("ASoC Driver for HiFiBerry DAC+"); +MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From 9c6f0b1812313d39afeefd700b7f9df9a82a47cd Mon Sep 17 00:00:00 2001 + +From 82b9cc2714dfed6e05ffe920aa244f8bce1c866b Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 072/170] Added driver for HiFiBerry Amp amplifier add-on board +Subject: [PATCH 067/181] 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. @@ -117152,11 +118314,14 @@ index 0000000..8f019e0 + + +#endif /* _TAS5713_H */ +-- +2.5.0 -From 21d08f232ffc350b2930f761f3da26f9867b1d4d Mon Sep 17 00:00:00 2001 + +From 8749024eb42ef2b1c8c0ec7f0ab946f02b4a43fd Mon Sep 17 00:00:00 2001 From: Ryan Coe Date: Sat, 31 Jan 2015 18:25:49 -0700 -Subject: [PATCH 073/170] Update ds1307 driver for device-tree support +Subject: [PATCH 068/181] Update ds1307 driver for device-tree support Signed-off-by: Ryan Coe --- @@ -117182,11 +118347,14 @@ index aa705bb..1cb13fee 100644 static struct i2c_driver ds1307_driver = { .driver = { .name = "rtc-ds1307", +-- +2.5.0 -From a2b52a3af1314e2b691d9518afb3051193758671 Mon Sep 17 00:00:00 2001 + +From 56c41eecb515d218b5f1d42290013be448bf6f40 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 -Subject: [PATCH 074/170] BCM270x_DT: Add pwr_led, and the required "input" +Subject: [PATCH 069/181] BCM270x_DT: Add pwr_led, and the required "input" trigger The "input" trigger makes the associated GPIO an input. This is to support @@ -117364,11 +118532,14 @@ index fa359c7..4b25a1a 100644 /* Set LED brightness level */ /* Must not sleep, use a workqueue if needed */ +-- +2.5.0 -From 12ad9b7c670220b1b8b80ebf507651d106cb28c0 Mon Sep 17 00:00:00 2001 + +From da32c806a964570a894c7e0cc0829b33bcd316bf Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 27 Feb 2015 15:10:24 +0000 -Subject: [PATCH 075/170] enc28j60: Add device tree compatible string and an +Subject: [PATCH 070/181] enc28j60: Add device tree compatible string and an overlay --- @@ -117396,11 +118567,14 @@ index 86ea17e..a1b20c1 100644 }, .probe = enc28j60_probe, .remove = enc28j60_remove, +-- +2.5.0 -From 660d2fba0483aafc4a1ce678016620c0871bb759 Mon Sep 17 00:00:00 2001 + +From 3cca9b33e952122e120731798f9b9c791e77b4cf Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 -Subject: [PATCH 076/170] Add driver for rpi-proto +Subject: [PATCH 071/181] 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 @@ -117614,11 +118788,14 @@ index 0000000..c6e45a0 +MODULE_AUTHOR("Florian Meier"); +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); +-- +2.5.0 -From e2af169e60b4ebd710e733996d57ad86264bae27 Mon Sep 17 00:00:00 2001 + +From 871b14af40ad5e52e42c6c1afbda8a4c749e572b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 -Subject: [PATCH 077/170] config: Add default configs +Subject: [PATCH 072/181] config: Add default configs --- arch/arm/configs/bcm2709_defconfig | 1254 +++++++++++++++++++++++++++++++++++ @@ -120158,11 +121335,14 @@ index 0000000..1d1b799 +CONFIG_CRYPTO_AES_ARM=m +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y +-- +2.5.0 -From e5292198fc83805a9f4751fddeb802f69c0270f0 Mon Sep 17 00:00:00 2001 + +From bdfe27bd1dc15598a946288419eb9f77b51672df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Wed, 29 Apr 2015 17:24:02 +0200 -Subject: [PATCH 078/170] bcm2835: bcm2835_defconfig +Subject: [PATCH 073/181] bcm2835: bcm2835_defconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -120304,7 +121484,7 @@ Signed-off-by: Noralf Trønnes 1 file changed, 1140 insertions(+), 26 deletions(-) diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig -index 31cb073..fdb2e2a8 100644 +index 31cb073..fdb2e2a 100644 --- a/arch/arm/configs/bcm2835_defconfig +++ b/arch/arm/configs/bcm2835_defconfig @@ -1,105 +1,1103 @@ @@ -121587,11 +122767,14 @@ index 31cb073..fdb2e2a8 100644 +CONFIG_LIBCRC32C=y # CONFIG_XZ_DEC_ARM is not set # CONFIG_XZ_DEC_ARMTHUMB is not set +-- +2.5.0 -From 6fb12ee15eb9b0f5b6fea66c861a9db8ec6671ed Mon Sep 17 00:00:00 2001 + +From 58aa31edba9ca1c3c253756287a88863c30ee5fc Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 -Subject: [PATCH 079/170] rpi-ft5406: Add touchscreen driver for pi LCD display +Subject: [PATCH 074/181] 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 @@ -121885,11 +123068,14 @@ index 0000000..b27dbee +MODULE_AUTHOR("Gordon Hollingworth"); +MODULE_DESCRIPTION("Touchscreen driver for memory based FT5406"); +MODULE_LICENSE("GPL"); +-- +2.5.0 -From b57a6269e03fe055f78ab50add6e2c68d43254e2 Mon Sep 17 00:00:00 2001 + +From 2f11cc37fbc88accd801b3f730099900c83802dc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Oct 2014 11:47:53 +0100 -Subject: [PATCH 080/170] Improve __copy_to_user and __copy_from_user +Subject: [PATCH 075/181] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use @@ -123341,7 +124527,7 @@ index 588bbc2..c29df92 100644 __copy_to_user_memcpy(void __user *to, const void *from, unsigned long n) { unsigned long ua_flags; -@@ -138,6 +183,54 @@ __copy_to_user_memcpy(void __user *to, const void *from, unsigned long n) +@@ -138,6 +183,54 @@ out: return n; } @@ -123427,11 +124613,14 @@ index 588bbc2..c29df92 100644 static unsigned long noinline __clear_user_memset(void __user *addr, unsigned long n) +-- +2.5.0 -From 44d43099a94c8b2db818c80c67789ef5f9857b81 Mon Sep 17 00:00:00 2001 + +From 2c49ea27901b7bbddd15273ac18b1858fb419e73 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 -Subject: [PATCH 081/170] gpio-poweroff: Allow it to work on Raspberry Pi +Subject: [PATCH 076/181] 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 @@ -123465,11 +124654,14 @@ index be3d81f..a030ae9 100644 dev_err(&pdev->dev, "%s: pm_power_off function already registered", __func__); +-- +2.5.0 -From 5b2d8bca046bd6f1a426e9205f194ece5b95e300 Mon Sep 17 00:00:00 2001 + +From 73ee4604d2e4b3e413a748fbba57cab68f47b2ed Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 -Subject: [PATCH 082/170] spidev: Add "spidev" compatible string to silence +Subject: [PATCH 077/181] spidev: Add "spidev" compatible string to silence warning See: https://github.com/raspberrypi/linux/issues/1054 @@ -123489,11 +124681,14 @@ index d0e7dfc..57b0760 100644 {}, }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); +-- +2.5.0 -From 534c337ea28bee34f886a1d1e00d281365c94efa Mon Sep 17 00:00:00 2001 + +From 55e0f3ebceab7623cdd61097bc9acbaa086e7e00 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 17:00:18 +0100 -Subject: [PATCH 083/170] scripts/dtc: Add overlay support +Subject: [PATCH 078/181] scripts/dtc: Add overlay support --- scripts/dtc/checks.c | 119 ++- @@ -123664,7 +124859,7 @@ index e81a8c74..efd1bc6 100644 }; diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l -index 0ee1caf0..dd44ba2 100644 +index 0ee1caf..dd44ba2 100644 --- a/scripts/dtc/dtc-lexer.l +++ b/scripts/dtc/dtc-lexer.l @@ -113,6 +113,11 @@ static void lexical_error(const char *fmt, ...); @@ -127897,11 +129092,14 @@ index 5b8c7d5..86b7338 100644 @@ -1 +1 @@ -#define DTC_VERSION "DTC 1.4.1-g9d3649bd" +#define DTC_VERSION "DTC 1.4.1-g9d3649bd-dirty" +-- +2.5.0 -From b065c580329ecb7c7e77bb7019c6059d7db83398 Mon Sep 17 00:00:00 2001 + +From e48abac09663399b57304777eb18d8cf2f44bda7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 -Subject: [PATCH 084/170] mfd: Add Raspberry Pi Sense HAT core driver +Subject: [PATCH 079/181] mfd: Add Raspberry Pi Sense HAT core driver --- drivers/input/joystick/Kconfig | 8 + @@ -127925,7 +129123,7 @@ Subject: [PATCH 084/170] mfd: Add Raspberry Pi Sense HAT core driver create mode 100644 include/linux/mfd/rpisense/joystick.h diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig -index 4215b53..4364d7c8 100644 +index 4215b53..4364d7c 100644 --- a/drivers/input/joystick/Kconfig +++ b/drivers/input/joystick/Kconfig @@ -330,4 +330,12 @@ config JOYSTICK_MAPLE @@ -128766,11 +129964,14 @@ index 0000000..56196dc + + +#endif +-- +2.5.0 -From c86a74aaff9bc42b3cb04881b3aaf7f822edda04 Mon Sep 17 00:00:00 2001 + +From 8e7ef65d3047c27ecb78d86d353b0fbd531df145 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 -Subject: [PATCH 085/170] RaspiDAC3 support +Subject: [PATCH 080/181] RaspiDAC3 support Signed-off-by: Jan Grulich @@ -129017,11 +130218,14 @@ index 0000000..3cabf5b +MODULE_AUTHOR("Jan Grulich "); +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From 2d340e2fbbc9f4735b798601a43ae9f0f4cc5742 Mon Sep 17 00:00:00 2001 + +From 9a6628f8582ec6297e6774f301e671766445540e Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:02:34 +0100 -Subject: [PATCH 086/170] tpa6130a2: Add headphone switch control +Subject: [PATCH 081/181] tpa6130a2: Add headphone switch control Signed-off-by: Jan Grulich --- @@ -129049,7 +130253,7 @@ index 11d85c5..3caaa17 100644 static int tpa6130a2_i2c_read(int reg) { struct tpa6130a2_data *data; -@@ -189,7 +192,7 @@ static int tpa6130a2_power(u8 power) +@@ -189,7 +192,7 @@ exit: } static int tpa6130a2_get_volsw(struct snd_kcontrol *kcontrol, @@ -129111,11 +130315,14 @@ index 11d85c5..3caaa17 100644 }; /* +-- +2.5.0 -From 6fc9d40bec5dbcf3ae8b52ab6850ed0b18193c82 Mon Sep 17 00:00:00 2001 + +From 1fcf9322b351a24ecac83761ce5cee2da2a3b830 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Sep 2015 23:38:59 +0100 -Subject: [PATCH 087/170] irq-bcm2835: Fix building with 2708 +Subject: [PATCH 082/181] irq-bcm2835: Fix building with 2708 --- drivers/irqchip/irq-bcm2835.c | 3 ++- @@ -129142,11 +130349,14 @@ index 20deb28..c02bf8a 100644 } } init_FIQ(FIQ_START); +-- +2.5.0 -From 0e7ec1e61b149567d5af63169cd4d701c133356f Mon Sep 17 00:00:00 2001 + +From f4f27ef5051113bf26cdd880325769e1c78324ad Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 -Subject: [PATCH 088/170] rpi_display: add backlight driver and overlay +Subject: [PATCH 083/181] 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 @@ -129180,7 +130390,7 @@ index d8c2771..fb7ac49 100644 dtb-$(RPI_DT_OVERLAYS) += rpi-display-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += rpi-ft5406-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 44e33a4..b819293 100644 +index 268d400..d7f2979 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -462,6 +462,12 @@ Load: dtoverlay=raspidac3 @@ -129413,11 +130623,14 @@ index 525816d..b011489 100644 RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, +-- +2.5.0 -From 0459ca97c1f2753ce805ab58ff17847cb4c142e0 Mon Sep 17 00:00:00 2001 + +From 456de5e00e7b5c0a13d63522cc8d17672df11630 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Mon, 16 Nov 2015 14:05:35 +0000 -Subject: [PATCH 089/170] bcm2835-dma: Fix up convert to DMA pool +Subject: [PATCH 084/181] bcm2835-dma: Fix up convert to DMA pool --- drivers/dma/bcm2835-dma.c | 36 ++++++++++++++++++++++++++---------- @@ -129501,11 +130714,14 @@ index 0adc347..985019b 100644 } else { /* Next block is empty. */ control_block->next = 0; +-- +2.5.0 -From f6dd60426dc7970ef4e9e3d9e00d374f80a6abd2 Mon Sep 17 00:00:00 2001 + +From 9270672ce393024dc5658ad58294c53e88740412 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 11 Nov 2015 11:38:59 +0000 -Subject: [PATCH 090/170] scripts: Multi-platform support for mkknlimg and +Subject: [PATCH 085/181] scripts: Multi-platform support for mkknlimg and knlinfo The firmware uses tags in the kernel trailer to choose which dtb file @@ -129753,11 +130969,14 @@ index 3998d43..005f404 100755 - my $val = $configs->{$wanted} || 'n'; - return (($val eq 'y') || ($val eq '1')); -} +-- +2.5.0 -From 6d38553e5ce7fb70dd1f89665caf58064a7e97d7 Mon Sep 17 00:00:00 2001 + +From b3cb3d086f56f20a97a17309991d75e70ebee360 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 2 Mar 2015 13:01:12 -0800 -Subject: [PATCH 091/170] drm/vc4: Add suport for 3D rendering using the V3D +Subject: [PATCH 086/181] drm/vc4: Add suport for 3D rendering using the V3D engine. This is a squash of the out-of-tree development series. Since that @@ -130594,7 +131813,7 @@ index d5db9e0..3baf1fc 100644 ret = drm_dev_register(drm, 0); if (ret < 0) -@@ -200,8 +229,11 @@ static int vc4_drm_bind(struct device *dev) +@@ -200,8 +229,11 @@ unregister: drm_dev_unregister(drm); unbind_all: component_unbind_all(dev, drm); @@ -135128,7 +136347,7 @@ index 0000000..0aab9d7 +} diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h new file mode 100644 -index 0000000..499daae5 +index 0000000..499daae --- /dev/null +++ b/include/uapi/drm/vc4_drm.h @@ -0,0 +1,229 @@ @@ -135361,11 +136580,14 @@ index 0000000..499daae5 +}; + +#endif /* _UAPI_VC4_DRM_H_ */ +-- +2.5.0 -From aa579c7485e1bae681c50b223e89cd658dd0b2c1 Mon Sep 17 00:00:00 2001 + +From efa3b684a25d94b3f86cb2d681022ff330f439ab Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Oct 2015 11:32:14 -0700 -Subject: [PATCH 092/170] drm/vc4: Force HDMI to connected. +Subject: [PATCH 087/181] drm/vc4: Force HDMI to connected. For some reason on the downstream tree, the HPD GPIO isn't working. @@ -135387,11 +136609,14 @@ index da9a36d..d15c529 100644 if (vc4->hdmi->hpd_gpio) { if (gpio_get_value(vc4->hdmi->hpd_gpio)) return connector_status_connected; +-- +2.5.0 -From edb828d91374e8fa4f05d68be008c40d4f9a158d Mon Sep 17 00:00:00 2001 + +From 35515aa384ec1cee80116fc2ef6b70856a05c647 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:23:18 -0700 -Subject: [PATCH 093/170] drm/vc4: bo cache locking fixes. +Subject: [PATCH 088/181] drm/vc4: bo cache locking fixes. Signed-off-by: Eric Anholt --- @@ -135539,11 +136764,14 @@ index 8cc89d1..c079b82 100644 /* Sequence number for the last job queued in job_list. * Starts at 0 (no jobs emitted). +-- +2.5.0 -From eafd7a031a15fb0d51a86b89e42ccde4f23434b4 Mon Sep 17 00:00:00 2001 + +From f30a84d66e480c667ceba0c19a46b3a9962b5ff1 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:29:41 -0700 -Subject: [PATCH 094/170] drm/vc4: bo cache locking cleanup. +Subject: [PATCH 089/181] drm/vc4: bo cache locking cleanup. Signed-off-by: Eric Anholt --- @@ -135634,11 +136862,14 @@ index af0fde6..acd360c 100644 } static void vc4_bo_cache_time_timer(unsigned long data) +-- +2.5.0 -From 482f2b3e97e919ac0ebc55a6040747495563b9a7 Mon Sep 17 00:00:00 2001 + +From 371ebba08d185667b50d69955f9ac2585f9c95ea Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:32:24 -0700 -Subject: [PATCH 095/170] drm/vc4: Use job_lock to protect seqno_cb_list. +Subject: [PATCH 090/181] drm/vc4: Use job_lock to protect seqno_cb_list. We're (mostly) not supposed to be using struct_mutex in drivers these days. @@ -135691,11 +136922,14 @@ index 361390b..b1853b2 100644 return ret; } +-- +2.5.0 -From 4dc15a296586679d5b014011e44a093cf962123e Mon Sep 17 00:00:00 2001 + +From 350add0fa80e0785b7346f61daed0cd6bf9cf336 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:44:35 -0700 -Subject: [PATCH 096/170] drm/vc4: Drop struct_mutex around CL validation. +Subject: [PATCH 091/181] drm/vc4: Drop struct_mutex around CL validation. We were using it so that we could make sure that shader validation state didn't change while we were validating, but now shader @@ -135757,11 +136991,14 @@ index b1853b2..32f375a 100644 return ret; } +-- +2.5.0 -From f1924e632d16f98eee1fe1be636249b8cee4ee6e Mon Sep 17 00:00:00 2001 + +From a62491866699a407c531f69dd3c026e6507344cd Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2015 08:44:35 -0700 -Subject: [PATCH 097/170] drm/vc4: Drop struct_mutex around CL validation. +Subject: [PATCH 092/181] drm/vc4: Drop struct_mutex around CL validation. We were using it so that we could make sure that shader validation state didn't change while we were validating, but now shader @@ -135781,7 +137018,7 @@ diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c index 32f375a..55551ea 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c -@@ -439,10 +439,12 @@ vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec) +@@ -439,10 +439,12 @@ fail: } static void @@ -135834,11 +137071,14 @@ index 32f375a..55551ea 100644 return ret; } +-- +2.5.0 -From 0193a1e5b931c7363279282b4169c2152af1a621 Mon Sep 17 00:00:00 2001 + +From 889bc7b68050b482f3b277f87ac04e94ccc95923 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 20 Oct 2015 13:59:15 +0100 -Subject: [PATCH 098/170] drm/vc4: Add support for more display plane formats. +Subject: [PATCH 093/181] drm/vc4: Add support for more display plane formats. Signed-off-by: Eric Anholt --- @@ -135872,11 +137112,14 @@ index 65e5455..0f85eb5 100644 }; static const struct hvs_format *vc4_get_hvs_format(u32 drm_format) +-- +2.5.0 -From 8faa3b83201819d56f997a2b2ecaf8c690080852 Mon Sep 17 00:00:00 2001 + +From f5bac6b3b97a092d4a4abce8fe9d7a23e3c644d5 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 23 Oct 2015 12:31:56 +0100 -Subject: [PATCH 099/170] drm/vc4: No need to stop the stopped threads. +Subject: [PATCH 094/181] drm/vc4: No need to stop the stopped threads. This was leftover debug code from the hackdriver. We never submit unless the thread is already idle. @@ -135901,11 +137144,14 @@ index 55551ea..eeb0925 100644 V3D_WRITE(V3D_CTNCA(thread), start); barrier(); +-- +2.5.0 -From d102d0e145b58bccbea52e89bbe52dcefc044aaa Mon Sep 17 00:00:00 2001 + +From f21c0763ead9be1616274254ba9955998c3d8e68 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 23 Oct 2015 12:33:43 +0100 -Subject: [PATCH 100/170] drm/vc4: Remove extra barrier()s aroudn CTnCA/CTnEA +Subject: [PATCH 095/181] drm/vc4: Remove extra barrier()s aroudn CTnCA/CTnEA setup. The writel() that these expand to already does barriers. @@ -135937,11 +137183,14 @@ index eeb0925..0cea723 100644 } int +-- +2.5.0 -From 0f099b4b1354b0377376b91ae60c6c16d82683a7 Mon Sep 17 00:00:00 2001 + +From d705f6016f15a91b49188780a4a9d7802d304e0b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 23 Oct 2015 14:57:22 +0100 -Subject: [PATCH 101/170] drm/vc4: Fix a typo in a V3D debug register. +Subject: [PATCH 096/181] drm/vc4: Fix a typo in a V3D debug register. Signed-off-by: Eric Anholt --- @@ -135975,11 +137224,14 @@ index b9cb7cf..cf35f58 100644 REGDEF(V3D_FDBGO), REGDEF(V3D_FDBGB), REGDEF(V3D_FDBGR), +-- +2.5.0 -From 22182768add611b53e33c5dd2e8901acc3d08181 Mon Sep 17 00:00:00 2001 + +From 9b14b6803f4b0ce01854806a13ba3538ce2cd9c0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 2 Nov 2015 17:07:33 +0000 -Subject: [PATCH 102/170] drm/vc4: Enable VC4 modules, and increase CMA size +Subject: [PATCH 097/181] drm/vc4: Enable VC4 modules, and increase CMA size with overlay If using the overlay, be careful not to boot to GUI or run startx, @@ -135993,7 +137245,7 @@ or the Pi will almost hang, reporting stalls in kernel threads. create mode 100644 arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index b819293..f5302b2 100644 +index d7f2979..1fa98ce 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -601,6 +601,14 @@ Params: txd1_pin GPIO pin for TXD1 (14, 32 or 40 - default 14) @@ -136138,11 +137390,14 @@ index 146add9..d6aa058 100644 CONFIG_FB=y CONFIG_FB_BCM2708=y CONFIG_FB_UDL=m +-- +2.5.0 -From 88315025318218ac04fcc66614083bb1a51f662f Mon Sep 17 00:00:00 2001 + +From c81983aea8382da38ea594a640dec1f47537f2a7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Nov 2015 18:29:58 +0000 -Subject: [PATCH 103/170] squash: fixups +Subject: [PATCH 098/181] squash: fixups --- drivers/gpu/drm/vc4/Kconfig | 2 +- @@ -136188,11 +137443,14 @@ index c83287a..2082713 100644 drm_atomic_helper_commit_modeset_enables(dev, state); +-- +2.5.0 -From 3fc233b798ac8498b4e24b42ad67fb3499a30f07 Mon Sep 17 00:00:00 2001 + +From 8a5cf5290c3d0a3a2c136a1645a736cc963f33b1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Nov 2015 20:26:03 +0000 -Subject: [PATCH 104/170] squash: add missing vc4-kms-v3d-overlay.dtb to +Subject: [PATCH 099/181] squash: add missing vc4-kms-v3d-overlay.dtb to makefile --- @@ -136211,11 +137469,14 @@ index fb7ac49..fc09bfb 100644 dtb-$(RPI_DT_OVERLAYS) += vga666-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += w1-gpio-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += w1-gpio-pullup-overlay.dtb +-- +2.5.0 -From d9888c76bcee2a7c118ab8ba93a1204fb5ff4e44 Mon Sep 17 00:00:00 2001 + +From 9212e62fcee8b716eeb3cfda9c95e56a9b839bac Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 12 Oct 2015 11:23:34 -0700 -Subject: [PATCH 105/170] clk: bcm2835: Also build the driver for downstream +Subject: [PATCH 100/181] clk: bcm2835: Also build the driver for downstream kernels. Signed-off-by: Eric Anholt @@ -136236,11 +137497,14 @@ index 3fc9506..a1b4cbc 100644 obj-$(CONFIG_COMMON_CLK_IPROC) += clk-ns2.o obj-$(CONFIG_ARCH_BCM_CYGNUS) += clk-cygnus.o obj-$(CONFIG_ARCH_BCM_NSP) += clk-nsp.o +-- +2.5.0 -From 0dbc0fe760a54bbcff587657062df49dc0eaf2b9 Mon Sep 17 00:00:00 2001 + +From 945df921aad68bb106b754366d8251cbcfd402a1 Mon Sep 17 00:00:00 2001 From: Holger Steinhaus Date: Sat, 14 Nov 2015 18:37:43 +0100 -Subject: [PATCH 106/170] dts: Added overlay for gpio_ir_recv driver +Subject: [PATCH 101/181] dts: Added overlay for gpio_ir_recv driver --- arch/arm/boot/dts/overlays/Makefile | 1 + @@ -136262,7 +137526,7 @@ index fc09bfb..ebc3354 100644 dtb-$(RPI_DT_OVERLAYS) += hifiberry-amp-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += hifiberry-dac-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index f5302b2..409aee1 100644 +index 1fa98ce..b4578cc 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -196,6 +196,22 @@ Params: int_pin GPIO used for INT (default 25) @@ -136348,11 +137612,14 @@ index 0000000..a2d6bc7 + rc-map-name = <&gpio_ir>,"linux,rc-map-name"; // default rc map + }; +}; +-- +2.5.0 -From 938b09ce6c6736d0861c2c9eec3a7e739585b589 Mon Sep 17 00:00:00 2001 + +From a7ae8a5175cb8a8ee7132524ec1888762bd79272 Mon Sep 17 00:00:00 2001 From: Alistair Buxton Date: Sun, 1 Nov 2015 22:27:56 +0000 -Subject: [PATCH 107/170] Build i2c_gpio module and add a device tree overlay +Subject: [PATCH 102/181] Build i2c_gpio module and add a device tree overlay to configure it. --- @@ -136377,7 +137644,7 @@ index ebc3354..e15d55c 100644 dtb-$(RPI_DT_OVERLAYS) += iqaudio-dac-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += iqaudio-dacplus-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 409aee1..d278305 100644 +index b4578cc..9362443 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -287,9 +287,20 @@ Params: speed Display SPI bus speed @@ -136460,11 +137727,14 @@ index d6aa058..51dc019 100644 CONFIG_SPI=y CONFIG_SPI_BCM2835=m CONFIG_SPI_SPIDEV=y +-- +2.5.0 -From a4b5aa412585674d4a4f2ba7c0d818fd796f51c3 Mon Sep 17 00:00:00 2001 + +From f29303a45cafa1f0f3ab8852aae3e2bf61972753 Mon Sep 17 00:00:00 2001 From: mwilliams03 Date: Sun, 18 Oct 2015 17:07:24 -0700 -Subject: [PATCH 108/170] New overlay for PiScreen2r +Subject: [PATCH 103/181] New overlay for PiScreen2r --- arch/arm/boot/dts/overlays/Makefile | 1 + @@ -136486,7 +137756,7 @@ index e15d55c..8595b14 100644 dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += pwm-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index d278305..3116d1a 100644 +index 9362443..0a21248 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -425,6 +425,20 @@ Params: speed Display SPI bus speed @@ -136616,11 +137886,14 @@ index 0000000..7c018e0 + }; +}; + +-- +2.5.0 -From 1a4fac1ea6bb33a963b06406f6f44b527daa3a90 Mon Sep 17 00:00:00 2001 + +From ca96022c26315bd80bf66a85e7ca2794eb8393ef Mon Sep 17 00:00:00 2001 From: Ondrej Wisniewski Date: Fri, 6 Nov 2015 15:01:28 +0100 -Subject: [PATCH 109/170] dts: Added overlay for Adafruit PiTFT 2.8" capacitive +Subject: [PATCH 104/181] dts: Added overlay for Adafruit PiTFT 2.8" capacitive touch screen --- @@ -136643,7 +137916,7 @@ index 8595b14..7d747bc 100644 dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += pwm-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 3116d1a..950b6c5 100644 +index 0a21248..422a0d4 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -439,6 +439,28 @@ Params: speed Display SPI bus speed @@ -136769,11 +138042,14 @@ index 0000000..48920e9 + touch-swapxy = <&ft6236>,"touchscreen-swapped-x-y?"; + }; +}; +-- +2.5.0 -From 660ba9173ca14b48d7cd2f69ff45e67ebe4d947a Mon Sep 17 00:00:00 2001 + +From a09649ae76c49375c6a5383d6135b94ad17e320f Mon Sep 17 00:00:00 2001 From: Stuart MacLean Date: Fri, 2 Oct 2015 15:12:59 +0100 -Subject: [PATCH 110/170] Add support for the HiFiBerry DAC+ Pro. +Subject: [PATCH 105/181] Add support for the HiFiBerry DAC+ Pro. The HiFiBerry DAC+ and DAC+ Pro products both use the existing bcm sound driver with the DAC+ Pro having a special clock device driver representing the two high precision oscillators. @@ -136788,7 +138064,7 @@ An addition bug fix is included for the PCM512x codec where by the physical size create mode 100644 drivers/clk/clk-hifiberry-dacpro.c diff --git a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts -index deb9c625..f923a48 100644 +index deb9c62..f923a48 100644 --- a/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts +++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-overlay.dts @@ -6,6 +6,16 @@ @@ -137307,7 +138583,7 @@ index 11e4f39..a6b651c 100644 ret = snd_soc_register_card(&snd_rpi_hifiberry_dacplus); diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c -index 047c489..090fe0ee 100644 +index 047c489..090fe0e 100644 --- a/sound/soc/codecs/pcm512x.c +++ b/sound/soc/codecs/pcm512x.c @@ -854,7 +854,8 @@ static int pcm512x_set_dividers(struct snd_soc_dai *dai, @@ -137320,11 +138596,14 @@ index 047c489..090fe0ee 100644 if (lrclk_div == 0) { dev_err(dev, "No LRCLK?\n"); return -EINVAL; +-- +2.5.0 -From 14b6c7013e62b3917ce73841dc8e379d011d37a5 Mon Sep 17 00:00:00 2001 + +From 57eb3eb134976cff7cb766db8a56c9f15f056677 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 5 Oct 2015 10:47:45 +0100 -Subject: [PATCH 111/170] BCM270X_DT: Add at86rf233 overlay +Subject: [PATCH 106/181] BCM270X_DT: Add at86rf233 overlay Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0. @@ -137349,7 +138628,7 @@ index 7d747bc..be9dead 100644 dtb-$(RPI_DT_OVERLAYS) += dht11-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += enc28j60-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 950b6c5..04e55ce 100644 +index 422a0d4..d0ef256 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -69,13 +69,14 @@ DT parameters: @@ -137458,11 +138737,14 @@ index 0000000..0460269 + trim = <&lowpan0>, "xtal-trim.0"; + }; +}; +-- +2.5.0 -From d33b3717e86cd6aa28c58d465a22e6c11a66bc13 Mon Sep 17 00:00:00 2001 + +From 43ee56116ee9233c9ad2838252ff2499f7db3d8b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 -Subject: [PATCH 112/170] mm: Remove the PFN busy warning +Subject: [PATCH 107/181] mm: Remove the PFN busy warning See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is expected sometimes when using CMA. However, that commit still spams @@ -137486,11 +138768,14 @@ index 9d666df..b682acc 100644 ret = -EBUSY; goto done; } +-- +2.5.0 -From a71d6ebfcbc401e520fa4a5aa185d027dfbe5ce1 Mon Sep 17 00:00:00 2001 + +From 6a81b9ddd3d2d3f8a9da194a160ccaba0ef93192 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 19 Nov 2014 12:06:38 -0800 -Subject: [PATCH 113/170] drm: Put an optional field in the driver struct for +Subject: [PATCH 108/181] drm: Put an optional field in the driver struct for GEM obj struct size. This allows a driver to derive from the CMA object without copying all @@ -137531,11 +138816,14 @@ index 0a271ca..54f5469 100644 const struct drm_ioctl_desc *ioctls; int num_ioctls; const struct file_operations *fops; +-- +2.5.0 -From 1c343ed1f86866d2625518774536bbef77f7a20a Mon Sep 17 00:00:00 2001 + +From a08b2f51277e2c266fad2d4f2402c57a3ec043db Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 30 Oct 2015 10:09:02 -0700 -Subject: [PATCH 114/170] drm/vc4: Add an interface for capturing the GPU state +Subject: [PATCH 109/181] drm/vc4: Add an interface for capturing the GPU state after a hang. This can be parsed with vc4-gpu-tools tools for trying to figure out @@ -137808,7 +139096,7 @@ index 0cea723..d90c664 100644 + vc4_free_hang_state(dev, vc4->hang_state); } diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h -index 499daae5..4a8d19f 100644 +index 499daae..4a8d19f 100644 --- a/include/uapi/drm/vc4_drm.h +++ b/include/uapi/drm/vc4_drm.h @@ -32,6 +32,7 @@ @@ -137875,11 +139163,14 @@ index 499daae5..4a8d19f 100644 +}; + #endif /* _UAPI_VC4_DRM_H_ */ +-- +2.5.0 -From 431be9af0aa88da94986effdff649330cfde1f5a Mon Sep 17 00:00:00 2001 + +From 377cbef6201b87f57c21814e264b9fc04fc6df26 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 4 Dec 2015 11:35:34 -0800 -Subject: [PATCH 115/170] drm/vc4: Update a bunch of code to match upstream +Subject: [PATCH 110/181] drm/vc4: Update a bunch of code to match upstream submission. This gets almost everything matching, except for the MSAA support and @@ -138431,7 +139722,7 @@ index e8192b4..22061ae 100644 .desc = DRIVER_DESC, .date = DRIVER_DATE, diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index 24845c1..53dfa8df 100644 +index 24845c1..53dfa8d 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -72,6 +72,9 @@ struct vc4_dev { @@ -138633,7 +139924,7 @@ index 2082713..f95f2df 100644 } } diff --git a/drivers/gpu/drm/vc4/vc4_packet.h b/drivers/gpu/drm/vc4/vc4_packet.h -index 9757bc8..cee38aad 100644 +index 9757bc8..cee38aa 100644 --- a/drivers/gpu/drm/vc4/vc4_packet.h +++ b/drivers/gpu/drm/vc4/vc4_packet.h @@ -27,60 +27,60 @@ @@ -139340,7 +140631,7 @@ index cf35f58..29a222f 100644 struct drm_device *drm = dev_get_drvdata(master); struct vc4_dev *vc4 = to_vc4_dev(drm); diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c -index ff3b62f..e44e35539 100644 +index ff3b62f..e44e355 100644 --- a/drivers/gpu/drm/vc4/vc4_validate.c +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -48,7 +48,6 @@ @@ -139798,11 +141089,14 @@ index 54f5469..987c25a 100644 const struct drm_ioctl_desc *ioctls; int num_ioctls; const struct file_operations *fops; +-- +2.5.0 -From 7d4ed9f40e9484ded3965b13fbb7914a1daf85d7 Mon Sep 17 00:00:00 2001 + +From ff6f0a965d679a085b81211dcc4ff64af72cf7cf Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 11 Dec 2015 19:45:03 -0800 -Subject: [PATCH 116/170] drm: Use the driver's gem_object_free function from +Subject: [PATCH 111/181] drm: Use the driver's gem_object_free function from CMA helpers. VC4 wraps the CMA objects in its own structures, so it needs to do its @@ -139862,11 +141156,14 @@ index 0f7b00b..e5df53b 100644 return ERR_PTR(ret); } +-- +2.5.0 -From 522e6f9cc4376fe49e8b41b40e7ddb98cf385a9e Mon Sep 17 00:00:00 2001 + +From 9ac5eb4f062ffc5077d5e022231d7f05c744a13d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 17 Jul 2015 13:15:50 -0700 -Subject: [PATCH 117/170] drm/vc4: Add support for MSAA rendering. +Subject: [PATCH 112/181] drm/vc4: Add support for MSAA rendering. For MSAA, you set a bit in the binner that halves the size of tiles in each direction, so you can pack 4 samples per pixel in the tile @@ -139885,7 +141182,7 @@ Signed-off-by: Eric Anholt 4 files changed, 258 insertions(+), 55 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_packet.h b/drivers/gpu/drm/vc4/vc4_packet.h -index cee38aad..0f31cc0 100644 +index cee38aa..0f31cc0 100644 --- a/drivers/gpu/drm/vc4/vc4_packet.h +++ b/drivers/gpu/drm/vc4/vc4_packet.h @@ -123,6 +123,11 @@ enum vc4_packet { @@ -140341,7 +141638,7 @@ index 3516354..8f2ec57 100644 return -EINVAL; } diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c -index e44e35539..2f22f19 100644 +index e44e355..2f22f19 100644 --- a/drivers/gpu/drm/vc4/vc4_validate.c +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -400,9 +400,8 @@ validate_tile_binning_config(VALIDATE_ARGS) @@ -140389,11 +141686,14 @@ index 4a8d19f..49cd992 100644 uint32_t clear_color[2]; uint32_t clear_z; uint8_t clear_s; +-- +2.5.0 -From 50a1843ffd2e6f408dcb6a64ca0a2ef3b062fd5a Mon Sep 17 00:00:00 2001 + +From ea9755a1fb4cd219b41fe7e42a5866a1394f4e35 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 8 Dec 2015 14:00:43 -0800 -Subject: [PATCH 118/170] drm/vc4: A few more non-functional changes to sync to +Subject: [PATCH 113/181] drm/vc4: A few more non-functional changes to sync to upstream. At this point all that's left is the force-enable of HDMI connector, @@ -140407,7 +141707,7 @@ Signed-off-by: Eric Anholt 2 files changed, 92 insertions(+), 92 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c -index 29a222f..4d103f7f 100644 +index 29a222f..4d103f7 100644 --- a/drivers/gpu/drm/vc4/vc4_v3d.c +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -109,7 +109,7 @@ static const struct { @@ -140736,11 +142036,14 @@ index 49cd992..eeb37e3 100644 }; #endif /* _UAPI_VC4_DRM_H_ */ +-- +2.5.0 -From 0a373a81664b9e9b8994512fb3d15ed296526e89 Mon Sep 17 00:00:00 2001 + +From bac734eadd3c4408fc8c4d1e9b152b9c8f4ae5d7 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 15 Dec 2015 23:46:32 +0000 -Subject: [PATCH 119/170] drm/vc4: Use "hpd-gpios" for HDMI GPIO, like what +Subject: [PATCH 114/181] drm/vc4: Use "hpd-gpios" for HDMI GPIO, like what landed upstream. Signed-off-by: Eric Anholt @@ -140761,11 +142064,14 @@ index cf5d5c9..da37483 100644 clocks = <&cprman BCM2835_PLLH_PIX>, <&cprman BCM2835_CLOCK_HSM>; clock-names = "pixel", "hdmi"; +-- +2.5.0 -From f8453aacbe60712c31c57580a126017b798bd339 Mon Sep 17 00:00:00 2001 + +From 778a220fc85916879ddf4cfe08132e946a6c4550 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 7 Dec 2015 12:35:01 -0800 -Subject: [PATCH 120/170] drm/vc4: Synchronize validation code for v2 +Subject: [PATCH 115/181] drm/vc4: Synchronize validation code for v2 submission upstream. Signed-off-by: Eric Anholt @@ -140777,7 +142083,7 @@ Signed-off-by: Eric Anholt 4 files changed, 135 insertions(+), 196 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h -index 53dfa8df..ed93fa78 100644 +index 53dfa8d..ed93fa7 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -189,17 +189,6 @@ to_vc4_encoder(struct drm_encoder *encoder) @@ -141381,11 +142687,14 @@ index 2f22f19..0fb5b99 100644 if (ret) return ret; } +-- +2.5.0 -From 280bea89916813978b81811c2769411d438eb52f Mon Sep 17 00:00:00 2001 + +From cba722c2963998efb459b5b35fb876d5b2664866 Mon Sep 17 00:00:00 2001 From: janluca Date: Sun, 27 Dec 2015 14:34:04 +0100 -Subject: [PATCH 121/170] MMC: Do not use mmc_debug if CONFIG_MMC_BCM2835 is +Subject: [PATCH 116/181] MMC: Do not use mmc_debug if CONFIG_MMC_BCM2835 is not set If CONFIG_MMC_BCM2835 was not set the compiling of the kernel failed @@ -141421,11 +142730,14 @@ index 87ae2e9..b79fe14 100644 +#endif } EXPORT_SYMBOL(mmc_fixup_device); +-- +2.5.0 -From d0390ae0ff774d8e7b5b4d5f38c33726354996bc Mon Sep 17 00:00:00 2001 + +From 27cf2fb0f8e2e53cb764741998f9f90b3c645960 Mon Sep 17 00:00:00 2001 From: Devon Fyson Date: Wed, 30 Dec 2015 16:40:47 -0500 -Subject: [PATCH 122/170] Extend clock timeout, fix modprobe baudrate +Subject: [PATCH 117/181] Extend clock timeout, fix modprobe baudrate parameter. Set the BSC_CLKT clock streching timeout to 35ms as per SMBus specs.\n- Increase priority of baudrate parameter passed to modprobe (in /etc/modprobe.d/*.conf or command line). Currently custom baudrates don't work because they are overridden by clock-frequency in the platform_device passed to the function. @@ -141532,11 +142844,14 @@ index 85f411c..b152639 100644 dev_info(&pdev->dev, "BSC%d Controller at 0x%08lx (irq %d) (baudrate %d)\n", pdev->id, (unsigned long)regs->start, irq, baudrate); +-- +2.5.0 -From 62dca1937fc3acfe4b6471607b7a4d58c34e73b7 Mon Sep 17 00:00:00 2001 + +From 94431f3b3e533e2e0d76bf0d8b1c7327afffaff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Thu, 31 Dec 2015 16:44:58 +0100 -Subject: [PATCH 123/170] bcm270x_dt: Add dwc2 and dwc-otg overlays +Subject: [PATCH 118/181] bcm270x_dt: Add dwc2 and dwc-otg overlays --- arch/arm/boot/dts/overlays/Makefile | 2 ++ @@ -141561,7 +142876,7 @@ index be9dead..aaa8976 100644 dtb-$(RPI_DT_OVERLAYS) += enc28j60-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += gpio-ir-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 04e55ce..c70c1e59 100644 +index d0ef256..4d3f974 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -198,6 +198,27 @@ Params: gpiopin GPIO connected to the sensor's DATA output. @@ -141653,11 +142968,14 @@ index 0000000..90c9811 + g-tx-fifo-size = <&usb>,"g-tx-fifo-size:0"; + }; +}; +-- +2.5.0 -From 162dd00041afb2995f90a928ea80aeaa0d141ce5 Mon Sep 17 00:00:00 2001 + +From 5878e13f1e5e7bde84719845c5e2fd555a2e776e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 4 Jan 2016 14:42:17 +0000 -Subject: [PATCH 124/170] BCM270X_DT: Add the sdtweak overlay, for tuning +Subject: [PATCH 119/181] BCM270X_DT: Add the sdtweak overlay, for tuning sdhost The sdhost overlay declares the sdhost interface and allows parameters @@ -141684,7 +143002,7 @@ index aaa8976..4d9d640 100644 dtb-$(RPI_DT_OVERLAYS) += smi-nand-overlay.dtb dtb-$(RPI_DT_OVERLAYS) += smi-overlay.dtb diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index c70c1e59..00f03fc 100644 +index 4d3f974..1c6b000 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -635,6 +635,20 @@ Params: overclock_50 Clock (in MHz) to use when the MMC framework @@ -141735,11 +143053,14 @@ index 0000000..74c168d + debug = <&frag1>,"brcm,debug?"; + }; +}; +-- +2.5.0 -From b07c427a7732a0fabcf521085e0fd61b0ef9047c Mon Sep 17 00:00:00 2001 + +From a5fec20719036c4d9b709607c2d991c03bf6404d Mon Sep 17 00:00:00 2001 From: Andrew Litt Date: Mon, 11 Jan 2016 07:54:21 +0000 -Subject: [PATCH 125/170] bcm2835-mmc: Don't override bus width capabilities +Subject: [PATCH 120/181] bcm2835-mmc: Don't override bus width capabilities from devicetree Take out the force setting of the MMC_CAP_4_BIT_DATA host capability @@ -141762,11 +143083,14 @@ index 43aed6e..104f93e 100644 mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD; +-- +2.5.0 -From f74652d026105ecc4a87b581a9c1c89a6e504d2c Mon Sep 17 00:00:00 2001 + +From 0a0dbcae21f26404b039ef63f920ccb7c637fd3f Mon Sep 17 00:00:00 2001 From: Andrew Litt Date: Mon, 11 Jan 2016 07:55:54 +0000 -Subject: [PATCH 126/170] SDIO-overlay: add bus_width parameter +Subject: [PATCH 121/181] SDIO-overlay: add bus_width parameter Allow setting of the SDIO bus width capability of the bcm2835-mmc host. This is helpful when only a 1 bit wide bus is connected @@ -141778,7 +143102,7 @@ mode. 2 files changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 00f03fc..aa57078 100644 +index 1c6b000..34a1b7f 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -634,6 +634,8 @@ Params: overclock_50 Clock (in MHz) to use when the MMC framework @@ -141809,35 +143133,14 @@ index afc8742..7935e7a 100644 + bus_width = <&sdio_mmc>,"bus-width:0"; }; }; +-- +2.5.0 -From 232754cb0ecd1967a8b72d6bd05467843d65a441 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Fri, 8 Jan 2016 13:42:06 +0000 -Subject: [PATCH 127/170] FIXUP BCM270X_DT: "random" (HWRNG) dtparam default is - on ---- - arch/arm/boot/dts/overlays/README | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index aa57078..34a1b7f 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -110,7 +110,7 @@ Params: - (default "off") - - random Set to "on" to enable the hardware random -- number generator (default "off") -+ number generator (default "on") - - uart0 Set to "off" to disable uart0 (default "on") - - -From 320bdec200197f074541e3999fa4b87889c5eb18 Mon Sep 17 00:00:00 2001 +From d264604314c69b8a15ad15d998dba87cc13ec137 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:41:45 +0100 -Subject: [PATCH 128/170] bcm2835: extend allowed range of channels and +Subject: [PATCH 122/181] bcm2835: extend allowed range of channels and samplerates Allow everything the videocore accepts. @@ -141873,11 +143176,14 @@ index 8c86375..31e3131 100755 .buffer_bytes_max = 128 * 1024, .period_bytes_min = 1 * 1024, .period_bytes_max = 128 * 1024, +-- +2.5.0 -From 7e634c8f8fe70286e0b8b404494d3143aa7bc3fc Mon Sep 17 00:00:00 2001 + +From 690cd611b67c4982d34c270a6887e31bfc10e756 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:42:18 +0100 -Subject: [PATCH 129/170] bcm2835: restrict channels*rate to 8*960000 +Subject: [PATCH 123/181] bcm2835: restrict channels*rate to 8*960000 This is required at least for SPDIF. If the bitrate goes above, videocore will either resample the audio or corrupt it due to @@ -141956,11 +143262,14 @@ index 31e3131..b17ed32 100755 chip->alsa_stream[idx] = alsa_stream; chip->opened |= (1 << idx); +-- +2.5.0 -From dcead34f063fc8c37ebfcfc9ab6696060c336bad Mon Sep 17 00:00:00 2001 + +From e78f52b9cbc932cc63cabf9c676827c979178144 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:42:48 +0100 -Subject: [PATCH 130/170] rpi: update vc_vchi_audioserv_defs.h +Subject: [PATCH 124/181] rpi: update vc_vchi_audioserv_defs.h Add audioserv 3 extensions. The changes were taken from the paste linked here: @@ -142025,11 +143334,14 @@ index af3e6eb..5f4409f 100644 -#endif // _VC_AUDIO_DEFS_H_ +#endif // _VC_AUDIO_DEFS_H_ \ No newline at end of file +-- +2.5.0 -From 7c7d2db494fbf1fd0b014dab0bb4c5c740f90442 Mon Sep 17 00:00:00 2001 + +From 91e518f65dd3f3a114a76ba91e01d175e4538c0f Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:43:12 +0100 -Subject: [PATCH 131/170] bcm2835: implement channel map API +Subject: [PATCH 125/181] bcm2835: implement channel map API Report all layouts supported by the HDMI protocol to userspace. Make the videocore set the correct layout according to the @@ -142399,7 +143711,7 @@ index b17ed32..1067460 100755 /* in preparation of the stream, set the controls (volume level) of the stream */ diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c -index 3de3094..8ecd2d73 100755 +index 3de3094..8ecd2d7 100755 --- a/sound/arm/bcm2835-vchiq.c +++ b/sound/arm/bcm2835-vchiq.c @@ -570,6 +570,8 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, @@ -142455,11 +143767,14 @@ index 0f71c5d..997fb69 100755 int bcm2835_audio_open(bcm2835_alsa_stream_t * alsa_stream); int bcm2835_audio_close(bcm2835_alsa_stream_t * alsa_stream); int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, +-- +2.5.0 -From 2a64337156d0f84537e04338b2ebd89eb6ec1f09 Mon Sep 17 00:00:00 2001 + +From f7e8641a04d664a8684859ab117d272414b76540 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:43:35 +0100 -Subject: [PATCH 132/170] bcm2835: access controls under the audio mutex +Subject: [PATCH 126/181] bcm2835: access controls under the audio mutex I don't think the ALSA framework provides any kind of automatic synchronization within the control callbacks. We most likely need @@ -142697,11 +144012,14 @@ index 1067460..48da3bb 100755 audio_info(" .. OUT\n"); return 0; } +-- +2.5.0 -From 6e781f631f7e23f7d88256d020d83950c9bf213a Mon Sep 17 00:00:00 2001 + +From 8a4d7e3381dfed3d79887b5ede5f7fe6f0b2411d Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:44:03 +0100 -Subject: [PATCH 133/170] bcm2835: always use 2/4/8 channels for multichannel +Subject: [PATCH 127/181] bcm2835: always use 2/4/8 channels for multichannel layouts Pad the unused channels with NA. This means userspace needs to write @@ -142839,11 +144157,14 @@ index 5b8e6bd2..dec052b 100755 { .ca_index = 0x31, .speakers = { FRW, FLW, RR, RL, FC, LFE, FR, FL } }, }; +-- +2.5.0 -From aaa2a41f44a0fc141b9a983a5f9f30bb8b6dbc8b Mon Sep 17 00:00:00 2001 + +From 0d4d206ecfc2d611c63fcfebafdf987ef815441b Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:44:24 +0100 -Subject: [PATCH 134/170] bcm2835: only allow stereo if analogue jack is +Subject: [PATCH 128/181] bcm2835: only allow stereo if analogue jack is selected Sending more than 2 channels to videocore while outputting to analogue @@ -142904,11 +144225,14 @@ index dec052b..e930718 100755 memset(remap, 0, sizeof(remap)); for (x = 0; x < substream->runtime->channels; x++) { int sp = ucontrol->value.integer.value[x]; +-- +2.5.0 -From 2c967fa0f5b0d10c86c796098574ba09ffe66cd5 Mon Sep 17 00:00:00 2001 + +From 29027fb2bc30261b03e5d47b623325dcee03d5da Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Jan 2016 19:44:47 +0100 -Subject: [PATCH 135/170] bcm2835: interpolate audio delay +Subject: [PATCH 129/181] bcm2835: interpolate audio delay It appears the GPU only sends us a message all 10ms to update the playback progress. Other than this, the playback position @@ -142999,11 +144323,14 @@ index 997fb69..20ef108 100755 uint32_t enable_fifo_irq; irq_handler_t fifo_irq_handler; +-- +2.5.0 -From 205e27a7f94a5531764cc517ce43623361ca466c Mon Sep 17 00:00:00 2001 + +From 883e12a918bfdc9c2b7224277105f3d1ce0a5300 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 19 Jan 2016 17:16:38 +0000 -Subject: [PATCH 136/170] bcm2835-sdhost: Add workaround for odd behaviour on +Subject: [PATCH 130/181] bcm2835-sdhost: Add workaround for odd behaviour on some cards For reasons not understood, the sdhost driver fails when reading @@ -143139,11 +144466,14 @@ index da089985..309633c 100644 return blk_size; } +-- +2.5.0 -From c5d24cba808118647d01a1869cf1c46d0658d78b Mon Sep 17 00:00:00 2001 + +From 95db92b00ba5ac07ee2491de54ef53aa6ed30509 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 22 Jan 2016 16:03:24 +0000 -Subject: [PATCH 137/170] bcm2835-sdhost: Add debug_flags dtparam +Subject: [PATCH 131/181] bcm2835-sdhost: Add debug_flags dtparam Bit zero disables the single-read-sectors map: @@ -143266,11 +144596,14 @@ index 309633c..ef9b1e6 100644 if (host->allow_dma) { if (node) { host->dma_chan_tx = +-- +2.5.0 -From 1a451a35b70fa9ed32f23a4ba925e5b2c2c3af78 Mon Sep 17 00:00:00 2001 + +From 240f5cbf012ac9d8eaa0101d7023f7fff1dadf1d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 25 Jan 2016 09:12:06 +0000 -Subject: [PATCH 138/170] BCM270X_DT: Add sdio_overclock parameter to sdio +Subject: [PATCH 132/181] BCM270X_DT: Add sdio_overclock parameter to sdio overlay The sdio_overclock parameter is like the overclock_50 parameter, i.e. @@ -143340,11 +144673,14 @@ index 7935e7a..398bd81 100644 + sdio_overclock = <&sdio_mmc>,"brcm,overclock-50:0"; }; }; +-- +2.5.0 -From 49ff16d7af98e6191d6dd60ba75b711612e948ab Mon Sep 17 00:00:00 2001 + +From e1e5423958165e4cf9e805c9196caa1fd37a53a5 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Thu, 21 Jan 2016 18:10:16 +0100 -Subject: [PATCH 139/170] rtc: ds1307: add support for the DT property +Subject: [PATCH 133/181] rtc: ds1307: add support for the DT property 'wakeup-source' For RTC chips with no IRQ directly connected to the SoC, the RTC chip @@ -143422,7 +144758,7 @@ index 1cb13fee..28ca4bf 100644 ds1307->regs[0] |= DS1337_BIT_INTCN | bbsqi_bitpos[ds1307->type]; ds1307->regs[0] &= ~(DS1337_BIT_A2IE | DS1337_BIT_A1IE); -@@ -1144,6 +1161,14 @@ static int ds1307_probe(struct i2c_client *client, +@@ -1144,6 +1161,14 @@ read_rtc: return PTR_ERR(ds1307->rtc); } @@ -143437,11 +144773,14 @@ index 1cb13fee..28ca4bf 100644 if (want_irq) { err = devm_request_threaded_irq(&client->dev, client->irq, NULL, irq_handler, +-- +2.5.0 -From e382e888be3f59b0ba3645809ae686947313e0c1 Mon Sep 17 00:00:00 2001 + +From b8a8384aa7ff13db75ddfdf3a53e2f955c3adda2 Mon Sep 17 00:00:00 2001 From: vitalogy Date: Tue, 19 Jan 2016 07:02:02 +0100 -Subject: [PATCH 140/170] dt-overlay: add wittypi-overlay.dts +Subject: [PATCH 134/181] dt-overlay: add wittypi-overlay.dts --- arch/arm/boot/dts/overlays/wittypi-overlay.dts | 44 ++++++++++++++++++++++++++ @@ -143498,42 +144837,14 @@ index 0000000..be5987d + }; + +}; +-- +2.5.0 -From 6dcfc3daab7c1c459b36261163b4e1dc15a6e965 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Wed, 3 Feb 2016 16:12:54 +0000 -Subject: [PATCH 141/170] BCM270X_DT: Disable DMA for bcm2835-sdhost on Pi2 -This is an interim patch to verify that problems seen with -some cards can be worked around at the expense of an increased -CPU load by forcing PIO mode. - -Although this could have used the brcm,force-pio attribute, that -is a boolean (true if present, false if absent) and attributes -can't be deleted by overlays. Instead, make brcm,pio-limit -unfeasibly high instead to allow DMA to be re-enabled using the -pio_limit parameter of the sdhost or sdtweak overlays. ---- - arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -index 5206ba2..0b68db5 100644 ---- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -+++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -@@ -43,6 +43,7 @@ - pinctrl-names = "default"; - pinctrl-0 = <&sdhost_pins>; - bus-width = <4>; -+ brcm,pio-limit = <0x7fffffff>; - status = "okay"; - }; - - -From 7519a79f61a67792e238a118db58600fb5f60ec8 Mon Sep 17 00:00:00 2001 +From 2254593d4403b6afd6e13df0ffb23a2a0d8bc298 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 19 Jan 2016 16:28:05 +0000 -Subject: [PATCH 142/170] FIXUP i2c_bcm2708: Don't change module baudrate +Subject: [PATCH 135/181] FIXUP i2c_bcm2708: Don't change module baudrate parameter Overwriting the baudrate module parameter creates an apparent @@ -143631,11 +144942,14 @@ index b152639..c9b8e5c 100644 return 0; +-- +2.5.0 -From f2d36d57d7e17b9f44ff914824df5b150eb9e3bd Mon Sep 17 00:00:00 2001 + +From 9e58877d8b11820ade53790c92447940c57f7bed Mon Sep 17 00:00:00 2001 From: Digital Dreamtime Date: Thu, 4 Feb 2016 14:14:44 +0000 -Subject: [PATCH 143/170] Allow up to 24dB digital gain to be applied when +Subject: [PATCH 136/181] Allow up to 24dB digital gain to be applied when using IQAudIO DAC+ 24db_digital_gain DT param can be used to specify that PCM512x @@ -143737,11 +145051,14 @@ index 37038d4..124d7a9 100644 } ret = snd_soc_register_card(&snd_rpi_iqaudio_dac); +-- +2.5.0 -From 8a189f18de820c6facd00ba2db97ba7c4a75156f Mon Sep 17 00:00:00 2001 + +From 1e95436cb4b6a2f7faf018c9c3198a46976ecff1 Mon Sep 17 00:00:00 2001 From: Digital Dreamtime Date: Thu, 4 Feb 2016 20:04:00 +0000 -Subject: [PATCH 144/170] Limit PCM512x "Digital" gain to 0dB by default with +Subject: [PATCH 137/181] Limit PCM512x "Digital" gain to 0dB by default with HiFiBerry DAC+ 24db_digital_gain DT param can be used to specify that PCM512x @@ -143842,18 +145159,21 @@ index a6b651c..153dbcd 100644 } ret = snd_soc_register_card(&snd_rpi_hifiberry_dacplus); +-- +2.5.0 -From 14ba431031afa218c0db43a7c20fe54916f8d357 Mon Sep 17 00:00:00 2001 + +From aa67cf40d9efd655f51d8159ad81677f2351d5f4 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 8 Feb 2016 09:46:33 +0000 -Subject: [PATCH 145/170] BCM270X_DT: Adjust overlay README formatting +Subject: [PATCH 138/181] BCM270X_DT: Adjust overlay README formatting --- - arch/arm/boot/dts/overlays/README | 420 +++++++++++++++++++------------------- - 1 file changed, 210 insertions(+), 210 deletions(-) + arch/arm/boot/dts/overlays/README | 414 +++++++++++++++++++------------------- + 1 file changed, 207 insertions(+), 207 deletions(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 296184f..ec1ae91 100644 +index 296184f..f987565 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -83,58 +83,58 @@ Name: @@ -144369,12 +145689,8 @@ index 296184f..ec1ae91 100644 Name: pwm -@@ -550,12 +550,12 @@ Info: Configures a single PWM channel - Pins 12 and 13 might be better choices on an A+, B+ or Pi2. - 2) The onboard analogue audio output uses both PWM channels. - 3) So be careful mixing audio and PWM. -- 4) Currently the clock must have been enabled and configured -+ 4) Currently the clockmust have been enabled and configured +@@ -553,9 +553,9 @@ Info: Configures a single PWM channel + 4) Currently the clock must have been enabled and configured by other means. Load: dtoverlay=pwm,= -Params: pin Output pin (default 18) - see table @@ -144386,12 +145702,8 @@ index 296184f..ec1ae91 100644 Name: pwm-2chan -@@ -569,14 +569,14 @@ Info: Configures both PWM channels - Pins 12 and 13 might be better choices on an A+, B+ or Pi2. - 2) The onboard analogue audio output uses both PWM channels. - 3) So be careful mixing audio and PWM. -- 4) Currently the clock must have been enabled and configured -+ 4) Currently the clockmust have been enabled and configured +@@ -572,11 +572,11 @@ Info: Configures both PWM channels + 4) Currently the clock must have been enabled and configured by other means. Load: dtoverlay=pwm-2chan,= -Params: pin Output pin (default 18) - see table @@ -144552,15 +145864,6 @@ index 296184f..ec1ae91 100644 Name: vc4-kms-v3d -@@ -753,7 +753,7 @@ Params: - - Name: vga666 - Info: Overlay for the Fen Logic VGA666 board -- This uses GPIOs 2-21 (so no I2C), and activates the output 2-3 seconds -+ This uses GPIOs 2-21 (sono I2C), and activates the output 2-3 seconds - after the kernel has started. - Load: dtoverlay=vga666 - Params: @@ -763,22 +763,22 @@ Name: w1-gpio Info: Configures the w1-gpio Onewire interface module. Use this overlay if you *don't* need a GPIO to drive an external pullup. @@ -144591,53 +145894,14 @@ index 296184f..ec1ae91 100644 Troubleshooting +-- +2.5.0 -From d32795d2be55748552ddacd9b1e47efc61264a98 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Mon, 8 Feb 2016 12:53:44 +0000 -Subject: [PATCH 146/170] FIXUP: Overlay README - Restore spaces deleted in - error ---- - arch/arm/boot/dts/overlays/README | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index ec1ae91..f987565 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -550,7 +550,7 @@ Info: Configures a single PWM channel - Pins 12 and 13 might be better choices on an A+, B+ or Pi2. - 2) The onboard analogue audio output uses both PWM channels. - 3) So be careful mixing audio and PWM. -- 4) Currently the clockmust have been enabled and configured -+ 4) Currently the clock must have been enabled and configured - by other means. - Load: dtoverlay=pwm,= - Params: pin Output pin (default 18) - see table -@@ -569,7 +569,7 @@ Info: Configures both PWM channels - Pins 12 and 13 might be better choices on an A+, B+ or Pi2. - 2) The onboard analogue audio output uses both PWM channels. - 3) So be careful mixing audio and PWM. -- 4) Currently the clockmust have been enabled and configured -+ 4) Currently the clock must have been enabled and configured - by other means. - Load: dtoverlay=pwm-2chan,= - Params: pin Output pin (default 18) - see table -@@ -753,7 +753,7 @@ Params: - - Name: vga666 - Info: Overlay for the Fen Logic VGA666 board -- This uses GPIOs 2-21 (sono I2C), and activates the output 2-3 seconds -+ This uses GPIOs 2-21 (so no I2C), and activates the output 2-3 seconds - after the kernel has started. - Load: dtoverlay=vga666 - Params: - -From be4e718cccf6909072eeab1032b1d9fb6dd92b43 Mon Sep 17 00:00:00 2001 +From 4c6e299647335365360d1ec00890f9d3e67f5340 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 9 Feb 2016 09:52:13 +0000 -Subject: [PATCH 147/170] pinctrl-bcm2835: Fix cut-and-paste error in "pull" +Subject: [PATCH 139/181] pinctrl-bcm2835: Fix cut-and-paste error in "pull" parsing The DT bindings for pinctrl-bcm2835 allow both the function and pull @@ -144661,35 +145925,14 @@ index 640e3b0..32f779e 100644 if (err) goto out; err = bcm2835_pctl_dt_node_to_map_pull(pc, np, pin, +-- +2.5.0 -From 14e35b8cca5bf1f6223ebc6cc4d527645076a3a3 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Thu, 11 Feb 2016 17:30:49 +0000 -Subject: [PATCH 148/170] Revert "BCM270X_DT: Disable DMA for bcm2835-sdhost on - Pi2" -This reverts commit 9c1adcc07a40f762fd4ac580f07646784de135e1. ---- - arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -index 0b68db5..5206ba2 100644 ---- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -+++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -@@ -43,7 +43,6 @@ - pinctrl-names = "default"; - pinctrl-0 = <&sdhost_pins>; - bus-width = <4>; -- brcm,pio-limit = <0x7fffffff>; - status = "okay"; - }; - - -From 5a117bd925d13a305d94eeb28919dedeaa9be17d Mon Sep 17 00:00:00 2001 +From 66f6a5636b2de4fab9c649d6ba5c93a13c360317 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 11 Feb 2016 16:51:01 +0000 -Subject: [PATCH 149/170] bcm2835-sdhost: Major revision +Subject: [PATCH 140/181] bcm2835-sdhost: Major revision This is a significant revision of the bcm2835-sdhost driver. It improves on the original in a number of ways: @@ -146757,11 +148000,14 @@ index ef9b1e6..262180b 100644 static struct platform_driver bcm2835_sdhost_driver = { .probe = bcm2835_sdhost_probe, .remove = bcm2835_sdhost_remove, +-- +2.5.0 -From d15e041e838bd735a7ed3eaa5dbff785213baf6d Mon Sep 17 00:00:00 2001 + +From ceeb5a537186b03a44b4e66f4233035878a0d536 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 12 Feb 2016 15:38:00 +0000 -Subject: [PATCH 150/170] BCM270X_DT: Add dtparams for the SD interface +Subject: [PATCH 141/181] BCM270X_DT: Add dtparams for the SD interface Add new base dtparams sd_overclock, sd_force_pio, sd_pio_limit and sd_debug. @@ -146807,7 +148053,7 @@ index 0445b46..d033ee4 100644 }; }; diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dts b/arch/arm/boot/dts/bcm2708-rpi-cm.dts -index 87c1a54..8bcafb41 100755 +index 87c1a54..8bcafb4 100755 --- a/arch/arm/boot/dts/bcm2708-rpi-cm.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts @@ -97,6 +97,5 @@ @@ -147013,11 +148259,14 @@ index b0b208c..e4a4677 100644 + debug = <&frag0>,"brcm,debug?"; }; }; +-- +2.5.0 -From bc7400cadff6bf33451b124eac2e8bf80ebb0197 Mon Sep 17 00:00:00 2001 + +From eed221b464fbe35d992163b25faddd98c3893f39 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Feb 2016 14:50:25 +0000 -Subject: [PATCH 151/170] dcw_otg: trim xfer length when buffer larger than +Subject: [PATCH 142/181] dcw_otg: trim xfer length when buffer larger than allocated size is received --- @@ -147053,11 +148302,14 @@ index 8db3dfc..d672a76 100644 /* non DWORD-aligned buffer case handling. */ if (hc->align_buff && bytes_transferred && hc->ep_is_in) { dwc_memcpy(urb->buf + urb->actual_length, hc->qh->dw_align_buf, +-- +2.5.0 -From f395ff998f2bde846499b1a0ef84519989dc2d4e Mon Sep 17 00:00:00 2001 + +From 32d6f044dd584154414f9386ec607fb093e658de Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 15 Feb 2016 10:00:27 +0000 -Subject: [PATCH 152/170] bcm2835-sdhost: Restore ATOMIC flag to PIO sg mapping +Subject: [PATCH 143/181] bcm2835-sdhost: Restore ATOMIC flag to PIO sg mapping Allocation problems have been seen in a wireless driver, and this is the only change which might have been responsible. @@ -147088,101 +148340,14 @@ index 262180b..d66385c 100644 sg_miter_start(&host->sg_miter, data->sg, data->sg_len, flags); host->blocks = data->blocks; } +-- +2.5.0 -From d2943c4ee1c52cb2c9802be194ca90442e4fe34f Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 16 Feb 2016 08:47:56 +0000 -Subject: [PATCH 153/170] Revert "Add blk_pos parameter to mmc multi_io_quirk - callback" -This reverts commit aab95f9b10e8c3d32de2bf163b86f220c88214fe. - -The bcm2835-sdhost driver no longer needs this patch. ---- - drivers/mmc/card/block.c | 1 - - drivers/mmc/host/omap_hsmmc.c | 4 +--- - drivers/mmc/host/sh_mobile_sdhi.c | 4 +--- - drivers/mmc/host/tmio_mmc_pio.c | 4 +--- - include/linux/mmc/host.h | 4 +--- - 5 files changed, 4 insertions(+), 13 deletions(-) - -diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c -index b35f0c4..d848616 100644 ---- a/drivers/mmc/card/block.c -+++ b/drivers/mmc/card/block.c -@@ -1510,7 +1510,6 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, - brq->data.blocks = card->host->ops->multi_io_quirk(card, - (rq_data_dir(req) == READ) ? - MMC_DATA_READ : MMC_DATA_WRITE, -- blk_rq_pos(req), - brq->data.blocks); - } - -diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c -index 708d0fa..7fb0753 100644 ---- a/drivers/mmc/host/omap_hsmmc.c -+++ b/drivers/mmc/host/omap_hsmmc.c -@@ -1832,9 +1832,7 @@ static void omap_hsmmc_conf_bus_power(struct omap_hsmmc_host *host) - } - - static int omap_hsmmc_multi_io_quirk(struct mmc_card *card, -- unsigned int direction, -- u32 blk_pos, -- int blk_size) -+ unsigned int direction, int blk_size) - { - /* This controller can't do multiblock reads due to hw bugs */ - if (direction == MMC_DATA_READ) -diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c -index 4f1ccf3..354f4f3 100644 ---- a/drivers/mmc/host/sh_mobile_sdhi.c -+++ b/drivers/mmc/host/sh_mobile_sdhi.c -@@ -170,9 +170,7 @@ static int sh_mobile_sdhi_write16_hook(struct tmio_mmc_host *host, int addr) - } - - static int sh_mobile_sdhi_multi_io_quirk(struct mmc_card *card, -- unsigned int direction, -- u32 blk_pos, -- int blk_size) -+ unsigned int direction, int blk_size) - { - /* - * In Renesas controllers, when performing a -diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c -index 7b730d8..a10fde4 100644 ---- a/drivers/mmc/host/tmio_mmc_pio.c -+++ b/drivers/mmc/host/tmio_mmc_pio.c -@@ -1003,9 +1003,7 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc) - } - - static int tmio_multi_io_quirk(struct mmc_card *card, -- unsigned int direction, -- u32 blk_pos, -- int blk_size) -+ unsigned int direction, int blk_size) - { - struct tmio_mmc_host *host = mmc_priv(card->host); - -diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h -index 105b3e6..ad22ebb 100644 ---- a/include/linux/mmc/host.h -+++ b/include/linux/mmc/host.h -@@ -143,9 +143,7 @@ struct mmc_host_ops { - * I/O. Returns the number of supported blocks for the request. - */ - int (*multi_io_quirk)(struct mmc_card *card, -- unsigned int direction, -- u32 blk_pos, -- int blk_size); -+ unsigned int direction, int blk_size); - }; - - struct mmc_card; - -From ee83592659ae5dc5ceee63790a8cba57ebfa57b3 Mon Sep 17 00:00:00 2001 +From ab3dbb555f24942c1f8874b13faa49c69a6c53f2 Mon Sep 17 00:00:00 2001 From: Craig Roberts Date: Tue, 16 Feb 2016 10:03:42 +0000 -Subject: [PATCH 154/170] Updated smsc95xx driver to check for a valid MAC +Subject: [PATCH 144/181] Updated smsc95xx driver to check for a valid MAC address in eeprom before using smsc95xx.macaddr parameter passed on command line. @@ -147221,18 +148386,21 @@ index 3244a90..7483222 100755 eth_hw_addr_random(dev->net); netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); } +-- +2.5.0 -From 1c43ff69763f4537b76b3248850256da2bda211b Mon Sep 17 00:00:00 2001 + +From d2b1e50cfbc8734b3704c4ac3262f64a6d36e745 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Feb 2016 19:02:31 +0000 -Subject: [PATCH 155/170] dcw_otg: Make trimming messages less noisy +Subject: [PATCH 145/181] dcw_otg: Make trimming messages less noisy --- drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index d672a76..e6b38ac3 100644 +index d672a76..e6b38ac 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -738,7 +738,8 @@ static int update_urb_state_xfer_comp(dwc_hc_t * hc, @@ -147255,11 +148423,14 @@ index d672a76..e6b38ac3 100644 bytes_transferred = urb->length - urb->actual_length; } +-- +2.5.0 -From 7f9781f9875f2aa638d5afdaa9709fa1ef9bda8d Mon Sep 17 00:00:00 2001 + +From 6190bf96baebf2532fcaa052bd5ee46c69ab43b8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 18 Feb 2016 15:28:14 +0000 -Subject: [PATCH 156/170] BCM270X_DT: at86rf233 overlay - drop to 3MHz +Subject: [PATCH 146/181] BCM270X_DT: at86rf233 overlay - drop to 3MHz The consensus is that 6MHz is too fast, but that 3MHz is OK. @@ -147296,11 +148467,14 @@ index 0460269..eab4052 100644 xtal-trim = /bits/ 8 <0xf>; }; }; +-- +2.5.0 -From 5af831a3f879c89c8c0b39c8f88e7600bdc3a765 Mon Sep 17 00:00:00 2001 + +From bcf7c5fca7af4491e899ec9a05c4b3aa2b3de4e5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 19 Feb 2016 12:04:48 +0000 -Subject: [PATCH 157/170] bcm2835-sdhost: Downgrade log message status +Subject: [PATCH 147/181] bcm2835-sdhost: Downgrade log message status --- drivers/mmc/host/bcm2835-sdhost.c | 4 ++-- @@ -147321,11 +148495,14 @@ index d66385c..4f6cab5 100644 timer_base = ioremap_nocache(bus_to_phys + 0x7e003000, SZ_4K); if (!timer_base) pr_err("sdhost: failed to remap timer\n"); +-- +2.5.0 -From e08f6b3aad073d8130d2ec0f8398f55983c0eac8 Mon Sep 17 00:00:00 2001 + +From 0c65f02df13a580f12b25f869df8098e63080a54 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 15 Jan 2016 16:48:27 +0000 -Subject: [PATCH 158/170] config: Enable HCI over UARTs +Subject: [PATCH 148/181] config: Enable HCI over UARTs --- arch/arm/configs/bcm2709_defconfig | 3 +++ @@ -147359,11 +148536,14 @@ index 51dc019..4368f0d 100644 CONFIG_BT_HCIBCM203X=m CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBFUSB=m +-- +2.5.0 -From 20c4c47bca3674d746518b1cca1e066e46b52900 Mon Sep 17 00:00:00 2001 + +From ba6e2e6446726f833e8009db2cc26ff266865ded Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 -Subject: [PATCH 159/170] hci_h5: Don't send conf_req when ACTIVE +Subject: [PATCH 149/181] 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. @@ -147385,11 +148565,14 @@ index abee221..2825833 100644 } else if (memcmp(data, conf_rsp, 2) == 0) { if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 7); +-- +2.5.0 -From 00dba6ec2ac004fc17075febd4504646eb3dc543 Mon Sep 17 00:00:00 2001 + +From a16463cef1f9dd276e81e78177b757b8192bb197 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 -Subject: [PATCH 160/170] amba_pl011: Don't use DT aliases for numbering +Subject: [PATCH 150/181] 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 @@ -147417,11 +148600,14 @@ index 899a771..68b3353 100644 uap->old_cr = 0; uap->port.dev = dev; +-- +2.5.0 -From 95136c932ac4433a6a50d394817812f8eb2cc914 Mon Sep 17 00:00:00 2001 + +From a1ca24aefc34f0f5db32510b2f8c6c649706ea1d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 15 Dec 2015 15:35:57 -0800 -Subject: [PATCH 161/170] clk: bcm2835: Add bindings for the auxiliary +Subject: [PATCH 151/181] clk: bcm2835: Add bindings for the auxiliary peripheral clock gates. These will be used for enabling UART1, SPI1, and SPI2. @@ -147496,11 +148682,14 @@ index 0000000..d91156e +#define BCM2835_AUX_CLOCK_SPI1 1 +#define BCM2835_AUX_CLOCK_SPI2 2 +#define BCM2835_AUX_CLOCK_COUNT 3 +-- +2.5.0 -From 924276b92ff47f0e778a9405d00637be4ca88736 Mon Sep 17 00:00:00 2001 + +From 2bac90ddbe50b4b7094092758db625eef9e4a8d3 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 15 Dec 2015 15:35:58 -0800 -Subject: [PATCH 162/170] clk: bcm2835: Add a driver for the auxiliary +Subject: [PATCH 152/181] clk: bcm2835: Add a driver for the auxiliary peripheral clock gates. There are a pair of SPI masters and a mini UART that were last minute @@ -147518,7 +148707,7 @@ updated Makefile to preserve the rasoberry pi architectures create mode 100644 drivers/clk/bcm/clk-bcm2835-aux.c diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile -index a1b4cbc..84070d51 100644 +index a1b4cbc..84070d5 100644 --- a/drivers/clk/bcm/Makefile +++ b/drivers/clk/bcm/Makefile @@ -4,6 +4,7 @@ obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm281xx.o @@ -147620,11 +148809,14 @@ index 0000000..e4f89e2 +MODULE_AUTHOR("Eric Anholt "); +MODULE_DESCRIPTION("BCM2835 auxiliary peripheral clock driver"); +MODULE_LICENSE("GPL v2"); +-- +2.5.0 -From 43477e669f736f6da34afbd8a96683b239b1fd1f Mon Sep 17 00:00:00 2001 + +From 854658aee5e5d75024210a7020a0cb4ce0eb8a27 Mon Sep 17 00:00:00 2001 From: Fraser Date: Tue, 23 Feb 2016 10:04:37 +1100 -Subject: [PATCH 163/170] Aux SPI 1&2 implementation +Subject: [PATCH 153/181] Aux SPI 1&2 implementation Adds aux spi 1 & 2 devices to compatible raspberry PIs. * Minor config of the driver build environment to ensure they get built @@ -148328,7 +149520,7 @@ index 4368f0d..1ca1695 100644 CONFIG_PPS=m CONFIG_PPS_CLIENT_LDISC=m diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile -index 84070d51..d60fd3f 100644 +index 84070d5..d60fd3f 100644 --- a/drivers/clk/bcm/Makefile +++ b/drivers/clk/bcm/Makefile @@ -4,7 +4,7 @@ obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm281xx.o @@ -148353,11 +149545,14 @@ index e842e86..c9d1558 100644 depends on GPIOLIB help This selects a driver for the Broadcom BCM2835 SPI aux master. +-- +2.5.0 -From 84c2e063885bb0ae3d5d2ad2e24e7a2bdb5729ae Mon Sep 17 00:00:00 2001 + +From 10e1cde4f9d179372a5171788b493119f979fe65 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Tue, 23 Feb 2016 17:28:23 +0100 -Subject: [PATCH 164/170] ASoC: bcm: add missing .owner fields in sound card +Subject: [PATCH 154/181] ASoC: bcm: add missing .owner fields in sound card drivers If snd_soc_card.owner is not set the kernel won't do usage refcounting @@ -148478,11 +149673,14 @@ index c6e45a0..9db678e 100644 .dai_link = snd_rpi_proto_dai, .num_links = ARRAY_SIZE(snd_rpi_proto_dai), }; +-- +2.5.0 -From 18674a7da1c3d50d9c957a8f88aaea2aa653d223 Mon Sep 17 00:00:00 2001 + +From c26dec8662e421abfef8374045c7207d9c96ab22 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 20 Jan 2016 17:50:09 +0000 -Subject: [PATCH 165/170] smsx95xx: Add option to disable the crimes against +Subject: [PATCH 155/181] smsx95xx: Add option to disable the crimes against truesize fix It may improve iperf numbers on Pi 1, but may generate dmesg warnings and possibly cause network issues @@ -148527,11 +149725,14 @@ index 7483222..a61bd08 usbnet_skb_return(dev, ax_skb); } +-- +2.5.0 -From 5e3c3e845f998f86c2f22017576cb19e5d7fe9bb Mon Sep 17 00:00:00 2001 + +From 3bf5a92557e3a68e6ddfd6684f9867b3020bc85d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 -Subject: [PATCH 166/170] bcm2835-virtgpio: Virtual GPIO driver +Subject: [PATCH 156/181] bcm2835-virtgpio: Virtual GPIO driver Add a virtual GPIO driver that uses the firmware mailbox interface to request that the VPU toggles LEDs. @@ -148557,7 +149758,7 @@ index 76b3a88..6d6b519 100644 CONFIG_GPIO_STMPE=y CONFIG_W1=m diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig -index b18bea0..a1f4ccee 100644 +index b18bea0..a1f4cce 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -132,6 +132,12 @@ config GPIO_BCM_KONA @@ -148783,22 +149984,25 @@ index b011489..c844968 100644 RPI_FIRMWARE_FRAMEBUFFER_RELEASE = 0x00048001, RPI_FIRMWARE_FRAMEBUFFER_TEST_PHYSICAL_WIDTH_HEIGHT = 0x00044003, RPI_FIRMWARE_FRAMEBUFFER_TEST_VIRTUAL_WIDTH_HEIGHT = 0x00044004, +-- +2.5.0 -From 6aa2c847f76f21c830544e8c79f9030a170ef475 Mon Sep 17 00:00:00 2001 + +From 50a5547704d6cdd13e0b7a9ed292649b19540850 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 21 Jan 2016 17:57:49 +0000 -Subject: [PATCH 167/170] BCM270X_DT: Add Pi3 support +Subject: [PATCH 157/181] BCM270X_DT: Add Pi3 support --- arch/arm/boot/dts/Makefile | 1 + - arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 174 ++++++++++++++++++++++++++++++++++ - arch/arm/boot/dts/bcm2710.dtsi | 102 ++++++++++++++++++++ - 3 files changed, 277 insertions(+) + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 192 ++++++++++++++++++++++++++++++++++ + arch/arm/boot/dts/bcm2710.dtsi | 102 ++++++++++++++++++ + 3 files changed, 295 insertions(+) create mode 100644 arch/arm/boot/dts/bcm2710-rpi-3-b.dts create mode 100644 arch/arm/boot/dts/bcm2710.dtsi diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index d583e67..fdc450f4 100644 +index d583e67..fdc450f 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -5,6 +5,7 @@ dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rpi-b-plus.dtb @@ -148811,10 +150015,10 @@ index d583e67..fdc450f4 100644 ifeq ($(CONFIG_ARCH_BCM2708),y) diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts new file mode 100644 -index 0000000..a6ecb51 +index 0000000..cc06089 --- /dev/null +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -@@ -0,0 +1,174 @@ +@@ -0,0 +1,192 @@ +/dts-v1/; + +#include "bcm2710.dtsi" @@ -148862,16 +150066,21 @@ index 0000000..a6ecb51 + }; + + bt_pins: bt_pins { -+ brcm,pins = <28 29 30 31 14 15 43>; -+ brcm,function = <6 6 6 6 2 2 4>; -+ // alt2:PCM alt5:UART1 alt0:GPCLK2 -+ brcm,pull = <0 0 0 0 0 2 0>; ++ brcm,pins = <28 29 30 31 43>; ++ brcm,function = <6 6 6 6 4>; /* alt2:PCM alt0:GPCLK2 */ ++ brcm,pull = <0 0 0 0 0>; ++ }; ++ ++ uart0_pins: uart0_pins { ++ brcm,pins = <32 33>; ++ brcm,function = <7>; /* alt3=UART0 */ ++ brcm,pull = <0 0>; + }; + + uart1_pins: uart1_pins { -+ brcm,pins = <32 33>; -+ brcm,function = <7>; /* alt3=UART0 */ -+ brcm,pull = <0>; ++ brcm,pins = <14 15>; ++ brcm,function = <2>; /* alt5=UART1 */ ++ brcm,pull = <0 0>; + }; +}; + @@ -148888,6 +150097,17 @@ index 0000000..a6ecb51 + non-removable; + bus-width = <4>; + status = "okay"; ++ brcm,overclock-50 = <0>; ++}; ++ ++&soc { ++ virtgpio: virtgpio { ++ compatible = "brcm,bcm2835-virtgpio"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ firmware = <&firmware>; ++ status = "okay"; ++ }; +}; + +&fb { @@ -148895,12 +150115,14 @@ index 0000000..a6ecb51 +}; + +&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins &bt_pins>; + status = "okay"; +}; + +&uart1 { + pinctrl-names = "default"; -+ pinctrl-0 = <&uart1_pins &bt_pins>; ++ pinctrl-0 = <&uart1_pins>; + status = "okay"; +}; + @@ -148956,7 +150178,7 @@ index 0000000..a6ecb51 + act_led: act { + label = "led0"; + linux,default-trigger = "mmc0"; -+ gpios = <&gpio 47 0>; ++ gpios = <&virtgpio 0 0>; + }; +}; + @@ -149097,96 +150319,14 @@ index 0000000..1a48686 + interrupt-parent = <&local_intc>; + interrupts = <8>; +}; +-- +2.5.0 -From 52015bd5f0bb4d64ca51c5f8539cf2552dfb8a42 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Thu, 21 Jan 2016 17:57:49 +0000 -Subject: [PATCH 168/170] FIXUP: BCM270X_DT: Update to latest Pi3 DTS ---- - arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 34 ++++++++++++++++++++++++++-------- - 1 file changed, 26 insertions(+), 8 deletions(-) - -diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -index a6ecb51..cc060898 100644 ---- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -+++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -@@ -45,16 +45,21 @@ - }; - - bt_pins: bt_pins { -- brcm,pins = <28 29 30 31 14 15 43>; -- brcm,function = <6 6 6 6 2 2 4>; -- // alt2:PCM alt5:UART1 alt0:GPCLK2 -- brcm,pull = <0 0 0 0 0 2 0>; -+ brcm,pins = <28 29 30 31 43>; -+ brcm,function = <6 6 6 6 4>; /* alt2:PCM alt0:GPCLK2 */ -+ brcm,pull = <0 0 0 0 0>; - }; - -- uart1_pins: uart1_pins { -+ uart0_pins: uart0_pins { - brcm,pins = <32 33>; - brcm,function = <7>; /* alt3=UART0 */ -- brcm,pull = <0>; -+ brcm,pull = <0 0>; -+ }; -+ -+ uart1_pins: uart1_pins { -+ brcm,pins = <14 15>; -+ brcm,function = <2>; /* alt5=UART1 */ -+ brcm,pull = <0 0>; - }; - }; - -@@ -71,6 +76,17 @@ - non-removable; - bus-width = <4>; - status = "okay"; -+ brcm,overclock-50 = <0>; -+}; -+ -+&soc { -+ virtgpio: virtgpio { -+ compatible = "brcm,bcm2835-virtgpio"; -+ gpio-controller; -+ #gpio-cells = <2>; -+ firmware = <&firmware>; -+ status = "okay"; -+ }; - }; - - &fb { -@@ -78,12 +94,14 @@ - }; - - &uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins &bt_pins>; - status = "okay"; - }; - - &uart1 { - pinctrl-names = "default"; -- pinctrl-0 = <&uart1_pins &bt_pins>; -+ pinctrl-0 = <&uart1_pins>; - status = "okay"; - }; - -@@ -139,7 +157,7 @@ - act_led: act { - label = "led0"; - linux,default-trigger = "mmc0"; -- gpios = <&gpio 47 0>; -+ gpios = <&virtgpio 0 0>; - }; - }; - - -From 310f5af54ca26b68795f0376c67b41e2bb18a0e0 Mon Sep 17 00:00:00 2001 +From 553f69bad0399c72288ce5e03e3d2ba486cb6394 Mon Sep 17 00:00:00 2001 From: Dave Stevenson <6by9@users.noreply.github.com> Date: Mon, 8 Feb 2016 23:49:41 +0000 -Subject: [PATCH 169/170] DT: Add overlays to configure I2C pins +Subject: [PATCH 158/181] DT: Add overlays to configure I2C pins Lifted from https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=120938&p=825883 @@ -149327,11 +150467,14 @@ index 0000000..e303b9c + pin_func = <&i2c1_pins>,"brcm,function:0"; + }; +}; +-- +2.5.0 -From c5cbb66686e7e289e8a7aff49a954f86893e628d Mon Sep 17 00:00:00 2001 + +From 8bfabcfcb4c8ccb858a0b5a1ad7dafec26359d93 Mon Sep 17 00:00:00 2001 From: Dhiraj Goel Date: Thu, 3 Mar 2016 21:10:50 -0800 -Subject: [PATCH 170/170] bcm2835-camera: fix a bug in computation of frame +Subject: [PATCH 159/181] bcm2835-camera: fix a bug in computation of frame timestamp Fixes #1318 @@ -149353,3 +150496,9595 @@ index e83334c..98a892e 100644 buf->vb.timestamp.tv_usec = dev->capture.kernel_start_ts.tv_usec + rem; +-- +2.5.0 + + +From 3befa2a46ca7643b203ac0c356b6c77c2168f9cb Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 2 Mar 2016 10:59:05 +0000 +Subject: [PATCH 160/181] BCM270X_DT: Add pi3-disable-bt overlay + +Disable Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15. To disable +the systemd service that initialises the modem so it doesn't use the UART: + + sudo systemctl disable hciuart + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 8 ++++ + .../boot/dts/overlays/pi3-disable-bt-overlay.dts | 48 ++++++++++++++++++++++ + 3 files changed, 57 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index f2bc3ce..2c2b2fa 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -39,6 +39,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can0-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += mcp2515-can1-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb ++dtb-$(RPI_DT_OVERLAYS) += pi3-disable-bt-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 7d7bbb8..4f0be23 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -496,6 +496,14 @@ Params: speed Display SPI bus speed + [ The pcf8563-rtc overlay has been deleted. See i2c-rtc. ] + + ++Name: pi3-disable-bt ++Info: Disable Pi3 Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15 ++ N.B. To disable the systemd service that initialises the modem so it ++ doesn't use the UART, use 'sudo systemctl disable hciuart'. ++Load: dtoverlay=pi3-disable-bt ++Params: ++ ++ + Name: piscreen + Info: PiScreen display by OzzMaker.com + Load: dtoverlay=piscreen,= +diff --git a/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts +new file mode 100644 +index 0000000..05403e2 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts +@@ -0,0 +1,48 @@ ++/dts-v1/; ++/plugin/; ++ ++/* Disable Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15. ++ To disable the systemd service that initialises the modem so it doesn't use ++ the UART: ++ ++ sudo systemctl disable hciuart ++*/ ++ ++/{ ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&uart1>; ++ __overlay__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&uart0>; ++ __overlay__ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins>; ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&gpio>; ++ __overlay__ { ++ uart0_pins: uart0_pins { ++ brcm,pins = <14 15>; ++ brcm,function = <4>; /* alt0 */ ++ brcm,pull = <0 2>; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target-path = "/aliases"; ++ __overlay__ { ++ serial0 = "/soc/uart@7e201000"; ++ serial1 = "/soc/uart@7e215040"; ++ }; ++ }; ++}; +-- +2.5.0 + + +From a154647b56e9db6a7a1ebfb0c2123ea561228c76 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 7 Mar 2016 09:53:03 +0000 +Subject: [PATCH 161/181] BCM270X_DT: Add pi3-miniuart-bt DT overlay + +Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore +UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum +usable baudrate. + +It is also necessary to edit /lib/systemd/system/hciuart.server and +replace ttyAMA0 with ttyS0. + +If cmdline.txt uses the alias serial0 to refer to the user-accessable port +then the firmware will replace with the appropriate port whether or not +this overlay is used. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 10 ++++ + .../boot/dts/overlays/pi3-miniuart-bt-overlay.dts | 61 ++++++++++++++++++++++ + 3 files changed, 72 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 2c2b2fa..687cc7c 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -40,6 +40,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can1-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += pi3-disable-bt-overlay.dtb ++dtb-$(RPI_DT_OVERLAYS) += pi3-miniuart-bt-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb + dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 4f0be23..6a7aa31 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -504,6 +504,16 @@ Load: dtoverlay=pi3-disable-bt + Params: + + ++Name: pi3-miniuart-bt ++Info: Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore ++ UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum ++ usable baudrate. ++ N.B. It is also necessary to edit /lib/systemd/system/hciuart.server ++ and replace ttyAMA0 with ttyS0. ++Load: dtoverlay=pi3-miniuart-bt ++Params: ++ ++ + Name: piscreen + Info: PiScreen display by OzzMaker.com + Load: dtoverlay=piscreen,= +diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +new file mode 100644 +index 0000000..ae1292a +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +@@ -0,0 +1,61 @@ ++/dts-v1/; ++/plugin/; ++ ++/* Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore ++ UART0/ttyAMA0 over GPIOs 14 & 15. Note that this may reduce the maximum ++ usable baudrate. ++ ++ It is also necessary to edit /lib/systemd/system/hciuart.server and ++ replace ttyAMA0 with ttyS0. ++ ++ If cmdline.txt uses the alias serial0 to refer to the user-accessable port ++ then the firmware will replace with the appropriate port whether or not ++ this overlay is used. ++*/ ++ ++/{ ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&uart0>; ++ __overlay__ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins>; ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&uart1>; ++ __overlay__ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_pins>; ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&gpio>; ++ __overlay__ { ++ uart0_pins: uart0_pins { ++ brcm,pins = <14 15>; ++ brcm,function = <4>; /* alt0 */ ++ brcm,pull = <0 2>; ++ }; ++ ++ uart1_pins: uart1_pins { ++ brcm,pins = <32 33>; ++ brcm,function = <2>; /* alt5=UART1 */ ++ brcm,pull = <0 0>; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target-path = "/aliases"; ++ __overlay__ { ++ serial0 = "/soc/uart@7e201000"; ++ serial1 = "/soc/uart@7e215040"; ++ }; ++ }; ++}; +-- +2.5.0 + + +From 5a0a0711e5c319d854b7b2f6f5301f3afb0bfa9e Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 7 Mar 2016 13:38:39 +0000 +Subject: [PATCH 162/181] Pi3 DT: Add dtparams for the SD interface + +Add new base dtparams sd_overclock, sd_force_pio, sd_pio_limit +and sd_debug. These were missed out of the initial Pi3 DTB. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +index cc06089..36972d8 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +@@ -188,5 +188,9 @@ + audio = <&audio>,"status"; + watchdog = <&watchdog>,"status"; + random = <&random>,"status"; ++ sd_overclock = <&sdhost>,"brcm,overclock-50:0"; ++ sd_force_pio = <&sdhost>,"brcm,force-pio?"; ++ sd_pio_limit = <&sdhost>,"brcm,pio-limit:0"; ++ sd_debug = <&sdhost>,"brcm,debug"; + }; + }; +-- +2.5.0 + + +From 9c4880b9e2e68e59190cf0d2cd3527a7a9d63379 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 7 Mar 2016 15:05:11 +0000 +Subject: [PATCH 163/181] vchiq_arm: Tweak the logging output + +Signed-off-by: Phil Elwell +--- + .../vc04_services/interface/vchiq_arm/vchiq_core.c | 31 +++++++++------------- + 1 file changed, 13 insertions(+), 18 deletions(-) + +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c +index 2c98da4..160db24 100644 +--- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c ++++ b/drivers/misc/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)); +- } + } + ++ 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++; + +@@ -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)); +- } + } + ++ 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)); + } + + 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)); + } + + switch (type) { +-- +2.5.0 + + +From 78ddf83b051548869ef5462693d25bd96a94d9e6 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 7 Mar 2016 16:46:39 +0000 +Subject: [PATCH 164/181] bcm2835-sdhost: Only claim one DMA channel + +With both MMC controllers enabled there are few DMA channels left. The +bcm2835-sdhost driver only uses DMA in one direction at a time, so it +doesn't need to claim two channels. + +See: https://github.com/raspberrypi/linux/issues/1327 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 5 +-- + drivers/mmc/host/bcm2835-sdhost.c | 70 ++++++++++++++++++++++++----------- + 2 files changed, 50 insertions(+), 25 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 4f65203..4f833a9 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -136,9 +136,8 @@ + reg = <0x7e202000 0x100>; + interrupts = <2 24>; + clocks = <&clk_core>; +- dmas = <&dma 13>, +- <&dma 13>; +- dma-names = "tx", "rx"; ++ dmas = <&dma 13>; ++ dma-names = "rx-tx"; + brcm,overclock-50 = <0>; + brcm,pio-limit = <1>; + status = "disabled"; +diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c +index 4f6cab5..4cc4272 100644 +--- a/drivers/mmc/host/bcm2835-sdhost.c ++++ b/drivers/mmc/host/bcm2835-sdhost.c +@@ -185,9 +185,10 @@ struct bcm2835_host { + unsigned int debug:1; /* Enable debug output */ + + /*DMA part*/ +- struct dma_chan *dma_chan_rx; /* DMA channel for reads */ +- struct dma_chan *dma_chan_tx; /* DMA channel for writes */ +- struct dma_chan *dma_chan; /* Channel in used */ ++ struct dma_chan *dma_chan_rxtx; /* DMA channel for reads and writes */ ++ struct dma_chan *dma_chan; /* Channel in use */ ++ struct dma_slave_config dma_cfg_rx; ++ struct dma_slave_config dma_cfg_tx; + struct dma_async_tx_descriptor *dma_desc; + u32 dma_dir; + u32 drain_words; +@@ -771,12 +772,11 @@ static void bcm2835_sdhost_prepare_dma(struct bcm2835_host *host, + log_event("PRD<", (u32)data, 0); + pr_debug("bcm2835_sdhost_prepare_dma()\n"); + ++ dma_chan = host->dma_chan_rxtx; + if (data->flags & MMC_DATA_READ) { +- dma_chan = host->dma_chan_rx; + dir_data = DMA_FROM_DEVICE; + dir_slave = DMA_DEV_TO_MEM; + } else { +- dma_chan = host->dma_chan_tx; + dir_data = DMA_TO_DEVICE; + dir_slave = DMA_MEM_TO_DEV; + } +@@ -813,6 +813,12 @@ static void bcm2835_sdhost_prepare_dma(struct bcm2835_host *host, + host->drain_words = len/4; + } + ++ /* The parameters have already been validated, so this will not fail */ ++ (void)dmaengine_slave_config(dma_chan, ++ (dir_data == DMA_FROM_DEVICE) ? ++ &host->dma_cfg_rx : ++ &host->dma_cfg_tx); ++ + len = dma_map_sg(dma_chan->device->dev, data->sg, data->sg_len, + dir_data); + +@@ -1805,28 +1811,46 @@ int bcm2835_sdhost_add_host(struct bcm2835_host *host) + spin_lock_init(&host->lock); + + if (host->allow_dma) { +- if (IS_ERR_OR_NULL(host->dma_chan_tx) || +- IS_ERR_OR_NULL(host->dma_chan_rx)) { +- pr_err("%s: unable to initialise DMA channels. " ++ if (IS_ERR_OR_NULL(host->dma_chan_rxtx)) { ++ pr_err("%s: unable to initialise DMA channel. " + "Falling back to PIO\n", + mmc_hostname(mmc)); + host->use_dma = false; + } else { +- host->use_dma = true; +- + cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; + cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; + cfg.slave_id = 13; /* DREQ channel */ + ++ /* Validate the slave configurations */ ++ + cfg.direction = DMA_MEM_TO_DEV; + cfg.src_addr = 0; + cfg.dst_addr = host->bus_addr + SDDATA; +- ret = dmaengine_slave_config(host->dma_chan_tx, &cfg); + +- cfg.direction = DMA_DEV_TO_MEM; +- cfg.src_addr = host->bus_addr + SDDATA; +- cfg.dst_addr = 0; +- ret = dmaengine_slave_config(host->dma_chan_rx, &cfg); ++ ret = dmaengine_slave_config(host->dma_chan_rxtx, &cfg); ++ ++ if (ret == 0) { ++ host->dma_cfg_tx = cfg; ++ ++ cfg.direction = DMA_DEV_TO_MEM; ++ cfg.src_addr = host->bus_addr + SDDATA; ++ cfg.dst_addr = 0; ++ ++ ret = dmaengine_slave_config(host->dma_chan_rxtx, &cfg); ++ } ++ ++ if (ret == 0) { ++ host->dma_cfg_rx = cfg; ++ ++ host->use_dma = true; ++ } else { ++ pr_err("%s: unable to configure DMA channel. " ++ "Falling back to PIO\n", ++ mmc_hostname(mmc)); ++ dma_release_channel(host->dma_chan_rxtx); ++ host->dma_chan_rxtx = NULL; ++ host->use_dma = false; ++ } + } + } else { + host->use_dma = false; +@@ -1948,19 +1972,21 @@ static int bcm2835_sdhost_probe(struct platform_device *pdev) + + if (host->allow_dma) { + if (node) { +- host->dma_chan_tx = +- dma_request_slave_channel(dev, "tx"); +- host->dma_chan_rx = +- dma_request_slave_channel(dev, "rx"); ++ host->dma_chan_rxtx = ++ dma_request_slave_channel(dev, "rx-tx"); ++ if (!host->dma_chan_rxtx) ++ host->dma_chan_rxtx = ++ dma_request_slave_channel(dev, "tx"); ++ if (!host->dma_chan_rxtx) ++ host->dma_chan_rxtx = ++ dma_request_slave_channel(dev, "rx"); + } else { + dma_cap_mask_t mask; + + dma_cap_zero(mask); + /* we don't care about the channel, any would work */ + dma_cap_set(DMA_SLAVE, mask); +- host->dma_chan_tx = +- dma_request_channel(mask, NULL, NULL); +- host->dma_chan_rx = ++ host->dma_chan_rxtx = + dma_request_channel(mask, NULL, NULL); + } + } +-- +2.5.0 + + +From 837343db652c927e0e8ca31f927d3d521194f349 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 8 Mar 2016 09:49:16 +0000 +Subject: [PATCH 165/181] bcm2835-mmc: Only claim one DMA channel + +With both MMC controllers enabled there are few DMA channels left. The +bcm2835-mmc driver only uses DMA in one direction at a time, so it +doesn't need to claim two channels. + +See: https://github.com/raspberrypi/linux/issues/1327 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 5 +-- + drivers/mmc/host/bcm2835-mmc.c | 69 +++++++++++++++++++++++++---------- + 2 files changed, 51 insertions(+), 23 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 4f833a9..e0be77a 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -232,9 +232,8 @@ + reg = <0x7e300000 0x100>; + interrupts = <2 30>; + clocks = <&clk_mmc>; +- dmas = <&dma 11>, +- <&dma 11>; +- dma-names = "tx", "rx"; ++ dmas = <&dma 11>; ++ dma-names = "rx-tx"; + brcm,overclock-50 = <0>; + status = "disabled"; + }; +diff --git a/drivers/mmc/host/bcm2835-mmc.c b/drivers/mmc/host/bcm2835-mmc.c +index 104f93e..ceb3793 100644 +--- a/drivers/mmc/host/bcm2835-mmc.c ++++ b/drivers/mmc/host/bcm2835-mmc.c +@@ -108,8 +108,9 @@ struct bcm2835_host { + u32 shadow; + + /*DMA part*/ +- struct dma_chan *dma_chan_rx; /* DMA channel for reads */ +- struct dma_chan *dma_chan_tx; /* DMA channel for writes */ ++ struct dma_chan *dma_chan_rxtx; /* DMA channel for reads and writes */ ++ struct dma_slave_config dma_cfg_rx; ++ struct dma_slave_config dma_cfg_tx; + struct dma_async_tx_descriptor *tx_desc; /* descriptor */ + + bool have_dma; +@@ -342,7 +343,7 @@ static void bcm2835_mmc_dma_complete(void *param) + + if (host->data && !(host->data->flags & MMC_DATA_WRITE)) { + /* otherwise handled in SDHCI IRQ */ +- dma_chan = host->dma_chan_rx; ++ dma_chan = host->dma_chan_rxtx; + dir_data = DMA_FROM_DEVICE; + + dma_unmap_sg(dma_chan->device->dev, +@@ -493,16 +494,21 @@ static void bcm2835_mmc_transfer_dma(struct bcm2835_host *host) + if (host->blocks == 0) + return; + ++ dma_chan = host->dma_chan_rxtx; + if (host->data->flags & MMC_DATA_READ) { +- dma_chan = host->dma_chan_rx; + dir_data = DMA_FROM_DEVICE; + dir_slave = DMA_DEV_TO_MEM; + } else { +- dma_chan = host->dma_chan_tx; + dir_data = DMA_TO_DEVICE; + dir_slave = DMA_MEM_TO_DEV; + } + ++ /* The parameters have already been validated, so this will not fail */ ++ (void)dmaengine_slave_config(dma_chan, ++ (dir_data == DMA_FROM_DEVICE) ? ++ &host->dma_cfg_rx : ++ &host->dma_cfg_tx); ++ + BUG_ON(!dma_chan->device); + BUG_ON(!dma_chan->device->dev); + BUG_ON(!host->data->sg); +@@ -936,7 +942,7 @@ static void bcm2835_mmc_data_irq(struct bcm2835_host *host, u32 intmask) + if (host->data->flags & MMC_DATA_WRITE) { + /* IRQ handled here */ + +- dma_chan = host->dma_chan_tx; ++ dma_chan = host->dma_chan_rxtx; + dir_data = DMA_TO_DEVICE; + dma_unmap_sg(dma_chan->device->dev, + host->data->sg, host->data->sg_len, +@@ -1316,28 +1322,47 @@ static int bcm2835_mmc_add_host(struct bcm2835_host *host) + dev_info(dev, "Forcing PIO mode\n"); + host->have_dma = false; + #else +- if (IS_ERR_OR_NULL(host->dma_chan_tx) || +- IS_ERR_OR_NULL(host->dma_chan_rx)) { +- dev_err(dev, "%s: Unable to initialise DMA channels. Falling back to PIO\n", ++ if (IS_ERR_OR_NULL(host->dma_chan_rxtx)) { ++ dev_err(dev, "%s: Unable to initialise DMA channel. Falling back to PIO\n", + DRIVER_NAME); + host->have_dma = false; + } else { +- dev_info(dev, "DMA channels allocated"); +- host->have_dma = true; ++ dev_info(dev, "DMA channel allocated"); + + cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; + cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; + cfg.slave_id = 11; /* DREQ channel */ + ++ /* Validate the slave configurations */ ++ + cfg.direction = DMA_MEM_TO_DEV; + cfg.src_addr = 0; + cfg.dst_addr = host->bus_addr + SDHCI_BUFFER; +- ret = dmaengine_slave_config(host->dma_chan_tx, &cfg); + +- cfg.direction = DMA_DEV_TO_MEM; +- cfg.src_addr = host->bus_addr + SDHCI_BUFFER; +- cfg.dst_addr = 0; +- ret = dmaengine_slave_config(host->dma_chan_rx, &cfg); ++ ret = dmaengine_slave_config(host->dma_chan_rxtx, &cfg); ++ ++ if (ret == 0) { ++ host->dma_cfg_tx = cfg; ++ ++ cfg.direction = DMA_DEV_TO_MEM; ++ cfg.src_addr = host->bus_addr + SDHCI_BUFFER; ++ cfg.dst_addr = 0; ++ ++ ret = dmaengine_slave_config(host->dma_chan_rxtx, &cfg); ++ } ++ ++ if (ret == 0) { ++ host->dma_cfg_rx = cfg; ++ ++ host->use_dma = true; ++ } else { ++ pr_err("%s: unable to configure DMA channel. " ++ "Faling back to PIO\n", ++ mmc_hostname(mmc)); ++ dma_release_channel(host->dma_chan_rxtx); ++ host->dma_chan_rxtx = NULL; ++ host->use_dma = false; ++ } + } + #endif + mmc->max_segs = 128; +@@ -1416,16 +1441,20 @@ static int bcm2835_mmc_probe(struct platform_device *pdev) + + #ifndef FORCE_PIO + if (node) { +- host->dma_chan_tx = dma_request_slave_channel(dev, "tx"); +- host->dma_chan_rx = dma_request_slave_channel(dev, "rx"); ++ host->dma_chan_rxtx = dma_request_slave_channel(dev, "rx-tx"); ++ if (!host->dma_chan_rxtx) ++ host->dma_chan_rxtx = ++ dma_request_slave_channel(dev, "tx"); ++ if (!host->dma_chan_rxtx) ++ host->dma_chan_rxtx = ++ dma_request_slave_channel(dev, "rx"); + } else { + dma_cap_mask_t mask; + + dma_cap_zero(mask); + /* we don't care about the channel, any would work */ + dma_cap_set(DMA_SLAVE, mask); +- host->dma_chan_tx = dma_request_channel(mask, NULL, NULL); +- host->dma_chan_rx = dma_request_channel(mask, NULL, NULL); ++ host->dma_chan_rxtx = dma_request_channel(mask, NULL, NULL); + } + #endif + clk = devm_clk_get(dev, NULL); +-- +2.5.0 + + +From 13332385a60aa06411b18ba0fa52ea7f4d7d2202 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 8 Mar 2016 17:08:39 +0000 +Subject: [PATCH 166/181] config: rebuild with savedefconfig + +--- + arch/arm/configs/bcm2709_defconfig | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 6d6b519..116002b 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -593,7 +593,6 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y + CONFIG_SERIAL_OF_PLATFORM=y + CONFIG_TTY_PRINTK=y + CONFIG_HW_RANDOM=y +-CONFIG_HW_RANDOM_BCM2835=y + CONFIG_RAW_DRIVER=y + CONFIG_I2C=y + CONFIG_I2C_CHARDEV=m +@@ -1112,7 +1111,7 @@ CONFIG_EXTCON=m + CONFIG_EXTCON_ARIZONA=m + CONFIG_IIO=m + CONFIG_IIO_BUFFER=y +-CONFIG_IIO_BUFFER_CB=y ++CONFIG_IIO_BUFFER_CB=m + CONFIG_IIO_KFIFO_BUF=m + CONFIG_MCP320X=m + CONFIG_DHT11=m +-- +2.5.0 + + +From 4ec8d596e82793a7ac373d724b304b8357e21793 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 8 Mar 2016 17:06:33 +0000 +Subject: [PATCH 167/181] config: Add module for mcp3422 ADC + +--- + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 116002b..7793baf 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -1114,6 +1114,7 @@ CONFIG_IIO_BUFFER=y + CONFIG_IIO_BUFFER_CB=m + CONFIG_IIO_KFIFO_BUF=m + CONFIG_MCP320X=m ++CONFIG_MCP3422=m + CONFIG_DHT11=m + CONFIG_PWM_BCM2835=m + CONFIG_RASPBERRYPI_FIRMWARE=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 1ca1695..f09be87 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -1121,6 +1121,7 @@ CONFIG_IIO_BUFFER=y + CONFIG_IIO_BUFFER_CB=m + CONFIG_IIO_KFIFO_BUF=m + CONFIG_MCP320X=m ++CONFIG_MCP3422=m + CONFIG_DHT11=m + CONFIG_PWM_BCM2835=m + CONFIG_RASPBERRYPI_FIRMWARE=y +-- +2.5.0 + + +From 7311096092d6b2631afcf5002cdd67989106ddac Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 8 Mar 2016 16:18:57 +0000 +Subject: [PATCH 168/181] Pi3 DT: Add pull-ups on the UART RX lines + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 4 ++-- + arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +index 36972d8..5a0c45a 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +@@ -53,13 +53,13 @@ + uart0_pins: uart0_pins { + brcm,pins = <32 33>; + brcm,function = <7>; /* alt3=UART0 */ +- brcm,pull = <0 0>; ++ brcm,pull = <0 2>; + }; + + uart1_pins: uart1_pins { + brcm,pins = <14 15>; + brcm,function = <2>; /* alt5=UART1 */ +- brcm,pull = <0 0>; ++ brcm,pull = <0 2>; + }; + }; + +diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +index ae1292a..0b8f0ca 100644 +--- a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts ++++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +@@ -46,7 +46,7 @@ + uart1_pins: uart1_pins { + brcm,pins = <32 33>; + brcm,function = <2>; /* alt5=UART1 */ +- brcm,pull = <0 0>; ++ brcm,pull = <0 2>; + }; + }; + }; +-- +2.5.0 + + +From 6d667301362eb99e4dac9af349201a58cf8059aa Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 9 Mar 2016 17:25:59 +0000 +Subject: [PATCH 169/181] brcmfmac: Disable power management + +Disable wireless power saving in the brcmfmac WLAN driver. This is a +temporary measure until the connectivity loss resulting from power +saving is resolved. + +Signed-off-by: Phil Elwell +--- + drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +index deb5f78..90f65d9 100644 +--- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c +@@ -2567,6 +2567,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 + */ ++ pr_info("power management disabled\n"); ++ enabled = false; + cfg->pwr_save = enabled; + if (!check_vif_up(ifp->vif)) { + +-- +2.5.0 + + +From 84e3a68609eda45904ae776a302617e094e2a45e Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 9 Mar 2016 21:28:52 +0000 +Subject: [PATCH 170/181] BCM270X_DT: rpi-display overlay - add swapxy param + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/README | 5 +---- + arch/arm/boot/dts/overlays/rpi-display-overlay.dts | 1 + + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 6a7aa31..6fa5b80 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -644,14 +644,11 @@ Name: rpi-display + Info: RPi-Display - 2.8" Touch Display by Watterott + Load: dtoverlay=rpi-display,= + Params: speed Display SPI bus speed +- + rotate Display rotation {0,90,180,270} +- + fps Delay between frame updates +- + debug Debug output level {0-7} +- + xohms Touchpanel sensitivity (X-plate resistance) ++ swapxy Swap x and y axis + + + Name: rpi-ft5406 +diff --git a/arch/arm/boot/dts/overlays/rpi-display-overlay.dts b/arch/arm/boot/dts/overlays/rpi-display-overlay.dts +index a8fa974..ccb296e 100644 +--- a/arch/arm/boot/dts/overlays/rpi-display-overlay.dts ++++ b/arch/arm/boot/dts/overlays/rpi-display-overlay.dts +@@ -78,5 +78,6 @@ + fps = <&rpidisplay>,"fps:0"; + debug = <&rpidisplay>,"debug:0"; + xohms = <&rpidisplay_ts>,"ti,x-plate-ohms;0"; ++ swapxy = <&rpidisplay_ts>,"ti,swap-xy?"; + }; + }; +-- +2.5.0 + + +From 7b5a45e254cd4a8d1ffac400c11ffdbf110e68ef Mon Sep 17 00:00:00 2001 +From: DigitalDreamtime +Date: Fri, 11 Mar 2016 11:44:35 +0000 +Subject: [PATCH 171/181] Remove I2S config from bt_pins. + +Remove I2S config from bt_pins. Causes issues with clock alignment when I2S is +used by an external DAC via GPIO header. +--- + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 6 +++--- + arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +index 5a0c45a..2cb7d43 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +@@ -45,9 +45,9 @@ + }; + + bt_pins: bt_pins { +- brcm,pins = <28 29 30 31 43>; +- brcm,function = <6 6 6 6 4>; /* alt2:PCM alt0:GPCLK2 */ +- brcm,pull = <0 0 0 0 0>; ++ brcm,pins = <43>; ++ brcm,function = <4>; /* alt0:GPCLK2 */ ++ brcm,pull = <0>; + }; + + uart0_pins: uart0_pins { +diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +index 0b8f0ca..f07afcb 100644 +--- a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts ++++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +@@ -29,7 +29,7 @@ + target = <&uart1>; + __overlay__ { + pinctrl-names = "default"; +- pinctrl-0 = <&uart1_pins>; ++ pinctrl-0 = <&uart1_pins &bt_pins>; + status = "okay"; + }; + }; +-- +2.5.0 + + +From bc6017a1c3dac44e3ce9b0d16490ced290df467c Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 10 Aug 2015 09:44:59 +0100 +Subject: [PATCH 172/181] Revert "scripts/dtc: Add overlay support" + +This reverts commit fa6d1755c2fdd9451077d8248e3804f0619f19b9. +--- + scripts/dtc/checks.c | 119 +-- + scripts/dtc/dtc-lexer.l | 5 - + scripts/dtc/dtc-lexer.lex.c_shipped | 490 +++++---- + scripts/dtc/dtc-parser.tab.c_shipped | 1896 +++++++++++++++------------------- + scripts/dtc/dtc-parser.tab.h_shipped | 107 +- + scripts/dtc/dtc-parser.y | 23 +- + scripts/dtc/dtc.c | 9 +- + scripts/dtc/dtc.h | 38 - + scripts/dtc/flattree.c | 141 +-- + scripts/dtc/version_gen.h | 2 +- + 10 files changed, 1145 insertions(+), 1685 deletions(-) + +diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c +index efd1bc6..e81a8c74 100644 +--- a/scripts/dtc/checks.c ++++ b/scripts/dtc/checks.c +@@ -458,91 +458,21 @@ static void fixup_phandle_references(struct check *c, struct node *dt, + struct node *node, struct property *prop) + { + struct marker *m = prop->val.markers; +- struct fixup *f, **fp; +- struct fixup_entry *fe, **fep; + struct node *refnode; + cell_t phandle; +- int has_phandle_refs; +- +- has_phandle_refs = 0; +- for_each_marker_of_type(m, REF_PHANDLE) { +- has_phandle_refs = 1; +- break; +- } +- +- if (!has_phandle_refs) +- return; + + for_each_marker_of_type(m, REF_PHANDLE) { + assert(m->offset + sizeof(cell_t) <= prop->val.len); + + refnode = get_node_by_ref(dt, m->ref); +- if (!refnode && !symbol_fixup_support) { ++ if (! refnode) { + FAIL(c, "Reference to non-existent node or label \"%s\"\n", +- m->ref); ++ m->ref); + continue; + } + +- if (!refnode) { +- /* allocate fixup entry */ +- fe = xmalloc(sizeof(*fe)); +- +- fe->node = node; +- fe->prop = prop; +- fe->offset = m->offset; +- fe->next = NULL; +- +- /* search for an already existing fixup */ +- for_each_fixup(dt, f) +- if (strcmp(f->ref, m->ref) == 0) +- break; +- +- /* no fixup found, add new */ +- if (f == NULL) { +- f = xmalloc(sizeof(*f)); +- f->ref = m->ref; +- f->entries = NULL; +- f->next = NULL; +- +- /* add it to the tree */ +- fp = &dt->fixups; +- while (*fp) +- fp = &(*fp)->next; +- *fp = f; +- } +- +- /* and now append fixup entry */ +- fep = &f->entries; +- while (*fep) +- fep = &(*fep)->next; +- *fep = fe; +- +- /* mark the entry as unresolved */ +- phandle = 0xdeadbeef; +- } else { +- phandle = get_node_phandle(dt, refnode); +- +- /* if it's a plugin, we need to record it */ +- if (symbol_fixup_support && dt->is_plugin) { +- +- /* allocate a new local fixup entry */ +- fe = xmalloc(sizeof(*fe)); +- +- fe->node = node; +- fe->prop = prop; +- fe->offset = m->offset; +- fe->next = NULL; +- +- /* append it to the local fixups */ +- fep = &dt->local_fixups; +- while (*fep) +- fep = &(*fep)->next; +- *fep = fe; +- } +- } +- +- *((cell_t *)(prop->val.val + m->offset)) = +- cpu_to_fdt32(phandle); ++ phandle = get_node_phandle(dt, refnode); ++ *((cell_t *)(prop->val.val + m->offset)) = cpu_to_fdt32(phandle); + } + } + ERROR(phandle_references, NULL, NULL, fixup_phandle_references, NULL, +@@ -722,45 +652,6 @@ static void check_obsolete_chosen_interrupt_controller(struct check *c, + } + TREE_WARNING(obsolete_chosen_interrupt_controller, NULL); + +-static void check_auto_label_phandles(struct check *c, struct node *dt, +- struct node *node) +-{ +- struct label *l; +- struct symbol *s, **sp; +- int has_label; +- +- if (!symbol_fixup_support) +- return; +- +- has_label = 0; +- for_each_label(node->labels, l) { +- has_label = 1; +- break; +- } +- +- if (!has_label) +- return; +- +- /* force allocation of a phandle for this node */ +- (void)get_node_phandle(dt, node); +- +- /* add the symbol */ +- for_each_label(node->labels, l) { +- +- s = xmalloc(sizeof(*s)); +- s->label = l; +- s->node = node; +- s->next = NULL; +- +- /* add it to the symbols list */ +- sp = &dt->symbols; +- while (*sp) +- sp = &((*sp)->next); +- *sp = s; +- } +-} +-NODE_WARNING(auto_label_phandles, NULL); +- + static struct check *check_table[] = { + &duplicate_node_names, &duplicate_property_names, + &node_name_chars, &node_name_format, &property_name_chars, +@@ -779,8 +670,6 @@ static struct check *check_table[] = { + &avoid_default_addr_size, + &obsolete_chosen_interrupt_controller, + +- &auto_label_phandles, +- + &always_fail, + }; + +diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l +index dd44ba2..0ee1caf 100644 +--- a/scripts/dtc/dtc-lexer.l ++++ b/scripts/dtc/dtc-lexer.l +@@ -113,11 +113,6 @@ static void lexical_error(const char *fmt, ...); + return DT_V1; + } + +-<*>"/plugin/" { +- DPRINT("Keyword: /plugin/\n"); +- return DT_PLUGIN; +- } +- + <*>"/memreserve/" { + DPRINT("Keyword: /memreserve/\n"); + BEGIN_DEFAULT(); +diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped +index 1518525..11cd78e 100644 +--- a/scripts/dtc/dtc-lexer.lex.c_shipped ++++ b/scripts/dtc/dtc-lexer.lex.c_shipped +@@ -9,7 +9,7 @@ + #define FLEX_SCANNER + #define YY_FLEX_MAJOR_VERSION 2 + #define YY_FLEX_MINOR_VERSION 5 +-#define YY_FLEX_SUBMINOR_VERSION 35 ++#define YY_FLEX_SUBMINOR_VERSION 39 + #if YY_FLEX_SUBMINOR_VERSION > 0 + #define FLEX_BETA + #endif +@@ -162,7 +162,12 @@ typedef unsigned int flex_uint32_t; + typedef struct yy_buffer_state *YY_BUFFER_STATE; + #endif + +-extern int yyleng; ++#ifndef YY_TYPEDEF_YY_SIZE_T ++#define YY_TYPEDEF_YY_SIZE_T ++typedef size_t yy_size_t; ++#endif ++ ++extern yy_size_t yyleng; + + extern FILE *yyin, *yyout; + +@@ -171,6 +176,7 @@ extern FILE *yyin, *yyout; + #define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) ++ #define YY_LINENO_REWIND_TO(ptr) + + /* Return all but the first "n" matched characters back to the input stream. */ + #define yyless(n) \ +@@ -188,11 +194,6 @@ extern FILE *yyin, *yyout; + + #define unput(c) yyunput( c, (yytext_ptr) ) + +-#ifndef YY_TYPEDEF_YY_SIZE_T +-#define YY_TYPEDEF_YY_SIZE_T +-typedef size_t yy_size_t; +-#endif +- + #ifndef YY_STRUCT_YY_BUFFER_STATE + #define YY_STRUCT_YY_BUFFER_STATE + struct yy_buffer_state +@@ -210,7 +211,7 @@ struct yy_buffer_state + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ +- int yy_n_chars; ++ yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to +@@ -280,8 +281,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + + /* yy_hold_char holds the character lost when yytext is formed. */ + static char yy_hold_char; +-static int yy_n_chars; /* number of characters read into yy_ch_buf */ +-int yyleng; ++static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ ++yy_size_t yyleng; + + /* Points to current character in buffer. */ + static char *yy_c_buf_p = (char *) 0; +@@ -309,7 +310,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); + + YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); + YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); +-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); ++YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); + + void *yyalloc (yy_size_t ); + void *yyrealloc (void *,yy_size_t ); +@@ -341,7 +342,7 @@ void yyfree (void * ); + + /* Begin user sect3 */ + +-#define yywrap(n) 1 ++#define yywrap() 1 + #define YY_SKIP_YYWRAP + + typedef unsigned char YY_CHAR; +@@ -372,8 +373,8 @@ static void yy_fatal_error (yyconst char msg[] ); + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +-#define YY_NUM_RULES 31 +-#define YY_END_OF_BUFFER 32 ++#define YY_NUM_RULES 30 ++#define YY_END_OF_BUFFER 31 + /* This struct is not used in this scanner, + but its presence is necessary. */ + struct yy_trans_info +@@ -381,26 +382,25 @@ struct yy_trans_info + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +-static yyconst flex_int16_t yy_accept[166] = ++static yyconst flex_int16_t yy_accept[159] = + { 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 32, 30, +- 19, 19, 30, 30, 30, 30, 30, 30, 30, 30, +- 30, 30, 30, 30, 30, 30, 16, 17, 17, 30, +- 17, 11, 11, 19, 27, 0, 3, 0, 28, 13, +- 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, +- 0, 22, 24, 26, 25, 23, 0, 10, 29, 0, +- 0, 0, 15, 15, 17, 17, 17, 11, 11, 11, +- 0, 13, 0, 12, 0, 0, 0, 21, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 17, 11, 11, +- 11, 0, 14, 20, 0, 0, 0, 0, 0, 0, +- +- 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 17, 7, 0, 0, 0, +- 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 4, 18, 0, 0, 5, 2, +- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 1, 0, 0, 0, 0, 6, 9, 0, +- 0, 0, 0, 8, 0 ++ 0, 0, 0, 0, 0, 0, 0, 0, 31, 29, ++ 18, 18, 29, 29, 29, 29, 29, 29, 29, 29, ++ 29, 29, 29, 29, 29, 29, 15, 16, 16, 29, ++ 16, 10, 10, 18, 26, 0, 3, 0, 27, 12, ++ 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, ++ 21, 23, 25, 24, 22, 0, 9, 28, 0, 0, ++ 0, 14, 14, 16, 16, 16, 10, 10, 10, 0, ++ 12, 0, 11, 0, 0, 0, 20, 0, 0, 0, ++ 0, 0, 0, 0, 0, 16, 10, 10, 10, 0, ++ 13, 19, 0, 0, 0, 0, 0, 0, 0, 0, ++ ++ 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 16, 6, 0, 0, 0, 0, 0, 0, 2, ++ 0, 0, 0, 0, 0, 0, 0, 0, 4, 17, ++ 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, ++ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, ++ 5, 8, 0, 0, 0, 0, 7, 0 + } ; + + static yyconst flex_int32_t yy_ec[256] = +@@ -416,9 +416,9 @@ static yyconst flex_int32_t yy_ec[256] = + 22, 22, 22, 22, 24, 22, 22, 25, 22, 22, + 1, 26, 27, 1, 22, 1, 21, 28, 29, 30, + +- 31, 21, 32, 22, 33, 22, 22, 34, 35, 36, +- 37, 38, 22, 39, 40, 41, 42, 43, 22, 25, +- 44, 22, 45, 46, 47, 1, 1, 1, 1, 1, ++ 31, 21, 22, 22, 32, 22, 22, 33, 34, 35, ++ 36, 37, 22, 38, 39, 40, 41, 42, 22, 25, ++ 43, 22, 44, 45, 46, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +@@ -435,165 +435,163 @@ static yyconst flex_int32_t yy_ec[256] = + 1, 1, 1, 1, 1 + } ; + +-static yyconst flex_int32_t yy_meta[48] = ++static yyconst flex_int32_t yy_meta[47] = + { 0, + 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, + 2, 2, 4, 5, 5, 5, 6, 1, 1, 1, + 7, 8, 8, 8, 8, 1, 1, 7, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, +- 8, 8, 8, 8, 3, 1, 4 ++ 8, 8, 8, 3, 1, 4 + } ; + +-static yyconst flex_int16_t yy_base[180] = ++static yyconst flex_int16_t yy_base[173] = + { 0, +- 0, 393, 35, 392, 66, 391, 38, 107, 397, 401, +- 55, 113, 377, 112, 111, 111, 114, 42, 376, 106, +- 377, 347, 126, 120, 0, 147, 401, 0, 124, 0, +- 137, 158, 170, 163, 401, 153, 401, 389, 401, 0, +- 378, 120, 401, 131, 380, 386, 355, 139, 351, 355, +- 351, 401, 401, 401, 401, 401, 367, 401, 401, 185, +- 350, 346, 401, 364, 0, 185, 347, 189, 356, 355, +- 0, 0, 330, 180, 366, 141, 372, 361, 332, 338, +- 331, 341, 334, 326, 205, 331, 337, 329, 401, 341, +- 167, 316, 401, 349, 348, 320, 328, 346, 180, 318, +- +- 324, 209, 324, 320, 322, 342, 338, 309, 306, 315, +- 305, 315, 312, 192, 342, 341, 401, 293, 306, 282, +- 268, 252, 255, 203, 285, 282, 272, 268, 252, 233, +- 232, 239, 208, 107, 401, 401, 238, 211, 401, 211, +- 212, 208, 228, 203, 215, 207, 233, 222, 212, 211, +- 203, 227, 401, 237, 225, 204, 185, 401, 401, 149, +- 128, 88, 42, 401, 401, 253, 259, 267, 271, 275, +- 281, 288, 292, 300, 308, 312, 318, 326, 334 ++ 0, 383, 34, 382, 65, 381, 37, 105, 387, 391, ++ 54, 111, 367, 110, 109, 109, 112, 41, 366, 104, ++ 367, 338, 124, 117, 0, 144, 391, 0, 121, 0, ++ 135, 155, 140, 179, 391, 160, 391, 379, 391, 0, ++ 368, 141, 391, 167, 370, 376, 346, 103, 342, 345, ++ 391, 391, 391, 391, 391, 358, 391, 391, 175, 342, ++ 338, 391, 355, 0, 185, 339, 184, 347, 346, 0, ++ 0, 322, 175, 357, 175, 363, 352, 324, 330, 323, ++ 332, 326, 201, 324, 329, 322, 391, 333, 181, 309, ++ 391, 341, 340, 313, 320, 338, 178, 311, 146, 317, ++ ++ 314, 315, 335, 331, 303, 300, 309, 299, 308, 188, ++ 336, 335, 391, 305, 320, 281, 283, 271, 203, 288, ++ 281, 271, 266, 264, 245, 242, 208, 104, 391, 391, ++ 244, 218, 204, 219, 206, 224, 201, 212, 204, 229, ++ 215, 208, 207, 200, 219, 391, 233, 221, 200, 181, ++ 391, 391, 149, 122, 86, 41, 391, 391, 245, 251, ++ 259, 263, 267, 273, 280, 284, 292, 300, 304, 310, ++ 318, 326 + } ; + +-static yyconst flex_int16_t yy_def[180] = ++static yyconst flex_int16_t yy_def[173] = + { 0, +- 165, 1, 1, 3, 165, 5, 1, 1, 165, 165, +- 165, 165, 165, 166, 167, 168, 165, 165, 165, 165, +- 169, 165, 165, 165, 170, 169, 165, 171, 172, 171, +- 171, 165, 165, 165, 165, 166, 165, 166, 165, 173, +- 165, 168, 165, 168, 174, 175, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 169, 165, 165, 165, +- 165, 165, 165, 169, 171, 172, 171, 165, 165, 165, +- 176, 173, 177, 168, 174, 174, 175, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 171, 165, 165, +- 176, 177, 165, 165, 165, 165, 165, 165, 165, 165, +- +- 165, 165, 165, 165, 171, 165, 165, 165, 165, 165, +- 165, 165, 165, 178, 165, 171, 165, 165, 165, 165, +- 165, 165, 165, 178, 165, 178, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 179, 165, 165, +- 165, 179, 165, 179, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 0, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165, 165 ++ 158, 1, 1, 3, 158, 5, 1, 1, 158, 158, ++ 158, 158, 158, 159, 160, 161, 158, 158, 158, 158, ++ 162, 158, 158, 158, 163, 162, 158, 164, 165, 164, ++ 164, 158, 158, 158, 158, 159, 158, 159, 158, 166, ++ 158, 161, 158, 161, 167, 168, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 162, 158, 158, 158, 158, ++ 158, 158, 162, 164, 165, 164, 158, 158, 158, 169, ++ 166, 170, 161, 167, 167, 168, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 164, 158, 158, 169, 170, ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ ++ 158, 164, 158, 158, 158, 158, 158, 158, 158, 171, ++ 158, 164, 158, 158, 158, 158, 158, 158, 171, 158, ++ 171, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 172, 158, 158, 158, 172, 158, 172, 158, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158, 0, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 158, 158 + } ; + +-static yyconst flex_int16_t yy_nxt[449] = ++static yyconst flex_int16_t yy_nxt[438] = + { 0, + 10, 11, 12, 11, 13, 14, 10, 15, 16, 10, + 10, 10, 17, 10, 10, 10, 10, 18, 19, 20, + 21, 21, 21, 21, 21, 10, 10, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, +- 21, 21, 21, 21, 10, 22, 10, 24, 25, 25, +- 25, 32, 33, 33, 164, 26, 34, 34, 34, 52, +- 53, 27, 26, 26, 26, 26, 10, 11, 12, 11, +- 13, 14, 28, 15, 16, 28, 28, 28, 24, 28, +- 28, 28, 10, 18, 19, 20, 29, 29, 29, 29, +- 29, 30, 10, 29, 29, 29, 29, 29, 29, 29, +- +- 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +- 10, 22, 10, 23, 34, 34, 34, 37, 39, 43, +- 32, 33, 33, 45, 55, 56, 46, 60, 43, 45, +- 65, 163, 46, 65, 65, 65, 44, 38, 60, 74, +- 58, 47, 141, 48, 142, 44, 49, 47, 50, 48, +- 76, 51, 62, 94, 50, 41, 44, 51, 37, 61, +- 64, 64, 64, 58, 34, 34, 34, 64, 162, 80, +- 67, 68, 68, 68, 64, 64, 64, 64, 38, 81, +- 69, 70, 71, 68, 68, 68, 60, 161, 43, 69, +- 70, 65, 69, 70, 65, 65, 65, 125, 85, 85, +- +- 85, 58, 68, 68, 68, 44, 102, 110, 125, 133, +- 102, 69, 70, 111, 114, 160, 159, 126, 85, 85, +- 85, 140, 140, 140, 140, 140, 140, 153, 126, 147, +- 147, 147, 153, 148, 147, 147, 147, 158, 148, 165, +- 157, 156, 155, 151, 150, 149, 146, 154, 145, 144, +- 143, 139, 154, 36, 36, 36, 36, 36, 36, 36, +- 36, 40, 138, 137, 136, 40, 40, 42, 42, 42, +- 42, 42, 42, 42, 42, 57, 57, 57, 57, 63, +- 135, 63, 65, 134, 165, 65, 133, 65, 65, 66, +- 132, 131, 66, 66, 66, 66, 72, 130, 72, 72, +- +- 75, 75, 75, 75, 75, 75, 75, 75, 77, 77, +- 77, 77, 77, 77, 77, 77, 91, 129, 91, 92, +- 128, 92, 92, 127, 92, 92, 124, 124, 124, 124, +- 124, 124, 124, 124, 152, 152, 152, 152, 152, 152, +- 152, 152, 60, 60, 123, 122, 121, 120, 119, 118, +- 117, 45, 116, 111, 115, 113, 112, 109, 108, 107, +- 46, 106, 93, 89, 105, 104, 103, 101, 100, 99, +- 98, 97, 96, 95, 78, 76, 93, 90, 89, 88, +- 58, 87, 86, 58, 84, 83, 82, 79, 78, 76, +- 73, 165, 59, 58, 54, 35, 165, 31, 23, 23, +- +- 9, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165 ++ 21, 21, 21, 10, 22, 10, 24, 25, 25, 25, ++ 32, 33, 33, 157, 26, 34, 34, 34, 51, 52, ++ 27, 26, 26, 26, 26, 10, 11, 12, 11, 13, ++ 14, 28, 15, 16, 28, 28, 28, 24, 28, 28, ++ 28, 10, 18, 19, 20, 29, 29, 29, 29, 29, ++ 30, 10, 29, 29, 29, 29, 29, 29, 29, 29, ++ ++ 29, 29, 29, 29, 29, 29, 29, 29, 10, 22, ++ 10, 23, 34, 34, 34, 37, 39, 43, 32, 33, ++ 33, 45, 54, 55, 46, 59, 45, 64, 156, 46, ++ 64, 64, 64, 79, 44, 38, 59, 57, 134, 47, ++ 135, 48, 80, 49, 47, 50, 48, 99, 61, 43, ++ 50, 110, 41, 67, 67, 67, 60, 63, 63, 63, ++ 57, 155, 68, 69, 63, 37, 44, 66, 67, 67, ++ 67, 63, 63, 63, 63, 73, 59, 68, 69, 70, ++ 34, 34, 34, 43, 75, 38, 154, 92, 83, 83, ++ 83, 64, 44, 120, 64, 64, 64, 67, 67, 67, ++ ++ 44, 57, 99, 68, 69, 107, 68, 69, 120, 127, ++ 108, 153, 152, 121, 83, 83, 83, 133, 133, 133, ++ 146, 133, 133, 133, 146, 140, 140, 140, 121, 141, ++ 140, 140, 140, 151, 141, 158, 150, 149, 148, 144, ++ 147, 143, 142, 139, 147, 36, 36, 36, 36, 36, ++ 36, 36, 36, 40, 138, 137, 136, 40, 40, 42, ++ 42, 42, 42, 42, 42, 42, 42, 56, 56, 56, ++ 56, 62, 132, 62, 64, 131, 130, 64, 129, 64, ++ 64, 65, 128, 158, 65, 65, 65, 65, 71, 127, ++ 71, 71, 74, 74, 74, 74, 74, 74, 74, 74, ++ ++ 76, 76, 76, 76, 76, 76, 76, 76, 89, 126, ++ 89, 90, 125, 90, 90, 124, 90, 90, 119, 119, ++ 119, 119, 119, 119, 119, 119, 145, 145, 145, 145, ++ 145, 145, 145, 145, 123, 122, 59, 59, 118, 117, ++ 116, 115, 114, 113, 45, 112, 108, 111, 109, 106, ++ 105, 104, 46, 103, 91, 87, 102, 101, 100, 98, ++ 97, 96, 95, 94, 93, 77, 75, 91, 88, 87, ++ 86, 57, 85, 84, 57, 82, 81, 78, 77, 75, ++ 72, 158, 58, 57, 53, 35, 158, 31, 23, 23, ++ 9, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158 + } ; + +-static yyconst flex_int16_t yy_chk[449] = ++static yyconst flex_int16_t yy_chk[438] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, +- 3, 7, 7, 7, 163, 3, 11, 11, 11, 18, +- 18, 3, 3, 3, 3, 3, 5, 5, 5, 5, ++ 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, ++ 7, 7, 7, 156, 3, 11, 11, 11, 18, 18, ++ 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, +- 5, 5, 5, 8, 12, 12, 12, 14, 15, 16, +- 8, 8, 8, 17, 20, 20, 17, 23, 42, 24, +- 29, 162, 24, 29, 29, 29, 16, 14, 31, 44, +- 29, 17, 134, 17, 134, 42, 17, 24, 17, 24, +- 76, 17, 24, 76, 24, 15, 44, 24, 36, 23, +- 26, 26, 26, 26, 34, 34, 34, 26, 161, 48, +- 31, 32, 32, 32, 26, 26, 26, 26, 36, 48, +- 32, 32, 32, 33, 33, 33, 60, 160, 74, 91, +- 91, 66, 33, 33, 66, 66, 66, 114, 60, 60, +- +- 60, 66, 68, 68, 68, 74, 85, 99, 124, 133, +- 102, 68, 68, 99, 102, 157, 156, 114, 85, 85, +- 85, 133, 133, 133, 140, 140, 140, 148, 124, 143, +- 143, 143, 152, 143, 147, 147, 147, 155, 147, 154, +- 151, 150, 149, 146, 145, 144, 142, 148, 141, 138, +- 137, 132, 152, 166, 166, 166, 166, 166, 166, 166, +- 166, 167, 131, 130, 129, 167, 167, 168, 168, 168, +- 168, 168, 168, 168, 168, 169, 169, 169, 169, 170, +- 128, 170, 171, 127, 126, 171, 125, 171, 171, 172, +- 123, 122, 172, 172, 172, 172, 173, 121, 173, 173, +- +- 174, 174, 174, 174, 174, 174, 174, 174, 175, 175, +- 175, 175, 175, 175, 175, 175, 176, 120, 176, 177, +- 119, 177, 177, 118, 177, 177, 178, 178, 178, 178, +- 178, 178, 178, 178, 179, 179, 179, 179, 179, 179, +- 179, 179, 116, 115, 113, 112, 111, 110, 109, 108, +- 107, 106, 105, 104, 103, 101, 100, 98, 97, 96, +- 95, 94, 92, 90, 88, 87, 86, 84, 83, 82, +- 81, 80, 79, 78, 77, 75, 73, 70, 69, 67, +- 64, 62, 61, 57, 51, 50, 49, 47, 46, 45, ++ 5, 8, 12, 12, 12, 14, 15, 16, 8, 8, ++ 8, 17, 20, 20, 17, 23, 24, 29, 155, 24, ++ 29, 29, 29, 48, 16, 14, 31, 29, 128, 17, ++ 128, 17, 48, 17, 24, 17, 24, 99, 24, 42, ++ 24, 99, 15, 33, 33, 33, 23, 26, 26, 26, ++ 26, 154, 33, 33, 26, 36, 42, 31, 32, 32, ++ 32, 26, 26, 26, 26, 44, 59, 32, 32, 32, ++ 34, 34, 34, 73, 75, 36, 153, 75, 59, 59, ++ 59, 65, 44, 110, 65, 65, 65, 67, 67, 67, ++ ++ 73, 65, 83, 89, 89, 97, 67, 67, 119, 127, ++ 97, 150, 149, 110, 83, 83, 83, 133, 133, 133, ++ 141, 127, 127, 127, 145, 136, 136, 136, 119, 136, ++ 140, 140, 140, 148, 140, 147, 144, 143, 142, 139, ++ 141, 138, 137, 135, 145, 159, 159, 159, 159, 159, ++ 159, 159, 159, 160, 134, 132, 131, 160, 160, 161, ++ 161, 161, 161, 161, 161, 161, 161, 162, 162, 162, ++ 162, 163, 126, 163, 164, 125, 124, 164, 123, 164, ++ 164, 165, 122, 121, 165, 165, 165, 165, 166, 120, ++ 166, 166, 167, 167, 167, 167, 167, 167, 167, 167, ++ ++ 168, 168, 168, 168, 168, 168, 168, 168, 169, 118, ++ 169, 170, 117, 170, 170, 116, 170, 170, 171, 171, ++ 171, 171, 171, 171, 171, 171, 172, 172, 172, 172, ++ 172, 172, 172, 172, 115, 114, 112, 111, 109, 108, ++ 107, 106, 105, 104, 103, 102, 101, 100, 98, 96, ++ 95, 94, 93, 92, 90, 88, 86, 85, 84, 82, ++ 81, 80, 79, 78, 77, 76, 74, 72, 69, 68, ++ 66, 63, 61, 60, 56, 50, 49, 47, 46, 45, + 41, 38, 22, 21, 19, 13, 9, 6, 4, 2, ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + +- 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, +- 165, 165, 165, 165, 165, 165, 165, 165 ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, ++ 158, 158, 158, 158, 158, 158, 158 + } ; + + static yy_state_type yy_last_accepting_state; +@@ -664,7 +662,7 @@ static int dts_version = 1; + static void push_input_file(const char *filename); + static bool pop_input_file(void); + static void lexical_error(const char *fmt, ...); +-#line 668 "dtc-lexer.lex.c" ++#line 666 "dtc-lexer.lex.c" + + #define INITIAL 0 + #define BYTESTRING 1 +@@ -706,7 +704,7 @@ FILE *yyget_out (void ); + + void yyset_out (FILE * out_str ); + +-int yyget_leng (void ); ++yy_size_t yyget_leng (void ); + + char *yyget_text (void ); + +@@ -855,10 +853,6 @@ YY_DECL + register char *yy_cp, *yy_bp; + register int yy_act; + +-#line 68 "dtc-lexer.l" +- +-#line 861 "dtc-lexer.lex.c" +- + if ( !(yy_init) ) + { + (yy_init) = 1; +@@ -885,6 +879,11 @@ YY_DECL + yy_load_buffer_state( ); + } + ++ { ++#line 68 "dtc-lexer.l" ++ ++#line 886 "dtc-lexer.lex.c" ++ + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); +@@ -902,7 +901,7 @@ YY_DECL + yy_match: + do + { +- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; ++ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; +@@ -911,13 +910,13 @@ yy_match: + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 166 ) ++ if ( yy_current_state >= 159 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } +- while ( yy_current_state != 165 ); ++ while ( yy_current_state != 158 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + +@@ -1008,31 +1007,23 @@ case 5: + YY_RULE_SETUP + #line 116 "dtc-lexer.l" + { +- DPRINT("Keyword: /plugin/\n"); +- return DT_PLUGIN; +- } +- YY_BREAK +-case 6: +-YY_RULE_SETUP +-#line 121 "dtc-lexer.l" +-{ + DPRINT("Keyword: /memreserve/\n"); + BEGIN_DEFAULT(); + return DT_MEMRESERVE; + } + YY_BREAK +-case 7: ++case 6: + YY_RULE_SETUP +-#line 127 "dtc-lexer.l" ++#line 122 "dtc-lexer.l" + { + DPRINT("Keyword: /bits/\n"); + BEGIN_DEFAULT(); + return DT_BITS; + } + YY_BREAK +-case 8: ++case 7: + YY_RULE_SETUP +-#line 133 "dtc-lexer.l" ++#line 128 "dtc-lexer.l" + { + DPRINT("Keyword: /delete-property/\n"); + DPRINT("\n"); +@@ -1040,9 +1031,9 @@ YY_RULE_SETUP + return DT_DEL_PROP; + } + YY_BREAK +-case 9: ++case 8: + YY_RULE_SETUP +-#line 140 "dtc-lexer.l" ++#line 135 "dtc-lexer.l" + { + DPRINT("Keyword: /delete-node/\n"); + DPRINT("\n"); +@@ -1050,9 +1041,9 @@ YY_RULE_SETUP + return DT_DEL_NODE; + } + YY_BREAK +-case 10: ++case 9: + YY_RULE_SETUP +-#line 147 "dtc-lexer.l" ++#line 142 "dtc-lexer.l" + { + DPRINT("Label: %s\n", yytext); + yylval.labelref = xstrdup(yytext); +@@ -1060,9 +1051,9 @@ YY_RULE_SETUP + return DT_LABEL; + } + YY_BREAK +-case 11: ++case 10: + YY_RULE_SETUP +-#line 154 "dtc-lexer.l" ++#line 149 "dtc-lexer.l" + { + char *e; + DPRINT("Integer Literal: '%s'\n", yytext); +@@ -1082,10 +1073,10 @@ YY_RULE_SETUP + return DT_LITERAL; + } + YY_BREAK +-case 12: +-/* rule 12 can match eol */ ++case 11: ++/* rule 11 can match eol */ + YY_RULE_SETUP +-#line 173 "dtc-lexer.l" ++#line 168 "dtc-lexer.l" + { + struct data d; + DPRINT("Character literal: %s\n", yytext); +@@ -1107,18 +1098,18 @@ YY_RULE_SETUP + return DT_CHAR_LITERAL; + } + YY_BREAK +-case 13: ++case 12: + YY_RULE_SETUP +-#line 194 "dtc-lexer.l" ++#line 189 "dtc-lexer.l" + { /* label reference */ + DPRINT("Ref: %s\n", yytext+1); + yylval.labelref = xstrdup(yytext+1); + return DT_REF; + } + YY_BREAK +-case 14: ++case 13: + YY_RULE_SETUP +-#line 200 "dtc-lexer.l" ++#line 195 "dtc-lexer.l" + { /* new-style path reference */ + yytext[yyleng-1] = '\0'; + DPRINT("Ref: %s\n", yytext+2); +@@ -1126,27 +1117,27 @@ YY_RULE_SETUP + return DT_REF; + } + YY_BREAK +-case 15: ++case 14: + YY_RULE_SETUP +-#line 207 "dtc-lexer.l" ++#line 202 "dtc-lexer.l" + { + yylval.byte = strtol(yytext, NULL, 16); + DPRINT("Byte: %02x\n", (int)yylval.byte); + return DT_BYTE; + } + YY_BREAK +-case 16: ++case 15: + YY_RULE_SETUP +-#line 213 "dtc-lexer.l" ++#line 208 "dtc-lexer.l" + { + DPRINT("/BYTESTRING\n"); + BEGIN_DEFAULT(); + return ']'; + } + YY_BREAK +-case 17: ++case 16: + YY_RULE_SETUP +-#line 219 "dtc-lexer.l" ++#line 214 "dtc-lexer.l" + { + DPRINT("PropNodeName: %s\n", yytext); + yylval.propnodename = xstrdup((yytext[0] == '\\') ? +@@ -1155,75 +1146,75 @@ YY_RULE_SETUP + return DT_PROPNODENAME; + } + YY_BREAK +-case 18: ++case 17: + YY_RULE_SETUP +-#line 227 "dtc-lexer.l" ++#line 222 "dtc-lexer.l" + { + DPRINT("Binary Include\n"); + return DT_INCBIN; + } + YY_BREAK +-case 19: +-/* rule 19 can match eol */ ++case 18: ++/* rule 18 can match eol */ + YY_RULE_SETUP +-#line 232 "dtc-lexer.l" ++#line 227 "dtc-lexer.l" + /* eat whitespace */ + YY_BREAK +-case 20: +-/* rule 20 can match eol */ ++case 19: ++/* rule 19 can match eol */ + YY_RULE_SETUP +-#line 233 "dtc-lexer.l" ++#line 228 "dtc-lexer.l" + /* eat C-style comments */ + YY_BREAK +-case 21: +-/* rule 21 can match eol */ ++case 20: ++/* rule 20 can match eol */ + YY_RULE_SETUP +-#line 234 "dtc-lexer.l" ++#line 229 "dtc-lexer.l" + /* eat C++-style comments */ + YY_BREAK +-case 22: ++case 21: + YY_RULE_SETUP +-#line 236 "dtc-lexer.l" ++#line 231 "dtc-lexer.l" + { return DT_LSHIFT; }; + YY_BREAK +-case 23: ++case 22: + YY_RULE_SETUP +-#line 237 "dtc-lexer.l" ++#line 232 "dtc-lexer.l" + { return DT_RSHIFT; }; + YY_BREAK +-case 24: ++case 23: + YY_RULE_SETUP +-#line 238 "dtc-lexer.l" ++#line 233 "dtc-lexer.l" + { return DT_LE; }; + YY_BREAK +-case 25: ++case 24: + YY_RULE_SETUP +-#line 239 "dtc-lexer.l" ++#line 234 "dtc-lexer.l" + { return DT_GE; }; + YY_BREAK +-case 26: ++case 25: + YY_RULE_SETUP +-#line 240 "dtc-lexer.l" ++#line 235 "dtc-lexer.l" + { return DT_EQ; }; + YY_BREAK +-case 27: ++case 26: + YY_RULE_SETUP +-#line 241 "dtc-lexer.l" ++#line 236 "dtc-lexer.l" + { return DT_NE; }; + YY_BREAK +-case 28: ++case 27: + YY_RULE_SETUP +-#line 242 "dtc-lexer.l" ++#line 237 "dtc-lexer.l" + { return DT_AND; }; + YY_BREAK +-case 29: ++case 28: + YY_RULE_SETUP +-#line 243 "dtc-lexer.l" ++#line 238 "dtc-lexer.l" + { return DT_OR; }; + YY_BREAK +-case 30: ++case 29: + YY_RULE_SETUP +-#line 245 "dtc-lexer.l" ++#line 240 "dtc-lexer.l" + { + DPRINT("Char: %c (\\x%02x)\n", yytext[0], + (unsigned)yytext[0]); +@@ -1239,12 +1230,12 @@ YY_RULE_SETUP + return yytext[0]; + } + YY_BREAK +-case 31: ++case 30: + YY_RULE_SETUP +-#line 260 "dtc-lexer.l" ++#line 255 "dtc-lexer.l" + ECHO; + YY_BREAK +-#line 1248 "dtc-lexer.lex.c" ++#line 1239 "dtc-lexer.lex.c" + + case YY_END_OF_BUFFER: + { +@@ -1374,6 +1365,7 @@ ECHO; + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ ++ } /* end of user's declarations */ + } /* end of yylex */ + + /* yy_get_next_buffer - try to read in a new buffer +@@ -1429,21 +1421,21 @@ static int yy_get_next_buffer (void) + + else + { +- int num_to_read = ++ yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ +- YY_BUFFER_STATE b = YY_CURRENT_BUFFER; ++ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { +- int new_size = b->yy_buf_size * 2; ++ yy_size_t new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; +@@ -1474,7 +1466,7 @@ static int yy_get_next_buffer (void) + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), +- (yy_n_chars), (size_t) num_to_read ); ++ (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } +@@ -1536,7 +1528,7 @@ static int yy_get_next_buffer (void) + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 166 ) ++ if ( yy_current_state >= 159 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +@@ -1564,13 +1556,13 @@ static int yy_get_next_buffer (void) + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 166 ) ++ if ( yy_current_state >= 159 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- yy_is_jam = (yy_current_state == 165); ++ yy_is_jam = (yy_current_state == 158); + +- return yy_is_jam ? 0 : yy_current_state; ++ return yy_is_jam ? 0 : yy_current_state; + } + + #ifndef YY_NO_INPUT +@@ -1597,7 +1589,7 @@ static int yy_get_next_buffer (void) + + else + { /* need more input */ +- int offset = (yy_c_buf_p) - (yytext_ptr); ++ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) +@@ -1871,7 +1863,7 @@ void yypop_buffer_state (void) + */ + static void yyensure_buffer_stack (void) + { +- int num_to_alloc; ++ yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + +@@ -1968,12 +1960,12 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) + * + * @return the newly allocated buffer state object. + */ +-YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) ++YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; +- int i; ++ yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; +@@ -2055,7 +2047,7 @@ FILE *yyget_out (void) + /** Get the length of the current token. + * + */ +-int yyget_leng (void) ++yy_size_t yyget_leng (void) + { + return yyleng; + } +@@ -2203,7 +2195,7 @@ void yyfree (void * ptr ) + + #define YYTABLES_NAME "yytables" + +-#line 260 "dtc-lexer.l" ++#line 254 "dtc-lexer.l" + + + +diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped +index 2c1784e..116458c 100644 +--- a/scripts/dtc/dtc-parser.tab.c_shipped ++++ b/scripts/dtc/dtc-parser.tab.c_shipped +@@ -1,19 +1,19 @@ +-/* A Bison parser, made by GNU Bison 2.5. */ ++/* A Bison parser, made by GNU Bison 3.0.2. */ + + /* Bison implementation for Yacc-like parsers in C +- +- Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. +- ++ ++ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. ++ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. +- ++ + 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. +- ++ + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +@@ -26,7 +26,7 @@ + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. +- ++ + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +@@ -44,7 +44,7 @@ + #define YYBISON 1 + + /* Bison version. */ +-#define YYBISON_VERSION "2.5" ++#define YYBISON_VERSION "3.0.2" + + /* Skeleton name. */ + #define YYSKELETON_NAME "yacc.c" +@@ -58,18 +58,13 @@ + /* Pull parsers. */ + #define YYPULL 1 + +-/* Using locations. */ +-#define YYLSP_NEEDED 1 + + + + /* Copy the first part of user declarations. */ +- +-/* Line 268 of yacc.c */ +-#line 20 "dtc-parser.y" ++#line 20 "dtc-parser.y" /* yacc.c:339 */ + + #include +-#include + + #include "dtc.h" + #include "srcpos.h" +@@ -85,14 +80,15 @@ extern void yyerror(char const *s); + extern struct boot_info *the_boot_info; + extern bool treesource_error; + ++#line 84 "dtc-parser.tab.c" /* yacc.c:339 */ + +-/* Line 268 of yacc.c */ +-#line 91 "dtc-parser.tab.c" +- +-/* Enabling traces. */ +-#ifndef YYDEBUG +-# define YYDEBUG 0 +-#endif ++# ifndef YY_NULLPTR ++# if defined __cplusplus && 201103L <= __cplusplus ++# define YY_NULLPTR nullptr ++# else ++# define YY_NULLPTR 0 ++# endif ++# endif + + /* Enabling verbose error messages. */ + #ifdef YYERROR_VERBOSE +@@ -102,51 +98,53 @@ extern bool treesource_error; + # define YYERROR_VERBOSE 0 + #endif + +-/* Enabling the token table. */ +-#ifndef YYTOKEN_TABLE +-# define YYTOKEN_TABLE 0 ++/* In a future release of Bison, this section will be replaced ++ by #include "dtc-parser.tab.h". */ ++#ifndef YY_YY_DTC_PARSER_TAB_H_INCLUDED ++# define YY_YY_DTC_PARSER_TAB_H_INCLUDED ++/* Debug traces. */ ++#ifndef YYDEBUG ++# define YYDEBUG 0 ++#endif ++#if YYDEBUG ++extern int yydebug; + #endif + +- +-/* Tokens. */ ++/* Token type. */ + #ifndef YYTOKENTYPE + # define YYTOKENTYPE +- /* Put the tokens into the symbol table, so that GDB and other debuggers +- know about them. */ +- enum yytokentype { +- DT_V1 = 258, +- DT_PLUGIN = 259, +- DT_MEMRESERVE = 260, +- DT_LSHIFT = 261, +- DT_RSHIFT = 262, +- DT_LE = 263, +- DT_GE = 264, +- DT_EQ = 265, +- DT_NE = 266, +- DT_AND = 267, +- DT_OR = 268, +- DT_BITS = 269, +- DT_DEL_PROP = 270, +- DT_DEL_NODE = 271, +- DT_PROPNODENAME = 272, +- DT_LITERAL = 273, +- DT_CHAR_LITERAL = 274, +- DT_BYTE = 275, +- DT_STRING = 276, +- DT_LABEL = 277, +- DT_REF = 278, +- DT_INCBIN = 279 +- }; ++ enum yytokentype ++ { ++ DT_V1 = 258, ++ DT_MEMRESERVE = 259, ++ DT_LSHIFT = 260, ++ DT_RSHIFT = 261, ++ DT_LE = 262, ++ DT_GE = 263, ++ DT_EQ = 264, ++ DT_NE = 265, ++ DT_AND = 266, ++ DT_OR = 267, ++ DT_BITS = 268, ++ DT_DEL_PROP = 269, ++ DT_DEL_NODE = 270, ++ DT_PROPNODENAME = 271, ++ DT_LITERAL = 272, ++ DT_CHAR_LITERAL = 273, ++ DT_BYTE = 274, ++ DT_STRING = 275, ++ DT_LABEL = 276, ++ DT_REF = 277, ++ DT_INCBIN = 278 ++ }; + #endif + +- +- ++/* Value type. */ + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +-typedef union YYSTYPE ++typedef union YYSTYPE YYSTYPE; ++union YYSTYPE + { +- +-/* Line 293 of yacc.c */ +-#line 39 "dtc-parser.y" ++#line 38 "dtc-parser.y" /* yacc.c:355 */ + + char *propnodename; + char *labelref; +@@ -164,37 +162,37 @@ typedef union YYSTYPE + struct node *nodelist; + struct reserve_info *re; + uint64_t integer; +- int is_plugin; + +- +- +-/* Line 293 of yacc.c */ +-#line 173 "dtc-parser.tab.c" +-} YYSTYPE; ++#line 167 "dtc-parser.tab.c" /* yacc.c:355 */ ++}; + # define YYSTYPE_IS_TRIVIAL 1 +-# define yystype YYSTYPE /* obsolescent; will be withdrawn */ + # define YYSTYPE_IS_DECLARED 1 + #endif + ++/* Location type. */ + #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +-typedef struct YYLTYPE ++typedef struct YYLTYPE YYLTYPE; ++struct YYLTYPE + { + int first_line; + int first_column; + int last_line; + int last_column; +-} YYLTYPE; +-# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ ++}; + # define YYLTYPE_IS_DECLARED 1 + # define YYLTYPE_IS_TRIVIAL 1 + #endif + + +-/* Copy the second part of user declarations. */ ++extern YYSTYPE yylval; ++extern YYLTYPE yylloc; ++int yyparse (void); + ++#endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED */ + +-/* Line 343 of yacc.c */ +-#line 198 "dtc-parser.tab.c" ++/* Copy the second part of user declarations. */ ++ ++#line 196 "dtc-parser.tab.c" /* yacc.c:358 */ + + #ifdef short + # undef short +@@ -208,11 +206,8 @@ typedef unsigned char yytype_uint8; + + #ifdef YYTYPE_INT8 + typedef YYTYPE_INT8 yytype_int8; +-#elif (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) +-typedef signed char yytype_int8; + #else +-typedef short int yytype_int8; ++typedef signed char yytype_int8; + #endif + + #ifdef YYTYPE_UINT16 +@@ -232,8 +227,7 @@ typedef short int yytype_int16; + # define YYSIZE_T __SIZE_TYPE__ + # elif defined size_t + # define YYSIZE_T size_t +-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) ++# elif ! defined YYSIZE_T + # include /* INFRINGES ON USER NAME SPACE */ + # define YYSIZE_T size_t + # else +@@ -247,38 +241,67 @@ typedef short int yytype_int16; + # if defined YYENABLE_NLS && YYENABLE_NLS + # if ENABLE_NLS + # include /* INFRINGES ON USER NAME SPACE */ +-# define YY_(msgid) dgettext ("bison-runtime", msgid) ++# define YY_(Msgid) dgettext ("bison-runtime", Msgid) + # endif + # endif + # ifndef YY_ +-# define YY_(msgid) msgid ++# define YY_(Msgid) Msgid ++# endif ++#endif ++ ++#ifndef YY_ATTRIBUTE ++# if (defined __GNUC__ \ ++ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ ++ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C ++# define YY_ATTRIBUTE(Spec) __attribute__(Spec) ++# else ++# define YY_ATTRIBUTE(Spec) /* empty */ ++# endif ++#endif ++ ++#ifndef YY_ATTRIBUTE_PURE ++# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) ++#endif ++ ++#ifndef YY_ATTRIBUTE_UNUSED ++# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) ++#endif ++ ++#if !defined _Noreturn \ ++ && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) ++# if defined _MSC_VER && 1200 <= _MSC_VER ++# define _Noreturn __declspec (noreturn) ++# else ++# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) + # endif + #endif + + /* Suppress unused-variable warnings by "using" E. */ + #if ! defined lint || defined __GNUC__ +-# define YYUSE(e) ((void) (e)) ++# define YYUSE(E) ((void) (E)) + #else +-# define YYUSE(e) /* empty */ ++# define YYUSE(E) /* empty */ + #endif + +-/* Identity function, used to suppress warnings about constant conditions. */ +-#ifndef lint +-# define YYID(n) (n) +-#else +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) +-static int +-YYID (int yyi) ++#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ ++/* Suppress an incorrect diagnostic about yylval being uninitialized. */ ++# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ ++ _Pragma ("GCC diagnostic push") \ ++ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ ++ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") ++# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ ++ _Pragma ("GCC diagnostic pop") + #else +-static int +-YYID (yyi) +- int yyi; ++# define YY_INITIAL_VALUE(Value) Value + #endif +-{ +- return yyi; +-} ++#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN ++# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN ++# define YY_IGNORE_MAYBE_UNINITIALIZED_END + #endif ++#ifndef YY_INITIAL_VALUE ++# define YY_INITIAL_VALUE(Value) /* Nothing. */ ++#endif ++ + + #if ! defined yyoverflow || YYERROR_VERBOSE + +@@ -297,9 +320,9 @@ YYID (yyi) + # define alloca _alloca + # else + # define YYSTACK_ALLOC alloca +-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) ++# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS + # include /* INFRINGES ON USER NAME SPACE */ ++ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ + # ifndef EXIT_SUCCESS + # define EXIT_SUCCESS 0 + # endif +@@ -309,8 +332,8 @@ YYID (yyi) + # endif + + # ifdef YYSTACK_ALLOC +- /* Pacify GCC's `empty if-body' warning. */ +-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) ++ /* Pacify GCC's 'empty if-body' warning. */ ++# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) + # ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely +@@ -326,7 +349,7 @@ YYID (yyi) + # endif + # if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ +- && (defined YYFREE || defined free))) ++ && (defined YYFREE || defined free))) + # include /* INFRINGES ON USER NAME SPACE */ + # ifndef EXIT_SUCCESS + # define EXIT_SUCCESS 0 +@@ -334,15 +357,13 @@ YYID (yyi) + # endif + # ifndef YYMALLOC + # define YYMALLOC malloc +-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) ++# if ! defined malloc && ! defined EXIT_SUCCESS + void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ + # endif + # endif + # ifndef YYFREE + # define YYFREE free +-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) ++# if ! defined free && ! defined EXIT_SUCCESS + void free (void *); /* INFRINGES ON USER NAME SPACE */ + # endif + # endif +@@ -352,8 +373,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ + + #if (! defined yyoverflow \ + && (! defined __cplusplus \ +- || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ +- && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) ++ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ ++ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + + /* A type that is properly aligned for any stack member. */ + union yyalloc +@@ -379,35 +400,35 @@ union yyalloc + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ +- do \ +- { \ +- YYSIZE_T yynewbytes; \ +- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ +- Stack = &yyptr->Stack_alloc; \ +- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ +- yyptr += yynewbytes / sizeof (*yyptr); \ +- } \ +- while (YYID (0)) ++# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ ++ do \ ++ { \ ++ YYSIZE_T yynewbytes; \ ++ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ ++ Stack = &yyptr->Stack_alloc; \ ++ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ ++ yyptr += yynewbytes / sizeof (*yyptr); \ ++ } \ ++ while (0) + + #endif + + #if defined YYCOPY_NEEDED && YYCOPY_NEEDED +-/* Copy COUNT objects from FROM to TO. The source and destination do ++/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ + # ifndef YYCOPY + # if defined __GNUC__ && 1 < __GNUC__ +-# define YYCOPY(To, From, Count) \ +- __builtin_memcpy (To, From, (Count) * sizeof (*(From))) ++# define YYCOPY(Dst, Src, Count) \ ++ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) + # else +-# define YYCOPY(To, From, Count) \ +- do \ +- { \ +- YYSIZE_T yyi; \ +- for (yyi = 0; yyi < (Count); yyi++) \ +- (To)[yyi] = (From)[yyi]; \ +- } \ +- while (YYID (0)) ++# define YYCOPY(Dst, Src, Count) \ ++ do \ ++ { \ ++ YYSIZE_T yyi; \ ++ for (yyi = 0; yyi < (Count); yyi++) \ ++ (Dst)[yyi] = (Src)[yyi]; \ ++ } \ ++ while (0) + # endif + # endif + #endif /* !YYCOPY_NEEDED */ +@@ -418,37 +439,39 @@ union yyalloc + #define YYLAST 136 + + /* YYNTOKENS -- Number of terminals. */ +-#define YYNTOKENS 48 ++#define YYNTOKENS 47 + /* YYNNTS -- Number of nonterminals. */ +-#define YYNNTS 29 ++#define YYNNTS 28 + /* YYNRULES -- Number of rules. */ +-#define YYNRULES 82 +-/* YYNRULES -- Number of states. */ +-#define YYNSTATES 147 ++#define YYNRULES 80 ++/* YYNSTATES -- Number of states. */ ++#define YYNSTATES 144 + +-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ ++/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned ++ by yylex, with out-of-bounds checking. */ + #define YYUNDEFTOK 2 +-#define YYMAXUTOK 279 ++#define YYMAXUTOK 278 + +-#define YYTRANSLATE(YYX) \ ++#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ ++/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM ++ as returned by yylex, without out-of-bounds checking. */ + static const yytype_uint8 yytranslate[] = + { + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 47, 2, 2, 2, 45, 41, 2, +- 33, 35, 44, 42, 34, 43, 2, 26, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 38, 25, +- 36, 29, 30, 37, 2, 2, 2, 2, 2, 2, ++ 2, 2, 2, 46, 2, 2, 2, 44, 40, 2, ++ 32, 34, 43, 41, 33, 42, 2, 25, 2, 2, ++ 2, 2, 2, 2, 2, 2, 2, 2, 37, 24, ++ 35, 28, 29, 36, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 31, 2, 32, 40, 2, 2, 2, 2, 2, ++ 2, 30, 2, 31, 39, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 27, 39, 28, 46, 2, 2, 2, ++ 2, 2, 2, 26, 38, 27, 45, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +@@ -463,335 +486,292 @@ static const yytype_uint8 yytranslate[] = + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, +- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 ++ 15, 16, 17, 18, 19, 20, 21, 22, 23 + }; + + #if YYDEBUG +-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in +- YYRHS. */ +-static const yytype_uint16 yyprhs[] = +-{ +- 0, 0, 3, 9, 10, 13, 14, 17, 22, 25, +- 28, 32, 37, 41, 46, 52, 53, 56, 61, 64, +- 68, 71, 74, 78, 83, 86, 96, 102, 105, 106, +- 109, 112, 116, 118, 121, 124, 127, 129, 131, 135, +- 137, 139, 145, 147, 151, 153, 157, 159, 163, 165, +- 169, 171, 175, 177, 181, 185, 187, 191, 195, 199, +- 203, 207, 211, 213, 217, 221, 223, 227, 231, 235, +- 237, 239, 242, 245, 248, 249, 252, 255, 256, 259, +- 262, 265, 269 +-}; +- +-/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +-static const yytype_int8 yyrhs[] = +-{ +- 49, 0, -1, 3, 25, 50, 51, 53, -1, -1, +- 4, 25, -1, -1, 52, 51, -1, 5, 60, 60, +- 25, -1, 22, 52, -1, 26, 54, -1, 53, 26, +- 54, -1, 53, 22, 23, 54, -1, 53, 23, 54, +- -1, 53, 16, 23, 25, -1, 27, 55, 75, 28, +- 25, -1, -1, 55, 56, -1, 17, 29, 57, 25, +- -1, 17, 25, -1, 15, 17, 25, -1, 22, 56, +- -1, 58, 21, -1, 58, 59, 30, -1, 58, 31, +- 74, 32, -1, 58, 23, -1, 58, 24, 33, 21, +- 34, 60, 34, 60, 35, -1, 58, 24, 33, 21, +- 35, -1, 57, 22, -1, -1, 57, 34, -1, 58, +- 22, -1, 14, 18, 36, -1, 36, -1, 59, 60, +- -1, 59, 23, -1, 59, 22, -1, 18, -1, 19, +- -1, 33, 61, 35, -1, 62, -1, 63, -1, 63, +- 37, 61, 38, 62, -1, 64, -1, 63, 13, 64, +- -1, 65, -1, 64, 12, 65, -1, 66, -1, 65, +- 39, 66, -1, 67, -1, 66, 40, 67, -1, 68, +- -1, 67, 41, 68, -1, 69, -1, 68, 10, 69, +- -1, 68, 11, 69, -1, 70, -1, 69, 36, 70, +- -1, 69, 30, 70, -1, 69, 8, 70, -1, 69, +- 9, 70, -1, 70, 6, 71, -1, 70, 7, 71, +- -1, 71, -1, 71, 42, 72, -1, 71, 43, 72, +- -1, 72, -1, 72, 44, 73, -1, 72, 26, 73, +- -1, 72, 45, 73, -1, 73, -1, 60, -1, 43, +- 73, -1, 46, 73, -1, 47, 73, -1, -1, 74, +- 20, -1, 74, 22, -1, -1, 76, 75, -1, 76, +- 56, -1, 17, 54, -1, 16, 17, 25, -1, 22, +- 76, -1 +-}; +- +-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ ++ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ + static const yytype_uint16 yyrline[] = + { +- 0, 108, 108, 119, 122, 130, 133, 140, 144, 152, +- 156, 161, 172, 182, 197, 205, 208, 215, 219, 223, +- 227, 235, 239, 243, 247, 251, 267, 277, 285, 288, +- 292, 299, 315, 320, 339, 353, 360, 361, 362, 369, +- 373, 374, 378, 379, 383, 384, 388, 389, 393, 394, +- 398, 399, 403, 404, 405, 409, 410, 411, 412, 413, +- 417, 418, 419, 423, 424, 425, 429, 430, 431, 432, +- 436, 437, 438, 439, 444, 447, 451, 459, 462, 466, +- 474, 478, 482 ++ 0, 104, 104, 113, 116, 123, 127, 135, 139, 144, ++ 155, 165, 180, 188, 191, 198, 202, 206, 210, 218, ++ 222, 226, 230, 234, 250, 260, 268, 271, 275, 282, ++ 298, 303, 322, 336, 343, 344, 345, 352, 356, 357, ++ 361, 362, 366, 367, 371, 372, 376, 377, 381, 382, ++ 386, 387, 388, 392, 393, 394, 395, 396, 400, 401, ++ 402, 406, 407, 408, 412, 413, 414, 415, 419, 420, ++ 421, 422, 427, 430, 434, 442, 445, 449, 457, 461, ++ 465 + }; + #endif + +-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE ++#if YYDEBUG || YYERROR_VERBOSE || 0 + /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ + static const char *const yytname[] = + { +- "$end", "error", "$undefined", "DT_V1", "DT_PLUGIN", "DT_MEMRESERVE", +- "DT_LSHIFT", "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND", +- "DT_OR", "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME", +- "DT_LITERAL", "DT_CHAR_LITERAL", "DT_BYTE", "DT_STRING", "DT_LABEL", +- "DT_REF", "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['", +- "']'", "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'", +- "'+'", "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile", +- "plugindecl", "memreserves", "memreserve", "devicetree", "nodedef", +- "proplist", "propdef", "propdata", "propdataprefix", "arrayprefix", +- "integer_prim", "integer_expr", "integer_trinary", "integer_or", +- "integer_and", "integer_bitor", "integer_bitxor", "integer_bitand", +- "integer_eq", "integer_rela", "integer_shift", "integer_add", +- "integer_mul", "integer_unary", "bytestring", "subnodes", "subnode", 0 ++ "$end", "error", "$undefined", "DT_V1", "DT_MEMRESERVE", "DT_LSHIFT", ++ "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND", "DT_OR", ++ "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME", "DT_LITERAL", ++ "DT_CHAR_LITERAL", "DT_BYTE", "DT_STRING", "DT_LABEL", "DT_REF", ++ "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['", "']'", ++ "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'", "'+'", ++ "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile", ++ "memreserves", "memreserve", "devicetree", "nodedef", "proplist", ++ "propdef", "propdata", "propdataprefix", "arrayprefix", "integer_prim", ++ "integer_expr", "integer_trinary", "integer_or", "integer_and", ++ "integer_bitor", "integer_bitxor", "integer_bitand", "integer_eq", ++ "integer_rela", "integer_shift", "integer_add", "integer_mul", ++ "integer_unary", "bytestring", "subnodes", "subnode", YY_NULLPTR + }; + #endif + + # ifdef YYPRINT +-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to +- token YYLEX-NUM. */ ++/* YYTOKNUM[NUM] -- (External) token number corresponding to the ++ (internal) symbol number NUM (which must be that of a token). */ + static const yytype_uint16 yytoknum[] = + { + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, +- 275, 276, 277, 278, 279, 59, 47, 123, 125, 61, +- 62, 91, 93, 40, 44, 41, 60, 63, 58, 124, +- 94, 38, 43, 45, 42, 37, 126, 33 ++ 275, 276, 277, 278, 59, 47, 123, 125, 61, 62, ++ 91, 93, 40, 44, 41, 60, 63, 58, 124, 94, ++ 38, 43, 45, 42, 37, 126, 33 + }; + # endif + +-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +-static const yytype_uint8 yyr1[] = +-{ +- 0, 48, 49, 50, 50, 51, 51, 52, 52, 53, +- 53, 53, 53, 53, 54, 55, 55, 56, 56, 56, +- 56, 57, 57, 57, 57, 57, 57, 57, 58, 58, +- 58, 59, 59, 59, 59, 59, 60, 60, 60, 61, +- 62, 62, 63, 63, 64, 64, 65, 65, 66, 66, +- 67, 67, 68, 68, 68, 69, 69, 69, 69, 69, +- 70, 70, 70, 71, 71, 71, 72, 72, 72, 72, +- 73, 73, 73, 73, 74, 74, 74, 75, 75, 75, +- 76, 76, 76 +-}; ++#define YYPACT_NINF -81 + +-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +-static const yytype_uint8 yyr2[] = ++#define yypact_value_is_default(Yystate) \ ++ (!!((Yystate) == (-81))) ++ ++#define YYTABLE_NINF -1 ++ ++#define yytable_value_is_error(Yytable_value) \ ++ 0 ++ ++ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing ++ STATE-NUM. */ ++static const yytype_int8 yypact[] = + { +- 0, 2, 5, 0, 2, 0, 2, 4, 2, 2, +- 3, 4, 3, 4, 5, 0, 2, 4, 2, 3, +- 2, 2, 3, 4, 2, 9, 5, 2, 0, 2, +- 2, 3, 1, 2, 2, 2, 1, 1, 3, 1, +- 1, 5, 1, 3, 1, 3, 1, 3, 1, 3, +- 1, 3, 1, 3, 3, 1, 3, 3, 3, 3, +- 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, +- 1, 2, 2, 2, 0, 2, 2, 0, 2, 2, +- 2, 3, 2 ++ 16, -11, 21, 10, -81, 25, 10, 19, 10, -81, ++ -81, -9, 25, -81, 2, 51, -81, -9, -9, -9, ++ -81, 1, -81, -6, 50, 14, 28, 29, 36, 3, ++ 58, 44, -3, -81, 47, -81, -81, 65, 68, 2, ++ 2, -81, -81, -81, -81, -9, -9, -9, -9, -9, ++ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, ++ -9, -9, -9, -9, -81, 63, 69, 2, -81, -81, ++ 50, 57, 14, 28, 29, 36, 3, 3, 58, 58, ++ 58, 58, 44, 44, -3, -3, -81, -81, -81, 79, ++ 80, -8, 63, -81, 72, 63, -81, -81, -9, 76, ++ 77, -81, -81, -81, -81, -81, 78, -81, -81, -81, ++ -81, -81, 35, 4, -81, -81, -81, -81, 86, -81, ++ -81, -81, 73, -81, -81, 33, 71, 84, 39, -81, ++ -81, -81, -81, -81, 41, -81, -81, -81, 25, -81, ++ 74, 25, 75, -81 + }; + +-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. +- Performed when YYTABLE doesn't specify something else to do. Zero +- means the default is an error. */ ++ /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. ++ Performed when YYTABLE does not specify something else to do. Zero ++ means the default is an error. */ + static const yytype_uint8 yydefact[] = + { +- 0, 0, 0, 3, 1, 0, 5, 4, 0, 0, +- 0, 5, 36, 37, 0, 0, 8, 0, 2, 6, +- 0, 0, 0, 70, 0, 39, 40, 42, 44, 46, +- 48, 50, 52, 55, 62, 65, 69, 0, 15, 9, +- 0, 0, 0, 0, 71, 72, 73, 38, 0, 0, ++ 0, 0, 0, 3, 1, 0, 0, 0, 3, 34, ++ 35, 0, 0, 6, 0, 2, 4, 0, 0, 0, ++ 68, 0, 37, 38, 40, 42, 44, 46, 48, 50, ++ 53, 60, 63, 67, 0, 13, 7, 0, 0, 0, ++ 0, 69, 70, 71, 36, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 7, 77, 0, +- 0, 12, 10, 43, 0, 45, 47, 49, 51, 53, +- 54, 58, 59, 57, 56, 60, 61, 63, 64, 67, +- 66, 68, 0, 0, 0, 0, 16, 0, 77, 13, +- 11, 0, 0, 0, 18, 28, 80, 20, 82, 0, +- 79, 78, 41, 19, 81, 0, 0, 14, 27, 17, +- 29, 0, 21, 30, 24, 0, 74, 32, 0, 0, +- 0, 0, 35, 34, 22, 33, 31, 0, 75, 76, +- 23, 0, 26, 0, 0, 0, 25 ++ 0, 0, 0, 0, 5, 75, 0, 0, 10, 8, ++ 41, 0, 43, 45, 47, 49, 51, 52, 56, 57, ++ 55, 54, 58, 59, 61, 62, 65, 64, 66, 0, ++ 0, 0, 0, 14, 0, 75, 11, 9, 0, 0, ++ 0, 16, 26, 78, 18, 80, 0, 77, 76, 39, ++ 17, 79, 0, 0, 12, 25, 15, 27, 0, 19, ++ 28, 22, 0, 72, 30, 0, 0, 0, 0, 33, ++ 32, 20, 31, 29, 0, 73, 74, 21, 0, 24, ++ 0, 0, 0, 23 + }; + +-/* YYDEFGOTO[NTERM-NUM]. */ +-static const yytype_int16 yydefgoto[] = ++ /* YYPGOTO[NTERM-NUM]. */ ++static const yytype_int8 yypgoto[] = + { +- -1, 2, 6, 10, 11, 18, 39, 68, 96, 115, +- 116, 128, 23, 24, 25, 26, 27, 28, 29, 30, +- 31, 32, 33, 34, 35, 36, 131, 97, 98 ++ -81, -81, 100, 104, -81, -38, -81, -80, -81, -81, ++ -81, -5, 66, 13, -81, 70, 67, 81, 64, 82, ++ 37, 27, 34, 38, -14, -81, 22, 24 + }; + +-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing +- STATE-NUM. */ +-#define YYPACT_NINF -84 +-static const yytype_int8 yypact[] = ++ /* YYDEFGOTO[NTERM-NUM]. */ ++static const yytype_int16 yydefgoto[] = + { +- 15, -12, 35, 42, -84, 27, 9, -84, 24, 9, +- 43, 9, -84, -84, -10, 24, -84, 60, 44, -84, +- -10, -10, -10, -84, 55, -84, -7, 52, 53, 51, +- 54, 10, 2, 38, 37, -4, -84, 68, -84, -84, +- 71, 73, 60, 60, -84, -84, -84, -84, -10, -10, +- -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, +- -10, -10, -10, -10, -10, -10, -10, -84, 56, 72, +- 60, -84, -84, 52, 61, 53, 51, 54, 10, 2, +- 2, 38, 38, 38, 38, 37, 37, -4, -4, -84, +- -84, -84, 81, 83, 34, 56, -84, 74, 56, -84, +- -84, -10, 76, 78, -84, -84, -84, -84, -84, 79, +- -84, -84, -84, -84, -84, -6, 3, -84, -84, -84, +- -84, 87, -84, -84, -84, 75, -84, -84, 32, 70, +- 86, 36, -84, -84, -84, -84, -84, 47, -84, -84, +- -84, 24, -84, 77, 24, 80, -84 ++ -1, 2, 7, 8, 15, 36, 65, 93, 112, 113, ++ 125, 20, 21, 22, 23, 24, 25, 26, 27, 28, ++ 29, 30, 31, 32, 33, 128, 94, 95 + }; + +-/* YYPGOTO[NTERM-NUM]. */ +-static const yytype_int8 yypgoto[] = ++ /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If ++ positive, shift that token. If negative, reduce the rule whose ++ number is the opposite. If YYTABLE_NINF, syntax error. */ ++static const yytype_uint8 yytable[] = + { +- -84, -84, -84, 98, 101, -84, -41, -84, -83, -84, +- -84, -84, -8, 63, 12, -84, 66, 67, 65, 69, +- 82, 29, 18, 25, 26, -17, -84, 20, 28 ++ 12, 68, 69, 41, 42, 43, 45, 34, 9, 10, ++ 53, 54, 104, 3, 5, 107, 101, 118, 35, 1, ++ 102, 4, 61, 11, 119, 120, 121, 122, 35, 97, ++ 46, 6, 55, 17, 123, 44, 18, 19, 56, 124, ++ 62, 63, 9, 10, 14, 51, 52, 86, 87, 88, ++ 9, 10, 48, 103, 129, 130, 115, 11, 135, 116, ++ 136, 47, 131, 57, 58, 11, 37, 49, 117, 50, ++ 137, 64, 38, 39, 138, 139, 40, 89, 90, 91, ++ 78, 79, 80, 81, 92, 59, 60, 66, 76, 77, ++ 67, 82, 83, 96, 98, 99, 100, 84, 85, 106, ++ 110, 111, 114, 126, 134, 127, 133, 141, 16, 143, ++ 13, 109, 71, 74, 72, 70, 105, 108, 0, 0, ++ 132, 0, 0, 0, 0, 0, 0, 0, 0, 73, ++ 0, 0, 75, 140, 0, 0, 142 + }; + +-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If +- positive, shift that token. If negative, reduce the rule which +- number is the opposite. If YYTABLE_NINF, syntax error. */ +-#define YYTABLE_NINF -1 +-static const yytype_uint8 yytable[] = ++static const yytype_int16 yycheck[] = + { +- 15, 71, 72, 44, 45, 46, 48, 37, 12, 13, +- 56, 57, 107, 3, 8, 110, 118, 121, 1, 119, +- 54, 55, 64, 14, 122, 123, 124, 125, 120, 100, +- 49, 9, 58, 20, 126, 4, 21, 22, 59, 127, +- 65, 66, 12, 13, 60, 61, 5, 89, 90, 91, +- 12, 13, 7, 106, 132, 133, 138, 14, 139, 104, +- 40, 38, 134, 105, 50, 14, 41, 42, 140, 17, +- 43, 92, 93, 94, 81, 82, 83, 84, 95, 62, +- 63, 141, 142, 79, 80, 85, 86, 38, 87, 88, +- 47, 52, 51, 67, 69, 53, 70, 99, 102, 101, +- 103, 113, 109, 114, 117, 129, 136, 137, 130, 19, +- 16, 144, 74, 112, 73, 146, 76, 75, 111, 0, +- 135, 77, 0, 108, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 143, 0, 78, 145 ++ 5, 39, 40, 17, 18, 19, 12, 12, 17, 18, ++ 7, 8, 92, 24, 4, 95, 24, 13, 26, 3, ++ 28, 0, 25, 32, 20, 21, 22, 23, 26, 67, ++ 36, 21, 29, 42, 30, 34, 45, 46, 35, 35, ++ 43, 44, 17, 18, 25, 9, 10, 61, 62, 63, ++ 17, 18, 38, 91, 21, 22, 21, 32, 19, 24, ++ 21, 11, 29, 5, 6, 32, 15, 39, 33, 40, ++ 31, 24, 21, 22, 33, 34, 25, 14, 15, 16, ++ 53, 54, 55, 56, 21, 41, 42, 22, 51, 52, ++ 22, 57, 58, 24, 37, 16, 16, 59, 60, 27, ++ 24, 24, 24, 17, 20, 32, 35, 33, 8, 34, ++ 6, 98, 46, 49, 47, 45, 92, 95, -1, -1, ++ 125, -1, -1, -1, -1, -1, -1, -1, -1, 48, ++ -1, -1, 50, 138, -1, -1, 141 + }; + +-#define yypact_value_is_default(yystate) \ +- ((yystate) == (-84)) +- +-#define yytable_value_is_error(yytable_value) \ +- YYID (0) ++ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing ++ symbol of state STATE-NUM. */ ++static const yytype_uint8 yystos[] = ++{ ++ 0, 3, 48, 24, 0, 4, 21, 49, 50, 17, ++ 18, 32, 58, 50, 25, 51, 49, 42, 45, 46, ++ 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, ++ 68, 69, 70, 71, 58, 26, 52, 15, 21, 22, ++ 25, 71, 71, 71, 34, 12, 36, 11, 38, 39, ++ 40, 9, 10, 7, 8, 29, 35, 5, 6, 41, ++ 42, 25, 43, 44, 24, 53, 22, 22, 52, 52, ++ 62, 59, 63, 64, 65, 66, 67, 67, 68, 68, ++ 68, 68, 69, 69, 70, 70, 71, 71, 71, 14, ++ 15, 16, 21, 54, 73, 74, 24, 52, 37, 16, ++ 16, 24, 28, 52, 54, 74, 27, 54, 73, 60, ++ 24, 24, 55, 56, 24, 21, 24, 33, 13, 20, ++ 21, 22, 23, 30, 35, 57, 17, 32, 72, 21, ++ 22, 29, 58, 35, 20, 19, 21, 31, 33, 34, ++ 58, 33, 58, 34 ++}; + +-static const yytype_int16 yycheck[] = ++ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ ++static const yytype_uint8 yyr1[] = + { +- 8, 42, 43, 20, 21, 22, 13, 15, 18, 19, +- 8, 9, 95, 25, 5, 98, 22, 14, 3, 25, +- 10, 11, 26, 33, 21, 22, 23, 24, 34, 70, +- 37, 22, 30, 43, 31, 0, 46, 47, 36, 36, +- 44, 45, 18, 19, 6, 7, 4, 64, 65, 66, +- 18, 19, 25, 94, 22, 23, 20, 33, 22, 25, +- 16, 27, 30, 29, 12, 33, 22, 23, 32, 26, +- 26, 15, 16, 17, 56, 57, 58, 59, 22, 42, +- 43, 34, 35, 54, 55, 60, 61, 27, 62, 63, +- 35, 40, 39, 25, 23, 41, 23, 25, 17, 38, +- 17, 25, 28, 25, 25, 18, 36, 21, 33, 11, +- 9, 34, 49, 101, 48, 35, 51, 50, 98, -1, +- 128, 52, -1, 95, -1, -1, -1, -1, -1, -1, +- -1, -1, -1, 141, -1, 53, 144 ++ 0, 47, 48, 49, 49, 50, 50, 51, 51, 51, ++ 51, 51, 52, 53, 53, 54, 54, 54, 54, 55, ++ 55, 55, 55, 55, 55, 55, 56, 56, 56, 57, ++ 57, 57, 57, 57, 58, 58, 58, 59, 60, 60, ++ 61, 61, 62, 62, 63, 63, 64, 64, 65, 65, ++ 66, 66, 66, 67, 67, 67, 67, 67, 68, 68, ++ 68, 69, 69, 69, 70, 70, 70, 70, 71, 71, ++ 71, 71, 72, 72, 72, 73, 73, 73, 74, 74, ++ 74 + }; + +-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing +- symbol of state STATE-NUM. */ +-static const yytype_uint8 yystos[] = ++ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ ++static const yytype_uint8 yyr2[] = + { +- 0, 3, 49, 25, 0, 4, 50, 25, 5, 22, +- 51, 52, 18, 19, 33, 60, 52, 26, 53, 51, +- 43, 46, 47, 60, 61, 62, 63, 64, 65, 66, +- 67, 68, 69, 70, 71, 72, 73, 60, 27, 54, +- 16, 22, 23, 26, 73, 73, 73, 35, 13, 37, +- 12, 39, 40, 41, 10, 11, 8, 9, 30, 36, +- 6, 7, 42, 43, 26, 44, 45, 25, 55, 23, +- 23, 54, 54, 64, 61, 65, 66, 67, 68, 69, +- 69, 70, 70, 70, 70, 71, 71, 72, 72, 73, +- 73, 73, 15, 16, 17, 22, 56, 75, 76, 25, +- 54, 38, 17, 17, 25, 29, 54, 56, 76, 28, +- 56, 75, 62, 25, 25, 57, 58, 25, 22, 25, +- 34, 14, 21, 22, 23, 24, 31, 36, 59, 18, +- 33, 74, 22, 23, 30, 60, 36, 21, 20, 22, +- 32, 34, 35, 60, 34, 60, 35 ++ 0, 2, 4, 0, 2, 4, 2, 2, 3, 4, ++ 3, 4, 5, 0, 2, 4, 2, 3, 2, 2, ++ 3, 4, 2, 9, 5, 2, 0, 2, 2, 3, ++ 1, 2, 2, 2, 1, 1, 3, 1, 1, 5, ++ 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, ++ 1, 3, 3, 1, 3, 3, 3, 3, 3, 3, ++ 1, 3, 3, 1, 3, 3, 3, 1, 1, 2, ++ 2, 2, 0, 2, 2, 0, 2, 2, 2, 3, ++ 2 + }; + +-#define yyerrok (yyerrstatus = 0) +-#define yyclearin (yychar = YYEMPTY) +-#define YYEMPTY (-2) +-#define YYEOF 0 +- +-#define YYACCEPT goto yyacceptlab +-#define YYABORT goto yyabortlab +-#define YYERROR goto yyerrorlab +- +- +-/* Like YYERROR except do call yyerror. This remains here temporarily +- to ease the transition to the new meaning of YYERROR, for GCC. +- Once GCC version 2 has supplanted version 1, this can go. However, +- YYFAIL appears to be in use. Nevertheless, it is formally deprecated +- in Bison 2.4.2's NEWS entry, where a plan to phase it out is +- discussed. */ +- +-#define YYFAIL goto yyerrlab +-#if defined YYFAIL +- /* This is here to suppress warnings from the GCC cpp's +- -Wunused-macros. Normally we don't worry about that warning, but +- some users do, and we want to make it easy for users to remove +- YYFAIL uses, which will produce warnings from Bison 2.5. */ +-#endif ++ ++#define yyerrok (yyerrstatus = 0) ++#define yyclearin (yychar = YYEMPTY) ++#define YYEMPTY (-2) ++#define YYEOF 0 ++ ++#define YYACCEPT goto yyacceptlab ++#define YYABORT goto yyabortlab ++#define YYERROR goto yyerrorlab ++ + + #define YYRECOVERING() (!!yyerrstatus) + +-#define YYBACKUP(Token, Value) \ +-do \ +- if (yychar == YYEMPTY && yylen == 1) \ +- { \ +- yychar = (Token); \ +- yylval = (Value); \ +- YYPOPSTACK (1); \ +- goto yybackup; \ +- } \ +- else \ +- { \ ++#define YYBACKUP(Token, Value) \ ++do \ ++ if (yychar == YYEMPTY) \ ++ { \ ++ yychar = (Token); \ ++ yylval = (Value); \ ++ YYPOPSTACK (yylen); \ ++ yystate = *yyssp; \ ++ goto yybackup; \ ++ } \ ++ else \ ++ { \ + yyerror (YY_("syntax error: cannot back up")); \ +- YYERROR; \ +- } \ +-while (YYID (0)) +- ++ YYERROR; \ ++ } \ ++while (0) + +-#define YYTERROR 1 +-#define YYERRCODE 256 ++/* Error token number */ ++#define YYTERROR 1 ++#define YYERRCODE 256 + + + /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +-#define YYRHSLOC(Rhs, K) ((Rhs)[K]) + #ifndef YYLLOC_DEFAULT +-# define YYLLOC_DEFAULT(Current, Rhs, N) \ +- do \ +- if (YYID (N)) \ +- { \ +- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ +- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ +- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ +- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ +- } \ +- else \ +- { \ +- (Current).first_line = (Current).last_line = \ +- YYRHSLOC (Rhs, 0).last_line; \ +- (Current).first_column = (Current).last_column = \ +- YYRHSLOC (Rhs, 0).last_column; \ +- } \ +- while (YYID (0)) ++# define YYLLOC_DEFAULT(Current, Rhs, N) \ ++ do \ ++ if (N) \ ++ { \ ++ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ ++ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ ++ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ ++ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ ++ } \ ++ else \ ++ { \ ++ (Current).first_line = (Current).last_line = \ ++ YYRHSLOC (Rhs, 0).last_line; \ ++ (Current).first_column = (Current).last_column = \ ++ YYRHSLOC (Rhs, 0).last_column; \ ++ } \ ++ while (0) + #endif + ++#define YYRHSLOC(Rhs, K) ((Rhs)[K]) ++ ++ ++/* Enable debugging if requested. */ ++#if YYDEBUG ++ ++# ifndef YYFPRINTF ++# include /* INFRINGES ON USER NAME SPACE */ ++# define YYFPRINTF fprintf ++# endif ++ ++# define YYDPRINTF(Args) \ ++do { \ ++ if (yydebug) \ ++ YYFPRINTF Args; \ ++} while (0) ++ + + /* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know +@@ -799,82 +779,73 @@ while (YYID (0)) + + #ifndef YY_LOCATION_PRINT + # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +-# define YY_LOCATION_PRINT(File, Loc) \ +- fprintf (File, "%d.%d-%d.%d", \ +- (Loc).first_line, (Loc).first_column, \ +- (Loc).last_line, (Loc).last_column) +-# else +-# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +-# endif +-#endif +- + +-/* YYLEX -- calling `yylex' with the right arguments. */ ++/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ + +-#ifdef YYLEX_PARAM +-# define YYLEX yylex (YYLEX_PARAM) +-#else +-# define YYLEX yylex () +-#endif ++YY_ATTRIBUTE_UNUSED ++static unsigned ++yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) ++{ ++ unsigned res = 0; ++ int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; ++ if (0 <= yylocp->first_line) ++ { ++ res += YYFPRINTF (yyo, "%d", yylocp->first_line); ++ if (0 <= yylocp->first_column) ++ res += YYFPRINTF (yyo, ".%d", yylocp->first_column); ++ } ++ if (0 <= yylocp->last_line) ++ { ++ if (yylocp->first_line < yylocp->last_line) ++ { ++ res += YYFPRINTF (yyo, "-%d", yylocp->last_line); ++ if (0 <= end_col) ++ res += YYFPRINTF (yyo, ".%d", end_col); ++ } ++ else if (0 <= end_col && yylocp->first_column < end_col) ++ res += YYFPRINTF (yyo, "-%d", end_col); ++ } ++ return res; ++ } + +-/* Enable debugging if requested. */ +-#if YYDEBUG ++# define YY_LOCATION_PRINT(File, Loc) \ ++ yy_location_print_ (File, &(Loc)) + +-# ifndef YYFPRINTF +-# include /* INFRINGES ON USER NAME SPACE */ +-# define YYFPRINTF fprintf ++# else ++# define YY_LOCATION_PRINT(File, Loc) ((void) 0) + # endif ++#endif + +-# define YYDPRINTF(Args) \ +-do { \ +- if (yydebug) \ +- YYFPRINTF Args; \ +-} while (YYID (0)) + +-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +-do { \ +- if (yydebug) \ +- { \ +- YYFPRINTF (stderr, "%s ", Title); \ +- yy_symbol_print (stderr, \ +- Type, Value, Location); \ +- YYFPRINTF (stderr, "\n"); \ +- } \ +-} while (YYID (0)) ++# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ ++do { \ ++ if (yydebug) \ ++ { \ ++ YYFPRINTF (stderr, "%s ", Title); \ ++ yy_symbol_print (stderr, \ ++ Type, Value, Location); \ ++ YYFPRINTF (stderr, "\n"); \ ++ } \ ++} while (0) + + +-/*--------------------------------. +-| Print this symbol on YYOUTPUT. | +-`--------------------------------*/ ++/*----------------------------------------. ++| Print this symbol's value on YYOUTPUT. | ++`----------------------------------------*/ + +-/*ARGSUSED*/ +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) + static void + yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) +-#else +-static void +-yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) +- FILE *yyoutput; +- int yytype; +- YYSTYPE const * const yyvaluep; +- YYLTYPE const * const yylocationp; +-#endif + { ++ FILE *yyo = yyoutput; ++ YYUSE (yyo); ++ YYUSE (yylocationp); + if (!yyvaluep) + return; +- YYUSE (yylocationp); + # ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +-# else +- YYUSE (yyoutput); + # endif +- switch (yytype) +- { +- default: +- break; +- } ++ YYUSE (yytype); + } + + +@@ -882,23 +853,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) + | Print this symbol on YYOUTPUT. | + `--------------------------------*/ + +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) + static void + yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) +-#else +-static void +-yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) +- FILE *yyoutput; +- int yytype; +- YYSTYPE const * const yyvaluep; +- YYLTYPE const * const yylocationp; +-#endif + { +- if (yytype < YYNTOKENS) +- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); +- else +- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); ++ YYFPRINTF (yyoutput, "%s %s (", ++ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + + YY_LOCATION_PRINT (yyoutput, *yylocationp); + YYFPRINTF (yyoutput, ": "); +@@ -911,16 +870,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) + | TOP (included). | + `------------------------------------------------------------------*/ + +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) + static void + yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +-#else +-static void +-yy_stack_print (yybottom, yytop) +- yytype_int16 *yybottom; +- yytype_int16 *yytop; +-#endif + { + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) +@@ -931,50 +882,42 @@ yy_stack_print (yybottom, yytop) + YYFPRINTF (stderr, "\n"); + } + +-# define YY_STACK_PRINT(Bottom, Top) \ +-do { \ +- if (yydebug) \ +- yy_stack_print ((Bottom), (Top)); \ +-} while (YYID (0)) ++# define YY_STACK_PRINT(Bottom, Top) \ ++do { \ ++ if (yydebug) \ ++ yy_stack_print ((Bottom), (Top)); \ ++} while (0) + + + /*------------------------------------------------. + | Report that the YYRULE is going to be reduced. | + `------------------------------------------------*/ + +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) +-static void +-yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) +-#else + static void +-yy_reduce_print (yyvsp, yylsp, yyrule) +- YYSTYPE *yyvsp; +- YYLTYPE *yylsp; +- int yyrule; +-#endif ++yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) + { ++ unsigned long int yylno = yyrline[yyrule]; + int yynrhs = yyr2[yyrule]; + int yyi; +- unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", +- yyrule - 1, yylno); ++ yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); +- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], +- &(yyvsp[(yyi + 1) - (yynrhs)]) +- , &(yylsp[(yyi + 1) - (yynrhs)]) ); ++ yy_symbol_print (stderr, ++ yystos[yyssp[yyi + 1 - yynrhs]], ++ &(yyvsp[(yyi + 1) - (yynrhs)]) ++ , &(yylsp[(yyi + 1) - (yynrhs)]) ); + YYFPRINTF (stderr, "\n"); + } + } + +-# define YY_REDUCE_PRINT(Rule) \ +-do { \ +- if (yydebug) \ +- yy_reduce_print (yyvsp, yylsp, Rule); \ +-} while (YYID (0)) ++# define YY_REDUCE_PRINT(Rule) \ ++do { \ ++ if (yydebug) \ ++ yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \ ++} while (0) + + /* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +@@ -988,7 +931,7 @@ int yydebug; + + + /* YYINITDEPTH -- initial size of the parser's stacks. */ +-#ifndef YYINITDEPTH ++#ifndef YYINITDEPTH + # define YYINITDEPTH 200 + #endif + +@@ -1011,15 +954,8 @@ int yydebug; + # define yystrlen strlen + # else + /* Return the length of YYSTR. */ +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) + static YYSIZE_T + yystrlen (const char *yystr) +-#else +-static YYSIZE_T +-yystrlen (yystr) +- const char *yystr; +-#endif + { + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) +@@ -1035,16 +971,8 @@ yystrlen (yystr) + # else + /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) + static char * + yystpcpy (char *yydest, const char *yysrc) +-#else +-static char * +-yystpcpy (yydest, yysrc) +- char *yydest; +- const char *yysrc; +-#endif + { + char *yyd = yydest; + const char *yys = yysrc; +@@ -1074,27 +1002,27 @@ yytnamerr (char *yyres, const char *yystr) + char const *yyp = yystr; + + for (;;) +- switch (*++yyp) +- { +- case '\'': +- case ',': +- goto do_not_strip_quotes; +- +- case '\\': +- if (*++yyp != '\\') +- goto do_not_strip_quotes; +- /* Fall through. */ +- default: +- if (yyres) +- yyres[yyn] = *yyp; +- yyn++; +- break; +- +- case '"': +- if (yyres) +- yyres[yyn] = '\0'; +- return yyn; +- } ++ switch (*++yyp) ++ { ++ case '\'': ++ case ',': ++ goto do_not_strip_quotes; ++ ++ case '\\': ++ if (*++yyp != '\\') ++ goto do_not_strip_quotes; ++ /* Fall through. */ ++ default: ++ if (yyres) ++ yyres[yyn] = *yyp; ++ yyn++; ++ break; ++ ++ case '"': ++ if (yyres) ++ yyres[yyn] = '\0'; ++ return yyn; ++ } + do_not_strip_quotes: ; + } + +@@ -1117,12 +1045,11 @@ static int + yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) + { +- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); ++ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + YYSIZE_T yysize = yysize0; +- YYSIZE_T yysize1; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ +- const char *yyformat = 0; ++ const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per +@@ -1130,10 +1057,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + int yycount = 0; + + /* There are many possibilities here to consider: +- - Assume YYFAIL is not used. It's too flawed to consider. See +- +- for details. YYERROR is fine as it does not invoke this +- function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected +@@ -1182,11 +1105,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + break; + } + yyarg[yycount++] = yytname[yyx]; +- yysize1 = yysize + yytnamerr (0, yytname[yyx]); +- if (! (yysize <= yysize1 +- && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) +- return 2; +- yysize = yysize1; ++ { ++ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); ++ if (! (yysize <= yysize1 ++ && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) ++ return 2; ++ yysize = yysize1; ++ } + } + } + } +@@ -1206,10 +1131,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + # undef YYCASE_ + } + +- yysize1 = yysize + yystrlen (yyformat); +- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) +- return 2; +- yysize = yysize1; ++ { ++ YYSIZE_T yysize1 = yysize + yystrlen (yyformat); ++ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) ++ return 2; ++ yysize = yysize1; ++ } + + if (*yymsg_alloc < yysize) + { +@@ -1246,50 +1173,21 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + | Release the memory associated to this symbol. | + `-----------------------------------------------*/ + +-/*ARGSUSED*/ +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) + static void + yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) +-#else +-static void +-yydestruct (yymsg, yytype, yyvaluep, yylocationp) +- const char *yymsg; +- int yytype; +- YYSTYPE *yyvaluep; +- YYLTYPE *yylocationp; +-#endif + { + YYUSE (yyvaluep); + YYUSE (yylocationp); +- + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + +- switch (yytype) +- { +- +- default: +- break; +- } ++ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN ++ YYUSE (yytype); ++ YY_IGNORE_MAYBE_UNINITIALIZED_END + } + + +-/* Prevent warnings from -Wmissing-prototypes. */ +-#ifdef YYPARSE_PARAM +-#if defined __STDC__ || defined __cplusplus +-int yyparse (void *YYPARSE_PARAM); +-#else +-int yyparse (); +-#endif +-#else /* ! YYPARSE_PARAM */ +-#if defined __STDC__ || defined __cplusplus +-int yyparse (void); +-#else +-int yyparse (); +-#endif +-#endif /* ! YYPARSE_PARAM */ + + + /* The lookahead symbol. */ +@@ -1297,10 +1195,12 @@ int yychar; + + /* The semantic value of the lookahead symbol. */ + YYSTYPE yylval; +- + /* Location data for the lookahead symbol. */ +-YYLTYPE yylloc; +- ++YYLTYPE yylloc ++# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL ++ = { 1, 1, 1, 1 } ++# endif ++; + /* Number of syntax errors so far. */ + int yynerrs; + +@@ -1309,38 +1209,19 @@ int yynerrs; + | yyparse. | + `----------*/ + +-#ifdef YYPARSE_PARAM +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) +-int +-yyparse (void *YYPARSE_PARAM) +-#else +-int +-yyparse (YYPARSE_PARAM) +- void *YYPARSE_PARAM; +-#endif +-#else /* ! YYPARSE_PARAM */ +-#if (defined __STDC__ || defined __C99__FUNC__ \ +- || defined __cplusplus || defined _MSC_VER) + int + yyparse (void) +-#else +-int +-yyparse () +- +-#endif +-#endif + { + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: +- `yyss': related to states. +- `yyvs': related to semantic values. +- `yyls': related to locations. ++ 'yyss': related to states. ++ 'yyvs': related to semantic values. ++ 'yyls': related to locations. + +- Refer to the stacks thru separate pointers, to allow yyoverflow ++ Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ +@@ -1366,7 +1247,7 @@ yyparse () + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ +- int yytoken; ++ int yytoken = 0; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; +@@ -1385,10 +1266,9 @@ yyparse () + Keep to zero when no symbol should be popped. */ + int yylen = 0; + +- yytoken = 0; +- yyss = yyssa; +- yyvs = yyvsa; +- yyls = yylsa; ++ yyssp = yyss = yyssa; ++ yyvsp = yyvs = yyvsa; ++ yylsp = yyls = yylsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); +@@ -1397,21 +1277,7 @@ yyparse () + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ +- +- /* Initialize stack pointers. +- Waste one element of value and location stack +- so that they stay on the same level as the state stack. +- The wasted elements are never initialized. */ +- yyssp = yyss; +- yyvsp = yyvs; +- yylsp = yyls; +- +-#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +- /* Initialize the default location before parsing starts. */ +- yylloc.first_line = yylloc.last_line = 1; +- yylloc.first_column = yylloc.last_column = 1; +-#endif +- ++ yylsp[0] = yylloc; + goto yysetstate; + + /*------------------------------------------------------------. +@@ -1432,26 +1298,26 @@ yyparse () + + #ifdef yyoverflow + { +- /* Give user a chance to reallocate the stack. Use copies of +- these so that the &'s don't force the real ones into +- memory. */ +- YYSTYPE *yyvs1 = yyvs; +- yytype_int16 *yyss1 = yyss; +- YYLTYPE *yyls1 = yyls; +- +- /* Each stack pointer address is followed by the size of the +- data in use in that stack, in bytes. This used to be a +- conditional around just the two extra args, but that might +- be undefined if yyoverflow is a macro. */ +- yyoverflow (YY_("memory exhausted"), +- &yyss1, yysize * sizeof (*yyssp), +- &yyvs1, yysize * sizeof (*yyvsp), +- &yyls1, yysize * sizeof (*yylsp), +- &yystacksize); +- +- yyls = yyls1; +- yyss = yyss1; +- yyvs = yyvs1; ++ /* Give user a chance to reallocate the stack. Use copies of ++ these so that the &'s don't force the real ones into ++ memory. */ ++ YYSTYPE *yyvs1 = yyvs; ++ yytype_int16 *yyss1 = yyss; ++ YYLTYPE *yyls1 = yyls; ++ ++ /* Each stack pointer address is followed by the size of the ++ data in use in that stack, in bytes. This used to be a ++ conditional around just the two extra args, but that might ++ be undefined if yyoverflow is a macro. */ ++ yyoverflow (YY_("memory exhausted"), ++ &yyss1, yysize * sizeof (*yyssp), ++ &yyvs1, yysize * sizeof (*yyvsp), ++ &yyls1, yysize * sizeof (*yylsp), ++ &yystacksize); ++ ++ yyls = yyls1; ++ yyss = yyss1; ++ yyvs = yyvs1; + } + #else /* no yyoverflow */ + # ifndef YYSTACK_RELOCATE +@@ -1459,23 +1325,23 @@ yyparse () + # else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) +- goto yyexhaustedlab; ++ goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) +- yystacksize = YYMAXDEPTH; ++ yystacksize = YYMAXDEPTH; + + { +- yytype_int16 *yyss1 = yyss; +- union yyalloc *yyptr = +- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); +- if (! yyptr) +- goto yyexhaustedlab; +- YYSTACK_RELOCATE (yyss_alloc, yyss); +- YYSTACK_RELOCATE (yyvs_alloc, yyvs); +- YYSTACK_RELOCATE (yyls_alloc, yyls); ++ yytype_int16 *yyss1 = yyss; ++ union yyalloc *yyptr = ++ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); ++ if (! yyptr) ++ goto yyexhaustedlab; ++ YYSTACK_RELOCATE (yyss_alloc, yyss); ++ YYSTACK_RELOCATE (yyvs_alloc, yyvs); ++ YYSTACK_RELOCATE (yyls_alloc, yyls); + # undef YYSTACK_RELOCATE +- if (yyss1 != yyssa) +- YYSTACK_FREE (yyss1); ++ if (yyss1 != yyssa) ++ YYSTACK_FREE (yyss1); + } + # endif + #endif /* no yyoverflow */ +@@ -1485,10 +1351,10 @@ yyparse () + yylsp = yyls + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", +- (unsigned long int) yystacksize)); ++ (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) +- YYABORT; ++ YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); +@@ -1517,7 +1383,7 @@ yybackup: + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); +- yychar = YYLEX; ++ yychar = yylex (); + } + + if (yychar <= YYEOF) +@@ -1557,7 +1423,9 @@ yybackup: + yychar = YYEMPTY; + + yystate = yyn; ++ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; ++ YY_IGNORE_MAYBE_UNINITIALIZED_END + *++yylsp = yylloc; + goto yynewstate; + +@@ -1580,7 +1448,7 @@ yyreduce: + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: +- `$$ = $1'. ++ '$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison +@@ -1595,322 +1463,273 @@ yyreduce: + switch (yyn) + { + case 2: +- +-/* Line 1806 of yacc.c */ +-#line 109 "dtc-parser.y" ++#line 105 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyvsp[(5) - (5)].node)->is_plugin = (yyvsp[(3) - (5)].is_plugin); +- (yyvsp[(5) - (5)].node)->is_root = 1; +- the_boot_info = build_boot_info((yyvsp[(4) - (5)].re), (yyvsp[(5) - (5)].node), +- guess_boot_cpuid((yyvsp[(5) - (5)].node))); ++ the_boot_info = build_boot_info((yyvsp[-1].re), (yyvsp[0].node), ++ guess_boot_cpuid((yyvsp[0].node))); + } ++#line 1472 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 3: +- +-/* Line 1806 of yacc.c */ +-#line 119 "dtc-parser.y" ++#line 113 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.is_plugin) = 0; ++ (yyval.re) = NULL; + } ++#line 1480 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 4: +- +-/* Line 1806 of yacc.c */ +-#line 123 "dtc-parser.y" ++#line 117 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.is_plugin) = 1; ++ (yyval.re) = chain_reserve_entry((yyvsp[-1].re), (yyvsp[0].re)); + } ++#line 1488 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 5: +- +-/* Line 1806 of yacc.c */ +-#line 130 "dtc-parser.y" ++#line 124 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.re) = NULL; ++ (yyval.re) = build_reserve_entry((yyvsp[-2].integer), (yyvsp[-1].integer)); + } ++#line 1496 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 6: +- +-/* Line 1806 of yacc.c */ +-#line 134 "dtc-parser.y" ++#line 128 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re)); ++ add_label(&(yyvsp[0].re)->labels, (yyvsp[-1].labelref)); ++ (yyval.re) = (yyvsp[0].re); + } ++#line 1505 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 7: +- +-/* Line 1806 of yacc.c */ +-#line 141 "dtc-parser.y" ++#line 136 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer)); ++ (yyval.node) = name_node((yyvsp[0].node), ""); + } ++#line 1513 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 8: +- +-/* Line 1806 of yacc.c */ +-#line 145 "dtc-parser.y" ++#line 140 "dtc-parser.y" /* yacc.c:1646 */ + { +- add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref)); +- (yyval.re) = (yyvsp[(2) - (2)].re); ++ (yyval.node) = merge_nodes((yyvsp[-2].node), (yyvsp[0].node)); + } ++#line 1521 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 9: +- +-/* Line 1806 of yacc.c */ +-#line 153 "dtc-parser.y" ++#line 145 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.node) = name_node((yyvsp[(2) - (2)].node), ""); ++ struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref)); ++ ++ add_label(&target->labels, (yyvsp[-2].labelref)); ++ if (target) ++ merge_nodes(target, (yyvsp[0].node)); ++ else ++ ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref)); ++ (yyval.node) = (yyvsp[-3].node); + } ++#line 1536 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 10: +- +-/* Line 1806 of yacc.c */ +-#line 157 "dtc-parser.y" ++#line 156 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); ++ struct node *target = get_node_by_ref((yyvsp[-2].node), (yyvsp[-1].labelref)); ++ ++ if (target) ++ merge_nodes(target, (yyvsp[0].node)); ++ else ++ ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref)); ++ (yyval.node) = (yyvsp[-2].node); + } ++#line 1550 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 11: +- +-/* Line 1806 of yacc.c */ +-#line 162 "dtc-parser.y" ++#line 166 "dtc-parser.y" /* yacc.c:1646 */ + { +- struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref)); ++ struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref)); + +- add_label(&target->labels, (yyvsp[(2) - (4)].labelref)); + if (target) +- merge_nodes(target, (yyvsp[(4) - (4)].node)); ++ delete_node(target); + else +- ERROR(&(yylsp[(3) - (4)]), "Label or path %s not found", (yyvsp[(3) - (4)].labelref)); +- (yyval.node) = (yyvsp[(1) - (4)].node); ++ ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref)); ++ ++ ++ (yyval.node) = (yyvsp[-3].node); + } ++#line 1566 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 12: +- +-/* Line 1806 of yacc.c */ +-#line 173 "dtc-parser.y" ++#line 181 "dtc-parser.y" /* yacc.c:1646 */ + { +- struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref)); +- +- if (target) +- merge_nodes(target, (yyvsp[(3) - (3)].node)); +- else +- ERROR(&(yylsp[(2) - (3)]), "Label or path %s not found", (yyvsp[(2) - (3)].labelref)); +- (yyval.node) = (yyvsp[(1) - (3)].node); ++ (yyval.node) = build_node((yyvsp[-3].proplist), (yyvsp[-2].nodelist)); + } ++#line 1574 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 13: +- +-/* Line 1806 of yacc.c */ +-#line 183 "dtc-parser.y" ++#line 188 "dtc-parser.y" /* yacc.c:1646 */ + { +- struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref)); +- +- if (target) +- delete_node(target); +- else +- ERROR(&(yylsp[(3) - (4)]), "Label or path %s not found", (yyvsp[(3) - (4)].labelref)); +- +- +- (yyval.node) = (yyvsp[(1) - (4)].node); ++ (yyval.proplist) = NULL; + } ++#line 1582 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 14: +- +-/* Line 1806 of yacc.c */ +-#line 198 "dtc-parser.y" ++#line 192 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist)); ++ (yyval.proplist) = chain_property((yyvsp[0].prop), (yyvsp[-1].proplist)); + } ++#line 1590 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 15: +- +-/* Line 1806 of yacc.c */ +-#line 205 "dtc-parser.y" ++#line 199 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.proplist) = NULL; ++ (yyval.prop) = build_property((yyvsp[-3].propnodename), (yyvsp[-1].data)); + } ++#line 1598 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 16: +- +-/* Line 1806 of yacc.c */ +-#line 209 "dtc-parser.y" ++#line 203 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist)); ++ (yyval.prop) = build_property((yyvsp[-1].propnodename), empty_data); + } ++#line 1606 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 17: +- +-/* Line 1806 of yacc.c */ +-#line 216 "dtc-parser.y" ++#line 207 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data)); ++ (yyval.prop) = build_property_delete((yyvsp[-1].propnodename)); + } ++#line 1614 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 18: +- +-/* Line 1806 of yacc.c */ +-#line 220 "dtc-parser.y" ++#line 211 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data); ++ add_label(&(yyvsp[0].prop)->labels, (yyvsp[-1].labelref)); ++ (yyval.prop) = (yyvsp[0].prop); + } ++#line 1623 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 19: +- +-/* Line 1806 of yacc.c */ +-#line 224 "dtc-parser.y" ++#line 219 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename)); ++ (yyval.data) = data_merge((yyvsp[-1].data), (yyvsp[0].data)); + } ++#line 1631 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 20: +- +-/* Line 1806 of yacc.c */ +-#line 228 "dtc-parser.y" ++#line 223 "dtc-parser.y" /* yacc.c:1646 */ + { +- add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref)); +- (yyval.prop) = (yyvsp[(2) - (2)].prop); ++ (yyval.data) = data_merge((yyvsp[-2].data), (yyvsp[-1].array).data); + } ++#line 1639 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 21: +- +-/* Line 1806 of yacc.c */ +-#line 236 "dtc-parser.y" ++#line 227 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data)); ++ (yyval.data) = data_merge((yyvsp[-3].data), (yyvsp[-1].data)); + } ++#line 1647 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 22: +- +-/* Line 1806 of yacc.c */ +-#line 240 "dtc-parser.y" ++#line 231 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = data_merge((yyvsp[(1) - (3)].data), (yyvsp[(2) - (3)].array).data); ++ (yyval.data) = data_add_marker((yyvsp[-1].data), REF_PATH, (yyvsp[0].labelref)); + } ++#line 1655 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 23: +- +-/* Line 1806 of yacc.c */ +-#line 244 "dtc-parser.y" ++#line 235 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data)); +- } +- break; +- +- case 24: +- +-/* Line 1806 of yacc.c */ +-#line 248 "dtc-parser.y" +- { +- (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref)); +- } +- break; +- +- case 25: +- +-/* Line 1806 of yacc.c */ +-#line 252 "dtc-parser.y" +- { +- FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL); ++ FILE *f = srcfile_relative_open((yyvsp[-5].data).val, NULL); + struct data d; + +- if ((yyvsp[(6) - (9)].integer) != 0) +- if (fseek(f, (yyvsp[(6) - (9)].integer), SEEK_SET) != 0) ++ if ((yyvsp[-3].integer) != 0) ++ if (fseek(f, (yyvsp[-3].integer), SEEK_SET) != 0) + die("Couldn't seek to offset %llu in \"%s\": %s", +- (unsigned long long)(yyvsp[(6) - (9)].integer), (yyvsp[(4) - (9)].data).val, ++ (unsigned long long)(yyvsp[-3].integer), (yyvsp[-5].data).val, + strerror(errno)); + +- d = data_copy_file(f, (yyvsp[(8) - (9)].integer)); ++ d = data_copy_file(f, (yyvsp[-1].integer)); + +- (yyval.data) = data_merge((yyvsp[(1) - (9)].data), d); ++ (yyval.data) = data_merge((yyvsp[-8].data), d); + fclose(f); + } ++#line 1675 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 26: +- +-/* Line 1806 of yacc.c */ +-#line 268 "dtc-parser.y" ++ case 24: ++#line 251 "dtc-parser.y" /* yacc.c:1646 */ + { +- FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL); ++ FILE *f = srcfile_relative_open((yyvsp[-1].data).val, NULL); + struct data d = empty_data; + + d = data_copy_file(f, -1); + +- (yyval.data) = data_merge((yyvsp[(1) - (5)].data), d); ++ (yyval.data) = data_merge((yyvsp[-4].data), d); + fclose(f); + } ++#line 1689 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 27: +- +-/* Line 1806 of yacc.c */ +-#line 278 "dtc-parser.y" ++ case 25: ++#line 261 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); ++ (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref)); + } ++#line 1697 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 28: +- +-/* Line 1806 of yacc.c */ +-#line 285 "dtc-parser.y" ++ case 26: ++#line 268 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = empty_data; + } ++#line 1705 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 29: +- +-/* Line 1806 of yacc.c */ +-#line 289 "dtc-parser.y" ++ case 27: ++#line 272 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = (yyvsp[(1) - (2)].data); ++ (yyval.data) = (yyvsp[-1].data); + } ++#line 1713 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 30: +- +-/* Line 1806 of yacc.c */ +-#line 293 "dtc-parser.y" ++ case 28: ++#line 276 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); ++ (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref)); + } ++#line 1721 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 31: +- +-/* Line 1806 of yacc.c */ +-#line 300 "dtc-parser.y" ++ case 29: ++#line 283 "dtc-parser.y" /* yacc.c:1646 */ + { + unsigned long long bits; + +- bits = (yyvsp[(2) - (3)].integer); ++ bits = (yyvsp[-1].integer); + + if ((bits != 8) && (bits != 16) && + (bits != 32) && (bits != 64)) { +- ERROR(&(yylsp[(2) - (3)]), "Array elements must be" ++ ERROR(&(yylsp[-1]), "Array elements must be" + " 8, 16, 32 or 64-bits"); + bits = 32; + } +@@ -1918,25 +1737,23 @@ yyreduce: + (yyval.array).data = empty_data; + (yyval.array).bits = bits; + } ++#line 1741 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 32: +- +-/* Line 1806 of yacc.c */ +-#line 316 "dtc-parser.y" ++ case 30: ++#line 299 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.array).data = empty_data; + (yyval.array).bits = 32; + } ++#line 1750 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 33: +- +-/* Line 1806 of yacc.c */ +-#line 321 "dtc-parser.y" ++ case 31: ++#line 304 "dtc-parser.y" /* yacc.c:1646 */ + { +- if ((yyvsp[(1) - (2)].array).bits < 64) { +- uint64_t mask = (1ULL << (yyvsp[(1) - (2)].array).bits) - 1; ++ if ((yyvsp[-1].array).bits < 64) { ++ uint64_t mask = (1ULL << (yyvsp[-1].array).bits) - 1; + /* + * Bits above mask must either be all zero + * (positive within range of mask) or all one +@@ -1945,293 +1762,258 @@ yyreduce: + * within the mask to one (i.e. | in the + * mask), all bits are one. + */ +- if (((yyvsp[(2) - (2)].integer) > mask) && (((yyvsp[(2) - (2)].integer) | mask) != -1ULL)) +- ERROR(&(yylsp[(2) - (2)]), "Value out of range for" +- " %d-bit array element", (yyvsp[(1) - (2)].array).bits); ++ if (((yyvsp[0].integer) > mask) && (((yyvsp[0].integer) | mask) != -1ULL)) ++ ERROR(&(yylsp[0]), "Value out of range for" ++ " %d-bit array element", (yyvsp[-1].array).bits); + } + +- (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, (yyvsp[(2) - (2)].integer), (yyvsp[(1) - (2)].array).bits); ++ (yyval.array).data = data_append_integer((yyvsp[-1].array).data, (yyvsp[0].integer), (yyvsp[-1].array).bits); + } ++#line 1773 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 34: +- +-/* Line 1806 of yacc.c */ +-#line 340 "dtc-parser.y" ++ case 32: ++#line 323 "dtc-parser.y" /* yacc.c:1646 */ + { +- uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits); ++ uint64_t val = ~0ULL >> (64 - (yyvsp[-1].array).bits); + +- if ((yyvsp[(1) - (2)].array).bits == 32) +- (yyvsp[(1) - (2)].array).data = data_add_marker((yyvsp[(1) - (2)].array).data, ++ if ((yyvsp[-1].array).bits == 32) ++ (yyvsp[-1].array).data = data_add_marker((yyvsp[-1].array).data, + REF_PHANDLE, +- (yyvsp[(2) - (2)].labelref)); ++ (yyvsp[0].labelref)); + else +- ERROR(&(yylsp[(2) - (2)]), "References are only allowed in " ++ ERROR(&(yylsp[0]), "References are only allowed in " + "arrays with 32-bit elements."); + +- (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, val, (yyvsp[(1) - (2)].array).bits); ++ (yyval.array).data = data_append_integer((yyvsp[-1].array).data, val, (yyvsp[-1].array).bits); + } ++#line 1791 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 35: +- +-/* Line 1806 of yacc.c */ +-#line 354 "dtc-parser.y" ++ case 33: ++#line 337 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.array).data = data_add_marker((yyvsp[(1) - (2)].array).data, LABEL, (yyvsp[(2) - (2)].labelref)); ++ (yyval.array).data = data_add_marker((yyvsp[-1].array).data, LABEL, (yyvsp[0].labelref)); + } ++#line 1799 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 38: +- +-/* Line 1806 of yacc.c */ +-#line 363 "dtc-parser.y" ++ case 36: ++#line 346 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.integer) = (yyvsp[(2) - (3)].integer); ++ (yyval.integer) = (yyvsp[-1].integer); + } ++#line 1807 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 41: ++ case 39: ++#line 357 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-4].integer) ? (yyvsp[-2].integer) : (yyvsp[0].integer); } ++#line 1813 "dtc-parser.tab.c" /* yacc.c:1646 */ ++ break; + +-/* Line 1806 of yacc.c */ +-#line 374 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); } ++ case 41: ++#line 362 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) || (yyvsp[0].integer); } ++#line 1819 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 43: +- +-/* Line 1806 of yacc.c */ +-#line 379 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); } ++#line 367 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) && (yyvsp[0].integer); } ++#line 1825 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 45: +- +-/* Line 1806 of yacc.c */ +-#line 384 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); } ++#line 372 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) | (yyvsp[0].integer); } ++#line 1831 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 47: +- +-/* Line 1806 of yacc.c */ +-#line 389 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); } ++#line 377 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) ^ (yyvsp[0].integer); } ++#line 1837 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 49: +- +-/* Line 1806 of yacc.c */ +-#line 394 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); } ++#line 382 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) & (yyvsp[0].integer); } ++#line 1843 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 51: +- +-/* Line 1806 of yacc.c */ +-#line 399 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); } ++#line 387 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) == (yyvsp[0].integer); } ++#line 1849 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 53: +- +-/* Line 1806 of yacc.c */ +-#line 404 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); } ++ case 52: ++#line 388 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) != (yyvsp[0].integer); } ++#line 1855 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 54: ++#line 393 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) < (yyvsp[0].integer); } ++#line 1861 "dtc-parser.tab.c" /* yacc.c:1646 */ ++ break; + +-/* Line 1806 of yacc.c */ +-#line 405 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); } ++ case 55: ++#line 394 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) > (yyvsp[0].integer); } ++#line 1867 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 56: +- +-/* Line 1806 of yacc.c */ +-#line 410 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); } ++#line 395 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) <= (yyvsp[0].integer); } ++#line 1873 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 57: +- +-/* Line 1806 of yacc.c */ +-#line 411 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); } ++#line 396 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) >= (yyvsp[0].integer); } ++#line 1879 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 58: +- +-/* Line 1806 of yacc.c */ +-#line 412 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); } ++#line 400 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) << (yyvsp[0].integer); } ++#line 1885 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 59: +- +-/* Line 1806 of yacc.c */ +-#line 413 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); } +- break; +- +- case 60: +- +-/* Line 1806 of yacc.c */ +-#line 417 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); } ++#line 401 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) >> (yyvsp[0].integer); } ++#line 1891 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 61: +- +-/* Line 1806 of yacc.c */ +-#line 418 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); } ++#line 406 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) + (yyvsp[0].integer); } ++#line 1897 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 63: +- +-/* Line 1806 of yacc.c */ +-#line 423 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); } ++ case 62: ++#line 407 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) - (yyvsp[0].integer); } ++#line 1903 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 64: ++#line 412 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) * (yyvsp[0].integer); } ++#line 1909 "dtc-parser.tab.c" /* yacc.c:1646 */ ++ break; + +-/* Line 1806 of yacc.c */ +-#line 424 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); } ++ case 65: ++#line 413 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) / (yyvsp[0].integer); } ++#line 1915 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 66: +- +-/* Line 1806 of yacc.c */ +-#line 429 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); } ++#line 414 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = (yyvsp[-2].integer) % (yyvsp[0].integer); } ++#line 1921 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 67: +- +-/* Line 1806 of yacc.c */ +-#line 430 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); } ++ case 69: ++#line 420 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = -(yyvsp[0].integer); } ++#line 1927 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 68: +- +-/* Line 1806 of yacc.c */ +-#line 431 "dtc-parser.y" +- { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); } ++ case 70: ++#line 421 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = ~(yyvsp[0].integer); } ++#line 1933 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 71: +- +-/* Line 1806 of yacc.c */ +-#line 437 "dtc-parser.y" +- { (yyval.integer) = -(yyvsp[(2) - (2)].integer); } ++#line 422 "dtc-parser.y" /* yacc.c:1646 */ ++ { (yyval.integer) = !(yyvsp[0].integer); } ++#line 1939 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 72: +- +-/* Line 1806 of yacc.c */ +-#line 438 "dtc-parser.y" +- { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); } ++#line 427 "dtc-parser.y" /* yacc.c:1646 */ ++ { ++ (yyval.data) = empty_data; ++ } ++#line 1947 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 73: +- +-/* Line 1806 of yacc.c */ +-#line 439 "dtc-parser.y" +- { (yyval.integer) = !(yyvsp[(2) - (2)].integer); } ++#line 431 "dtc-parser.y" /* yacc.c:1646 */ ++ { ++ (yyval.data) = data_append_byte((yyvsp[-1].data), (yyvsp[0].byte)); ++ } ++#line 1955 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 74: +- +-/* Line 1806 of yacc.c */ +-#line 444 "dtc-parser.y" ++#line 435 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = empty_data; ++ (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref)); + } ++#line 1963 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 75: +- +-/* Line 1806 of yacc.c */ +-#line 448 "dtc-parser.y" ++#line 442 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte)); ++ (yyval.nodelist) = NULL; + } ++#line 1971 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 76: +- +-/* Line 1806 of yacc.c */ +-#line 452 "dtc-parser.y" ++#line 446 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref)); ++ (yyval.nodelist) = chain_node((yyvsp[-1].node), (yyvsp[0].nodelist)); + } ++#line 1979 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 77: +- +-/* Line 1806 of yacc.c */ +-#line 459 "dtc-parser.y" ++#line 450 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.nodelist) = NULL; ++ ERROR(&(yylsp[0]), "Properties must precede subnodes"); ++ YYERROR; + } ++#line 1988 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 78: +- +-/* Line 1806 of yacc.c */ +-#line 463 "dtc-parser.y" ++#line 458 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist)); ++ (yyval.node) = name_node((yyvsp[0].node), (yyvsp[-1].propnodename)); + } ++#line 1996 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 79: +- +-/* Line 1806 of yacc.c */ +-#line 467 "dtc-parser.y" ++#line 462 "dtc-parser.y" /* yacc.c:1646 */ + { +- ERROR(&(yylsp[(2) - (2)]), "Properties must precede subnodes"); +- YYERROR; ++ (yyval.node) = name_node(build_node_delete(), (yyvsp[-1].propnodename)); + } ++#line 2004 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 80: +- +-/* Line 1806 of yacc.c */ +-#line 475 "dtc-parser.y" ++#line 466 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename)); ++ add_label(&(yyvsp[0].node)->labels, (yyvsp[-1].labelref)); ++ (yyval.node) = (yyvsp[0].node); + } ++#line 2013 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 81: + +-/* Line 1806 of yacc.c */ +-#line 479 "dtc-parser.y" +- { +- (yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename)); +- } +- break; +- +- case 82: +- +-/* Line 1806 of yacc.c */ +-#line 483 "dtc-parser.y" +- { +- add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref)); +- (yyval.node) = (yyvsp[(2) - (2)].node); +- } +- break; +- +- +- +-/* Line 1806 of yacc.c */ +-#line 2235 "dtc-parser.tab.c" ++#line 2017 "dtc-parser.tab.c" /* yacc.c:1646 */ + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires +@@ -2254,7 +2036,7 @@ yyreduce: + *++yyvsp = yyval; + *++yylsp = yyloc; + +- /* Now `shift' the result of the reduction. Determine what state ++ /* Now 'shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + +@@ -2269,9 +2051,9 @@ yyreduce: + goto yynewstate; + + +-/*------------------------------------. +-| yyerrlab -- here on detecting error | +-`------------------------------------*/ ++/*--------------------------------------. ++| yyerrlab -- here on detecting error. | ++`--------------------------------------*/ + yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ +@@ -2322,20 +2104,20 @@ yyerrlab: + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an +- error, discard it. */ ++ error, discard it. */ + + if (yychar <= YYEOF) +- { +- /* Return failure if at end of input. */ +- if (yychar == YYEOF) +- YYABORT; +- } ++ { ++ /* Return failure if at end of input. */ ++ if (yychar == YYEOF) ++ YYABORT; ++ } + else +- { +- yydestruct ("Error: discarding", +- yytoken, &yylval, &yylloc); +- yychar = YYEMPTY; +- } ++ { ++ yydestruct ("Error: discarding", ++ yytoken, &yylval, &yylloc); ++ yychar = YYEMPTY; ++ } + } + + /* Else will try to reuse lookahead token after shifting the error +@@ -2355,7 +2137,7 @@ yyerrorlab: + goto yyerrorlab; + + yyerror_range[1] = yylsp[1-yylen]; +- /* Do not reclaim the symbols of the rule which action triggered ++ /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; +@@ -2368,35 +2150,37 @@ yyerrorlab: + | yyerrlab1 -- common code for both syntax error and YYERROR. | + `-------------------------------------------------------------*/ + yyerrlab1: +- yyerrstatus = 3; /* Each real token shifted decrements this. */ ++ yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) +- { +- yyn += YYTERROR; +- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) +- { +- yyn = yytable[yyn]; +- if (0 < yyn) +- break; +- } +- } ++ { ++ yyn += YYTERROR; ++ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) ++ { ++ yyn = yytable[yyn]; ++ if (0 < yyn) ++ break; ++ } ++ } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) +- YYABORT; ++ YYABORT; + + yyerror_range[1] = *yylsp; + yydestruct ("Error: popping", +- yystos[yystate], yyvsp, yylsp); ++ yystos[yystate], yyvsp, yylsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + ++ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; ++ YY_IGNORE_MAYBE_UNINITIALIZED_END + + yyerror_range[2] = yylloc; + /* Using YYLLOC is tempting, but would change the location of +@@ -2425,7 +2209,7 @@ yyabortlab: + yyresult = 1; + goto yyreturn; + +-#if !defined(yyoverflow) || YYERROR_VERBOSE ++#if !defined yyoverflow || YYERROR_VERBOSE + /*-------------------------------------------------. + | yyexhaustedlab -- memory exhaustion comes here. | + `-------------------------------------------------*/ +@@ -2444,14 +2228,14 @@ yyreturn: + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc); + } +- /* Do not reclaim the symbols of the rule which action triggered ++ /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", +- yystos[*yyssp], yyvsp, yylsp); ++ yystos[*yyssp], yyvsp, yylsp); + YYPOPSTACK (1); + } + #ifndef yyoverflow +@@ -2462,18 +2246,12 @@ yyreturn: + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + #endif +- /* Make sure YYID is used. */ +- return YYID (yyresult); ++ return yyresult; + } +- +- +- +-/* Line 2067 of yacc.c */ +-#line 489 "dtc-parser.y" ++#line 472 "dtc-parser.y" /* yacc.c:1906 */ + + + void yyerror(char const *s) + { + ERROR(&yylloc, "%s", s); + } +- +diff --git a/scripts/dtc/dtc-parser.tab.h_shipped b/scripts/dtc/dtc-parser.tab.h_shipped +index 0b22bbb..30867c6 100644 +--- a/scripts/dtc/dtc-parser.tab.h_shipped ++++ b/scripts/dtc/dtc-parser.tab.h_shipped +@@ -1,19 +1,19 @@ +-/* A Bison parser, made by GNU Bison 2.5. */ ++/* A Bison parser, made by GNU Bison 3.0.2. */ + + /* Bison interface for Yacc-like parsers in C +- +- Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. +- ++ ++ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. ++ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. +- ++ + 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. +- ++ + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +@@ -26,50 +26,55 @@ + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. +- ++ + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + ++#ifndef YY_YY_DTC_PARSER_TAB_H_INCLUDED ++# define YY_YY_DTC_PARSER_TAB_H_INCLUDED ++/* Debug traces. */ ++#ifndef YYDEBUG ++# define YYDEBUG 0 ++#endif ++#if YYDEBUG ++extern int yydebug; ++#endif + +-/* Tokens. */ ++/* Token type. */ + #ifndef YYTOKENTYPE + # define YYTOKENTYPE +- /* Put the tokens into the symbol table, so that GDB and other debuggers +- know about them. */ +- enum yytokentype { +- DT_V1 = 258, +- DT_PLUGIN = 259, +- DT_MEMRESERVE = 260, +- DT_LSHIFT = 261, +- DT_RSHIFT = 262, +- DT_LE = 263, +- DT_GE = 264, +- DT_EQ = 265, +- DT_NE = 266, +- DT_AND = 267, +- DT_OR = 268, +- DT_BITS = 269, +- DT_DEL_PROP = 270, +- DT_DEL_NODE = 271, +- DT_PROPNODENAME = 272, +- DT_LITERAL = 273, +- DT_CHAR_LITERAL = 274, +- DT_BYTE = 275, +- DT_STRING = 276, +- DT_LABEL = 277, +- DT_REF = 278, +- DT_INCBIN = 279 +- }; ++ enum yytokentype ++ { ++ DT_V1 = 258, ++ DT_MEMRESERVE = 259, ++ DT_LSHIFT = 260, ++ DT_RSHIFT = 261, ++ DT_LE = 262, ++ DT_GE = 263, ++ DT_EQ = 264, ++ DT_NE = 265, ++ DT_AND = 266, ++ DT_OR = 267, ++ DT_BITS = 268, ++ DT_DEL_PROP = 269, ++ DT_DEL_NODE = 270, ++ DT_PROPNODENAME = 271, ++ DT_LITERAL = 272, ++ DT_CHAR_LITERAL = 273, ++ DT_BYTE = 274, ++ DT_STRING = 275, ++ DT_LABEL = 276, ++ DT_REF = 277, ++ DT_INCBIN = 278 ++ }; + #endif + +- +- ++/* Value type. */ + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +-typedef union YYSTYPE ++typedef union YYSTYPE YYSTYPE; ++union YYSTYPE + { +- +-/* Line 2068 of yacc.c */ +-#line 39 "dtc-parser.y" ++#line 38 "dtc-parser.y" /* yacc.c:1909 */ + + char *propnodename; + char *labelref; +@@ -87,32 +92,30 @@ typedef union YYSTYPE + struct node *nodelist; + struct reserve_info *re; + uint64_t integer; +- int is_plugin; +- +- + +-/* Line 2068 of yacc.c */ +-#line 96 "dtc-parser.tab.h" +-} YYSTYPE; ++#line 97 "dtc-parser.tab.h" /* yacc.c:1909 */ ++}; + # define YYSTYPE_IS_TRIVIAL 1 +-# define yystype YYSTYPE /* obsolescent; will be withdrawn */ + # define YYSTYPE_IS_DECLARED 1 + #endif + +-extern YYSTYPE yylval; +- ++/* Location type. */ + #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +-typedef struct YYLTYPE ++typedef struct YYLTYPE YYLTYPE; ++struct YYLTYPE + { + int first_line; + int first_column; + int last_line; + int last_column; +-} YYLTYPE; +-# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ ++}; + # define YYLTYPE_IS_DECLARED 1 + # define YYLTYPE_IS_TRIVIAL 1 + #endif + ++ ++extern YYSTYPE yylval; + extern YYLTYPE yylloc; ++int yyparse (void); + ++#endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED */ +diff --git a/scripts/dtc/dtc-parser.y b/scripts/dtc/dtc-parser.y +index 56b9c15..5a897e3 100644 +--- a/scripts/dtc/dtc-parser.y ++++ b/scripts/dtc/dtc-parser.y +@@ -19,7 +19,6 @@ + */ + %{ + #include +-#include + + #include "dtc.h" + #include "srcpos.h" +@@ -53,11 +52,9 @@ extern bool treesource_error; + struct node *nodelist; + struct reserve_info *re; + uint64_t integer; +- int is_plugin; + } + + %token DT_V1 +-%token DT_PLUGIN + %token DT_MEMRESERVE + %token DT_LSHIFT DT_RSHIFT DT_LE DT_GE DT_EQ DT_NE DT_AND DT_OR + %token DT_BITS +@@ -74,7 +71,6 @@ extern bool treesource_error; + + %type propdata + %type propdataprefix +-%type plugindecl + %type memreserve + %type memreserves + %type arrayprefix +@@ -105,23 +101,10 @@ extern bool treesource_error; + %% + + sourcefile: +- DT_V1 ';' plugindecl memreserves devicetree ++ DT_V1 ';' memreserves devicetree + { +- $5->is_plugin = $3; +- $5->is_root = 1; +- the_boot_info = build_boot_info($4, $5, +- guess_boot_cpuid($5)); +- } +- ; +- +-plugindecl: +- /* empty */ +- { +- $$ = 0; +- } +- | DT_PLUGIN ';' +- { +- $$ = 1; ++ the_boot_info = build_boot_info($3, $4, ++ guess_boot_cpuid($4)); + } + ; + +diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c +index 0cbb14c..8c4add6 100644 +--- a/scripts/dtc/dtc.c ++++ b/scripts/dtc/dtc.c +@@ -29,7 +29,6 @@ int reservenum; /* Number of memory reservation slots */ + int minsize; /* Minimum blob size */ + int padsize; /* Additional padding to blob */ + int phandle_format = PHANDLE_BOTH; /* Use linux,phandle or phandle properties */ +-int symbol_fixup_support = 0; + + static void fill_fullpaths(struct node *tree, const char *prefix) + { +@@ -52,7 +51,7 @@ static void fill_fullpaths(struct node *tree, const char *prefix) + #define FDT_VERSION(version) _FDT_VERSION(version) + #define _FDT_VERSION(version) #version + static const char usage_synopsis[] = "dtc [options] "; +-static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv@"; ++static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv"; + static struct option const usage_long_opts[] = { + {"quiet", no_argument, NULL, 'q'}, + {"in-format", a_argument, NULL, 'I'}, +@@ -70,7 +69,6 @@ static struct option const usage_long_opts[] = { + {"phandle", a_argument, NULL, 'H'}, + {"warning", a_argument, NULL, 'W'}, + {"error", a_argument, NULL, 'E'}, +- {"symbols", a_argument, NULL, '@'}, + {"help", no_argument, NULL, 'h'}, + {"version", no_argument, NULL, 'v'}, + {NULL, no_argument, NULL, 0x0}, +@@ -101,7 +99,6 @@ static const char * const usage_opts_help[] = { + "\t\tboth - Both \"linux,phandle\" and \"phandle\" properties", + "\n\tEnable/disable warnings (prefix with \"no-\")", + "\n\tEnable/disable errors (prefix with \"no-\")", +- "\n\tSymbols and Fixups support", + "\n\tPrint this help and exit", + "\n\tPrint version and exit", + NULL, +@@ -189,9 +186,7 @@ int main(int argc, char *argv[]) + case 'E': + parse_checks_option(false, true, optarg); + break; +- case '@': +- symbol_fixup_support = 1; +- break; ++ + case 'h': + usage(NULL); + default: +diff --git a/scripts/dtc/dtc.h b/scripts/dtc/dtc.h +index fe45748..56212c8 100644 +--- a/scripts/dtc/dtc.h ++++ b/scripts/dtc/dtc.h +@@ -54,7 +54,6 @@ extern int reservenum; /* Number of memory reservation slots */ + extern int minsize; /* Minimum blob size */ + extern int padsize; /* Additional padding to blob */ + extern int phandle_format; /* Use linux,phandle or phandle properties */ +-extern int symbol_fixup_support;/* enable symbols & fixup support */ + + #define PHANDLE_LEGACY 0x1 + #define PHANDLE_EPAPR 0x2 +@@ -133,25 +132,6 @@ struct label { + struct label *next; + }; + +-struct fixup_entry { +- int offset; +- struct node *node; +- struct property *prop; +- struct fixup_entry *next; +-}; +- +-struct fixup { +- char *ref; +- struct fixup_entry *entries; +- struct fixup *next; +-}; +- +-struct symbol { +- struct label *label; +- struct node *node; +- struct symbol *next; +-}; +- + struct property { + bool deleted; + char *name; +@@ -178,12 +158,6 @@ struct node { + int addr_cells, size_cells; + + struct label *labels; +- +- int is_root; +- int is_plugin; +- struct fixup *fixups; +- struct symbol *symbols; +- struct fixup_entry *local_fixups; + }; + + #define for_each_label_withdel(l0, l) \ +@@ -207,18 +181,6 @@ struct node { + for_each_child_withdel(n, c) \ + if (!(c)->deleted) + +-#define for_each_fixup(n, f) \ +- for ((f) = (n)->fixups; (f); (f) = (f)->next) +- +-#define for_each_fixup_entry(f, fe) \ +- for ((fe) = (f)->entries; (fe); (fe) = (fe)->next) +- +-#define for_each_symbol(n, s) \ +- for ((s) = (n)->symbols; (s); (s) = (s)->next) +- +-#define for_each_local_fixup_entry(n, fe) \ +- for ((fe) = (n)->local_fixups; (fe); (fe) = (fe)->next) +- + void add_label(struct label **labels, char *label); + void delete_labels(struct label **labels); + +diff --git a/scripts/dtc/flattree.c b/scripts/dtc/flattree.c +index f439b40..bd99fa2 100644 +--- a/scripts/dtc/flattree.c ++++ b/scripts/dtc/flattree.c +@@ -262,12 +262,6 @@ static void flatten_tree(struct node *tree, struct emitter *emit, + struct property *prop; + struct node *child; + bool seen_name_prop = false; +- struct symbol *sym; +- struct fixup *f; +- struct fixup_entry *fe; +- char *name, *s; +- const char *fullpath; +- int namesz, nameoff, vallen; + + if (tree->deleted) + return; +@@ -282,6 +276,8 @@ static void flatten_tree(struct node *tree, struct emitter *emit, + emit->align(etarget, sizeof(cell_t)); + + for_each_property(tree, prop) { ++ int nameoff; ++ + if (streq(prop->name, "name")) + seen_name_prop = true; + +@@ -314,139 +310,6 @@ static void flatten_tree(struct node *tree, struct emitter *emit, + flatten_tree(child, emit, etarget, strbuf, vi); + } + +- if (!symbol_fixup_support) +- goto no_symbols; +- +- /* add the symbol nodes (if any) */ +- if (tree->symbols) { +- +- emit->beginnode(etarget, NULL); +- emit->string(etarget, "__symbols__", 0); +- emit->align(etarget, sizeof(cell_t)); +- +- for_each_symbol(tree, sym) { +- +- vallen = strlen(sym->node->fullpath); +- +- nameoff = stringtable_insert(strbuf, sym->label->label); +- +- emit->property(etarget, NULL); +- emit->cell(etarget, vallen + 1); +- emit->cell(etarget, nameoff); +- +- if ((vi->flags & FTF_VARALIGN) && vallen >= 8) +- emit->align(etarget, 8); +- +- emit->string(etarget, sym->node->fullpath, +- strlen(sym->node->fullpath)); +- emit->align(etarget, sizeof(cell_t)); +- } +- +- emit->endnode(etarget, NULL); +- } +- +- /* add the fixup nodes */ +- if (tree->fixups) { +- +- /* emit the external fixups */ +- emit->beginnode(etarget, NULL); +- emit->string(etarget, "__fixups__", 0); +- emit->align(etarget, sizeof(cell_t)); +- +- for_each_fixup(tree, f) { +- +- namesz = 0; +- for_each_fixup_entry(f, fe) { +- fullpath = fe->node->fullpath; +- if (fullpath[0] == '\0') +- fullpath = "/"; +- namesz += strlen(fullpath) + 1; +- namesz += strlen(fe->prop->name) + 1; +- namesz += 32; /* space for : + '\0' */ +- } +- +- name = xmalloc(namesz); +- +- s = name; +- for_each_fixup_entry(f, fe) { +- fullpath = fe->node->fullpath; +- if (fullpath[0] == '\0') +- fullpath = "/"; +- snprintf(s, name + namesz - s, "%s:%s:%d", +- fullpath, +- fe->prop->name, fe->offset); +- s += strlen(s) + 1; +- } +- +- nameoff = stringtable_insert(strbuf, f->ref); +- vallen = s - name - 1; +- +- emit->property(etarget, NULL); +- emit->cell(etarget, vallen + 1); +- emit->cell(etarget, nameoff); +- +- if ((vi->flags & FTF_VARALIGN) && vallen >= 8) +- emit->align(etarget, 8); +- +- emit->string(etarget, name, vallen); +- emit->align(etarget, sizeof(cell_t)); +- +- free(name); +- } +- +- emit->endnode(etarget, tree->labels); +- } +- +- /* add the local fixup property */ +- if (tree->local_fixups) { +- +- /* emit the external fixups */ +- emit->beginnode(etarget, NULL); +- emit->string(etarget, "__local_fixups__", 0); +- emit->align(etarget, sizeof(cell_t)); +- +- namesz = 0; +- for_each_local_fixup_entry(tree, fe) { +- fullpath = fe->node->fullpath; +- if (fullpath[0] == '\0') +- fullpath = "/"; +- namesz += strlen(fullpath) + 1; +- namesz += strlen(fe->prop->name) + 1; +- namesz += 32; /* space for : + '\0' */ +- } +- +- name = xmalloc(namesz); +- +- s = name; +- for_each_local_fixup_entry(tree, fe) { +- fullpath = fe->node->fullpath; +- if (fullpath[0] == '\0') +- fullpath = "/"; +- snprintf(s, name + namesz - s, "%s:%s:%d", +- fullpath, fe->prop->name, +- fe->offset); +- s += strlen(s) + 1; +- } +- +- nameoff = stringtable_insert(strbuf, "fixup"); +- vallen = s - name - 1; +- +- emit->property(etarget, NULL); +- emit->cell(etarget, vallen + 1); +- emit->cell(etarget, nameoff); +- +- if ((vi->flags & FTF_VARALIGN) && vallen >= 8) +- emit->align(etarget, 8); +- +- emit->string(etarget, name, vallen); +- emit->align(etarget, sizeof(cell_t)); +- +- free(name); +- +- emit->endnode(etarget, tree->labels); +- } +- +-no_symbols: + emit->endnode(etarget, tree->labels); + } + +diff --git a/scripts/dtc/version_gen.h b/scripts/dtc/version_gen.h +index 86b7338..5b8c7d5 100644 +--- a/scripts/dtc/version_gen.h ++++ b/scripts/dtc/version_gen.h +@@ -1 +1 @@ +-#define DTC_VERSION "DTC 1.4.1-g9d3649bd-dirty" ++#define DTC_VERSION "DTC 1.4.1-g9d3649bd" +-- +2.5.0 + + +From fdba337a4b1b302e9c9a6ba478543cd628981fde Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 10 Aug 2015 09:49:15 +0100 +Subject: [PATCH 173/181] scripts/dtc: Update to upstream version 1.4.1 + +Includes the new localfixups format. + +Signed-off-by: Phil Elwell +--- + scripts/dtc/checks.c | 105 ++++- + scripts/dtc/dtc-lexer.l | 5 + + scripts/dtc/dtc-lexer.lex.c_shipped | 490 ++++++++++++------------ + scripts/dtc/dtc-parser.tab.c_shipped | 722 ++++++++++++++++++----------------- + scripts/dtc/dtc-parser.tab.h_shipped | 46 +-- + scripts/dtc/dtc-parser.y | 22 +- + scripts/dtc/dtc.c | 9 +- + scripts/dtc/dtc.h | 40 ++ + scripts/dtc/flattree.c | 202 ++++++++++ + scripts/dtc/version_gen.h | 2 +- + 10 files changed, 1021 insertions(+), 622 deletions(-) + +diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c +index e81a8c74..540a3ea 100644 +--- a/scripts/dtc/checks.c ++++ b/scripts/dtc/checks.c +@@ -458,6 +458,8 @@ static void fixup_phandle_references(struct check *c, struct node *dt, + struct node *node, struct property *prop) + { + struct marker *m = prop->val.markers; ++ struct fixup *f, **fp; ++ struct fixup_entry *fe, **fep; + struct node *refnode; + cell_t phandle; + +@@ -466,11 +468,69 @@ static void fixup_phandle_references(struct check *c, struct node *dt, + + refnode = get_node_by_ref(dt, m->ref); + if (! refnode) { +- FAIL(c, "Reference to non-existent node or label \"%s\"\n", +- m->ref); ++ if (!dt->is_plugin) { ++ FAIL(c, "Reference to non-existent node or label \"%s\"\n", ++ m->ref); ++ continue; ++ } ++ ++ /* allocate fixup entry */ ++ fe = xmalloc(sizeof(*fe)); ++ ++ fe->node = node; ++ fe->prop = prop; ++ fe->offset = m->offset; ++ fe->next = NULL; ++ ++ /* search for an already existing fixup */ ++ for_each_fixup(dt, f) ++ if (strcmp(f->ref, m->ref) == 0) ++ break; ++ ++ /* no fixup found, add new */ ++ if (f == NULL) { ++ f = xmalloc(sizeof(*f)); ++ f->ref = m->ref; ++ f->entries = NULL; ++ f->next = NULL; ++ ++ /* add it to the tree */ ++ fp = &dt->fixups; ++ while (*fp) ++ fp = &(*fp)->next; ++ *fp = f; ++ } ++ ++ /* and now append fixup entry */ ++ fep = &f->entries; ++ while (*fep) ++ fep = &(*fep)->next; ++ *fep = fe; ++ ++ /* mark the entry as unresolved */ ++ *((cell_t *)(prop->val.val + m->offset)) = ++ cpu_to_fdt32(0xdeadbeef); + continue; + } + ++ /* if it's a local reference, we need to record it */ ++ if (symbol_fixup_support) { ++ ++ /* allocate a new local fixup entry */ ++ fe = xmalloc(sizeof(*fe)); ++ ++ fe->node = node; ++ fe->prop = prop; ++ fe->offset = m->offset; ++ fe->next = NULL; ++ ++ /* append it to the local fixups */ ++ fep = &dt->local_fixups; ++ while (*fep) ++ fep = &(*fep)->next; ++ *fep = fe; ++ } ++ + phandle = get_node_phandle(dt, refnode); + *((cell_t *)(prop->val.val + m->offset)) = cpu_to_fdt32(phandle); + } +@@ -652,6 +712,45 @@ static void check_obsolete_chosen_interrupt_controller(struct check *c, + } + TREE_WARNING(obsolete_chosen_interrupt_controller, NULL); + ++static void check_auto_label_phandles(struct check *c, struct node *dt, ++ struct node *node) ++{ ++ struct label *l; ++ struct symbol *s, **sp; ++ int has_label; ++ ++ if (!symbol_fixup_support) ++ return; ++ ++ has_label = 0; ++ for_each_label(node->labels, l) { ++ has_label = 1; ++ break; ++ } ++ ++ if (!has_label) ++ return; ++ ++ /* force allocation of a phandle for this node */ ++ (void)get_node_phandle(dt, node); ++ ++ /* add the symbol */ ++ for_each_label(node->labels, l) { ++ ++ s = xmalloc(sizeof(*s)); ++ s->label = l; ++ s->node = node; ++ s->next = NULL; ++ ++ /* add it to the symbols list */ ++ sp = &dt->symbols; ++ while (*sp) ++ sp = &((*sp)->next); ++ *sp = s; ++ } ++} ++NODE_WARNING(auto_label_phandles, NULL); ++ + static struct check *check_table[] = { + &duplicate_node_names, &duplicate_property_names, + &node_name_chars, &node_name_format, &property_name_chars, +@@ -670,6 +769,8 @@ static struct check *check_table[] = { + &avoid_default_addr_size, + &obsolete_chosen_interrupt_controller, + ++ &auto_label_phandles, ++ + &always_fail, + }; + +diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l +index 0ee1caf..dd44ba2 100644 +--- a/scripts/dtc/dtc-lexer.l ++++ b/scripts/dtc/dtc-lexer.l +@@ -113,6 +113,11 @@ static void lexical_error(const char *fmt, ...); + return DT_V1; + } + ++<*>"/plugin/" { ++ DPRINT("Keyword: /plugin/\n"); ++ return DT_PLUGIN; ++ } ++ + <*>"/memreserve/" { + DPRINT("Keyword: /memreserve/\n"); + BEGIN_DEFAULT(); +diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped +index 11cd78e..1518525 100644 +--- a/scripts/dtc/dtc-lexer.lex.c_shipped ++++ b/scripts/dtc/dtc-lexer.lex.c_shipped +@@ -9,7 +9,7 @@ + #define FLEX_SCANNER + #define YY_FLEX_MAJOR_VERSION 2 + #define YY_FLEX_MINOR_VERSION 5 +-#define YY_FLEX_SUBMINOR_VERSION 39 ++#define YY_FLEX_SUBMINOR_VERSION 35 + #if YY_FLEX_SUBMINOR_VERSION > 0 + #define FLEX_BETA + #endif +@@ -162,12 +162,7 @@ typedef unsigned int flex_uint32_t; + typedef struct yy_buffer_state *YY_BUFFER_STATE; + #endif + +-#ifndef YY_TYPEDEF_YY_SIZE_T +-#define YY_TYPEDEF_YY_SIZE_T +-typedef size_t yy_size_t; +-#endif +- +-extern yy_size_t yyleng; ++extern int yyleng; + + extern FILE *yyin, *yyout; + +@@ -176,7 +171,6 @@ extern FILE *yyin, *yyout; + #define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) +- #define YY_LINENO_REWIND_TO(ptr) + + /* Return all but the first "n" matched characters back to the input stream. */ + #define yyless(n) \ +@@ -194,6 +188,11 @@ extern FILE *yyin, *yyout; + + #define unput(c) yyunput( c, (yytext_ptr) ) + ++#ifndef YY_TYPEDEF_YY_SIZE_T ++#define YY_TYPEDEF_YY_SIZE_T ++typedef size_t yy_size_t; ++#endif ++ + #ifndef YY_STRUCT_YY_BUFFER_STATE + #define YY_STRUCT_YY_BUFFER_STATE + struct yy_buffer_state +@@ -211,7 +210,7 @@ struct yy_buffer_state + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ +- yy_size_t yy_n_chars; ++ int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to +@@ -281,8 +280,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + + /* yy_hold_char holds the character lost when yytext is formed. */ + static char yy_hold_char; +-static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +-yy_size_t yyleng; ++static int yy_n_chars; /* number of characters read into yy_ch_buf */ ++int yyleng; + + /* Points to current character in buffer. */ + static char *yy_c_buf_p = (char *) 0; +@@ -310,7 +309,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); + + YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); + YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); +-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); ++YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); + + void *yyalloc (yy_size_t ); + void *yyrealloc (void *,yy_size_t ); +@@ -342,7 +341,7 @@ void yyfree (void * ); + + /* Begin user sect3 */ + +-#define yywrap() 1 ++#define yywrap(n) 1 + #define YY_SKIP_YYWRAP + + typedef unsigned char YY_CHAR; +@@ -373,8 +372,8 @@ static void yy_fatal_error (yyconst char msg[] ); + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +-#define YY_NUM_RULES 30 +-#define YY_END_OF_BUFFER 31 ++#define YY_NUM_RULES 31 ++#define YY_END_OF_BUFFER 32 + /* This struct is not used in this scanner, + but its presence is necessary. */ + struct yy_trans_info +@@ -382,25 +381,26 @@ struct yy_trans_info + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +-static yyconst flex_int16_t yy_accept[159] = ++static yyconst flex_int16_t yy_accept[166] = + { 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 31, 29, +- 18, 18, 29, 29, 29, 29, 29, 29, 29, 29, +- 29, 29, 29, 29, 29, 29, 15, 16, 16, 29, +- 16, 10, 10, 18, 26, 0, 3, 0, 27, 12, +- 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, +- 21, 23, 25, 24, 22, 0, 9, 28, 0, 0, +- 0, 14, 14, 16, 16, 16, 10, 10, 10, 0, +- 12, 0, 11, 0, 0, 0, 20, 0, 0, 0, +- 0, 0, 0, 0, 0, 16, 10, 10, 10, 0, +- 13, 19, 0, 0, 0, 0, 0, 0, 0, 0, +- +- 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 16, 6, 0, 0, 0, 0, 0, 0, 2, +- 0, 0, 0, 0, 0, 0, 0, 0, 4, 17, +- 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, +- 5, 8, 0, 0, 0, 0, 7, 0 ++ 0, 0, 0, 0, 0, 0, 0, 0, 32, 30, ++ 19, 19, 30, 30, 30, 30, 30, 30, 30, 30, ++ 30, 30, 30, 30, 30, 30, 16, 17, 17, 30, ++ 17, 11, 11, 19, 27, 0, 3, 0, 28, 13, ++ 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, ++ 0, 22, 24, 26, 25, 23, 0, 10, 29, 0, ++ 0, 0, 15, 15, 17, 17, 17, 11, 11, 11, ++ 0, 13, 0, 12, 0, 0, 0, 21, 0, 0, ++ 0, 0, 0, 0, 0, 0, 0, 17, 11, 11, ++ 11, 0, 14, 20, 0, 0, 0, 0, 0, 0, ++ ++ 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, ++ 0, 0, 0, 0, 0, 17, 7, 0, 0, 0, ++ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, ++ 0, 0, 0, 0, 4, 18, 0, 0, 5, 2, ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 0, 1, 0, 0, 0, 0, 6, 9, 0, ++ 0, 0, 0, 8, 0 + } ; + + static yyconst flex_int32_t yy_ec[256] = +@@ -416,9 +416,9 @@ static yyconst flex_int32_t yy_ec[256] = + 22, 22, 22, 22, 24, 22, 22, 25, 22, 22, + 1, 26, 27, 1, 22, 1, 21, 28, 29, 30, + +- 31, 21, 22, 22, 32, 22, 22, 33, 34, 35, +- 36, 37, 22, 38, 39, 40, 41, 42, 22, 25, +- 43, 22, 44, 45, 46, 1, 1, 1, 1, 1, ++ 31, 21, 32, 22, 33, 22, 22, 34, 35, 36, ++ 37, 38, 22, 39, 40, 41, 42, 43, 22, 25, ++ 44, 22, 45, 46, 47, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +@@ -435,163 +435,165 @@ static yyconst flex_int32_t yy_ec[256] = + 1, 1, 1, 1, 1 + } ; + +-static yyconst flex_int32_t yy_meta[47] = ++static yyconst flex_int32_t yy_meta[48] = + { 0, + 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, + 2, 2, 4, 5, 5, 5, 6, 1, 1, 1, + 7, 8, 8, 8, 8, 1, 1, 7, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, +- 8, 8, 8, 3, 1, 4 ++ 8, 8, 8, 8, 3, 1, 4 + } ; + +-static yyconst flex_int16_t yy_base[173] = ++static yyconst flex_int16_t yy_base[180] = + { 0, +- 0, 383, 34, 382, 65, 381, 37, 105, 387, 391, +- 54, 111, 367, 110, 109, 109, 112, 41, 366, 104, +- 367, 338, 124, 117, 0, 144, 391, 0, 121, 0, +- 135, 155, 140, 179, 391, 160, 391, 379, 391, 0, +- 368, 141, 391, 167, 370, 376, 346, 103, 342, 345, +- 391, 391, 391, 391, 391, 358, 391, 391, 175, 342, +- 338, 391, 355, 0, 185, 339, 184, 347, 346, 0, +- 0, 322, 175, 357, 175, 363, 352, 324, 330, 323, +- 332, 326, 201, 324, 329, 322, 391, 333, 181, 309, +- 391, 341, 340, 313, 320, 338, 178, 311, 146, 317, +- +- 314, 315, 335, 331, 303, 300, 309, 299, 308, 188, +- 336, 335, 391, 305, 320, 281, 283, 271, 203, 288, +- 281, 271, 266, 264, 245, 242, 208, 104, 391, 391, +- 244, 218, 204, 219, 206, 224, 201, 212, 204, 229, +- 215, 208, 207, 200, 219, 391, 233, 221, 200, 181, +- 391, 391, 149, 122, 86, 41, 391, 391, 245, 251, +- 259, 263, 267, 273, 280, 284, 292, 300, 304, 310, +- 318, 326 ++ 0, 393, 35, 392, 66, 391, 38, 107, 397, 401, ++ 55, 113, 377, 112, 111, 111, 114, 42, 376, 106, ++ 377, 347, 126, 120, 0, 147, 401, 0, 124, 0, ++ 137, 158, 170, 163, 401, 153, 401, 389, 401, 0, ++ 378, 120, 401, 131, 380, 386, 355, 139, 351, 355, ++ 351, 401, 401, 401, 401, 401, 367, 401, 401, 185, ++ 350, 346, 401, 364, 0, 185, 347, 189, 356, 355, ++ 0, 0, 330, 180, 366, 141, 372, 361, 332, 338, ++ 331, 341, 334, 326, 205, 331, 337, 329, 401, 341, ++ 167, 316, 401, 349, 348, 320, 328, 346, 180, 318, ++ ++ 324, 209, 324, 320, 322, 342, 338, 309, 306, 315, ++ 305, 315, 312, 192, 342, 341, 401, 293, 306, 282, ++ 268, 252, 255, 203, 285, 282, 272, 268, 252, 233, ++ 232, 239, 208, 107, 401, 401, 238, 211, 401, 211, ++ 212, 208, 228, 203, 215, 207, 233, 222, 212, 211, ++ 203, 227, 401, 237, 225, 204, 185, 401, 401, 149, ++ 128, 88, 42, 401, 401, 253, 259, 267, 271, 275, ++ 281, 288, 292, 300, 308, 312, 318, 326, 334 + } ; + +-static yyconst flex_int16_t yy_def[173] = ++static yyconst flex_int16_t yy_def[180] = + { 0, +- 158, 1, 1, 3, 158, 5, 1, 1, 158, 158, +- 158, 158, 158, 159, 160, 161, 158, 158, 158, 158, +- 162, 158, 158, 158, 163, 162, 158, 164, 165, 164, +- 164, 158, 158, 158, 158, 159, 158, 159, 158, 166, +- 158, 161, 158, 161, 167, 168, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 162, 158, 158, 158, 158, +- 158, 158, 162, 164, 165, 164, 158, 158, 158, 169, +- 166, 170, 161, 167, 167, 168, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 164, 158, 158, 169, 170, +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- +- 158, 164, 158, 158, 158, 158, 158, 158, 158, 171, +- 158, 164, 158, 158, 158, 158, 158, 158, 171, 158, +- 171, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 172, 158, 158, 158, 172, 158, 172, 158, 158, 158, +- 158, 158, 158, 158, 158, 158, 158, 0, 158, 158, +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 158, 158 ++ 165, 1, 1, 3, 165, 5, 1, 1, 165, 165, ++ 165, 165, 165, 166, 167, 168, 165, 165, 165, 165, ++ 169, 165, 165, 165, 170, 169, 165, 171, 172, 171, ++ 171, 165, 165, 165, 165, 166, 165, 166, 165, 173, ++ 165, 168, 165, 168, 174, 175, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 169, 165, 165, 165, ++ 165, 165, 165, 169, 171, 172, 171, 165, 165, 165, ++ 176, 173, 177, 168, 174, 174, 175, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 171, 165, 165, ++ 176, 177, 165, 165, 165, 165, 165, 165, 165, 165, ++ ++ 165, 165, 165, 165, 171, 165, 165, 165, 165, 165, ++ 165, 165, 165, 178, 165, 171, 165, 165, 165, 165, ++ 165, 165, 165, 178, 165, 178, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 179, 165, 165, ++ 165, 179, 165, 179, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 0, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165, 165 + } ; + +-static yyconst flex_int16_t yy_nxt[438] = ++static yyconst flex_int16_t yy_nxt[449] = + { 0, + 10, 11, 12, 11, 13, 14, 10, 15, 16, 10, + 10, 10, 17, 10, 10, 10, 10, 18, 19, 20, + 21, 21, 21, 21, 21, 10, 10, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, +- 21, 21, 21, 10, 22, 10, 24, 25, 25, 25, +- 32, 33, 33, 157, 26, 34, 34, 34, 51, 52, +- 27, 26, 26, 26, 26, 10, 11, 12, 11, 13, +- 14, 28, 15, 16, 28, 28, 28, 24, 28, 28, +- 28, 10, 18, 19, 20, 29, 29, 29, 29, 29, +- 30, 10, 29, 29, 29, 29, 29, 29, 29, 29, +- +- 29, 29, 29, 29, 29, 29, 29, 29, 10, 22, +- 10, 23, 34, 34, 34, 37, 39, 43, 32, 33, +- 33, 45, 54, 55, 46, 59, 45, 64, 156, 46, +- 64, 64, 64, 79, 44, 38, 59, 57, 134, 47, +- 135, 48, 80, 49, 47, 50, 48, 99, 61, 43, +- 50, 110, 41, 67, 67, 67, 60, 63, 63, 63, +- 57, 155, 68, 69, 63, 37, 44, 66, 67, 67, +- 67, 63, 63, 63, 63, 73, 59, 68, 69, 70, +- 34, 34, 34, 43, 75, 38, 154, 92, 83, 83, +- 83, 64, 44, 120, 64, 64, 64, 67, 67, 67, +- +- 44, 57, 99, 68, 69, 107, 68, 69, 120, 127, +- 108, 153, 152, 121, 83, 83, 83, 133, 133, 133, +- 146, 133, 133, 133, 146, 140, 140, 140, 121, 141, +- 140, 140, 140, 151, 141, 158, 150, 149, 148, 144, +- 147, 143, 142, 139, 147, 36, 36, 36, 36, 36, +- 36, 36, 36, 40, 138, 137, 136, 40, 40, 42, +- 42, 42, 42, 42, 42, 42, 42, 56, 56, 56, +- 56, 62, 132, 62, 64, 131, 130, 64, 129, 64, +- 64, 65, 128, 158, 65, 65, 65, 65, 71, 127, +- 71, 71, 74, 74, 74, 74, 74, 74, 74, 74, +- +- 76, 76, 76, 76, 76, 76, 76, 76, 89, 126, +- 89, 90, 125, 90, 90, 124, 90, 90, 119, 119, +- 119, 119, 119, 119, 119, 119, 145, 145, 145, 145, +- 145, 145, 145, 145, 123, 122, 59, 59, 118, 117, +- 116, 115, 114, 113, 45, 112, 108, 111, 109, 106, +- 105, 104, 46, 103, 91, 87, 102, 101, 100, 98, +- 97, 96, 95, 94, 93, 77, 75, 91, 88, 87, +- 86, 57, 85, 84, 57, 82, 81, 78, 77, 75, +- 72, 158, 58, 57, 53, 35, 158, 31, 23, 23, +- 9, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 158, 158 ++ 21, 21, 21, 21, 10, 22, 10, 24, 25, 25, ++ 25, 32, 33, 33, 164, 26, 34, 34, 34, 52, ++ 53, 27, 26, 26, 26, 26, 10, 11, 12, 11, ++ 13, 14, 28, 15, 16, 28, 28, 28, 24, 28, ++ 28, 28, 10, 18, 19, 20, 29, 29, 29, 29, ++ 29, 30, 10, 29, 29, 29, 29, 29, 29, 29, ++ ++ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, ++ 10, 22, 10, 23, 34, 34, 34, 37, 39, 43, ++ 32, 33, 33, 45, 55, 56, 46, 60, 43, 45, ++ 65, 163, 46, 65, 65, 65, 44, 38, 60, 74, ++ 58, 47, 141, 48, 142, 44, 49, 47, 50, 48, ++ 76, 51, 62, 94, 50, 41, 44, 51, 37, 61, ++ 64, 64, 64, 58, 34, 34, 34, 64, 162, 80, ++ 67, 68, 68, 68, 64, 64, 64, 64, 38, 81, ++ 69, 70, 71, 68, 68, 68, 60, 161, 43, 69, ++ 70, 65, 69, 70, 65, 65, 65, 125, 85, 85, ++ ++ 85, 58, 68, 68, 68, 44, 102, 110, 125, 133, ++ 102, 69, 70, 111, 114, 160, 159, 126, 85, 85, ++ 85, 140, 140, 140, 140, 140, 140, 153, 126, 147, ++ 147, 147, 153, 148, 147, 147, 147, 158, 148, 165, ++ 157, 156, 155, 151, 150, 149, 146, 154, 145, 144, ++ 143, 139, 154, 36, 36, 36, 36, 36, 36, 36, ++ 36, 40, 138, 137, 136, 40, 40, 42, 42, 42, ++ 42, 42, 42, 42, 42, 57, 57, 57, 57, 63, ++ 135, 63, 65, 134, 165, 65, 133, 65, 65, 66, ++ 132, 131, 66, 66, 66, 66, 72, 130, 72, 72, ++ ++ 75, 75, 75, 75, 75, 75, 75, 75, 77, 77, ++ 77, 77, 77, 77, 77, 77, 91, 129, 91, 92, ++ 128, 92, 92, 127, 92, 92, 124, 124, 124, 124, ++ 124, 124, 124, 124, 152, 152, 152, 152, 152, 152, ++ 152, 152, 60, 60, 123, 122, 121, 120, 119, 118, ++ 117, 45, 116, 111, 115, 113, 112, 109, 108, 107, ++ 46, 106, 93, 89, 105, 104, 103, 101, 100, 99, ++ 98, 97, 96, 95, 78, 76, 93, 90, 89, 88, ++ 58, 87, 86, 58, 84, 83, 82, 79, 78, 76, ++ 73, 165, 59, 58, 54, 35, 165, 31, 23, 23, ++ ++ 9, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165 + } ; + +-static yyconst flex_int16_t yy_chk[438] = ++static yyconst flex_int16_t yy_chk[449] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, +- 7, 7, 7, 156, 3, 11, 11, 11, 18, 18, +- 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, ++ 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, ++ 3, 7, 7, 7, 163, 3, 11, 11, 11, 18, ++ 18, 3, 3, 3, 3, 3, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, +- 5, 8, 12, 12, 12, 14, 15, 16, 8, 8, +- 8, 17, 20, 20, 17, 23, 24, 29, 155, 24, +- 29, 29, 29, 48, 16, 14, 31, 29, 128, 17, +- 128, 17, 48, 17, 24, 17, 24, 99, 24, 42, +- 24, 99, 15, 33, 33, 33, 23, 26, 26, 26, +- 26, 154, 33, 33, 26, 36, 42, 31, 32, 32, +- 32, 26, 26, 26, 26, 44, 59, 32, 32, 32, +- 34, 34, 34, 73, 75, 36, 153, 75, 59, 59, +- 59, 65, 44, 110, 65, 65, 65, 67, 67, 67, +- +- 73, 65, 83, 89, 89, 97, 67, 67, 119, 127, +- 97, 150, 149, 110, 83, 83, 83, 133, 133, 133, +- 141, 127, 127, 127, 145, 136, 136, 136, 119, 136, +- 140, 140, 140, 148, 140, 147, 144, 143, 142, 139, +- 141, 138, 137, 135, 145, 159, 159, 159, 159, 159, +- 159, 159, 159, 160, 134, 132, 131, 160, 160, 161, +- 161, 161, 161, 161, 161, 161, 161, 162, 162, 162, +- 162, 163, 126, 163, 164, 125, 124, 164, 123, 164, +- 164, 165, 122, 121, 165, 165, 165, 165, 166, 120, +- 166, 166, 167, 167, 167, 167, 167, 167, 167, 167, +- +- 168, 168, 168, 168, 168, 168, 168, 168, 169, 118, +- 169, 170, 117, 170, 170, 116, 170, 170, 171, 171, +- 171, 171, 171, 171, 171, 171, 172, 172, 172, 172, +- 172, 172, 172, 172, 115, 114, 112, 111, 109, 108, +- 107, 106, 105, 104, 103, 102, 101, 100, 98, 96, +- 95, 94, 93, 92, 90, 88, 86, 85, 84, 82, +- 81, 80, 79, 78, 77, 76, 74, 72, 69, 68, +- 66, 63, 61, 60, 56, 50, 49, 47, 46, 45, ++ 5, 5, 5, 8, 12, 12, 12, 14, 15, 16, ++ 8, 8, 8, 17, 20, 20, 17, 23, 42, 24, ++ 29, 162, 24, 29, 29, 29, 16, 14, 31, 44, ++ 29, 17, 134, 17, 134, 42, 17, 24, 17, 24, ++ 76, 17, 24, 76, 24, 15, 44, 24, 36, 23, ++ 26, 26, 26, 26, 34, 34, 34, 26, 161, 48, ++ 31, 32, 32, 32, 26, 26, 26, 26, 36, 48, ++ 32, 32, 32, 33, 33, 33, 60, 160, 74, 91, ++ 91, 66, 33, 33, 66, 66, 66, 114, 60, 60, ++ ++ 60, 66, 68, 68, 68, 74, 85, 99, 124, 133, ++ 102, 68, 68, 99, 102, 157, 156, 114, 85, 85, ++ 85, 133, 133, 133, 140, 140, 140, 148, 124, 143, ++ 143, 143, 152, 143, 147, 147, 147, 155, 147, 154, ++ 151, 150, 149, 146, 145, 144, 142, 148, 141, 138, ++ 137, 132, 152, 166, 166, 166, 166, 166, 166, 166, ++ 166, 167, 131, 130, 129, 167, 167, 168, 168, 168, ++ 168, 168, 168, 168, 168, 169, 169, 169, 169, 170, ++ 128, 170, 171, 127, 126, 171, 125, 171, 171, 172, ++ 123, 122, 172, 172, 172, 172, 173, 121, 173, 173, ++ ++ 174, 174, 174, 174, 174, 174, 174, 174, 175, 175, ++ 175, 175, 175, 175, 175, 175, 176, 120, 176, 177, ++ 119, 177, 177, 118, 177, 177, 178, 178, 178, 178, ++ 178, 178, 178, 178, 179, 179, 179, 179, 179, 179, ++ 179, 179, 116, 115, 113, 112, 111, 110, 109, 108, ++ 107, 106, 105, 104, 103, 101, 100, 98, 97, 96, ++ 95, 94, 92, 90, 88, 87, 86, 84, 83, 82, ++ 81, 80, 79, 78, 77, 75, 73, 70, 69, 67, ++ 64, 62, 61, 57, 51, 50, 49, 47, 46, 45, + 41, 38, 22, 21, 19, 13, 9, 6, 4, 2, +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, +- 158, 158, 158, 158, 158, 158, 158 ++ 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, ++ 165, 165, 165, 165, 165, 165, 165, 165 + } ; + + static yy_state_type yy_last_accepting_state; +@@ -662,7 +664,7 @@ static int dts_version = 1; + static void push_input_file(const char *filename); + static bool pop_input_file(void); + static void lexical_error(const char *fmt, ...); +-#line 666 "dtc-lexer.lex.c" ++#line 668 "dtc-lexer.lex.c" + + #define INITIAL 0 + #define BYTESTRING 1 +@@ -704,7 +706,7 @@ FILE *yyget_out (void ); + + void yyset_out (FILE * out_str ); + +-yy_size_t yyget_leng (void ); ++int yyget_leng (void ); + + char *yyget_text (void ); + +@@ -853,6 +855,10 @@ YY_DECL + register char *yy_cp, *yy_bp; + register int yy_act; + ++#line 68 "dtc-lexer.l" ++ ++#line 861 "dtc-lexer.lex.c" ++ + if ( !(yy_init) ) + { + (yy_init) = 1; +@@ -879,11 +885,6 @@ YY_DECL + yy_load_buffer_state( ); + } + +- { +-#line 68 "dtc-lexer.l" +- +-#line 886 "dtc-lexer.lex.c" +- + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); +@@ -901,7 +902,7 @@ YY_DECL + yy_match: + do + { +- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; ++ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; +@@ -910,13 +911,13 @@ yy_match: + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 159 ) ++ if ( yy_current_state >= 166 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } +- while ( yy_current_state != 158 ); ++ while ( yy_current_state != 165 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + +@@ -1007,23 +1008,31 @@ case 5: + YY_RULE_SETUP + #line 116 "dtc-lexer.l" + { ++ DPRINT("Keyword: /plugin/\n"); ++ return DT_PLUGIN; ++ } ++ YY_BREAK ++case 6: ++YY_RULE_SETUP ++#line 121 "dtc-lexer.l" ++{ + DPRINT("Keyword: /memreserve/\n"); + BEGIN_DEFAULT(); + return DT_MEMRESERVE; + } + YY_BREAK +-case 6: ++case 7: + YY_RULE_SETUP +-#line 122 "dtc-lexer.l" ++#line 127 "dtc-lexer.l" + { + DPRINT("Keyword: /bits/\n"); + BEGIN_DEFAULT(); + return DT_BITS; + } + YY_BREAK +-case 7: ++case 8: + YY_RULE_SETUP +-#line 128 "dtc-lexer.l" ++#line 133 "dtc-lexer.l" + { + DPRINT("Keyword: /delete-property/\n"); + DPRINT("\n"); +@@ -1031,9 +1040,9 @@ YY_RULE_SETUP + return DT_DEL_PROP; + } + YY_BREAK +-case 8: ++case 9: + YY_RULE_SETUP +-#line 135 "dtc-lexer.l" ++#line 140 "dtc-lexer.l" + { + DPRINT("Keyword: /delete-node/\n"); + DPRINT("\n"); +@@ -1041,9 +1050,9 @@ YY_RULE_SETUP + return DT_DEL_NODE; + } + YY_BREAK +-case 9: ++case 10: + YY_RULE_SETUP +-#line 142 "dtc-lexer.l" ++#line 147 "dtc-lexer.l" + { + DPRINT("Label: %s\n", yytext); + yylval.labelref = xstrdup(yytext); +@@ -1051,9 +1060,9 @@ YY_RULE_SETUP + return DT_LABEL; + } + YY_BREAK +-case 10: ++case 11: + YY_RULE_SETUP +-#line 149 "dtc-lexer.l" ++#line 154 "dtc-lexer.l" + { + char *e; + DPRINT("Integer Literal: '%s'\n", yytext); +@@ -1073,10 +1082,10 @@ YY_RULE_SETUP + return DT_LITERAL; + } + YY_BREAK +-case 11: +-/* rule 11 can match eol */ ++case 12: ++/* rule 12 can match eol */ + YY_RULE_SETUP +-#line 168 "dtc-lexer.l" ++#line 173 "dtc-lexer.l" + { + struct data d; + DPRINT("Character literal: %s\n", yytext); +@@ -1098,18 +1107,18 @@ YY_RULE_SETUP + return DT_CHAR_LITERAL; + } + YY_BREAK +-case 12: ++case 13: + YY_RULE_SETUP +-#line 189 "dtc-lexer.l" ++#line 194 "dtc-lexer.l" + { /* label reference */ + DPRINT("Ref: %s\n", yytext+1); + yylval.labelref = xstrdup(yytext+1); + return DT_REF; + } + YY_BREAK +-case 13: ++case 14: + YY_RULE_SETUP +-#line 195 "dtc-lexer.l" ++#line 200 "dtc-lexer.l" + { /* new-style path reference */ + yytext[yyleng-1] = '\0'; + DPRINT("Ref: %s\n", yytext+2); +@@ -1117,27 +1126,27 @@ YY_RULE_SETUP + return DT_REF; + } + YY_BREAK +-case 14: ++case 15: + YY_RULE_SETUP +-#line 202 "dtc-lexer.l" ++#line 207 "dtc-lexer.l" + { + yylval.byte = strtol(yytext, NULL, 16); + DPRINT("Byte: %02x\n", (int)yylval.byte); + return DT_BYTE; + } + YY_BREAK +-case 15: ++case 16: + YY_RULE_SETUP +-#line 208 "dtc-lexer.l" ++#line 213 "dtc-lexer.l" + { + DPRINT("/BYTESTRING\n"); + BEGIN_DEFAULT(); + return ']'; + } + YY_BREAK +-case 16: ++case 17: + YY_RULE_SETUP +-#line 214 "dtc-lexer.l" ++#line 219 "dtc-lexer.l" + { + DPRINT("PropNodeName: %s\n", yytext); + yylval.propnodename = xstrdup((yytext[0] == '\\') ? +@@ -1146,75 +1155,75 @@ YY_RULE_SETUP + return DT_PROPNODENAME; + } + YY_BREAK +-case 17: ++case 18: + YY_RULE_SETUP +-#line 222 "dtc-lexer.l" ++#line 227 "dtc-lexer.l" + { + DPRINT("Binary Include\n"); + return DT_INCBIN; + } + YY_BREAK +-case 18: +-/* rule 18 can match eol */ +-YY_RULE_SETUP +-#line 227 "dtc-lexer.l" +-/* eat whitespace */ +- YY_BREAK + case 19: + /* rule 19 can match eol */ + YY_RULE_SETUP +-#line 228 "dtc-lexer.l" +-/* eat C-style comments */ ++#line 232 "dtc-lexer.l" ++/* eat whitespace */ + YY_BREAK + case 20: + /* rule 20 can match eol */ + YY_RULE_SETUP +-#line 229 "dtc-lexer.l" +-/* eat C++-style comments */ ++#line 233 "dtc-lexer.l" ++/* eat C-style comments */ + YY_BREAK + case 21: ++/* rule 21 can match eol */ + YY_RULE_SETUP +-#line 231 "dtc-lexer.l" +-{ return DT_LSHIFT; }; ++#line 234 "dtc-lexer.l" ++/* eat C++-style comments */ + YY_BREAK + case 22: + YY_RULE_SETUP +-#line 232 "dtc-lexer.l" +-{ return DT_RSHIFT; }; ++#line 236 "dtc-lexer.l" ++{ return DT_LSHIFT; }; + YY_BREAK + case 23: + YY_RULE_SETUP +-#line 233 "dtc-lexer.l" +-{ return DT_LE; }; ++#line 237 "dtc-lexer.l" ++{ return DT_RSHIFT; }; + YY_BREAK + case 24: + YY_RULE_SETUP +-#line 234 "dtc-lexer.l" +-{ return DT_GE; }; ++#line 238 "dtc-lexer.l" ++{ return DT_LE; }; + YY_BREAK + case 25: + YY_RULE_SETUP +-#line 235 "dtc-lexer.l" +-{ return DT_EQ; }; ++#line 239 "dtc-lexer.l" ++{ return DT_GE; }; + YY_BREAK + case 26: + YY_RULE_SETUP +-#line 236 "dtc-lexer.l" +-{ return DT_NE; }; ++#line 240 "dtc-lexer.l" ++{ return DT_EQ; }; + YY_BREAK + case 27: + YY_RULE_SETUP +-#line 237 "dtc-lexer.l" +-{ return DT_AND; }; ++#line 241 "dtc-lexer.l" ++{ return DT_NE; }; + YY_BREAK + case 28: + YY_RULE_SETUP +-#line 238 "dtc-lexer.l" +-{ return DT_OR; }; ++#line 242 "dtc-lexer.l" ++{ return DT_AND; }; + YY_BREAK + case 29: + YY_RULE_SETUP +-#line 240 "dtc-lexer.l" ++#line 243 "dtc-lexer.l" ++{ return DT_OR; }; ++ YY_BREAK ++case 30: ++YY_RULE_SETUP ++#line 245 "dtc-lexer.l" + { + DPRINT("Char: %c (\\x%02x)\n", yytext[0], + (unsigned)yytext[0]); +@@ -1230,12 +1239,12 @@ YY_RULE_SETUP + return yytext[0]; + } + YY_BREAK +-case 30: ++case 31: + YY_RULE_SETUP +-#line 255 "dtc-lexer.l" ++#line 260 "dtc-lexer.l" + ECHO; + YY_BREAK +-#line 1239 "dtc-lexer.lex.c" ++#line 1248 "dtc-lexer.lex.c" + + case YY_END_OF_BUFFER: + { +@@ -1365,7 +1374,6 @@ ECHO; + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +- } /* end of user's declarations */ + } /* end of yylex */ + + /* yy_get_next_buffer - try to read in a new buffer +@@ -1421,21 +1429,21 @@ static int yy_get_next_buffer (void) + + else + { +- yy_size_t num_to_read = ++ int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ +- YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; ++ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { +- yy_size_t new_size = b->yy_buf_size * 2; ++ int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; +@@ -1466,7 +1474,7 @@ static int yy_get_next_buffer (void) + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), +- (yy_n_chars), num_to_read ); ++ (yy_n_chars), (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } +@@ -1528,7 +1536,7 @@ static int yy_get_next_buffer (void) + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 159 ) ++ if ( yy_current_state >= 166 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +@@ -1556,13 +1564,13 @@ static int yy_get_next_buffer (void) + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 159 ) ++ if ( yy_current_state >= 166 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- yy_is_jam = (yy_current_state == 158); ++ yy_is_jam = (yy_current_state == 165); + +- return yy_is_jam ? 0 : yy_current_state; ++ return yy_is_jam ? 0 : yy_current_state; + } + + #ifndef YY_NO_INPUT +@@ -1589,7 +1597,7 @@ static int yy_get_next_buffer (void) + + else + { /* need more input */ +- yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); ++ int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) +@@ -1863,7 +1871,7 @@ void yypop_buffer_state (void) + */ + static void yyensure_buffer_stack (void) + { +- yy_size_t num_to_alloc; ++ int num_to_alloc; + + if (!(yy_buffer_stack)) { + +@@ -1960,12 +1968,12 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) + * + * @return the newly allocated buffer state object. + */ +-YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) ++YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; +- yy_size_t i; ++ int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; +@@ -2047,7 +2055,7 @@ FILE *yyget_out (void) + /** Get the length of the current token. + * + */ +-yy_size_t yyget_leng (void) ++int yyget_leng (void) + { + return yyleng; + } +@@ -2195,7 +2203,7 @@ void yyfree (void * ptr ) + + #define YYTABLES_NAME "yytables" + +-#line 254 "dtc-lexer.l" ++#line 260 "dtc-lexer.l" + + + +diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped +index 116458c..844c462 100644 +--- a/scripts/dtc/dtc-parser.tab.c_shipped ++++ b/scripts/dtc/dtc-parser.tab.c_shipped +@@ -65,6 +65,7 @@ + #line 20 "dtc-parser.y" /* yacc.c:339 */ + + #include ++#include + + #include "dtc.h" + #include "srcpos.h" +@@ -80,7 +81,7 @@ extern void yyerror(char const *s); + extern struct boot_info *the_boot_info; + extern bool treesource_error; + +-#line 84 "dtc-parser.tab.c" /* yacc.c:339 */ ++#line 85 "dtc-parser.tab.c" /* yacc.c:339 */ + + # ifndef YY_NULLPTR + # if defined __cplusplus && 201103L <= __cplusplus +@@ -116,26 +117,27 @@ extern int yydebug; + enum yytokentype + { + DT_V1 = 258, +- DT_MEMRESERVE = 259, +- DT_LSHIFT = 260, +- DT_RSHIFT = 261, +- DT_LE = 262, +- DT_GE = 263, +- DT_EQ = 264, +- DT_NE = 265, +- DT_AND = 266, +- DT_OR = 267, +- DT_BITS = 268, +- DT_DEL_PROP = 269, +- DT_DEL_NODE = 270, +- DT_PROPNODENAME = 271, +- DT_LITERAL = 272, +- DT_CHAR_LITERAL = 273, +- DT_BYTE = 274, +- DT_STRING = 275, +- DT_LABEL = 276, +- DT_REF = 277, +- DT_INCBIN = 278 ++ DT_PLUGIN = 259, ++ DT_MEMRESERVE = 260, ++ DT_LSHIFT = 261, ++ DT_RSHIFT = 262, ++ DT_LE = 263, ++ DT_GE = 264, ++ DT_EQ = 265, ++ DT_NE = 266, ++ DT_AND = 267, ++ DT_OR = 268, ++ DT_BITS = 269, ++ DT_DEL_PROP = 270, ++ DT_DEL_NODE = 271, ++ DT_PROPNODENAME = 272, ++ DT_LITERAL = 273, ++ DT_CHAR_LITERAL = 274, ++ DT_BYTE = 275, ++ DT_STRING = 276, ++ DT_LABEL = 277, ++ DT_REF = 278, ++ DT_INCBIN = 279 + }; + #endif + +@@ -144,7 +146,7 @@ extern int yydebug; + typedef union YYSTYPE YYSTYPE; + union YYSTYPE + { +-#line 38 "dtc-parser.y" /* yacc.c:355 */ ++#line 39 "dtc-parser.y" /* yacc.c:355 */ + + char *propnodename; + char *labelref; +@@ -162,8 +164,9 @@ union YYSTYPE + struct node *nodelist; + struct reserve_info *re; + uint64_t integer; ++ bool is_plugin; + +-#line 167 "dtc-parser.tab.c" /* yacc.c:355 */ ++#line 170 "dtc-parser.tab.c" /* yacc.c:355 */ + }; + # define YYSTYPE_IS_TRIVIAL 1 + # define YYSTYPE_IS_DECLARED 1 +@@ -192,7 +195,7 @@ int yyparse (void); + + /* Copy the second part of user declarations. */ + +-#line 196 "dtc-parser.tab.c" /* yacc.c:358 */ ++#line 199 "dtc-parser.tab.c" /* yacc.c:358 */ + + #ifdef short + # undef short +@@ -439,18 +442,18 @@ union yyalloc + #define YYLAST 136 + + /* YYNTOKENS -- Number of terminals. */ +-#define YYNTOKENS 47 ++#define YYNTOKENS 48 + /* YYNNTS -- Number of nonterminals. */ +-#define YYNNTS 28 ++#define YYNNTS 29 + /* YYNRULES -- Number of rules. */ +-#define YYNRULES 80 ++#define YYNRULES 82 + /* YYNSTATES -- Number of states. */ +-#define YYNSTATES 144 ++#define YYNSTATES 147 + + /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ + #define YYUNDEFTOK 2 +-#define YYMAXUTOK 278 ++#define YYMAXUTOK 279 + + #define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) +@@ -462,16 +465,16 @@ static const yytype_uint8 yytranslate[] = + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 46, 2, 2, 2, 44, 40, 2, +- 32, 34, 43, 41, 33, 42, 2, 25, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 37, 24, +- 35, 28, 29, 36, 2, 2, 2, 2, 2, 2, ++ 2, 2, 2, 47, 2, 2, 2, 45, 41, 2, ++ 33, 35, 44, 42, 34, 43, 2, 26, 2, 2, ++ 2, 2, 2, 2, 2, 2, 2, 2, 38, 25, ++ 36, 29, 30, 37, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 30, 2, 31, 39, 2, 2, 2, 2, 2, ++ 2, 31, 2, 32, 40, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 26, 38, 27, 45, 2, 2, 2, ++ 2, 2, 2, 27, 39, 28, 46, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +@@ -486,22 +489,22 @@ static const yytype_uint8 yytranslate[] = + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, +- 15, 16, 17, 18, 19, 20, 21, 22, 23 ++ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 + }; + + #if YYDEBUG + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ + static const yytype_uint16 yyrline[] = + { +- 0, 104, 104, 113, 116, 123, 127, 135, 139, 144, +- 155, 165, 180, 188, 191, 198, 202, 206, 210, 218, +- 222, 226, 230, 234, 250, 260, 268, 271, 275, 282, +- 298, 303, 322, 336, 343, 344, 345, 352, 356, 357, +- 361, 362, 366, 367, 371, 372, 376, 377, 381, 382, +- 386, 387, 388, 392, 393, 394, 395, 396, 400, 401, +- 402, 406, 407, 408, 412, 413, 414, 415, 419, 420, +- 421, 422, 427, 430, 434, 442, 445, 449, 457, 461, +- 465 ++ 0, 108, 108, 118, 121, 129, 132, 139, 143, 151, ++ 155, 160, 171, 181, 196, 204, 207, 214, 218, 222, ++ 226, 234, 238, 242, 246, 250, 266, 276, 284, 287, ++ 291, 298, 314, 319, 338, 352, 359, 360, 361, 368, ++ 372, 373, 377, 378, 382, 383, 387, 388, 392, 393, ++ 397, 398, 402, 403, 404, 408, 409, 410, 411, 412, ++ 416, 417, 418, 422, 423, 424, 428, 429, 430, 431, ++ 435, 436, 437, 438, 443, 446, 450, 458, 461, 465, ++ 473, 477, 481 + }; + #endif + +@@ -510,19 +513,19 @@ static const yytype_uint16 yyrline[] = + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ + static const char *const yytname[] = + { +- "$end", "error", "$undefined", "DT_V1", "DT_MEMRESERVE", "DT_LSHIFT", +- "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND", "DT_OR", +- "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME", "DT_LITERAL", +- "DT_CHAR_LITERAL", "DT_BYTE", "DT_STRING", "DT_LABEL", "DT_REF", +- "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['", "']'", +- "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'", "'+'", +- "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile", +- "memreserves", "memreserve", "devicetree", "nodedef", "proplist", +- "propdef", "propdata", "propdataprefix", "arrayprefix", "integer_prim", +- "integer_expr", "integer_trinary", "integer_or", "integer_and", +- "integer_bitor", "integer_bitxor", "integer_bitand", "integer_eq", +- "integer_rela", "integer_shift", "integer_add", "integer_mul", +- "integer_unary", "bytestring", "subnodes", "subnode", YY_NULLPTR ++ "$end", "error", "$undefined", "DT_V1", "DT_PLUGIN", "DT_MEMRESERVE", ++ "DT_LSHIFT", "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND", ++ "DT_OR", "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME", ++ "DT_LITERAL", "DT_CHAR_LITERAL", "DT_BYTE", "DT_STRING", "DT_LABEL", ++ "DT_REF", "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['", ++ "']'", "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'", ++ "'+'", "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile", ++ "plugindecl", "memreserves", "memreserve", "devicetree", "nodedef", ++ "proplist", "propdef", "propdata", "propdataprefix", "arrayprefix", ++ "integer_prim", "integer_expr", "integer_trinary", "integer_or", ++ "integer_and", "integer_bitor", "integer_bitxor", "integer_bitand", ++ "integer_eq", "integer_rela", "integer_shift", "integer_add", ++ "integer_mul", "integer_unary", "bytestring", "subnodes", "subnode", YY_NULLPTR + }; + #endif + +@@ -533,16 +536,16 @@ static const yytype_uint16 yytoknum[] = + { + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, +- 275, 276, 277, 278, 59, 47, 123, 125, 61, 62, +- 91, 93, 40, 44, 41, 60, 63, 58, 124, 94, +- 38, 43, 45, 42, 37, 126, 33 ++ 275, 276, 277, 278, 279, 59, 47, 123, 125, 61, ++ 62, 91, 93, 40, 44, 41, 60, 63, 58, 124, ++ 94, 38, 43, 45, 42, 37, 126, 33 + }; + # endif + +-#define YYPACT_NINF -81 ++#define YYPACT_NINF -84 + + #define yypact_value_is_default(Yystate) \ +- (!!((Yystate) == (-81))) ++ (!!((Yystate) == (-84))) + + #define YYTABLE_NINF -1 + +@@ -553,21 +556,21 @@ static const yytype_uint16 yytoknum[] = + STATE-NUM. */ + static const yytype_int8 yypact[] = + { +- 16, -11, 21, 10, -81, 25, 10, 19, 10, -81, +- -81, -9, 25, -81, 2, 51, -81, -9, -9, -9, +- -81, 1, -81, -6, 50, 14, 28, 29, 36, 3, +- 58, 44, -3, -81, 47, -81, -81, 65, 68, 2, +- 2, -81, -81, -81, -81, -9, -9, -9, -9, -9, +- -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, +- -9, -9, -9, -9, -81, 63, 69, 2, -81, -81, +- 50, 57, 14, 28, 29, 36, 3, 3, 58, 58, +- 58, 58, 44, 44, -3, -3, -81, -81, -81, 79, +- 80, -8, 63, -81, 72, 63, -81, -81, -9, 76, +- 77, -81, -81, -81, -81, -81, 78, -81, -81, -81, +- -81, -81, 35, 4, -81, -81, -81, -81, 86, -81, +- -81, -81, 73, -81, -81, 33, 71, 84, 39, -81, +- -81, -81, -81, -81, 41, -81, -81, -81, 25, -81, +- 74, 25, 75, -81 ++ 15, -12, 35, 42, -84, 27, 9, -84, 24, 9, ++ 43, 9, -84, -84, -10, 24, -84, 60, 44, -84, ++ -10, -10, -10, -84, 55, -84, -7, 52, 53, 51, ++ 54, 10, 2, 38, 37, -4, -84, 68, -84, -84, ++ 71, 73, 60, 60, -84, -84, -84, -84, -10, -10, ++ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, ++ -10, -10, -10, -10, -10, -10, -10, -84, 56, 72, ++ 60, -84, -84, 52, 61, 53, 51, 54, 10, 2, ++ 2, 38, 38, 38, 38, 37, 37, -4, -4, -84, ++ -84, -84, 81, 83, 34, 56, -84, 74, 56, -84, ++ -84, -10, 76, 78, -84, -84, -84, -84, -84, 79, ++ -84, -84, -84, -84, -84, -6, 3, -84, -84, -84, ++ -84, 87, -84, -84, -84, 75, -84, -84, 32, 70, ++ 86, 36, -84, -84, -84, -84, -84, 47, -84, -84, ++ -84, 24, -84, 77, 24, 80, -84 + }; + + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. +@@ -575,37 +578,37 @@ static const yytype_int8 yypact[] = + means the default is an error. */ + static const yytype_uint8 yydefact[] = + { +- 0, 0, 0, 3, 1, 0, 0, 0, 3, 34, +- 35, 0, 0, 6, 0, 2, 4, 0, 0, 0, +- 68, 0, 37, 38, 40, 42, 44, 46, 48, 50, +- 53, 60, 63, 67, 0, 13, 7, 0, 0, 0, +- 0, 69, 70, 71, 36, 0, 0, 0, 0, 0, ++ 0, 0, 0, 3, 1, 0, 5, 4, 0, 0, ++ 0, 5, 36, 37, 0, 0, 8, 0, 2, 6, ++ 0, 0, 0, 70, 0, 39, 40, 42, 44, 46, ++ 48, 50, 52, 55, 62, 65, 69, 0, 15, 9, ++ 0, 0, 0, 0, 71, 72, 73, 38, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 5, 75, 0, 0, 10, 8, +- 41, 0, 43, 45, 47, 49, 51, 52, 56, 57, +- 55, 54, 58, 59, 61, 62, 65, 64, 66, 0, +- 0, 0, 0, 14, 0, 75, 11, 9, 0, 0, +- 0, 16, 26, 78, 18, 80, 0, 77, 76, 39, +- 17, 79, 0, 0, 12, 25, 15, 27, 0, 19, +- 28, 22, 0, 72, 30, 0, 0, 0, 0, 33, +- 32, 20, 31, 29, 0, 73, 74, 21, 0, 24, +- 0, 0, 0, 23 ++ 0, 0, 0, 0, 0, 0, 0, 7, 77, 0, ++ 0, 12, 10, 43, 0, 45, 47, 49, 51, 53, ++ 54, 58, 59, 57, 56, 60, 61, 63, 64, 67, ++ 66, 68, 0, 0, 0, 0, 16, 0, 77, 13, ++ 11, 0, 0, 0, 18, 28, 80, 20, 82, 0, ++ 79, 78, 41, 19, 81, 0, 0, 14, 27, 17, ++ 29, 0, 21, 30, 24, 0, 74, 32, 0, 0, ++ 0, 0, 35, 34, 22, 33, 31, 0, 75, 76, ++ 23, 0, 26, 0, 0, 0, 25 + }; + + /* YYPGOTO[NTERM-NUM]. */ + static const yytype_int8 yypgoto[] = + { +- -81, -81, 100, 104, -81, -38, -81, -80, -81, -81, +- -81, -5, 66, 13, -81, 70, 67, 81, 64, 82, +- 37, 27, 34, 38, -14, -81, 22, 24 ++ -84, -84, -84, 98, 101, -84, -41, -84, -83, -84, ++ -84, -84, -8, 63, 12, -84, 66, 67, 65, 69, ++ 82, 29, 18, 25, 26, -17, -84, 20, 28 + }; + + /* YYDEFGOTO[NTERM-NUM]. */ + static const yytype_int16 yydefgoto[] = + { +- -1, 2, 7, 8, 15, 36, 65, 93, 112, 113, +- 125, 20, 21, 22, 23, 24, 25, 26, 27, 28, +- 29, 30, 31, 32, 33, 128, 94, 95 ++ -1, 2, 6, 10, 11, 18, 39, 68, 96, 115, ++ 116, 128, 23, 24, 25, 26, 27, 28, 29, 30, ++ 31, 32, 33, 34, 35, 36, 131, 97, 98 + }; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If +@@ -613,87 +616,87 @@ static const yytype_int16 yydefgoto[] = + number is the opposite. If YYTABLE_NINF, syntax error. */ + static const yytype_uint8 yytable[] = + { +- 12, 68, 69, 41, 42, 43, 45, 34, 9, 10, +- 53, 54, 104, 3, 5, 107, 101, 118, 35, 1, +- 102, 4, 61, 11, 119, 120, 121, 122, 35, 97, +- 46, 6, 55, 17, 123, 44, 18, 19, 56, 124, +- 62, 63, 9, 10, 14, 51, 52, 86, 87, 88, +- 9, 10, 48, 103, 129, 130, 115, 11, 135, 116, +- 136, 47, 131, 57, 58, 11, 37, 49, 117, 50, +- 137, 64, 38, 39, 138, 139, 40, 89, 90, 91, +- 78, 79, 80, 81, 92, 59, 60, 66, 76, 77, +- 67, 82, 83, 96, 98, 99, 100, 84, 85, 106, +- 110, 111, 114, 126, 134, 127, 133, 141, 16, 143, +- 13, 109, 71, 74, 72, 70, 105, 108, 0, 0, +- 132, 0, 0, 0, 0, 0, 0, 0, 0, 73, +- 0, 0, 75, 140, 0, 0, 142 ++ 15, 71, 72, 44, 45, 46, 48, 37, 12, 13, ++ 56, 57, 107, 3, 8, 110, 118, 121, 1, 119, ++ 54, 55, 64, 14, 122, 123, 124, 125, 120, 100, ++ 49, 9, 58, 20, 126, 4, 21, 22, 59, 127, ++ 65, 66, 12, 13, 60, 61, 5, 89, 90, 91, ++ 12, 13, 7, 106, 132, 133, 138, 14, 139, 104, ++ 40, 38, 134, 105, 50, 14, 41, 42, 140, 17, ++ 43, 92, 93, 94, 81, 82, 83, 84, 95, 62, ++ 63, 141, 142, 79, 80, 85, 86, 38, 87, 88, ++ 47, 52, 51, 67, 69, 53, 70, 99, 102, 101, ++ 103, 113, 109, 114, 117, 129, 136, 137, 130, 19, ++ 16, 144, 74, 112, 73, 146, 76, 75, 111, 0, ++ 135, 77, 0, 108, 0, 0, 0, 0, 0, 0, ++ 0, 0, 0, 143, 0, 78, 145 + }; + + static const yytype_int16 yycheck[] = + { +- 5, 39, 40, 17, 18, 19, 12, 12, 17, 18, +- 7, 8, 92, 24, 4, 95, 24, 13, 26, 3, +- 28, 0, 25, 32, 20, 21, 22, 23, 26, 67, +- 36, 21, 29, 42, 30, 34, 45, 46, 35, 35, +- 43, 44, 17, 18, 25, 9, 10, 61, 62, 63, +- 17, 18, 38, 91, 21, 22, 21, 32, 19, 24, +- 21, 11, 29, 5, 6, 32, 15, 39, 33, 40, +- 31, 24, 21, 22, 33, 34, 25, 14, 15, 16, +- 53, 54, 55, 56, 21, 41, 42, 22, 51, 52, +- 22, 57, 58, 24, 37, 16, 16, 59, 60, 27, +- 24, 24, 24, 17, 20, 32, 35, 33, 8, 34, +- 6, 98, 46, 49, 47, 45, 92, 95, -1, -1, +- 125, -1, -1, -1, -1, -1, -1, -1, -1, 48, +- -1, -1, 50, 138, -1, -1, 141 ++ 8, 42, 43, 20, 21, 22, 13, 15, 18, 19, ++ 8, 9, 95, 25, 5, 98, 22, 14, 3, 25, ++ 10, 11, 26, 33, 21, 22, 23, 24, 34, 70, ++ 37, 22, 30, 43, 31, 0, 46, 47, 36, 36, ++ 44, 45, 18, 19, 6, 7, 4, 64, 65, 66, ++ 18, 19, 25, 94, 22, 23, 20, 33, 22, 25, ++ 16, 27, 30, 29, 12, 33, 22, 23, 32, 26, ++ 26, 15, 16, 17, 56, 57, 58, 59, 22, 42, ++ 43, 34, 35, 54, 55, 60, 61, 27, 62, 63, ++ 35, 40, 39, 25, 23, 41, 23, 25, 17, 38, ++ 17, 25, 28, 25, 25, 18, 36, 21, 33, 11, ++ 9, 34, 49, 101, 48, 35, 51, 50, 98, -1, ++ 128, 52, -1, 95, -1, -1, -1, -1, -1, -1, ++ -1, -1, -1, 141, -1, 53, 144 + }; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ + static const yytype_uint8 yystos[] = + { +- 0, 3, 48, 24, 0, 4, 21, 49, 50, 17, +- 18, 32, 58, 50, 25, 51, 49, 42, 45, 46, +- 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, +- 68, 69, 70, 71, 58, 26, 52, 15, 21, 22, +- 25, 71, 71, 71, 34, 12, 36, 11, 38, 39, +- 40, 9, 10, 7, 8, 29, 35, 5, 6, 41, +- 42, 25, 43, 44, 24, 53, 22, 22, 52, 52, +- 62, 59, 63, 64, 65, 66, 67, 67, 68, 68, +- 68, 68, 69, 69, 70, 70, 71, 71, 71, 14, +- 15, 16, 21, 54, 73, 74, 24, 52, 37, 16, +- 16, 24, 28, 52, 54, 74, 27, 54, 73, 60, +- 24, 24, 55, 56, 24, 21, 24, 33, 13, 20, +- 21, 22, 23, 30, 35, 57, 17, 32, 72, 21, +- 22, 29, 58, 35, 20, 19, 21, 31, 33, 34, +- 58, 33, 58, 34 ++ 0, 3, 49, 25, 0, 4, 50, 25, 5, 22, ++ 51, 52, 18, 19, 33, 60, 52, 26, 53, 51, ++ 43, 46, 47, 60, 61, 62, 63, 64, 65, 66, ++ 67, 68, 69, 70, 71, 72, 73, 60, 27, 54, ++ 16, 22, 23, 26, 73, 73, 73, 35, 13, 37, ++ 12, 39, 40, 41, 10, 11, 8, 9, 30, 36, ++ 6, 7, 42, 43, 26, 44, 45, 25, 55, 23, ++ 23, 54, 54, 64, 61, 65, 66, 67, 68, 69, ++ 69, 70, 70, 70, 70, 71, 71, 72, 72, 73, ++ 73, 73, 15, 16, 17, 22, 56, 75, 76, 25, ++ 54, 38, 17, 17, 25, 29, 54, 56, 76, 28, ++ 56, 75, 62, 25, 25, 57, 58, 25, 22, 25, ++ 34, 14, 21, 22, 23, 24, 31, 36, 59, 18, ++ 33, 74, 22, 23, 30, 60, 36, 21, 20, 22, ++ 32, 34, 35, 60, 34, 60, 35 + }; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ + static const yytype_uint8 yyr1[] = + { +- 0, 47, 48, 49, 49, 50, 50, 51, 51, 51, +- 51, 51, 52, 53, 53, 54, 54, 54, 54, 55, +- 55, 55, 55, 55, 55, 55, 56, 56, 56, 57, +- 57, 57, 57, 57, 58, 58, 58, 59, 60, 60, +- 61, 61, 62, 62, 63, 63, 64, 64, 65, 65, +- 66, 66, 66, 67, 67, 67, 67, 67, 68, 68, +- 68, 69, 69, 69, 70, 70, 70, 70, 71, 71, +- 71, 71, 72, 72, 72, 73, 73, 73, 74, 74, +- 74 ++ 0, 48, 49, 50, 50, 51, 51, 52, 52, 53, ++ 53, 53, 53, 53, 54, 55, 55, 56, 56, 56, ++ 56, 57, 57, 57, 57, 57, 57, 57, 58, 58, ++ 58, 59, 59, 59, 59, 59, 60, 60, 60, 61, ++ 62, 62, 63, 63, 64, 64, 65, 65, 66, 66, ++ 67, 67, 68, 68, 68, 69, 69, 69, 69, 69, ++ 70, 70, 70, 71, 71, 71, 72, 72, 72, 72, ++ 73, 73, 73, 73, 74, 74, 74, 75, 75, 75, ++ 76, 76, 76 + }; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ + static const yytype_uint8 yyr2[] = + { +- 0, 2, 4, 0, 2, 4, 2, 2, 3, 4, +- 3, 4, 5, 0, 2, 4, 2, 3, 2, 2, +- 3, 4, 2, 9, 5, 2, 0, 2, 2, 3, +- 1, 2, 2, 2, 1, 1, 3, 1, 1, 5, +- 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, +- 1, 3, 3, 1, 3, 3, 3, 3, 3, 3, +- 1, 3, 3, 1, 3, 3, 3, 1, 1, 2, +- 2, 2, 0, 2, 2, 0, 2, 2, 2, 3, +- 2 ++ 0, 2, 5, 0, 2, 0, 2, 4, 2, 2, ++ 3, 4, 3, 4, 5, 0, 2, 4, 2, 3, ++ 2, 2, 3, 4, 2, 9, 5, 2, 0, 2, ++ 2, 3, 1, 2, 2, 2, 1, 1, 3, 1, ++ 1, 5, 1, 3, 1, 3, 1, 3, 1, 3, ++ 1, 3, 1, 3, 3, 1, 3, 3, 3, 3, ++ 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, ++ 1, 2, 2, 2, 0, 2, 2, 0, 2, 2, ++ 2, 3, 2 + }; + + +@@ -1463,65 +1466,82 @@ yyreduce: + switch (yyn) + { + case 2: +-#line 105 "dtc-parser.y" /* yacc.c:1646 */ ++#line 109 "dtc-parser.y" /* yacc.c:1646 */ + { ++ (yyvsp[0].node)->is_plugin = (yyvsp[-2].is_plugin); + the_boot_info = build_boot_info((yyvsp[-1].re), (yyvsp[0].node), + guess_boot_cpuid((yyvsp[0].node))); + } +-#line 1472 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1476 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 3: +-#line 113 "dtc-parser.y" /* yacc.c:1646 */ ++#line 118 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.re) = NULL; ++ (yyval.is_plugin) = false; + } +-#line 1480 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1484 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 4: +-#line 117 "dtc-parser.y" /* yacc.c:1646 */ ++#line 122 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.re) = chain_reserve_entry((yyvsp[-1].re), (yyvsp[0].re)); ++ (yyval.is_plugin) = true; + } +-#line 1488 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1492 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 5: +-#line 124 "dtc-parser.y" /* yacc.c:1646 */ ++#line 129 "dtc-parser.y" /* yacc.c:1646 */ + { +- (yyval.re) = build_reserve_entry((yyvsp[-2].integer), (yyvsp[-1].integer)); ++ (yyval.re) = NULL; + } +-#line 1496 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1500 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + case 6: +-#line 128 "dtc-parser.y" /* yacc.c:1646 */ ++#line 133 "dtc-parser.y" /* yacc.c:1646 */ ++ { ++ (yyval.re) = chain_reserve_entry((yyvsp[-1].re), (yyvsp[0].re)); ++ } ++#line 1508 "dtc-parser.tab.c" /* yacc.c:1646 */ ++ break; ++ ++ case 7: ++#line 140 "dtc-parser.y" /* yacc.c:1646 */ ++ { ++ (yyval.re) = build_reserve_entry((yyvsp[-2].integer), (yyvsp[-1].integer)); ++ } ++#line 1516 "dtc-parser.tab.c" /* yacc.c:1646 */ ++ break; ++ ++ case 8: ++#line 144 "dtc-parser.y" /* yacc.c:1646 */ + { + add_label(&(yyvsp[0].re)->labels, (yyvsp[-1].labelref)); + (yyval.re) = (yyvsp[0].re); + } +-#line 1505 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1525 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 7: +-#line 136 "dtc-parser.y" /* yacc.c:1646 */ ++ case 9: ++#line 152 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.node) = name_node((yyvsp[0].node), ""); + } +-#line 1513 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1533 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 8: +-#line 140 "dtc-parser.y" /* yacc.c:1646 */ ++ case 10: ++#line 156 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.node) = merge_nodes((yyvsp[-2].node), (yyvsp[0].node)); + } +-#line 1521 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1541 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 9: +-#line 145 "dtc-parser.y" /* yacc.c:1646 */ ++ case 11: ++#line 161 "dtc-parser.y" /* yacc.c:1646 */ + { + struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref)); + +@@ -1532,11 +1552,11 @@ yyreduce: + ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref)); + (yyval.node) = (yyvsp[-3].node); + } +-#line 1536 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1556 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 10: +-#line 156 "dtc-parser.y" /* yacc.c:1646 */ ++ case 12: ++#line 172 "dtc-parser.y" /* yacc.c:1646 */ + { + struct node *target = get_node_by_ref((yyvsp[-2].node), (yyvsp[-1].labelref)); + +@@ -1546,11 +1566,11 @@ yyreduce: + ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref)); + (yyval.node) = (yyvsp[-2].node); + } +-#line 1550 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1570 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 11: +-#line 166 "dtc-parser.y" /* yacc.c:1646 */ ++ case 13: ++#line 182 "dtc-parser.y" /* yacc.c:1646 */ + { + struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref)); + +@@ -1562,100 +1582,100 @@ yyreduce: + + (yyval.node) = (yyvsp[-3].node); + } +-#line 1566 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1586 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 12: +-#line 181 "dtc-parser.y" /* yacc.c:1646 */ ++ case 14: ++#line 197 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.node) = build_node((yyvsp[-3].proplist), (yyvsp[-2].nodelist)); + } +-#line 1574 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1594 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 13: +-#line 188 "dtc-parser.y" /* yacc.c:1646 */ ++ case 15: ++#line 204 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.proplist) = NULL; + } +-#line 1582 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1602 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 14: +-#line 192 "dtc-parser.y" /* yacc.c:1646 */ ++ case 16: ++#line 208 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.proplist) = chain_property((yyvsp[0].prop), (yyvsp[-1].proplist)); + } +-#line 1590 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1610 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 15: +-#line 199 "dtc-parser.y" /* yacc.c:1646 */ ++ case 17: ++#line 215 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.prop) = build_property((yyvsp[-3].propnodename), (yyvsp[-1].data)); + } +-#line 1598 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1618 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 16: +-#line 203 "dtc-parser.y" /* yacc.c:1646 */ ++ case 18: ++#line 219 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.prop) = build_property((yyvsp[-1].propnodename), empty_data); + } +-#line 1606 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1626 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 17: +-#line 207 "dtc-parser.y" /* yacc.c:1646 */ ++ case 19: ++#line 223 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.prop) = build_property_delete((yyvsp[-1].propnodename)); + } +-#line 1614 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1634 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 18: +-#line 211 "dtc-parser.y" /* yacc.c:1646 */ ++ case 20: ++#line 227 "dtc-parser.y" /* yacc.c:1646 */ + { + add_label(&(yyvsp[0].prop)->labels, (yyvsp[-1].labelref)); + (yyval.prop) = (yyvsp[0].prop); + } +-#line 1623 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1643 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 19: +-#line 219 "dtc-parser.y" /* yacc.c:1646 */ ++ case 21: ++#line 235 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = data_merge((yyvsp[-1].data), (yyvsp[0].data)); + } +-#line 1631 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1651 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 20: +-#line 223 "dtc-parser.y" /* yacc.c:1646 */ ++ case 22: ++#line 239 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = data_merge((yyvsp[-2].data), (yyvsp[-1].array).data); + } +-#line 1639 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1659 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 21: +-#line 227 "dtc-parser.y" /* yacc.c:1646 */ ++ case 23: ++#line 243 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = data_merge((yyvsp[-3].data), (yyvsp[-1].data)); + } +-#line 1647 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1667 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 22: +-#line 231 "dtc-parser.y" /* yacc.c:1646 */ ++ case 24: ++#line 247 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = data_add_marker((yyvsp[-1].data), REF_PATH, (yyvsp[0].labelref)); + } +-#line 1655 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1675 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 23: +-#line 235 "dtc-parser.y" /* yacc.c:1646 */ ++ case 25: ++#line 251 "dtc-parser.y" /* yacc.c:1646 */ + { + FILE *f = srcfile_relative_open((yyvsp[-5].data).val, NULL); + struct data d; +@@ -1671,11 +1691,11 @@ yyreduce: + (yyval.data) = data_merge((yyvsp[-8].data), d); + fclose(f); + } +-#line 1675 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1695 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 24: +-#line 251 "dtc-parser.y" /* yacc.c:1646 */ ++ case 26: ++#line 267 "dtc-parser.y" /* yacc.c:1646 */ + { + FILE *f = srcfile_relative_open((yyvsp[-1].data).val, NULL); + struct data d = empty_data; +@@ -1685,43 +1705,43 @@ yyreduce: + (yyval.data) = data_merge((yyvsp[-4].data), d); + fclose(f); + } +-#line 1689 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1709 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 25: +-#line 261 "dtc-parser.y" /* yacc.c:1646 */ ++ case 27: ++#line 277 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref)); + } +-#line 1697 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1717 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 26: +-#line 268 "dtc-parser.y" /* yacc.c:1646 */ ++ case 28: ++#line 284 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = empty_data; + } +-#line 1705 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1725 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 27: +-#line 272 "dtc-parser.y" /* yacc.c:1646 */ ++ case 29: ++#line 288 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = (yyvsp[-1].data); + } +-#line 1713 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1733 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 28: +-#line 276 "dtc-parser.y" /* yacc.c:1646 */ ++ case 30: ++#line 292 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref)); + } +-#line 1721 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1741 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 29: +-#line 283 "dtc-parser.y" /* yacc.c:1646 */ ++ case 31: ++#line 299 "dtc-parser.y" /* yacc.c:1646 */ + { + unsigned long long bits; + +@@ -1737,20 +1757,20 @@ yyreduce: + (yyval.array).data = empty_data; + (yyval.array).bits = bits; + } +-#line 1741 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1761 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 30: +-#line 299 "dtc-parser.y" /* yacc.c:1646 */ ++ case 32: ++#line 315 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.array).data = empty_data; + (yyval.array).bits = 32; + } +-#line 1750 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1770 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 31: +-#line 304 "dtc-parser.y" /* yacc.c:1646 */ ++ case 33: ++#line 320 "dtc-parser.y" /* yacc.c:1646 */ + { + if ((yyvsp[-1].array).bits < 64) { + uint64_t mask = (1ULL << (yyvsp[-1].array).bits) - 1; +@@ -1769,11 +1789,11 @@ yyreduce: + + (yyval.array).data = data_append_integer((yyvsp[-1].array).data, (yyvsp[0].integer), (yyvsp[-1].array).bits); + } +-#line 1773 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1793 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 32: +-#line 323 "dtc-parser.y" /* yacc.c:1646 */ ++ case 34: ++#line 339 "dtc-parser.y" /* yacc.c:1646 */ + { + uint64_t val = ~0ULL >> (64 - (yyvsp[-1].array).bits); + +@@ -1787,233 +1807,233 @@ yyreduce: + + (yyval.array).data = data_append_integer((yyvsp[-1].array).data, val, (yyvsp[-1].array).bits); + } +-#line 1791 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1811 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 33: +-#line 337 "dtc-parser.y" /* yacc.c:1646 */ ++ case 35: ++#line 353 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.array).data = data_add_marker((yyvsp[-1].array).data, LABEL, (yyvsp[0].labelref)); + } +-#line 1799 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1819 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 36: +-#line 346 "dtc-parser.y" /* yacc.c:1646 */ ++ case 38: ++#line 362 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.integer) = (yyvsp[-1].integer); + } +-#line 1807 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1827 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 39: +-#line 357 "dtc-parser.y" /* yacc.c:1646 */ ++ case 41: ++#line 373 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-4].integer) ? (yyvsp[-2].integer) : (yyvsp[0].integer); } +-#line 1813 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1833 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 41: +-#line 362 "dtc-parser.y" /* yacc.c:1646 */ ++ case 43: ++#line 378 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) || (yyvsp[0].integer); } +-#line 1819 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1839 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 43: +-#line 367 "dtc-parser.y" /* yacc.c:1646 */ ++ case 45: ++#line 383 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) && (yyvsp[0].integer); } +-#line 1825 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1845 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 45: +-#line 372 "dtc-parser.y" /* yacc.c:1646 */ ++ case 47: ++#line 388 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) | (yyvsp[0].integer); } +-#line 1831 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1851 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 47: +-#line 377 "dtc-parser.y" /* yacc.c:1646 */ ++ case 49: ++#line 393 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) ^ (yyvsp[0].integer); } +-#line 1837 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1857 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 49: +-#line 382 "dtc-parser.y" /* yacc.c:1646 */ ++ case 51: ++#line 398 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) & (yyvsp[0].integer); } +-#line 1843 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1863 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 51: +-#line 387 "dtc-parser.y" /* yacc.c:1646 */ ++ case 53: ++#line 403 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) == (yyvsp[0].integer); } +-#line 1849 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1869 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 52: +-#line 388 "dtc-parser.y" /* yacc.c:1646 */ ++ case 54: ++#line 404 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) != (yyvsp[0].integer); } +-#line 1855 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1875 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 54: +-#line 393 "dtc-parser.y" /* yacc.c:1646 */ ++ case 56: ++#line 409 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) < (yyvsp[0].integer); } +-#line 1861 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1881 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 55: +-#line 394 "dtc-parser.y" /* yacc.c:1646 */ ++ case 57: ++#line 410 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) > (yyvsp[0].integer); } +-#line 1867 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1887 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 56: +-#line 395 "dtc-parser.y" /* yacc.c:1646 */ ++ case 58: ++#line 411 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) <= (yyvsp[0].integer); } +-#line 1873 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1893 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 57: +-#line 396 "dtc-parser.y" /* yacc.c:1646 */ ++ case 59: ++#line 412 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) >= (yyvsp[0].integer); } +-#line 1879 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1899 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 58: +-#line 400 "dtc-parser.y" /* yacc.c:1646 */ ++ case 60: ++#line 416 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) << (yyvsp[0].integer); } +-#line 1885 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1905 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 59: +-#line 401 "dtc-parser.y" /* yacc.c:1646 */ ++ case 61: ++#line 417 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) >> (yyvsp[0].integer); } +-#line 1891 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1911 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 61: +-#line 406 "dtc-parser.y" /* yacc.c:1646 */ ++ case 63: ++#line 422 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) + (yyvsp[0].integer); } +-#line 1897 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1917 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 62: +-#line 407 "dtc-parser.y" /* yacc.c:1646 */ ++ case 64: ++#line 423 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) - (yyvsp[0].integer); } +-#line 1903 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1923 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 64: +-#line 412 "dtc-parser.y" /* yacc.c:1646 */ ++ case 66: ++#line 428 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) * (yyvsp[0].integer); } +-#line 1909 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1929 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 65: +-#line 413 "dtc-parser.y" /* yacc.c:1646 */ ++ case 67: ++#line 429 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) / (yyvsp[0].integer); } +-#line 1915 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1935 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 66: +-#line 414 "dtc-parser.y" /* yacc.c:1646 */ ++ case 68: ++#line 430 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = (yyvsp[-2].integer) % (yyvsp[0].integer); } +-#line 1921 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1941 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 69: +-#line 420 "dtc-parser.y" /* yacc.c:1646 */ ++ case 71: ++#line 436 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = -(yyvsp[0].integer); } +-#line 1927 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1947 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 70: +-#line 421 "dtc-parser.y" /* yacc.c:1646 */ ++ case 72: ++#line 437 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = ~(yyvsp[0].integer); } +-#line 1933 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1953 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 71: +-#line 422 "dtc-parser.y" /* yacc.c:1646 */ ++ case 73: ++#line 438 "dtc-parser.y" /* yacc.c:1646 */ + { (yyval.integer) = !(yyvsp[0].integer); } +-#line 1939 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1959 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 72: +-#line 427 "dtc-parser.y" /* yacc.c:1646 */ ++ case 74: ++#line 443 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = empty_data; + } +-#line 1947 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1967 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 73: +-#line 431 "dtc-parser.y" /* yacc.c:1646 */ ++ case 75: ++#line 447 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = data_append_byte((yyvsp[-1].data), (yyvsp[0].byte)); + } +-#line 1955 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1975 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 74: +-#line 435 "dtc-parser.y" /* yacc.c:1646 */ ++ case 76: ++#line 451 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref)); + } +-#line 1963 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1983 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 75: +-#line 442 "dtc-parser.y" /* yacc.c:1646 */ ++ case 77: ++#line 458 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.nodelist) = NULL; + } +-#line 1971 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1991 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 76: +-#line 446 "dtc-parser.y" /* yacc.c:1646 */ ++ case 78: ++#line 462 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.nodelist) = chain_node((yyvsp[-1].node), (yyvsp[0].nodelist)); + } +-#line 1979 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 1999 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 77: +-#line 450 "dtc-parser.y" /* yacc.c:1646 */ ++ case 79: ++#line 466 "dtc-parser.y" /* yacc.c:1646 */ + { + ERROR(&(yylsp[0]), "Properties must precede subnodes"); + YYERROR; + } +-#line 1988 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 2008 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 78: +-#line 458 "dtc-parser.y" /* yacc.c:1646 */ ++ case 80: ++#line 474 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.node) = name_node((yyvsp[0].node), (yyvsp[-1].propnodename)); + } +-#line 1996 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 2016 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 79: +-#line 462 "dtc-parser.y" /* yacc.c:1646 */ ++ case 81: ++#line 478 "dtc-parser.y" /* yacc.c:1646 */ + { + (yyval.node) = name_node(build_node_delete(), (yyvsp[-1].propnodename)); + } +-#line 2004 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 2024 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + +- case 80: +-#line 466 "dtc-parser.y" /* yacc.c:1646 */ ++ case 82: ++#line 482 "dtc-parser.y" /* yacc.c:1646 */ + { + add_label(&(yyvsp[0].node)->labels, (yyvsp[-1].labelref)); + (yyval.node) = (yyvsp[0].node); + } +-#line 2013 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 2033 "dtc-parser.tab.c" /* yacc.c:1646 */ + break; + + +-#line 2017 "dtc-parser.tab.c" /* yacc.c:1646 */ ++#line 2037 "dtc-parser.tab.c" /* yacc.c:1646 */ + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires +@@ -2248,7 +2268,7 @@ yyreturn: + #endif + return yyresult; + } +-#line 472 "dtc-parser.y" /* yacc.c:1906 */ ++#line 488 "dtc-parser.y" /* yacc.c:1906 */ + + + void yyerror(char const *s) +diff --git a/scripts/dtc/dtc-parser.tab.h_shipped b/scripts/dtc/dtc-parser.tab.h_shipped +index 30867c6..276d078 100644 +--- a/scripts/dtc/dtc-parser.tab.h_shipped ++++ b/scripts/dtc/dtc-parser.tab.h_shipped +@@ -46,26 +46,27 @@ extern int yydebug; + enum yytokentype + { + DT_V1 = 258, +- DT_MEMRESERVE = 259, +- DT_LSHIFT = 260, +- DT_RSHIFT = 261, +- DT_LE = 262, +- DT_GE = 263, +- DT_EQ = 264, +- DT_NE = 265, +- DT_AND = 266, +- DT_OR = 267, +- DT_BITS = 268, +- DT_DEL_PROP = 269, +- DT_DEL_NODE = 270, +- DT_PROPNODENAME = 271, +- DT_LITERAL = 272, +- DT_CHAR_LITERAL = 273, +- DT_BYTE = 274, +- DT_STRING = 275, +- DT_LABEL = 276, +- DT_REF = 277, +- DT_INCBIN = 278 ++ DT_PLUGIN = 259, ++ DT_MEMRESERVE = 260, ++ DT_LSHIFT = 261, ++ DT_RSHIFT = 262, ++ DT_LE = 263, ++ DT_GE = 264, ++ DT_EQ = 265, ++ DT_NE = 266, ++ DT_AND = 267, ++ DT_OR = 268, ++ DT_BITS = 269, ++ DT_DEL_PROP = 270, ++ DT_DEL_NODE = 271, ++ DT_PROPNODENAME = 272, ++ DT_LITERAL = 273, ++ DT_CHAR_LITERAL = 274, ++ DT_BYTE = 275, ++ DT_STRING = 276, ++ DT_LABEL = 277, ++ DT_REF = 278, ++ DT_INCBIN = 279 + }; + #endif + +@@ -74,7 +75,7 @@ extern int yydebug; + typedef union YYSTYPE YYSTYPE; + union YYSTYPE + { +-#line 38 "dtc-parser.y" /* yacc.c:1909 */ ++#line 39 "dtc-parser.y" /* yacc.c:1909 */ + + char *propnodename; + char *labelref; +@@ -92,8 +93,9 @@ union YYSTYPE + struct node *nodelist; + struct reserve_info *re; + uint64_t integer; ++ bool is_plugin; + +-#line 97 "dtc-parser.tab.h" /* yacc.c:1909 */ ++#line 99 "dtc-parser.tab.h" /* yacc.c:1909 */ + }; + # define YYSTYPE_IS_TRIVIAL 1 + # define YYSTYPE_IS_DECLARED 1 +diff --git a/scripts/dtc/dtc-parser.y b/scripts/dtc/dtc-parser.y +index 5a897e3..d23927d 100644 +--- a/scripts/dtc/dtc-parser.y ++++ b/scripts/dtc/dtc-parser.y +@@ -19,6 +19,7 @@ + */ + %{ + #include ++#include + + #include "dtc.h" + #include "srcpos.h" +@@ -52,9 +53,11 @@ extern bool treesource_error; + struct node *nodelist; + struct reserve_info *re; + uint64_t integer; ++ bool is_plugin; + } + + %token DT_V1 ++%token DT_PLUGIN + %token DT_MEMRESERVE + %token DT_LSHIFT DT_RSHIFT DT_LE DT_GE DT_EQ DT_NE DT_AND DT_OR + %token DT_BITS +@@ -71,6 +74,7 @@ extern bool treesource_error; + + %type propdata + %type propdataprefix ++%type plugindecl + %type memreserve + %type memreserves + %type arrayprefix +@@ -101,10 +105,22 @@ extern bool treesource_error; + %% + + sourcefile: +- DT_V1 ';' memreserves devicetree ++ DT_V1 ';' plugindecl memreserves devicetree + { +- the_boot_info = build_boot_info($3, $4, +- guess_boot_cpuid($4)); ++ $5->is_plugin = $3; ++ the_boot_info = build_boot_info($4, $5, ++ guess_boot_cpuid($5)); ++ } ++ ; ++ ++plugindecl: ++ /* empty */ ++ { ++ $$ = false; ++ } ++ | DT_PLUGIN ';' ++ { ++ $$ = true; + } + ; + +diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c +index 8c4add6..91e91e7 100644 +--- a/scripts/dtc/dtc.c ++++ b/scripts/dtc/dtc.c +@@ -29,6 +29,7 @@ int reservenum; /* Number of memory reservation slots */ + int minsize; /* Minimum blob size */ + int padsize; /* Additional padding to blob */ + int phandle_format = PHANDLE_BOTH; /* Use linux,phandle or phandle properties */ ++int symbol_fixup_support = 0; + + static void fill_fullpaths(struct node *tree, const char *prefix) + { +@@ -51,7 +52,7 @@ static void fill_fullpaths(struct node *tree, const char *prefix) + #define FDT_VERSION(version) _FDT_VERSION(version) + #define _FDT_VERSION(version) #version + static const char usage_synopsis[] = "dtc [options] "; +-static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv"; ++static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:@hv"; + static struct option const usage_long_opts[] = { + {"quiet", no_argument, NULL, 'q'}, + {"in-format", a_argument, NULL, 'I'}, +@@ -69,6 +70,7 @@ static struct option const usage_long_opts[] = { + {"phandle", a_argument, NULL, 'H'}, + {"warning", a_argument, NULL, 'W'}, + {"error", a_argument, NULL, 'E'}, ++ {"symbols", no_argument, NULL, '@'}, + {"help", no_argument, NULL, 'h'}, + {"version", no_argument, NULL, 'v'}, + {NULL, no_argument, NULL, 0x0}, +@@ -99,6 +101,7 @@ static const char * const usage_opts_help[] = { + "\t\tboth - Both \"linux,phandle\" and \"phandle\" properties", + "\n\tEnable/disable warnings (prefix with \"no-\")", + "\n\tEnable/disable errors (prefix with \"no-\")", ++ "\n\tEnable symbols/fixup support", + "\n\tPrint this help and exit", + "\n\tPrint version and exit", + NULL, +@@ -186,7 +189,9 @@ int main(int argc, char *argv[]) + case 'E': + parse_checks_option(false, true, optarg); + break; +- ++ case '@': ++ symbol_fixup_support = 1; ++ break; + case 'h': + usage(NULL); + default: +diff --git a/scripts/dtc/dtc.h b/scripts/dtc/dtc.h +index 56212c8..f163b22 100644 +--- a/scripts/dtc/dtc.h ++++ b/scripts/dtc/dtc.h +@@ -54,6 +54,7 @@ extern int reservenum; /* Number of memory reservation slots */ + extern int minsize; /* Minimum blob size */ + extern int padsize; /* Additional padding to blob */ + extern int phandle_format; /* Use linux,phandle or phandle properties */ ++extern int symbol_fixup_support;/* enable symbols & fixup support */ + + #define PHANDLE_LEGACY 0x1 + #define PHANDLE_EPAPR 0x2 +@@ -132,6 +133,26 @@ struct label { + struct label *next; + }; + ++struct fixup_entry { ++ int offset; ++ struct node *node; ++ struct property *prop; ++ struct fixup_entry *next; ++ bool local_fixup_generated; ++}; ++ ++struct fixup { ++ char *ref; ++ struct fixup_entry *entries; ++ struct fixup *next; ++}; ++ ++struct symbol { ++ struct label *label; ++ struct node *node; ++ struct symbol *next; ++}; ++ + struct property { + bool deleted; + char *name; +@@ -158,6 +179,13 @@ struct node { + int addr_cells, size_cells; + + struct label *labels; ++ ++ struct symbol *symbols; ++ struct fixup_entry *local_fixups; ++ bool emit_local_fixup_node; ++ ++ bool is_plugin; ++ struct fixup *fixups; + }; + + #define for_each_label_withdel(l0, l) \ +@@ -181,6 +209,18 @@ struct node { + for_each_child_withdel(n, c) \ + if (!(c)->deleted) + ++#define for_each_fixup(n, f) \ ++ for ((f) = (n)->fixups; (f); (f) = (f)->next) ++ ++#define for_each_fixup_entry(f, fe) \ ++ for ((fe) = (f)->entries; (fe); (fe) = (fe)->next) ++ ++#define for_each_symbol(n, s) \ ++ for ((s) = (n)->symbols; (s); (s) = (s)->next) ++ ++#define for_each_local_fixup_entry(n, fe) \ ++ for ((fe) = (n)->local_fixups; (fe); (fe) = (fe)->next) ++ + void add_label(struct label **labels, char *label); + void delete_labels(struct label **labels); + +diff --git a/scripts/dtc/flattree.c b/scripts/dtc/flattree.c +index bd99fa2..2385137 100644 +--- a/scripts/dtc/flattree.c ++++ b/scripts/dtc/flattree.c +@@ -255,6 +255,204 @@ static int stringtable_insert(struct data *d, const char *str) + return i; + } + ++static void emit_local_fixups(struct node *tree, struct emitter *emit, ++ void *etarget, struct data *strbuf, struct version_info *vi, ++ struct node *node) ++{ ++ struct fixup_entry *fe, *fen; ++ struct node *child; ++ int nameoff, count; ++ cell_t *buf; ++ struct data d; ++ ++ if (node->emit_local_fixup_node) { ++ ++ /* emit the external fixups (do not emit /) */ ++ if (node != tree) { ++ emit->beginnode(etarget, NULL); ++ emit->string(etarget, node->name, 0); ++ emit->align(etarget, sizeof(cell_t)); ++ } ++ ++ for_each_local_fixup_entry(tree, fe) { ++ if (fe->node != node || fe->local_fixup_generated) ++ continue; ++ ++ /* count the number of fixup entries */ ++ count = 0; ++ for_each_local_fixup_entry(tree, fen) { ++ if (fen->prop != fe->prop) ++ continue; ++ fen->local_fixup_generated = true; ++ count++; ++ } ++ ++ /* allocate buffer */ ++ buf = xmalloc(count * sizeof(cell_t)); ++ ++ /* collect all the offsets in buffer */ ++ count = 0; ++ for_each_local_fixup_entry(tree, fen) { ++ if (fen->prop != fe->prop) ++ continue; ++ fen->local_fixup_generated = true; ++ buf[count++] = cpu_to_fdt32(fen->offset); ++ } ++ d = empty_data; ++ d.len = count * sizeof(cell_t); ++ d.val = (char *)buf; ++ ++ nameoff = stringtable_insert(strbuf, fe->prop->name); ++ emit->property(etarget, fe->prop->labels); ++ emit->cell(etarget, count * sizeof(cell_t)); ++ emit->cell(etarget, nameoff); ++ ++ if ((vi->flags & FTF_VARALIGN) && ++ (count * sizeof(cell_t)) >= 8) ++ emit->align(etarget, 8); ++ ++ emit->data(etarget, d); ++ emit->align(etarget, sizeof(cell_t)); ++ ++ free(buf); ++ } ++ } ++ ++ for_each_child(node, child) ++ emit_local_fixups(tree, emit, etarget, strbuf, vi, child); ++ ++ if (node->emit_local_fixup_node && node != tree) ++ emit->endnode(etarget, tree->labels); ++} ++ ++static void emit_symbols_node(struct node *tree, struct emitter *emit, ++ void *etarget, struct data *strbuf, ++ struct version_info *vi) ++{ ++ struct symbol *sym; ++ int nameoff, vallen; ++ ++ /* do nothing if no symbols */ ++ if (!tree->symbols) ++ return; ++ ++ emit->beginnode(etarget, NULL); ++ emit->string(etarget, "__symbols__", 0); ++ emit->align(etarget, sizeof(cell_t)); ++ ++ for_each_symbol(tree, sym) { ++ ++ vallen = strlen(sym->node->fullpath); ++ ++ nameoff = stringtable_insert(strbuf, sym->label->label); ++ ++ emit->property(etarget, NULL); ++ emit->cell(etarget, vallen + 1); ++ emit->cell(etarget, nameoff); ++ ++ if ((vi->flags & FTF_VARALIGN) && vallen >= 8) ++ emit->align(etarget, 8); ++ ++ emit->string(etarget, sym->node->fullpath, ++ strlen(sym->node->fullpath)); ++ emit->align(etarget, sizeof(cell_t)); ++ } ++ ++ emit->endnode(etarget, NULL); ++} ++ ++static void emit_local_fixups_node(struct node *tree, struct emitter *emit, ++ void *etarget, struct data *strbuf, ++ struct version_info *vi) ++{ ++ struct fixup_entry *fe; ++ struct node *node; ++ ++ /* do nothing if no local fixups */ ++ if (!tree->local_fixups) ++ return; ++ ++ /* mark all nodes that need a local fixup generated (and parents) */ ++ for_each_local_fixup_entry(tree, fe) { ++ node = fe->node; ++ while (node != NULL && !node->emit_local_fixup_node) { ++ node->emit_local_fixup_node = true; ++ node = node->parent; ++ } ++ } ++ ++ /* emit the local fixups node now */ ++ emit->beginnode(etarget, NULL); ++ emit->string(etarget, "__local_fixups__", 0); ++ emit->align(etarget, sizeof(cell_t)); ++ ++ emit_local_fixups(tree, emit, etarget, strbuf, vi, tree); ++ ++ emit->endnode(etarget, tree->labels); ++} ++ ++static void emit_fixups_node(struct node *tree, struct emitter *emit, ++ void *etarget, struct data *strbuf, ++ struct version_info *vi) ++{ ++ struct fixup *f; ++ struct fixup_entry *fe; ++ char *name, *s; ++ const char *fullpath; ++ int namesz, nameoff, vallen; ++ ++ /* do nothing if no fixups */ ++ if (!tree->fixups) ++ return; ++ ++ /* emit the external fixups */ ++ emit->beginnode(etarget, NULL); ++ emit->string(etarget, "__fixups__", 0); ++ emit->align(etarget, sizeof(cell_t)); ++ ++ for_each_fixup(tree, f) { ++ ++ namesz = 0; ++ for_each_fixup_entry(f, fe) { ++ fullpath = fe->node->fullpath; ++ if (fullpath[0] == '\0') ++ fullpath = "/"; ++ namesz += strlen(fullpath) + 1; ++ namesz += strlen(fe->prop->name) + 1; ++ namesz += 32; /* space for : + '\0' */ ++ } ++ ++ name = xmalloc(namesz); ++ ++ s = name; ++ for_each_fixup_entry(f, fe) { ++ fullpath = fe->node->fullpath; ++ if (fullpath[0] == '\0') ++ fullpath = "/"; ++ snprintf(s, name + namesz - s, "%s:%s:%d", fullpath, ++ fe->prop->name, fe->offset); ++ s += strlen(s) + 1; ++ } ++ ++ nameoff = stringtable_insert(strbuf, f->ref); ++ vallen = s - name - 1; ++ ++ emit->property(etarget, NULL); ++ emit->cell(etarget, vallen + 1); ++ emit->cell(etarget, nameoff); ++ ++ if ((vi->flags & FTF_VARALIGN) && vallen >= 8) ++ emit->align(etarget, 8); ++ ++ emit->string(etarget, name, vallen); ++ emit->align(etarget, sizeof(cell_t)); ++ ++ free(name); ++ } ++ ++ emit->endnode(etarget, tree->labels); ++} ++ + static void flatten_tree(struct node *tree, struct emitter *emit, + void *etarget, struct data *strbuf, + struct version_info *vi) +@@ -310,6 +508,10 @@ static void flatten_tree(struct node *tree, struct emitter *emit, + flatten_tree(child, emit, etarget, strbuf, vi); + } + ++ emit_symbols_node(tree, emit, etarget, strbuf, vi); ++ emit_local_fixups_node(tree, emit, etarget, strbuf, vi); ++ emit_fixups_node(tree, emit, etarget, strbuf, vi); ++ + emit->endnode(etarget, tree->labels); + } + +diff --git a/scripts/dtc/version_gen.h b/scripts/dtc/version_gen.h +index 5b8c7d5..2595dfd 100644 +--- a/scripts/dtc/version_gen.h ++++ b/scripts/dtc/version_gen.h +@@ -1 +1 @@ +-#define DTC_VERSION "DTC 1.4.1-g9d3649bd" ++#define DTC_VERSION "DTC 1.4.1-g25efc119" +-- +2.5.0 + + +From c731598f90a484f5dc40cb0ade3eee18c7f0508b Mon Sep 17 00:00:00 2001 +From: Pantelis Antoniou +Date: Thu, 22 Oct 2015 23:30:04 +0300 +Subject: [PATCH 174/181] configfs: implement binary attributes + +ConfigFS lacked binary attributes up until now. This patch +introduces support for binary attributes in a somewhat similar +manner of sysfs binary attributes albeit with changes that +fit the configfs usage model. + +Problems that configfs binary attributes fix are everything that +requires a binary blob as part of the configuration of a resource, +such as bitstream loading for FPGAs, DTBs for dynamically created +devices etc. + +Look at Documentation/filesystems/configfs/configfs.txt for internals +and howto use them. + +This patch is against linux-next as of today that contains +Christoph's configfs rework. + +Signed-off-by: Pantelis Antoniou +[hch: folded a fix from Geert Uytterhoeven ] +[hch: a few tiny updates based on review feedback] +Signed-off-by: Christoph Hellwig +--- + Documentation/filesystems/configfs/configfs.txt | 57 +++++- + fs/configfs/configfs_internal.h | 14 +- + fs/configfs/dir.c | 18 +- + fs/configfs/file.c | 255 +++++++++++++++++++++++- + fs/configfs/inode.c | 2 +- + include/linux/configfs.h | 50 +++++ + 6 files changed, 374 insertions(+), 22 deletions(-) + +diff --git a/Documentation/filesystems/configfs/configfs.txt b/Documentation/filesystems/configfs/configfs.txt +index af68efd..e5fe521 100644 +--- a/Documentation/filesystems/configfs/configfs.txt ++++ b/Documentation/filesystems/configfs/configfs.txt +@@ -51,15 +51,27 @@ configfs tree is always there, whether mounted on /config or not. + An item is created via mkdir(2). The item's attributes will also + appear at this time. readdir(3) can determine what the attributes are, + read(2) can query their default values, and write(2) can store new +-values. Like sysfs, attributes should be ASCII text files, preferably +-with only one value per file. The same efficiency caveats from sysfs +-apply. Don't mix more than one attribute in one attribute file. +- +-Like sysfs, configfs expects write(2) to store the entire buffer at +-once. When writing to configfs attributes, userspace processes should +-first read the entire file, modify the portions they wish to change, and +-then write the entire buffer back. Attribute files have a maximum size +-of one page (PAGE_SIZE, 4096 on i386). ++values. Don't mix more than one attribute in one attribute file. ++ ++There are two types of configfs attributes: ++ ++* Normal attributes, which similar to sysfs attributes, are small ASCII text ++files, with a maximum size of one page (PAGE_SIZE, 4096 on i386). Preferably ++only one value per file should be used, and the same caveats from sysfs apply. ++Configfs expects write(2) to store the entire buffer at once. When writing to ++normal configfs attributes, userspace processes should first read the entire ++file, modify the portions they wish to change, and then write the entire ++buffer back. ++ ++* Binary attributes, which are somewhat similar to sysfs binary attributes, ++but with a few slight changes to semantics. The PAGE_SIZE limitation does not ++apply, but the whole binary item must fit in single kernel vmalloc'ed buffer. ++The write(2) calls from user space are buffered, and the attributes' ++write_bin_attribute method will be invoked on the final close, therefore it is ++imperative for user-space to check the return code of close(2) in order to ++verify that the operation finished successfully. ++To avoid a malicious user OOMing the kernel, there's a per-binary attribute ++maximum buffer value. + + When an item needs to be destroyed, remove it with rmdir(2). An + item cannot be destroyed if any other item has a link to it (via +@@ -171,6 +183,7 @@ among other things. For that, it needs a type. + struct configfs_item_operations *ct_item_ops; + struct configfs_group_operations *ct_group_ops; + struct configfs_attribute **ct_attrs; ++ struct configfs_bin_attribute **ct_bin_attrs; + }; + + The most basic function of a config_item_type is to define what +@@ -201,6 +214,32 @@ be called whenever userspace asks for a read(2) on the attribute. If an + attribute is writable and provides a ->store method, that method will be + be called whenever userspace asks for a write(2) on the attribute. + ++[struct configfs_bin_attribute] ++ ++ struct configfs_attribute { ++ struct configfs_attribute cb_attr; ++ void *cb_private; ++ size_t cb_max_size; ++ }; ++ ++The binary attribute is used when the one needs to use binary blob to ++appear as the contents of a file in the item's configfs directory. ++To do so add the binary attribute to the NULL-terminated array ++config_item_type->ct_bin_attrs, and the item appears in configfs, the ++attribute file will appear with the configfs_bin_attribute->cb_attr.ca_name ++filename. configfs_bin_attribute->cb_attr.ca_mode specifies the file ++permissions. ++The cb_private member is provided for use by the driver, while the ++cb_max_size member specifies the maximum amount of vmalloc buffer ++to be used. ++ ++If binary attribute is readable and the config_item provides a ++ct_item_ops->read_bin_attribute() method, that method will be called ++whenever userspace asks for a read(2) on the attribute. The converse ++will happen for write(2). The reads/writes are bufferred so only a ++single read/write will occur; the attributes' need not concern itself ++with it. ++ + [struct config_group] + + A config_item cannot live in a vacuum. The only way one can be created +diff --git a/fs/configfs/configfs_internal.h b/fs/configfs/configfs_internal.h +index b65d1ef..ccc31fa 100644 +--- a/fs/configfs/configfs_internal.h ++++ b/fs/configfs/configfs_internal.h +@@ -53,13 +53,14 @@ struct configfs_dirent { + #define CONFIGFS_ROOT 0x0001 + #define CONFIGFS_DIR 0x0002 + #define CONFIGFS_ITEM_ATTR 0x0004 ++#define CONFIGFS_ITEM_BIN_ATTR 0x0008 + #define CONFIGFS_ITEM_LINK 0x0020 + #define CONFIGFS_USET_DIR 0x0040 + #define CONFIGFS_USET_DEFAULT 0x0080 + #define CONFIGFS_USET_DROPPING 0x0100 + #define CONFIGFS_USET_IN_MKDIR 0x0200 + #define CONFIGFS_USET_CREATING 0x0400 +-#define CONFIGFS_NOT_PINNED (CONFIGFS_ITEM_ATTR) ++#define CONFIGFS_NOT_PINNED (CONFIGFS_ITEM_ATTR | CONFIGFS_ITEM_BIN_ATTR) + + extern struct mutex configfs_symlink_mutex; + extern spinlock_t configfs_dirent_lock; +@@ -72,6 +73,8 @@ extern struct inode * configfs_new_inode(umode_t mode, struct configfs_dirent *, + extern int configfs_create(struct dentry *, umode_t mode, void (*init)(struct inode *)); + + extern int configfs_create_file(struct config_item *, const struct configfs_attribute *); ++extern int configfs_create_bin_file(struct config_item *, ++ const struct configfs_bin_attribute *); + extern int configfs_make_dirent(struct configfs_dirent *, + struct dentry *, void *, umode_t, int); + extern int configfs_dirent_is_ready(struct configfs_dirent *); +@@ -88,7 +91,7 @@ extern void configfs_release_fs(void); + extern struct rw_semaphore configfs_rename_sem; + extern const struct file_operations configfs_dir_operations; + extern const struct file_operations configfs_file_operations; +-extern const struct file_operations bin_fops; ++extern const struct file_operations configfs_bin_file_operations; + extern const struct inode_operations configfs_dir_inode_operations; + extern const struct inode_operations configfs_root_inode_operations; + extern const struct inode_operations configfs_symlink_inode_operations; +@@ -119,6 +122,13 @@ static inline struct configfs_attribute * to_attr(struct dentry * dentry) + return ((struct configfs_attribute *) sd->s_element); + } + ++static inline struct configfs_bin_attribute *to_bin_attr(struct dentry *dentry) ++{ ++ struct configfs_attribute *attr = to_attr(dentry); ++ ++ return container_of(attr, struct configfs_bin_attribute, cb_attr); ++} ++ + static inline struct config_item *configfs_get_config_item(struct dentry *dentry) + { + struct config_item * item = NULL; +diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c +index a7a1b21..7ae97e8 100644 +--- a/fs/configfs/dir.c ++++ b/fs/configfs/dir.c +@@ -255,6 +255,12 @@ static void configfs_init_file(struct inode * inode) + inode->i_fop = &configfs_file_operations; + } + ++static void configfs_init_bin_file(struct inode *inode) ++{ ++ inode->i_size = 0; ++ inode->i_fop = &configfs_bin_file_operations; ++} ++ + static void init_symlink(struct inode * inode) + { + inode->i_op = &configfs_symlink_inode_operations; +@@ -423,7 +429,9 @@ static int configfs_attach_attr(struct configfs_dirent * sd, struct dentry * den + spin_unlock(&configfs_dirent_lock); + + error = configfs_create(dentry, (attr->ca_mode & S_IALLUGO) | S_IFREG, +- configfs_init_file); ++ (sd->s_type & CONFIGFS_ITEM_BIN_ATTR) ? ++ configfs_init_bin_file : ++ configfs_init_file); + if (error) { + configfs_put(sd); + return error; +@@ -583,6 +591,7 @@ static int populate_attrs(struct config_item *item) + { + struct config_item_type *t = item->ci_type; + struct configfs_attribute *attr; ++ struct configfs_bin_attribute *bin_attr; + int error = 0; + int i; + +@@ -594,6 +603,13 @@ static int populate_attrs(struct config_item *item) + break; + } + } ++ if (t->ct_bin_attrs) { ++ for (i = 0; (bin_attr = t->ct_bin_attrs[i]) != NULL; i++) { ++ error = configfs_create_bin_file(item, bin_attr); ++ if (error) ++ break; ++ } ++ } + + if (error) + detach_attrs(item); +diff --git a/fs/configfs/file.c b/fs/configfs/file.c +index d39099e..3687187 100644 +--- a/fs/configfs/file.c ++++ b/fs/configfs/file.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -48,6 +49,10 @@ struct configfs_buffer { + struct configfs_item_operations * ops; + struct mutex mutex; + int needs_read_fill; ++ bool read_in_progress; ++ bool write_in_progress; ++ char *bin_buffer; ++ int bin_buffer_size; + }; + + +@@ -123,6 +128,87 @@ out: + return retval; + } + ++/** ++ * configfs_read_bin_file - read a binary attribute. ++ * @file: file pointer. ++ * @buf: buffer to fill. ++ * @count: number of bytes to read. ++ * @ppos: starting offset in file. ++ * ++ * Userspace wants to read a binary attribute file. The attribute ++ * descriptor is in the file's ->d_fsdata. The target item is in the ++ * directory's ->d_fsdata. ++ * ++ * We check whether we need to refill the buffer. If so we will ++ * call the attributes' attr->read() twice. The first time we ++ * will pass a NULL as a buffer pointer, which the attributes' method ++ * will use to return the size of the buffer required. If no error ++ * occurs we will allocate the buffer using vmalloc and call ++ * attr->read() again passing that buffer as an argument. ++ * Then we just copy to user-space using simple_read_from_buffer. ++ */ ++ ++static ssize_t ++configfs_read_bin_file(struct file *file, char __user *buf, ++ size_t count, loff_t *ppos) ++{ ++ struct configfs_buffer *buffer = file->private_data; ++ struct dentry *dentry = file->f_path.dentry; ++ struct config_item *item = to_item(dentry->d_parent); ++ struct configfs_bin_attribute *bin_attr = to_bin_attr(dentry); ++ ssize_t retval = 0; ++ ssize_t len = min_t(size_t, count, PAGE_SIZE); ++ ++ mutex_lock(&buffer->mutex); ++ ++ /* we don't support switching read/write modes */ ++ if (buffer->write_in_progress) { ++ retval = -ETXTBSY; ++ goto out; ++ } ++ buffer->read_in_progress = 1; ++ ++ if (buffer->needs_read_fill) { ++ /* perform first read with buf == NULL to get extent */ ++ len = bin_attr->read(item, NULL, 0); ++ if (len <= 0) { ++ retval = len; ++ goto out; ++ } ++ ++ /* do not exceed the maximum value */ ++ if (bin_attr->cb_max_size && len > bin_attr->cb_max_size) { ++ retval = -EFBIG; ++ goto out; ++ } ++ ++ buffer->bin_buffer = vmalloc(len); ++ if (buffer->bin_buffer == NULL) { ++ retval = -ENOMEM; ++ goto out; ++ } ++ buffer->bin_buffer_size = len; ++ ++ /* perform second read to fill buffer */ ++ len = bin_attr->read(item, buffer->bin_buffer, len); ++ if (len < 0) { ++ retval = len; ++ vfree(buffer->bin_buffer); ++ buffer->bin_buffer_size = 0; ++ buffer->bin_buffer = NULL; ++ goto out; ++ } ++ ++ buffer->needs_read_fill = 0; ++ } ++ ++ retval = simple_read_from_buffer(buf, count, ppos, buffer->bin_buffer, ++ buffer->bin_buffer_size); ++out: ++ mutex_unlock(&buffer->mutex); ++ return retval; ++} ++ + + /** + * fill_write_buffer - copy buffer from userspace. +@@ -209,10 +295,80 @@ configfs_write_file(struct file *file, const char __user *buf, size_t count, lof + return len; + } + +-static int check_perm(struct inode * inode, struct file * file) ++/** ++ * configfs_write_bin_file - write a binary attribute. ++ * @file: file pointer ++ * @buf: data to write ++ * @count: number of bytes ++ * @ppos: starting offset ++ * ++ * Writing to a binary attribute file is similar to a normal read. ++ * We buffer the consecutive writes (binary attribute files do not ++ * support lseek) in a continuously growing buffer, but we don't ++ * commit until the close of the file. ++ */ ++ ++static ssize_t ++configfs_write_bin_file(struct file *file, const char __user *buf, ++ size_t count, loff_t *ppos) ++{ ++ struct configfs_buffer *buffer = file->private_data; ++ struct dentry *dentry = file->f_path.dentry; ++ struct configfs_bin_attribute *bin_attr = to_bin_attr(dentry); ++ void *tbuf = NULL; ++ ssize_t len; ++ ++ mutex_lock(&buffer->mutex); ++ ++ /* we don't support switching read/write modes */ ++ if (buffer->read_in_progress) { ++ len = -ETXTBSY; ++ goto out; ++ } ++ buffer->write_in_progress = 1; ++ ++ /* buffer grows? */ ++ if (*ppos + count > buffer->bin_buffer_size) { ++ ++ if (bin_attr->cb_max_size && ++ *ppos + count > bin_attr->cb_max_size) { ++ len = -EFBIG; ++ } ++ ++ tbuf = vmalloc(*ppos + count); ++ if (tbuf == NULL) { ++ len = -ENOMEM; ++ goto out; ++ } ++ ++ /* copy old contents */ ++ if (buffer->bin_buffer) { ++ memcpy(tbuf, buffer->bin_buffer, ++ buffer->bin_buffer_size); ++ vfree(buffer->bin_buffer); ++ } ++ ++ /* clear the new area */ ++ memset(tbuf + buffer->bin_buffer_size, 0, ++ *ppos + count - buffer->bin_buffer_size); ++ buffer->bin_buffer = tbuf; ++ buffer->bin_buffer_size = *ppos + count; ++ } ++ ++ len = simple_write_to_buffer(buffer->bin_buffer, ++ buffer->bin_buffer_size, ppos, buf, count); ++ if (len > 0) ++ *ppos += len; ++out: ++ mutex_unlock(&buffer->mutex); ++ return len; ++} ++ ++static int check_perm(struct inode * inode, struct file * file, int type) + { + struct config_item *item = configfs_get_config_item(file->f_path.dentry->d_parent); + struct configfs_attribute * attr = to_attr(file->f_path.dentry); ++ struct configfs_bin_attribute *bin_attr = NULL; + struct configfs_buffer * buffer; + struct configfs_item_operations * ops = NULL; + int error = 0; +@@ -220,6 +376,9 @@ static int check_perm(struct inode * inode, struct file * file) + if (!item || !attr) + goto Einval; + ++ if (type & CONFIGFS_ITEM_BIN_ATTR) ++ bin_attr = to_bin_attr(file->f_path.dentry); ++ + /* Grab the module reference for this attribute if we have one */ + if (!try_module_get(attr->ca_owner)) { + error = -ENODEV; +@@ -236,9 +395,14 @@ static int check_perm(struct inode * inode, struct file * file) + * and we must have a store method. + */ + if (file->f_mode & FMODE_WRITE) { +- if (!(inode->i_mode & S_IWUGO) || !attr->store) ++ if (!(inode->i_mode & S_IWUGO)) ++ goto Eaccess; ++ ++ if ((type & CONFIGFS_ITEM_ATTR) && !attr->store) + goto Eaccess; + ++ if ((type & CONFIGFS_ITEM_BIN_ATTR) && !bin_attr->write) ++ goto Eaccess; + } + + /* File needs read support. +@@ -246,7 +410,13 @@ static int check_perm(struct inode * inode, struct file * file) + * must be a show method for it. + */ + if (file->f_mode & FMODE_READ) { +- if (!(inode->i_mode & S_IRUGO) || !attr->show) ++ if (!(inode->i_mode & S_IRUGO)) ++ goto Eaccess; ++ ++ if ((type & CONFIGFS_ITEM_ATTR) && !attr->show) ++ goto Eaccess; ++ ++ if ((type & CONFIGFS_ITEM_BIN_ATTR) && !bin_attr->read) + goto Eaccess; + } + +@@ -260,6 +430,8 @@ static int check_perm(struct inode * inode, struct file * file) + } + mutex_init(&buffer->mutex); + buffer->needs_read_fill = 1; ++ buffer->read_in_progress = 0; ++ buffer->write_in_progress = 0; + buffer->ops = ops; + file->private_data = buffer; + goto Done; +@@ -277,12 +449,7 @@ static int check_perm(struct inode * inode, struct file * file) + return error; + } + +-static int configfs_open_file(struct inode * inode, struct file * filp) +-{ +- return check_perm(inode,filp); +-} +- +-static int configfs_release(struct inode * inode, struct file * filp) ++static int configfs_release(struct inode *inode, struct file *filp) + { + struct config_item * item = to_item(filp->f_path.dentry->d_parent); + struct configfs_attribute * attr = to_attr(filp->f_path.dentry); +@@ -303,6 +470,47 @@ static int configfs_release(struct inode * inode, struct file * filp) + return 0; + } + ++static int configfs_open_file(struct inode *inode, struct file *filp) ++{ ++ return check_perm(inode, filp, CONFIGFS_ITEM_ATTR); ++} ++ ++static int configfs_open_bin_file(struct inode *inode, struct file *filp) ++{ ++ return check_perm(inode, filp, CONFIGFS_ITEM_BIN_ATTR); ++} ++ ++static int configfs_release_bin_file(struct inode *inode, struct file *filp) ++{ ++ struct configfs_buffer *buffer = filp->private_data; ++ struct dentry *dentry = filp->f_path.dentry; ++ struct config_item *item = to_item(dentry->d_parent); ++ struct configfs_bin_attribute *bin_attr = to_bin_attr(dentry); ++ ssize_t len = 0; ++ int ret; ++ ++ buffer->read_in_progress = 0; ++ ++ if (buffer->write_in_progress) { ++ buffer->write_in_progress = 0; ++ ++ len = bin_attr->write(item, buffer->bin_buffer, ++ buffer->bin_buffer_size); ++ ++ /* vfree on NULL is safe */ ++ vfree(buffer->bin_buffer); ++ buffer->bin_buffer = NULL; ++ buffer->bin_buffer_size = 0; ++ buffer->needs_read_fill = 1; ++ } ++ ++ ret = configfs_release(inode, filp); ++ if (len < 0) ++ return len; ++ return ret; ++} ++ ++ + const struct file_operations configfs_file_operations = { + .read = configfs_read_file, + .write = configfs_write_file, +@@ -311,6 +519,14 @@ const struct file_operations configfs_file_operations = { + .release = configfs_release, + }; + ++const struct file_operations configfs_bin_file_operations = { ++ .read = configfs_read_bin_file, ++ .write = configfs_write_bin_file, ++ .llseek = NULL, /* bin file is not seekable */ ++ .open = configfs_open_bin_file, ++ .release = configfs_release_bin_file, ++}; ++ + /** + * configfs_create_file - create an attribute file for an item. + * @item: item we're creating for. +@@ -332,3 +548,24 @@ int configfs_create_file(struct config_item * item, const struct configfs_attrib + return error; + } + ++/** ++ * configfs_create_bin_file - create a binary attribute file for an item. ++ * @item: item we're creating for. ++ * @attr: atrribute descriptor. ++ */ ++ ++int configfs_create_bin_file(struct config_item *item, ++ const struct configfs_bin_attribute *bin_attr) ++{ ++ struct dentry *dir = item->ci_dentry; ++ struct configfs_dirent *parent_sd = dir->d_fsdata; ++ umode_t mode = (bin_attr->cb_attr.ca_mode & S_IALLUGO) | S_IFREG; ++ int error = 0; ++ ++ mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_NORMAL); ++ error = configfs_make_dirent(parent_sd, NULL, (void *) bin_attr, mode, ++ CONFIGFS_ITEM_BIN_ATTR); ++ mutex_unlock(&dir->d_inode->i_mutex); ++ ++ return error; ++} +diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c +index eae8757..0cc810e 100644 +--- a/fs/configfs/inode.c ++++ b/fs/configfs/inode.c +@@ -218,7 +218,7 @@ const unsigned char * configfs_get_name(struct configfs_dirent *sd) + if (sd->s_type & (CONFIGFS_DIR | CONFIGFS_ITEM_LINK)) + return sd->s_dentry->d_name.name; + +- if (sd->s_type & CONFIGFS_ITEM_ATTR) { ++ if (sd->s_type & (CONFIGFS_ITEM_ATTR | CONFIGFS_ITEM_BIN_ATTR)) { + attr = sd->s_element; + return attr->ca_name; + } +diff --git a/include/linux/configfs.h b/include/linux/configfs.h +index 758a029..f7300d0 100644 +--- a/include/linux/configfs.h ++++ b/include/linux/configfs.h +@@ -51,6 +51,7 @@ struct module; + struct configfs_item_operations; + struct configfs_group_operations; + struct configfs_attribute; ++struct configfs_bin_attribute; + struct configfs_subsystem; + + struct config_item { +@@ -84,6 +85,7 @@ struct config_item_type { + struct configfs_item_operations *ct_item_ops; + struct configfs_group_operations *ct_group_ops; + struct configfs_attribute **ct_attrs; ++ struct configfs_bin_attribute **ct_bin_attrs; + }; + + /** +@@ -154,6 +156,54 @@ static struct configfs_attribute _pfx##attr_##_name = { \ + .store = _pfx##_name##_store, \ + } + ++struct file; ++struct vm_area_struct; ++ ++struct configfs_bin_attribute { ++ struct configfs_attribute cb_attr; /* std. attribute */ ++ void *cb_private; /* for user */ ++ size_t cb_max_size; /* max core size */ ++ ssize_t (*read)(struct config_item *, void *, size_t); ++ ssize_t (*write)(struct config_item *, const void *, size_t); ++}; ++ ++#define CONFIGFS_BIN_ATTR(_pfx, _name, _priv, _maxsz) \ ++static struct configfs_bin_attribute _pfx##attr_##_name = { \ ++ .cb_attr = { \ ++ .ca_name = __stringify(_name), \ ++ .ca_mode = S_IRUGO | S_IWUSR, \ ++ .ca_owner = THIS_MODULE, \ ++ }, \ ++ .cb_private = _priv, \ ++ .cb_max_size = _maxsz, \ ++ .read = _pfx##_name##_read, \ ++ .write = _pfx##_name##_write, \ ++} ++ ++#define CONFIGFS_BIN_ATTR_RO(_pfx, _name, _priv, _maxsz) \ ++static struct configfs_attribute _pfx##attr_##_name = { \ ++ .cb_attr = { \ ++ .ca_name = __stringify(_name), \ ++ .ca_mode = S_IRUGO, \ ++ .ca_owner = THIS_MODULE, \ ++ }, \ ++ .cb_private = _priv, \ ++ .cb_max_size = _maxsz, \ ++ .read = _pfx##_name##_read, \ ++} ++ ++#define CONFIGFS_BIN_ATTR_WO(_pfx, _name, _priv, _maxsz) \ ++static struct configfs_attribute _pfx##attr_##_name = { \ ++ .cb_attr = { \ ++ .ca_name = __stringify(_name), \ ++ .ca_mode = S_IWUSR, \ ++ .ca_owner = THIS_MODULE, \ ++ }, \ ++ .cb_private = _priv, \ ++ .cb_max_size = _maxsz, \ ++ .write = _pfx##_name##_write, \ ++} ++ + /* + * If allow_link() exists, the item can symlink(2) out to other + * items. If the item is a group, it may support mkdir(2). +-- +2.5.0 + + +From 8fcd978e0a8d736f1c397a61e571ff6885148561 Mon Sep 17 00:00:00 2001 +From: Pantelis Antoniou +Date: Wed, 3 Dec 2014 13:23:28 +0200 +Subject: [PATCH 175/181] 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. + +Original commit message: + +Add a runtime interface to using configfs for generic device tree overlay +usage. With it its possible to use device tree overlays without having +to use a per-platform overlay manager. + +Please see Documentation/devicetree/configfs-overlays.txt for more info. + +Changes since v2: +- Removed ifdef CONFIG_OF_OVERLAY (since for now it's required) +- Created a documentation entry +- Slight rewording in Kconfig + +Changes since v1: +- of_resolve() -> of_resolve_phandles(). + +Originally-signed-off-by: Pantelis Antoniou +Signed-off-by: Phil Elwell +--- + Documentation/devicetree/configfs-overlays.txt | 31 +++ + drivers/of/Kconfig | 7 + + drivers/of/Makefile | 1 + + drivers/of/configfs.c | 314 +++++++++++++++++++++++++ + 4 files changed, 353 insertions(+) + create mode 100644 Documentation/devicetree/configfs-overlays.txt + create mode 100644 drivers/of/configfs.c + +diff --git a/Documentation/devicetree/configfs-overlays.txt b/Documentation/devicetree/configfs-overlays.txt +new file mode 100644 +index 0000000..5fa43e0 +--- /dev/null ++++ b/Documentation/devicetree/configfs-overlays.txt +@@ -0,0 +1,31 @@ ++Howto use the configfs overlay interface. ++ ++A device-tree configfs entry is created in /config/device-tree/overlays ++and and it is manipulated using standard file system I/O. ++Note that this is a debug level interface, for use by developers and ++not necessarily something accessed by normal users due to the ++security implications of having direct access to the kernel's device tree. ++ ++* To create an overlay you mkdir the directory: ++ ++ # mkdir /config/device-tree/overlays/foo ++ ++* Either you echo the overlay firmware file to the path property file. ++ ++ # echo foo.dtbo >/config/device-tree/overlays/foo/path ++ ++* Or you cat the contents of the overlay to the dtbo file ++ ++ # cat foo.dtbo >/config/device-tree/overlays/foo/dtbo ++ ++The overlay file will be applied, and devices will be created/destroyed ++as required. ++ ++To remove it simply rmdir the directory. ++ ++ # rmdir /config/device-tree/overlays/foo ++ ++The rationalle of the dual interface (firmware & direct copy) is that each is ++better suited to different use patterns. The firmware interface is what's ++intended to be used by hardware managers in the kernel, while the copy interface ++make sense for developers (since it avoids problems with namespaces). +diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig +index e2a4841..7e5e6c4 100644 +--- a/drivers/of/Kconfig ++++ b/drivers/of/Kconfig +@@ -112,4 +112,11 @@ config OF_OVERLAY + While this option is selected automatically when needed, you can + enable it manually to improve device tree unit test coverage. + ++config OF_CONFIGFS ++ bool "Device Tree Overlay ConfigFS interface" ++ select CONFIGFS_FS ++ select OF_OVERLAY ++ help ++ Enable a simple user-space driven DT overlay interface. ++ + endif # OF +diff --git a/drivers/of/Makefile b/drivers/of/Makefile +index 156c072..46c8f57 100644 +--- a/drivers/of/Makefile ++++ b/drivers/of/Makefile +@@ -1,4 +1,5 @@ + obj-y = base.o device.o platform.o ++obj-$(CONFIG_OF_CONFIGFS) += configfs.o + obj-$(CONFIG_OF_DYNAMIC) += dynamic.o + obj-$(CONFIG_OF_FLATTREE) += fdt.o + obj-$(CONFIG_OF_EARLY_FLATTREE) += fdt_address.o +diff --git a/drivers/of/configfs.c b/drivers/of/configfs.c +new file mode 100644 +index 0000000..7b66deb +--- /dev/null ++++ b/drivers/of/configfs.c +@@ -0,0 +1,314 @@ ++/* ++ * Configfs entries for device-tree ++ * ++ * Copyright (C) 2013 - Pantelis Antoniou ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version ++ * 2 of the License, or (at your option) any later version. ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "of_private.h" ++ ++struct cfs_overlay_item { ++ struct config_item item; ++ ++ char path[PATH_MAX]; ++ ++ const struct firmware *fw; ++ struct device_node *overlay; ++ int ov_id; ++ ++ void *dtbo; ++ int dtbo_size; ++}; ++ ++static int create_overlay(struct cfs_overlay_item *overlay, void *blob) ++{ ++ int err; ++ ++ /* unflatten the tree */ ++ of_fdt_unflatten_tree(blob, &overlay->overlay); ++ if (overlay->overlay == NULL) { ++ pr_err("%s: failed to unflatten tree\n", __func__); ++ err = -EINVAL; ++ goto out_err; ++ } ++ pr_debug("%s: unflattened OK\n", __func__); ++ ++ /* mark it as detached */ ++ of_node_set_flag(overlay->overlay, OF_DETACHED); ++ ++ /* perform resolution */ ++ err = of_resolve_phandles(overlay->overlay); ++ if (err != 0) { ++ pr_err("%s: Failed to resolve tree\n", __func__); ++ goto out_err; ++ } ++ pr_debug("%s: resolved OK\n", __func__); ++ ++ err = of_overlay_create(overlay->overlay); ++ if (err < 0) { ++ pr_err("%s: Failed to create overlay (err=%d)\n", ++ __func__, err); ++ goto out_err; ++ } ++ overlay->ov_id = err; ++ ++out_err: ++ return err; ++} ++ ++static inline struct cfs_overlay_item *to_cfs_overlay_item( ++ struct config_item *item) ++{ ++ return item ? container_of(item, struct cfs_overlay_item, item) : NULL; ++} ++ ++static ssize_t cfs_overlay_item_path_show(struct config_item *item, ++ char *page) ++{ ++ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item); ++ return sprintf(page, "%s\n", overlay->path); ++} ++ ++static ssize_t cfs_overlay_item_path_store(struct config_item *item, ++ const char *page, size_t count) ++{ ++ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item); ++ const char *p = page; ++ char *s; ++ int err; ++ ++ /* if it's set do not allow changes */ ++ if (overlay->path[0] != '\0' || overlay->dtbo_size > 0) ++ return -EPERM; ++ ++ /* copy to path buffer (and make sure it's always zero terminated */ ++ count = snprintf(overlay->path, sizeof(overlay->path) - 1, "%s", p); ++ overlay->path[sizeof(overlay->path) - 1] = '\0'; ++ ++ /* strip trailing newlines */ ++ s = overlay->path + strlen(overlay->path); ++ while (s > overlay->path && *--s == '\n') ++ *s = '\0'; ++ ++ pr_debug("%s: path is '%s'\n", __func__, overlay->path); ++ ++ err = request_firmware(&overlay->fw, overlay->path, NULL); ++ if (err != 0) ++ goto out_err; ++ ++ err = create_overlay(overlay, (void *)overlay->fw->data); ++ if (err != 0) ++ goto out_err; ++ ++ return count; ++ ++out_err: ++ ++ release_firmware(overlay->fw); ++ overlay->fw = NULL; ++ ++ overlay->path[0] = '\0'; ++ return err; ++} ++ ++static ssize_t cfs_overlay_item_status_show(struct config_item *item, ++ char *page) ++{ ++ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item); ++ ++ return sprintf(page, "%s\n", ++ overlay->ov_id >= 0 ? "applied" : "unapplied"); ++} ++ ++CONFIGFS_ATTR(cfs_overlay_item_, path); ++CONFIGFS_ATTR_RO(cfs_overlay_item_, status); ++ ++static struct configfs_attribute *cfs_overlay_attrs[] = { ++ &cfs_overlay_item_attr_path, ++ &cfs_overlay_item_attr_status, ++ NULL, ++}; ++ ++ssize_t cfs_overlay_item_dtbo_read(struct config_item *item, ++ void *buf, size_t max_count) ++{ ++ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item); ++ ++ pr_debug("%s: buf=%p max_count=%u\n", __func__, ++ buf, max_count); ++ ++ if (overlay->dtbo == NULL) ++ return 0; ++ ++ /* copy if buffer provided */ ++ if (buf != NULL) { ++ /* the buffer must be large enough */ ++ if (overlay->dtbo_size > max_count) ++ return -ENOSPC; ++ ++ memcpy(buf, overlay->dtbo, overlay->dtbo_size); ++ } ++ ++ return overlay->dtbo_size; ++} ++ ++ssize_t cfs_overlay_item_dtbo_write(struct config_item *item, ++ const void *buf, size_t count) ++{ ++ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item); ++ int err; ++ ++ /* if it's set do not allow changes */ ++ if (overlay->path[0] != '\0' || overlay->dtbo_size > 0) ++ return -EPERM; ++ ++ /* copy the contents */ ++ overlay->dtbo = kmemdup(buf, count, GFP_KERNEL); ++ if (overlay->dtbo == NULL) ++ return -ENOMEM; ++ ++ overlay->dtbo_size = count; ++ ++ err = create_overlay(overlay, overlay->dtbo); ++ if (err != 0) ++ goto out_err; ++ ++ return count; ++ ++out_err: ++ kfree(overlay->dtbo); ++ overlay->dtbo = NULL; ++ overlay->dtbo_size = 0; ++ ++ return err; ++} ++ ++CONFIGFS_BIN_ATTR(cfs_overlay_item_, dtbo, NULL, SZ_1M); ++ ++static struct configfs_bin_attribute *cfs_overlay_bin_attrs[] = { ++ &cfs_overlay_item_attr_dtbo, ++ NULL, ++}; ++ ++static void cfs_overlay_release(struct config_item *item) ++{ ++ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item); ++ ++ if (overlay->ov_id >= 0) ++ of_overlay_destroy(overlay->ov_id); ++ if (overlay->fw) ++ release_firmware(overlay->fw); ++ /* kfree with NULL is safe */ ++ kfree(overlay->dtbo); ++ kfree(overlay); ++} ++ ++static struct configfs_item_operations cfs_overlay_item_ops = { ++ .release = cfs_overlay_release, ++}; ++ ++static struct config_item_type cfs_overlay_type = { ++ .ct_item_ops = &cfs_overlay_item_ops, ++ .ct_attrs = cfs_overlay_attrs, ++ .ct_bin_attrs = cfs_overlay_bin_attrs, ++ .ct_owner = THIS_MODULE, ++}; ++ ++static struct config_item *cfs_overlay_group_make_item( ++ struct config_group *group, const char *name) ++{ ++ struct cfs_overlay_item *overlay; ++ ++ overlay = kzalloc(sizeof(*overlay), GFP_KERNEL); ++ if (!overlay) ++ return ERR_PTR(-ENOMEM); ++ overlay->ov_id = -1; ++ ++ config_item_init_type_name(&overlay->item, name, &cfs_overlay_type); ++ return &overlay->item; ++} ++ ++static void cfs_overlay_group_drop_item(struct config_group *group, ++ struct config_item *item) ++{ ++ struct cfs_overlay_item *overlay = to_cfs_overlay_item(item); ++ ++ config_item_put(&overlay->item); ++} ++ ++static struct configfs_group_operations overlays_ops = { ++ .make_item = cfs_overlay_group_make_item, ++ .drop_item = cfs_overlay_group_drop_item, ++}; ++ ++static struct config_item_type overlays_type = { ++ .ct_group_ops = &overlays_ops, ++ .ct_owner = THIS_MODULE, ++}; ++ ++static struct configfs_group_operations of_cfs_ops = { ++ /* empty - we don't allow anything to be created */ ++}; ++ ++static struct config_item_type of_cfs_type = { ++ .ct_group_ops = &of_cfs_ops, ++ .ct_owner = THIS_MODULE, ++}; ++ ++struct config_group of_cfs_overlay_group; ++ ++struct config_group *of_cfs_def_groups[] = { ++ &of_cfs_overlay_group, ++ NULL ++}; ++ ++static struct configfs_subsystem of_cfs_subsys = { ++ .su_group = { ++ .cg_item = { ++ .ci_namebuf = "device-tree", ++ .ci_type = &of_cfs_type, ++ }, ++ .default_groups = of_cfs_def_groups, ++ }, ++ .su_mutex = __MUTEX_INITIALIZER(of_cfs_subsys.su_mutex), ++}; ++ ++static int __init of_cfs_init(void) ++{ ++ int ret; ++ ++ pr_info("%s\n", __func__); ++ ++ config_group_init(&of_cfs_subsys.su_group); ++ config_group_init_type_name(&of_cfs_overlay_group, "overlays", ++ &overlays_type); ++ ++ ret = configfs_register_subsystem(&of_cfs_subsys); ++ if (ret != 0) { ++ pr_err("%s: failed to register subsys\n", __func__); ++ goto out; ++ } ++ pr_info("%s: OK\n", __func__); ++out: ++ return ret; ++} ++late_initcall(of_cfs_init); +-- +2.5.0 + + +From 5a1bb771e1720a2650342b234ec18931cbcf34ef Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 13 Mar 2015 12:43:36 +0000 +Subject: [PATCH 176/181] Protect __release_resource against resources without + parents + +Without this patch, removing a device tree overlay can crash here. + +Signed-off-by: Phil Elwell +--- + kernel/resource.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/kernel/resource.c b/kernel/resource.c +index 249b1eb..eb973a53 100644 +--- a/kernel/resource.c ++++ b/kernel/resource.c +@@ -237,6 +237,12 @@ static int __release_resource(struct resource *old) + { + struct resource *tmp, **p; + ++ if (!old->parent) { ++ WARN(old->sibling, "sibling but no parent"); ++ if (old->sibling) ++ return -EINVAL; ++ return 0; ++ } + p = &old->parent->child; + for (;;) { + tmp = *p; +-- +2.5.0 + + +From ad6c79879fc15268a42dcd62911ba7950690e75a Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 13 Mar 2015 20:00:21 +0000 +Subject: [PATCH 177/181] BCM270X_DT: Add a .dtbo target, use for overlays + +Change the filenames and extensions to keep the pre-DDT style of +overlay (-overlay.dtb) distinct from new ones that use a +different style of local fixups (.dtbo), and to match other +platforms. + +The RPi firmware uses the DDTK trailer atom to choose which type of +overlay to use for each kernel. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/.gitignore | 2 +- + arch/arm/boot/dts/overlays/Makefile | 135 +++++++++++++++++------------------- + scripts/Makefile.lib | 10 +++ + 3 files changed, 76 insertions(+), 71 deletions(-) + +diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore +index 3c79f85..eaaeb17 100644 +--- a/arch/arm/boot/.gitignore ++++ b/arch/arm/boot/.gitignore +@@ -3,4 +3,4 @@ zImage + xipImage + bootpImage + uImage +-*.dtb ++*.dtb* +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 687cc7c..d81fa09 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -12,78 +12,73 @@ ifeq ($(CONFIG_ARCH_BCM2835),y) + RPI_DT_OVERLAYS=y + endif + +-dtb-$(RPI_DT_OVERLAYS) += ads7846-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += at86rf233-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += dwc2-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += dwc-otg-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += dht11-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += enc28j60-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += gpio-ir-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += gpio-poweroff-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += hifiberry-amp-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += hifiberry-dac-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += hifiberry-dacplus-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += hifiberry-digi-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += hy28a-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += hy28b-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += i2c-rtc-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += i2c-gpio-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += i2c0-bcm2708-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += i2c1-bcm2708-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += i2s-mmap-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += iqaudio-dac-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += iqaudio-dacplus-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += lirc-rpi-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += mcp2515-can0-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += mcp2515-can1-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += pi3-disable-bt-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += pi3-miniuart-bt-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += pitft28-resistive-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += pwm-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += pwm-2chan-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += raspidac3-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += rpi-backlight-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += rpi-dac-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += rpi-display-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += rpi-ft5406-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += rpi-proto-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += rpi-sense-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += sdhost-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += sdio-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += sdtweak-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += smi-dev-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += smi-nand-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += smi-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += spi1-1cs-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += spi1-2cs-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += spi1-3cs-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += spi2-1cs-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += spi2-2cs-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += spi2-3cs-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += spi-gpio35-39-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += tinylcd35-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += uart1-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += vc4-kms-v3d-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += vga666-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += w1-gpio-overlay.dtb +-dtb-$(RPI_DT_OVERLAYS) += w1-gpio-pullup-overlay.dtb ++dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += dwc2.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += dwc-otg.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += dht11.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += enc28j60.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += gpio-ir.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += gpio-poweroff.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += hifiberry-amp.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += hifiberry-dac.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += hifiberry-dacplus.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += hifiberry-digi.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += hy28a.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += hy28b.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += i2c-rtc.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += i2c-gpio.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += i2c0-bcm2708.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += i2c1-bcm2708.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += i2s-mmap.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dac.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dacplus.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += lirc-rpi.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can0.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can1.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += mmc.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += mz61581.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += pi3-disable-bt.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += pi3-miniuart-bt.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += piscreen.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += piscreen2r.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += pitft28-capacitive.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += pitft28-resistive.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += pps-gpio.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += pwm.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += pwm-2chan.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += raspidac3.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += rpi-backlight.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += rpi-dac.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += rpi-display.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += rpi-ft5406.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += rpi-proto.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += rpi-sense.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += sdhost.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += sdio.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += sdtweak.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += smi-dev.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += smi-nand.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += smi.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi1-1cs.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi1-2cs.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi1-3cs.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi2-1cs.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi2-2cs.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi2-3cs.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += spi-gpio35-39.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += tinylcd35.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += uart1.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += vc4-kms-v3d.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += vga666.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += w1-gpio.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += w1-gpio-pullup.dtbo + + targets += dtbs dtbs_install +-targets += $(dtb-y) ++targets += $(dtbo-y) + + endif + +-always := $(dtb-y) +-clean-files := *.dtb +- +-# Enable fixups to support overlays on BCM2708 platforms +-ifeq ($(RPI_DT_OVERLAYS),y) +- DTC_FLAGS ?= -@ +-endif ++always := $(dtbo-y) ++clean-files := *.dtbo +diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib +index 79e8661..7209d622 100644 +--- a/scripts/Makefile.lib ++++ b/scripts/Makefile.lib +@@ -292,6 +292,16 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ + $(obj)/%.dtb: $(src)/%.dts FORCE + $(call if_changed_dep,dtc) + ++quiet_cmd_dtco = DTCO $@ ++cmd_dtco = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ ++ $(objtree)/scripts/dtc/dtc -@ -O dtb -o $@ -b 0 \ ++ -i $(dir $<) $(DTC_FLAGS) \ ++ -d $(depfile).dtc.tmp $(dtc-tmp) ; \ ++ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) ++ ++$(obj)/%.dtbo: $(src)/%-overlay.dts FORCE ++ $(call if_changed_dep,dtco) ++ + dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) + + # Bzip2 +-- +2.5.0 + + +From 8796451eac76c5af336741713c9b38da6945ba84 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 29 May 2015 11:18:58 +0100 +Subject: [PATCH 178/181] scripts/knlinfo: Decode DDTK atom + +Show the DDTK atom as being a boolean. + +Signed-off-by: Phil Elwell +--- + scripts/knlinfo | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/scripts/knlinfo b/scripts/knlinfo +index b9ef124..263ec93 100755 +--- a/scripts/knlinfo ++++ b/scripts/knlinfo +@@ -16,6 +16,7 @@ my $trailer_magic = 'RPTL'; + + my %atom_formats = + ( ++ 'DDTK' => \&format_bool, + 'DTOK' => \&format_bool, + 'KVer' => \&format_string, + '270X' => \&format_bool, +@@ -148,7 +149,7 @@ sub format_atom + sub format_bool + { + my ($data) = @_; +- return unpack('V', $data) ? 'true' : 'false'; ++ return unpack('V', $data) ? 'y' : 'n'; + } + + sub format_int +-- +2.5.0 + + +From b52a154f8d805a5a712f5bb95c8ffff21637907f Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 29 May 2015 11:48:59 +0100 +Subject: [PATCH 179/181] Enable Dynamic Device Tree for bcmrpi_defconfig and + bcm2709_defconfig + +Signed-off-by: Phil Elwell +--- + arch/arm/configs/bcm2709_defconfig | 2 +- + arch/arm/configs/bcmrpi_defconfig | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 7793baf..0fff5a3 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -403,6 +403,7 @@ CONFIG_MTD=m + CONFIG_MTD_BLOCK=m + CONFIG_MTD_NAND=m + CONFIG_MTD_UBI=m ++CONFIG_OF_CONFIGFS=y + CONFIG_ZRAM=m + CONFIG_ZRAM_LZ4_COMPRESS=y + CONFIG_BLK_DEV_LOOP=y +@@ -1161,7 +1162,6 @@ CONFIG_NTFS_FS=m + CONFIG_NTFS_RW=y + CONFIG_TMPFS=y + CONFIG_TMPFS_POSIX_ACL=y +-CONFIG_CONFIGFS_FS=y + CONFIG_ECRYPT_FS=m + CONFIG_HFS_FS=m + CONFIG_HFSPLUS_FS=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index f09be87..2db41e6 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -396,6 +396,7 @@ CONFIG_MTD=m + CONFIG_MTD_BLOCK=m + CONFIG_MTD_NAND=m + CONFIG_MTD_UBI=m ++CONFIG_OF_OVERLAY=y + CONFIG_ZRAM=m + CONFIG_ZRAM_LZ4_COMPRESS=y + CONFIG_BLK_DEV_LOOP=y +-- +2.5.0 + + +From b8430f4f0266adc5e47eedd6075cc9c642857bb2 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Sun, 13 Mar 2016 16:14:44 +0000 +Subject: [PATCH 180/181] SQUASH: Add CONFIG_OF_CONFIGFS to bcmrpi_defconfig + +Signed-off-by: Phil Elwell +--- + arch/arm/configs/bcmrpi_defconfig | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 2db41e6..74149cf 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -396,7 +396,7 @@ CONFIG_MTD=m + CONFIG_MTD_BLOCK=m + CONFIG_MTD_NAND=m + CONFIG_MTD_UBI=m +-CONFIG_OF_OVERLAY=y ++CONFIG_OF_CONFIGFS=y + CONFIG_ZRAM=m + CONFIG_ZRAM_LZ4_COMPRESS=y + CONFIG_BLK_DEV_LOOP=y +@@ -1169,7 +1169,6 @@ CONFIG_NTFS_FS=m + CONFIG_NTFS_RW=y + CONFIG_TMPFS=y + CONFIG_TMPFS_POSIX_ACL=y +-CONFIG_CONFIGFS_FS=y + CONFIG_ECRYPT_FS=m + CONFIG_HFS_FS=m + CONFIG_HFSPLUS_FS=m +-- +2.5.0 + + +From 9453a7778a3b6d0ecc1878d451a22616e1248d4b Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 14 Mar 2016 16:56:54 +0000 +Subject: [PATCH 181/181] dts, kbuild: dtbs_install installs .dtbo files too + +Signed-off-by: Phil Elwell +--- + scripts/Makefile.dtbinst | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst +index 1c15717..43647b3 100644 +--- a/scripts/Makefile.dtbinst ++++ b/scripts/Makefile.dtbinst +@@ -29,6 +29,7 @@ ifeq ("$(dtbinst-root)", "$(obj)") + endif + + dtbinst-files := $(dtb-y) ++dtboinst-files := $(dtbo-y) + dtbinst-dirs := $(dts-dirs) + + # Helper targets for Installing DTBs into the boot directory +@@ -37,15 +38,18 @@ quiet_cmd_dtb_install = INSTALL $< + + install-dir = $(patsubst $(dtbinst-root)%,$(INSTALL_DTBS_PATH)%,$(obj)) + +-$(dtbinst-files) $(dtbinst-dirs): | __dtbs_install_prep ++$(dtbinst-files) $(dtboinst-files) $(dtbinst-dirs): | __dtbs_install_prep + + $(dtbinst-files): %.dtb: $(obj)/%.dtb + $(call cmd,dtb_install,$(install-dir)) + ++$(dtboinst-files): %.dtbo: $(obj)/%.dtbo ++ $(call cmd,dtb_install,$(install-dir)) ++ + $(dtbinst-dirs): + $(Q)$(MAKE) $(dtbinst)=$(obj)/$@ + +-PHONY += $(dtbinst-files) $(dtbinst-dirs) +-__dtbs_install: $(dtbinst-files) $(dtbinst-dirs) ++PHONY += $(dtbinst-files) $(dtboinst-files) $(dtbinst-dirs) ++__dtbs_install: $(dtbinst-files) $(dtboinst-files) $(dtbinst-dirs) + + .PHONY: $(PHONY) +-- +2.5.0 +